zoukankan      html  css  js  c++  java
  • 如何解决Vue.js模板报错的问题

    1、错误描述

    log.js?1afd:24 [HMR] Waiting for update signal from WDS...
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-col> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-list-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Left> at srccomponentsLeft.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-appbar> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Top> at srccomponentsTop.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-icon> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Top> at srccomponentsTop.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-chip> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Top> at srccomponentsTop.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <mu-avatar> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
    
    found in
    
    ---> <Top> at srccomponentsTop.vue
           <App> at srcApp.vue
             <Root>
    warn @ vue.runtime.esm.js?2b0e:587
    vue.runtime.esm.js?2b0e:8010 Download the Vue Devtools extension for a better development experience:
    https://github.com/vuejs/vue-devtools
    

    2、错误原因

          在使用Muse-UI组件,但是没有安装这个组件,更没有引入这个组件,导致出现了找不到

    3、解决办法

    (1)安装Muse-UI

    npm i muse-ui -S

    (2)引入Muse-UI

    import MuseUI from 'muse-ui';
    import 'muse-ui/dist/muse-ui.css';
    
    Vue.use(MuseUI);
  • 相关阅读:
    day06 数据类型的内置方法(数字类型和字符串)
    day 05 流程控制(if、while、for)
    day04 交互、格式化输出、运算符
    day03 python运行、变量、注释、内存管理、数据类型
    day02 编程语言
    动手实现hashmap
    顺时针打印矩阵
    反转链表-用二重指针解决
    面试经验--携程测试开发工程师--一面
    linus提到过的单链表删除节点算法
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313769.html
Copyright © 2011-2022 走看看