yanye411325 / vv-calendar-click

基于vv-calendar改进click版本

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vv-calendar-click

基于vv-calendar的click优化版

install

npm install vv-calendar-click -s

how to use

属性

name type Value
type string month / week,分别代表显示周、月,和只显示周。
configDayData array 在某些天上需要加上的标识数据
name type arguments callback
selectDateChange function date 返回当前选中的日期相关数据
import Vue from "vue";
import Calendar from "vv-calendar-click";
Vue.use(Calendar);
<Calendar
  v-model="selectedDate"
  :config-day-data="calendarConfigDayData"
  type="month"
></Calendar>
 data() {
    return {
      selectedDate: new Date(),
      calendarConfigDayData: [
        { date: 1586706786234, numberCount: 3 }
      ],
    };
  },
  methods: {
    onSelectDateChange(date) {
      this.selectedDate = date.date.timeString;
      console.log(date);
      console.log(this.selectedDate);
    },
  }

About

基于vv-calendar改进click版本

License:MIT License


Languages

Language:Vue 77.4%Language:CSS 15.1%Language:JavaScript 6.4%Language:HTML 1.0%