Vuetifyjs error Unknown custom element: did you register the component correctly(Vuetifyjs错误未知的自定义元素:您是否正确注册了组件)
问题描述
我正在使用 vuetify 构建模板,但出现错误
Am using vuetify to build a template but am getting an error
unknown custom element dashboard did you register the component correctly?
这是我的代码:
In the main.js
import Vue from 'vue'
import App from './App.vue'
import Vuetify from 'vuetify'
import VueRouter from 'vue-router';
import {routes} from './routes';
Vue.use(VueRouter);
Vue.use(Vuetify)
new Vue({
el: '#app',
render: h => h(App)
})
在我的 App.vue 中
In my App.vue
<template>
<dashboard></dashboard>
</template>
<script>
import Dashbaord from './components/dashboard/Dashboard.vue';
export default {
name: "appinit",
components: {
"dashboard":Dashboard
}
}
这是我的仪表板
<template>
<v-app>
<left-drawer></left-drawer>
<toolbar></toolbar> <!-- Dashboard Toolbar-->
<main>
<v-container fluid>
..info are
</v-slide-y-transition>
</v-container>
</main>
<right-drawer></right-drawer>
<footer-area></footer-area>
</v-app>
</template>
<script>
imports ......
export default {
components: {
Toolbar, RightDrawer,LeftDrawer,FooterArea
}
}
我刚刚将初始的 vuefy 安装组件分成不同的组件部分可能是什么问题
What could be wrong as i have just separated the initial vuefy installation component into different component sections
代码可在 github 上的 此链接
The code is available at github on This link
可能出了什么问题?
推荐答案
您的代码中几乎没有问题.
You have few issues in your code.
- 你必须在 App.vue 中关闭标签
- 修复 App.vue 第 6 行仪表板"的错字
- 从 Dashboard.Vue 中删除页脚区域(您还没有该组件;))
这篇关于Vuetifyjs错误未知的自定义元素:您是否正确注册了组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Vuetifyjs错误未知的自定义元素:您是否正确注册了组件
基础教程推荐
- 我什么时候应该在导入时使用方括号 2022-01-01
- 悬停时滑动输入并停留几秒钟 2022-01-01
- 动态更新多个选择框 2022-01-01
- 在for循环中使用setTimeout 2022-01-01
- 响应更改 div 大小保持纵横比 2022-01-01
- 当用户滚动离开时如何暂停 youtube 嵌入 2022-01-01
- 在 JS 中获取客户端时区(不是 GMT 偏移量) 2022-01-01
- 角度Apollo设置WatchQuery结果为可用变量 2022-01-01
- 有没有办法使用OpenLayers更改OpenStreetMap中某些要素 2022-09-06
- Karma-Jasmine:如何正确监视 Modal? 2022-01-01