[英]Vue FullCalendar how to set options dynamically?
我需要動態更改 Vue FullCalendar 中的一些選項,但日歷沒有應用它。
請看我的例子https://codesandbox.io/s/3q2j3r7pjq
底部的按鈕設置 maxTime 選項從 20:00 到 18:00
我如何刷新日歷視圖?
我找到了 =)
this.$refs.calendar.fireMethod('option', optionName, optionValue)
您必須為日歷組件定義引用並在其 api 上調用 setOption
<full-calendar :config="config" :events="events" ref="fullCalendar" />
...
this.$refs.fullCalendar.getApi().setOption('maxTime', '18:00:00');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.