本人最近在将A项目中的一个flask template页面前后端代码,迁移至B项目的中。

A项目 template页面中使用了Vue,使用了element-ui组件。B项目也是flask 框架,之前没有使用vue框架写页面。迁移后页面一直无法正常调试出,报错内容:

Unknown custom element did you register the component correctly

原因应该是:element-ui没有被正确引用。

但是看代码,确实是引用了的

    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"><script src="https://unpkg.com/vue/dist/vue.js"></script><script src="https://unpkg.com/element-ui/lib/index.js"></script>

查看源码也发现是引用了的:

最后发现:

因为B模板,在base.html最后再次引入了Vue(多人长历史项目,引用有点乱),覆盖了前面的Vue

导致前面的element-ui引用是无效的(在vue之前引用)

解决办法:

在其后在引入一次element的js文件

flask template中使用Vue,遇到引入element-ui无效问题,Unknown custom element did you register the component correc相关推荐

  1. Vue报错:Unknown custom element: router-view - did you register the component correctly页面中不显示链接

    Vue报错:Unknown custom element: router-view - did you register the component correctly vue-router应用到组件 ...

  2. 在style标签中,vue项目引入style文件,外部css文件

    在style标签中,vue项目引入style文件,外部css文件 一.css是什么? 二.使用步骤 1.使用style标签引入 2.在style标签内使用@import导入 总结 一.css是什么? ...

  3. 使用vue.js路由踩到的一个坑Unknown custom element

    在配合require.js使用vue路由的时候,遇到了路由组件报错: "vue.js:597 [Vue warn]: Unknown custom element: <router-l ...

  4. [Vue warn]: Unknown custom element: vhead - did you register the component correctly? For recursiv

    [Vue warn]: Unknown custom element: <vhead> - did you register the component correctly? For re ...

  5. vue-2.5.16.js:597 [Vue warn]: Unknown custom element: ocean - did you register the component corre

    vue-2.5.16.js:597 [Vue warn]: Unknown custom element: - did you register the component correctly? Fo ...

  6. Vue报错-[Vue warn]: Unknown custom element: <van-action-sheet> - did you register the component correc

    项目场景: 今天在使用到vant组件的时候引入报错. [Vue warn]: Unknown custom element: <van-action-sheet> - did you re ...

  7. vue 报错unknown custom element解决方法

    vue 报错unknown custom element解决方法 参考文章: (1)vue 报错unknown custom element解决方法 (2)https://www.cnblogs.co ...

  8. [Vue warn]: Unknown custom element: <Top> - did you register the component correctly?

    [Vue warn]: Unknown custom element: - did you register the component correctly? 错误如下: 出现错误的原因有以下几种: ...

  9. [Vue warn]: Unknown custom element: <helptext> - did you register the component correctly? For recu

    报错信息: vue.js:634 [Vue warn]: Unknown custom element: - did you register the component correctly? For ...

最新文章

  1. jquery 实现仿QQ右下角弹出框
  2. Java的基础方法Java的对象_java基础之 创建对象的几种方式
  3. 转载-项目经理与部门经理之间的关系
  4. dojo Quick Start/dojo入门手册--json
  5. android ndk使用c 11,使用c 11 std :: async在android ndk中使用不完整类型无效
  6. SRM614 Div1 Hard
  7. java 快速io_Java编程在ICPC快速IO实现源码
  8. java枚举的特点_Java中有些好的特性(二):枚举
  9. 在状态栏中显示鼠标位置坐标
  10. 10g索引的作用实验1
  11. PyTorch 1.0 中文官方教程:用 numpy 和 scipy 创建扩展
  12. iphone导出照片到电脑_苹果手机照片删除了怎么恢复?简单方法图文教程
  13. 基础佛学知识-间歇博客
  14. 微服务架构 SpringCloud(一)组件和概念介绍
  15. IDEA取消双击shift出现的搜索框
  16. 全国大学生数学建模2018年A题高温作业专用服装设计
  17. 阿里云服务器 发送邮件无法连接smtp的解决方案
  18. 剖析《口袋妖怪复刻版》技术架构
  19. Centerface + Facenet实现视频人脸识别(附代码)
  20. qq邮箱html源码,qq邮箱源码

热门文章

  1. aws WorkMail和SES实战
  2. android 未读短信app,Android APP桌面启动图标未读信息小红点实现——在巨人的肩膀上淌坑...
  3. blude关注+私信脚本引流使用教程
  4. 三星平板T805S刷机
  5. Assetbundle解密问题记录: Failed to decompress data for the Assetbundle
  6. 2017中国之旅系列之五:广东深圳较场尾之旅
  7. 因为RestTemplate而认识了%257B%2522与%7B%22
  8. 互联网营销活动常见类型
  9. 我才20岁,要接受自己的平庸吗?
  10. html按经纬度查询距离,JS根据两点的经纬度坐标得到驾车行驶距离