Vuetifyjs 错误未知自定义元素:您是否正确注册了组件 [英] Vuetifyjs error Unknown custom element: did you register the component correctly

查看:42
本文介绍了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.

  1. 你必须在 App.vue 中关闭标签
  2. 修复 App.vue 第 6 行仪表板"的拼写错误
  3. 从 Dashboard.Vue 中删除页脚区域(您还没有该组件;))

这篇关于Vuetifyjs 错误未知自定义元素:您是否正确注册了组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆