美文网首页
fullcalendar在vue中使用步骤

fullcalendar在vue中使用步骤

作者: 学王 | 来源:发表于2018-11-30 10:30 被阅读0次

1:安装

npm i fullcalendar -S

2:引入

import fullcalendar from "fullcalendar";
import "fullcalendar/dist/fullcalendar.min.css";
import "fullcalendar/dist/locale/zh-cn.js";(中文包)

3:使用

$("#calendar").fullCalendar({ 
header: { left: "prev,next today", center: "title", right: "month,basicWeek" },
navLinks: true, // can click day/week names to navigate views
editable: true, 
eventLimit: true, // allow "more" link when too many events 
eventLimitText: "更多",
events: [ { title: "All Day Event", start: "2018-11-01", color: "#06BB87" }, ] });

4:注意事项
4.1依赖moment.js/jquery.js。
4.2渲染前需要在html中设置一个容器,本文是#calendar。

相关文章

网友评论

      本文标题:fullcalendar在vue中使用步骤

      本文链接:https://www.haomeiwen.com/subject/mbmccqtx.html