vue-fullcalendar管理日程事件(增删改查拖放) 附代码
时间: 2023-04-06 19:01:29 浏览: 147
vue实现表格数据的增删改查
5星 · 资源好评率100%
感谢您的提问。关于vue-fullcalendar管理日程事件(增删改查拖放)的问题,我可以回答。以下是示例代码:
<template>
<div>
<full-calendar :config="config" @event-click="handleEventClick" />
</div>
</template>
<script>
import FullCalendar from "@fullcalendar/vue";
import dayGridPlugin from "@fullcalendar/daygrid";
import interactionPlugin from "@fullcalendar/interaction";
export default {
components: {
FullCalendar,
},
data() {
return {
config: {
plugins: [dayGridPlugin, interactionPlugin],
editable: true,
events: [
{
title: "Event 1",
start: "2021-09-01",
end: "2021-09-02",
},
{
title: "Event 2",
start: "2021-09-03",
end: "2021-09-04",
},
],
},
};
},
methods: {
handleEventClick(info) {
console.log(info.event.title);
},
},
};
</script>
希望这个代码能够帮助到您。如果您还有其他问题,欢迎继续提问。
阅读全文