我使用带有类型记录的vue3和公历,我正在使用示例代码,如主页中所示
new Vue({
el: '#app',
data() {
return {
date: new Date(),
}
},
mounted() {
const calendar = bulmaCalendar.attach(this.$refs.calendarTrigger, {
startDate: this.date,
})[0]
calendar.on('select', e => (this.date = e.start || null))
},
computed: {
niceDate() {
if (this.date) {
return this.date.toLocaleDateString()
}
}
}
});
// The view is like:
<div id='app'>
Selected date: { { niceDate } }
<button ref='calendarTrigger' type='button'>Change</button>
</div> 现在我从打字稿中得到了错误

有人知道怎么解决吗?提前感谢
发布于 2022-06-10 21:53:00
这份文件需要更新。
calendar.on("select", (event) => { console.info(calendar.startDate); });
这个很好
https://stackoverflow.com/questions/72579370
复制相似问题