vue使用FullCalendar插件(基本)
安装npm install --save @fullcalendar/vuenpm install --save @fullcalendar/corenpm install --save @fullcalendar/daygrid或者npm install --save @fullcalendar/vue @fullcalendar/core @fullcalendar/daygrid...
·
安装
npm install --save @fullcalendar/vue
npm install --save @fullcalendar/core
npm install --save @fullcalendar/daygrid
导入
import FullCalendar from "@fullcalendar/vue";
import dayGridPlugin from "@fullcalendar/daygrid";
import timeGridPlugin from "@fullcalendar/timegrid";
import interactionPlugin from "@fullcalendar/interaction";
components: {
FullCalendar //注册
},
引入
@import "~@fullcalendar/core/main.css";
@import "~@fullcalendar/daygrid/main.css";
@import "~@fullcalendar/timegrid/main.css";
初始化
<template>
<FullCalendar defaultView="dayGridMonth" :plugins="calendarPlugins" />
</template>
<script>
data() {
return {
calendarPlugins: [
dayGridPlugin,
timeGridPlugin,
interactionPlugin
],
};
}
效果图
更多推荐
已为社区贡献2条内容
所有评论(0)