0.1.6 • Published 3 years ago

vue-scheduling-calendar v0.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

VueSchedulingCalendar

一个用于排班展示的的 vue 日历组件

展示图

安装

npm install vue-scheduling-calendar -S
或者
yarn add vue-scheduling-calendar

使用

main.js中引入插件并注册

#main.js
import VueSchedulingCalendar from "vue-scheduling-calendar";
import "vue-scheduling-calendar/dist/vue-scheduling-calendar.css";
Vue.use(VueSchedulingCalendar)
在main.js中引入插件并注册

在项目中使用 VueSchedulingCalendar

<template>
  <Vue-scheduling-calendar />
</template>

参数

参数类型必填默认说明
showCalendarBooleanfalsetrue控制日历是否显示
mainColorStringfalse#148eeb主要颜色
showCurrentDateBooleanfalsetrue是否突出显示默认日期
itemBorderRadiusBooleanfalsetrue日期点击按钮圆角
currentTextColorStringfalse#148eeb选中字体颜色
currentBackgroundColorStringfalse"#eaf3fc"选中项的背景颜色
dateMonthStringfalse${new Date().getFullYear()}-${new Date().getMonth() + 1}传入的年月 如2021-04-19或者2021/04/19,不传默认当前年月

事件

事件名说明回调参数
dayClick日历按钮点击事件,返回值年月日 YYYY-MM-DD或者YYYY/MM/DD

slot

名称说明
dataItem作用域插槽,为每个日历的每一项内容,插槽内容在日期的下面居中展示,组件会给插槽绑定当前的日期内容,插槽内容v-slot:dataItem="slotProps" slotProps.item即为当前循环项,详见example
footer底部注脚,可插入一些图例之类的

License

MIT license

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago