Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js 如何向vuetify v-calendar中的事件添加信息?_Vue.js_Vuetify.js - Fatal编程技术网

Vue.js 如何向vuetify v-calendar中的事件添加信息?

Vue.js 如何向vuetify v-calendar中的事件添加信息?,vue.js,vuetify.js,Vue.js,Vuetify.js,我可以在vuetify v-calendar中为事件添加更多信息或详细信息,因为现在只是名称和事件时间。谢谢。您可以使用插槽事件: 模板: <v-calendar v-model="value" :weekdays="weekday" :type="type" :events="events" @change="getEvents" >

我可以在vuetify v-calendar中为事件添加更多信息或详细信息,因为现在只是名称和事件时间。谢谢。

您可以使用插槽事件:

模板:

<v-calendar
    v-model="value"
    :weekdays="weekday"
    :type="type"
    :events="events"
    @change="getEvents"
>
    <template v-slot:event="{ event }">
        {{ event.moreInformation }}
    </template>
</v-calendar>
export default {
  data: () => ({
    events: [
      {
        name: "Event name",
        moreInformation: "Event more information"
      }
    ]
  })
};