问题描述
限时送ChatGPT账号..我的项目设置使用 vue-cli 和 vue-cli-plugin-vuetify.当我想使用任何 List Components 时,浏览器控制台会在大多数情况下抛出错误vuetify 元素,例如:
My project setup is using vue-cli with vue-cli-plugin-vuetify. When i want to use any of the List Components, the browser console throws errors on most of the vuetify elements, like:
[Vue 警告]:未知的自定义元素:<v-list-item-content>- 您是否正确注册了组件?对于递归组件,请确保提供名称"选项.
我的猜测是我需要对文件 /plugins/vuetify.js
做一些额外的配置才能使列表工作,但我不知道如何.
My guess is that i need to do some extra configuration on the file /plugins/vuetify.js
to make the lists work but i don't know how.
我的文件 vuetify.js
看起来像这样:
My file vuetify.js
looks like this:
import Vue from 'vue'
import Vuetify from 'vuetify/lib'
import 'vuetify/src/stylus/app.styl'
Vue.use(Vuetify, {
iconfont: 'md',
})
main.js
:
import Vue from 'vue'
import './plugins/vuetify'
import App from './App.vue'
import router from './router'
import store from './store'
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
问题:如何让 vuetify 中的所有组件都能工作??
Questions: How can i make all components from vuetify work??
感谢您的帮助!
基本上,我所做的是使用 vue create projectX
创建一个新项目,然后使用 vue add vuetify
添加 vuetify.现在我希望能够使用 vuetify 文档中的示例.但是复制和粘贴示例会导致所描述的错误...
Basically, what i did was creating a new project with vue create projectX
and then added vuetify with vue add vuetify
. And now i want to be able to use the examples from the vuetify documentation. But copy&pasting the examples results in the described error...
推荐答案
尝试更新 vuetify:npm install -S vuetify@2.0.1
Try updating vuetify with: npm install -S vuetify@2.0.1
这篇关于“[Vue 警告]:未知的自定义元素:..."错误,当使用 vue-cli-plugin-vuetify 的 vuetify UI 组件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论