element ui ——did you register the component correctly报错

报错信息:

    [Vue warn]: Unknown custom element: <el-drawer> - did you register the component correctly? For recursive components, make sure to provide the 'name' option.

 [Vue warn]: Unknown custom element: <el-link>  - did you register the component correctly? For recursive components, make sure to provide the 'name' option.

报错截图:


原因所在:

症结所在

    drawer 组件是element UI 比较新的版本出的组件,element UI 版本过低

解决方法:

    更新element  UI 版本到2.13.2 版本。

    在实际项目中并没有解决,后来发现虽然webpack 引入使用了2.13.2版本,但项目中有一个文件,实际element 没有使用webpack引入,而使用的是cdn引入方式,cdn实际引入的又是2.4.11版本。所以后来把cdn引入的版本改成2.13.2后,就解决这问题了

项目前端框架:

    avue  element ui

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。