官网地址
API | VCalendar
1.安装
yarn add v-calendar@next @popperjs/core
2.全局引入
mian.js
//日历插件
import VCalendar from 'v-calendar';
import 'v-calendar/style.css';app.use(VCalendar);
3.使用
<div><VCalendar reservationTime expanded borderless :attributes='attributes' @dayclick="dayclick"></VCalendar></div>const attributes = ref([{key: "1",highlight: "green", // 高亮显示 默认蓝色dates: ["2024-07-13", "2024-07-14", "2024-07-15"],// dot: 'red', //底部小红点},{key: "2",highlight: "true", // 高亮显示dates: ["2024-07-20"],// dot: 'blue', //底部小红点},
}]