我正在基于Dayspan Vuetify库(
https://github.com/ClickerMonkey/dayspan-vuetify)。
我不知道如何在每天的单元格中添加按钮。欢迎有人帮助!
Live Demo
答案 0 :(得分:0)
您可以在模板中放置任何内容(请参见按钮):
https://github.com/ClickerMonkey/dayspan-vuetify-example/blob/master/src/App.vue
<template slot="eventTimeTitle" slot-scope="{calendarEvent, details}">
<div>
<v-icon class="ds-ev-icon"
v-if="details.icon"
size="14"
:style="{color: details.forecolor}">
{{ details.icon }}
</v-icon>
<v-btn outline @click="doSomething" color="indigo">Button</v-btn>
<strong class="ds-ev-title">{{ details.title }}</strong>
</div>
<div class="ds-ev-description">{{ getCalendarTime( calendarEvent ) }}</div>
</template>
为点击添加方法:
doSomething(e) {
console.log(e);
alert('clicked')
}