【发布时间】:2020-10-06 08:01:49
【问题描述】:
我正在尝试向资源时间线中的事件添加弹出框,我想知道正确的方法是什么。
我在 Vue ^2.6.11 中使用 fullcalendar/vue ^5.3.1 和 bootstrap-vue 的 ^2.1.0。
阅读this question 后,我有以下内容,这似乎可行,但似乎不是正确的方法。
我认为是propsData 和.$mount() 的使用让人感觉必须有更好、更惯用的方法?另外,好像也不可能把内容做成html?
在组件中:
<script>
import { BPopover } from 'bootstrap-vue'
</script>
在日历选项中:
eventDidMount: function (info) {
new BPopover({
propsData: {
title: info.event.extendedProps.title,
content: info.event.extendedProps.projectName,
triggers: 'hover',
target: info.el,
}
}).$mount()
}
任何想法都非常感谢。
非常感谢。
【问题讨论】:
标签: javascript vue.js fullcalendar bootstrap-vue fullcalendar-5