0.1.4 • Published 3 years ago
yzg-calendar v0.1.4
yzg-calendar
npm下载
npm install yzg-calendar -S
全局安装
import {Calendar, DayCalendar, WeekCalendar, MonthCalendar } from 'yzg-calendar';
Vue.use(Calendar);
Vue.use(DayCalendar);
Vue.use(WeekCalendar);
Vue.use(MonthCalendar);
单独引用
import Calendar form 'yzg-calendar/packages/calendar'
import DayCalendar form 'yzg-calendar/packages/day-calendar'
import WeekCalendar form 'yzg-calendar/packages/week-calendar'
import MonthCalendar form 'yzg-calendar/packages/moth-calendar'
日程组件
props
参数
参数 说明 类型 tasks 任务项数组 Array\<Task> titileKey 标题字段名,默认 title
String option 其他配置项 Object具体参数见下面
option参数
参数 | 说明 | 类型 |
---|
slot插槽
slot插槽 | 说明 | 参数 |
---|---|---|
#day-item | 自定义每个任务项 | 返回任务项data |
日历组件
v-model 绑定
Date
对象props
参数 | 说明 | 类型 |
---|---|---|
swipe | 是否支持左右滑动切换 | Boolen |
background | 背景 | css Object对象 |
slot插槽 | 说明 | 参数 |
---|---|---|
#week | 自定义日历星期 | 返回星期几 |
#day | 自定义日历天 | 返回当天day data |