Я создал vue с проектом функции vuetify и получаю эти ошибки. первое прошлое ошибок
Так я структурирую проект.
Это код для VideoPrueba.vue
<template>
<div>
<v-row>
<v-col
class = "d-flex justify-center"
cols = "6"
>
<div class = "positionButton">
<v-btn
class = "accent-3 blue"
dark
>
Add voice
</v-btn>
</div>
</v-col>
<v-col
class = "d-flex justify-center"
cols = "6"
>
<VideoPrueba
v-for = "(step, key) in steps"
:key = "key"
v-model = "step.selected"
:items = "step.options"
/>
</v-col>
</v-row>
</div>
</template>
<script>
import VideoPrueba from './VideoPrueba'
export default {
name: 'HelloWorld',
components:'VideoPrueba',
data: () => ({
steps: [
{
title: 'Videos',
options: ['Video 1', 'Video 2', 'Video 3', 'Video 4'],
selected: []
}
],
} )
}
</script>
Это код для HelloWorld.vue
<template>
<div>
<v-row>
<v-col
class = "d-flex justify-center"
cols = "6"
>
<div class = "positionButton">
<v-btn
class = "accent-3 blue"
dark
>
Add voice
</v-btn>
</div>
</v-col>
<v-col
class = "d-flex justify-center"
cols = "6"
>
<VideoPrueba
v-for = "(step, key) in steps"
:key = "key"
v-model = "step.selected"
:items = "step.options"
/>
</v-col>
</v-row>
</div>
</template>
<script>
import VideoPrueba from './VideoPrueba'
export default {
name: 'HelloWorld',
components:'VideoPrueba',
data: () => ({
steps: [
{
title: 'Videos',
options: ['Video 1', 'Video 2', 'Video 3', 'Video 4'],
selected: []
}
],
} )
}
</script>
Это для App.vue
<template>
<v-app>
<v-app-bar
app
color = "primary"
dark
>
<div class = "d-flex align-center">
<v-img
alt = "Vuetify Logo"
class = "shrink mr-2"
contain
src = "https://cdn.vuetifyjs.com/images/logos/vuetify-logo-dark.png"
transition = "scale-transition"
width = "40"
/>
<v-img
alt = "Vuetify Name"
class = "shrink mt-1 hidden-sm-and-down"
contain
min-width = "100"
src = "https://cdn.vuetifyjs.com/images/logos/vuetify-name-dark.png"
width = "100"
/>
</div>
<v-spacer></v-spacer>
<v-btn
href = "https://github.com/vuetifyjs/vuetify/releases/latest"
target = "_blank"
text
>
<span class = "mr-2">Latest Release</span>
<v-icon>mdi-open-in-new</v-icon>
</v-btn>
</v-app-bar>
<v-main>
<HelloWorld/>
</v-main>
</v-app>
</template>
<script>
import HelloWorld from './components/HelloWorld';
export default {
name: 'App',
components: {
HelloWorld,
},
data: () => ({
//
}),
};
</script>
И это то, что у меня есть для main.js
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import vuetify from './plugins/vuetify';
Vue.config.productionTip = false
new Vue({
router,
store,
vuetify,
render: h => h(App)
}).$mount('#app')
Есть идеи, спасибо?
Большое спасибо, это сработало.
components:'VideoPrueba',
и т. д. Должны бытьcomponents: {VideoPrueba},