1 Star 3 Fork 0

癸亥王/wang_calendar

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

=======

wang_calendar

介绍

vue3 + ts 日历日程组件 采用 vue + ts 完成整个项目,可以用在vue项目中

安装教程

1. 安装

# yarn
yarn install wang-calendar
# npm
npm i wang-calendar
# pnpm
pnpm install wang-calendar

2. 注册组件

// 全局注册使用 main.js
import WangCalendar from 'wang-calendar'
import 'wang-calendar/style.css'

app.use(WangCalendar)

// 局部注册使用  App.vue
import { WangCalendar, WangScrollbar } from 'wang-calendar'
import 'wang-calendar/style.css'

3. 使用

<wang-calendar v-model="date" :events="events" />
<WangScrollbar :height?="xxx" :width?="xxx">
    <!-- 你的内容 -->
</WangScrollbar>

使用说明

1. 属性

属性名 说明 类型 可选值 默认值
v-model 日期 Date - new Date()
events 日程 { id: number, begin: string, end: string, title: string,[key: string]: any }[] - -
height 组件高度 number >=500 500

2. 事件

事件名 说明 回调参数
clickDays 当用户点击日期单元格的时候触发 { day: string, date: Date }
clickEvents 当用户点击日程显示块的时候触发 { index: number, id: number }

3. 插槽

名称 说明
day 日历在月份视图下日期单元格显示自定义内容,参数为{ type?: 'prev' | 'current' | 'next', day: string, date: Date, isSelected?: boolean, isToday?: boolean }
MIT License Copyright (c) 2023 癸亥王 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

vue3 + ts 日历日程组件 展开 收起
JavaScript 等 4 种语言
MIT
取消

发行版 (1)

全部
2年前

贡献者 (1)

全部

近期动态

1年前推送了新的提交到 master 分支,2fc11f7...db1524c
2年前推送了新的提交到 master 分支,8682a77...2fc11f7
2年前推送了新的提交到 master 分支,0e96fb8...8682a77
2年前推送了新的提交到 master 分支,f2de77d...0e96fb8
2年前推送了新的提交到 master 分支,a4cd684...f2de77d
加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/laoyaowang/wang_calendar.git
git@gitee.com:laoyaowang/wang_calendar.git
laoyaowang
wang_calendar
wang_calendar
master

搜索帮助