我目前正在使用 Laravel 和 Vue/Vuetify 處理圖像輪播,我正在使用 Vuetify v-carousel 和 v-carousel-item 來(lái)實(shí)現(xiàn)這一點(diǎn),除了由于標(biāo)題中的錯(cuò)誤輪播沒(méi)有呈現(xiàn)。我已經(jīng)根據(jù) vuetify 文檔正確初始化了我的 Vuetify 實(shí)例(我認(rèn)為)--下面的代碼適用于我的 app.js--import Vue from 'vue'import Vuetify, {VCarousel} from 'vuetify/lib'Vue.component('example-component', require('./components/ExampleComponent.vue').default);Vue.use(Vuetify, { components: { VCarousel, }, })// export default new Vuetify({})const app = new Vue({}).$mount('#app');--下面的代碼是針對(duì)使用輪播的組件的--<template> <v-carousel> <v-carousel-item v-for="(slide, i) in slides" :src = "slide.content " :key=i> </v-carousel-item> <v-carousel-item> <!-- <v-playback autoPlay :url = "video" :type="video/mp4" :width = "720" @play = "pauseCarousel" @pause = "playCarousel" ref = 'videoPlayer'></v-playback> --> </v-carousel-item> </v-carousel></template>這給了我這個(gè)錯(cuò)誤[Vue warn]: Error in render: "TypeError: Cannot read property 't' of undefined"found in---> <VCarousel> <ImageCarousel> at resources/js/components/ImageCarousel.vue <ExampleComponent> at resources/js/components/ExampleComponent.vue <Root>
使用 vuetify v-carousel 組件時(shí)出現(xiàn)“無(wú)法讀取未定義的屬性‘t’”錯(cuò)誤
回首憶惘然
2021-09-17 16:32:13