flask template中使用Vue,遇到引入element-ui无效问题,Unknown custom element did you register the component correc
本人最近在将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相关推荐
- 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应用到组件 ...
- 在style标签中,vue项目引入style文件,外部css文件
在style标签中,vue项目引入style文件,外部css文件 一.css是什么? 二.使用步骤 1.使用style标签引入 2.在style标签内使用@import导入 总结 一.css是什么? ...
- 使用vue.js路由踩到的一个坑Unknown custom element
在配合require.js使用vue路由的时候,遇到了路由组件报错: "vue.js:597 [Vue warn]: Unknown custom element: <router-l ...
- [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 ...
- 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 ...
- 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 ...
- vue 报错unknown custom element解决方法
vue 报错unknown custom element解决方法 参考文章: (1)vue 报错unknown custom element解决方法 (2)https://www.cnblogs.co ...
- [Vue warn]: Unknown custom element: <Top> - did you register the component correctly?
[Vue warn]: Unknown custom element: - did you register the component correctly? 错误如下: 出现错误的原因有以下几种: ...
- [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 ...
最新文章
- jquery 实现仿QQ右下角弹出框
- Java的基础方法Java的对象_java基础之 创建对象的几种方式
- 转载-项目经理与部门经理之间的关系
- dojo Quick Start/dojo入门手册--json
- android ndk使用c 11,使用c 11 std :: async在android ndk中使用不完整类型无效
- SRM614 Div1 Hard
- java 快速io_Java编程在ICPC快速IO实现源码
- java枚举的特点_Java中有些好的特性(二):枚举
- 在状态栏中显示鼠标位置坐标
- 10g索引的作用实验1
- PyTorch 1.0 中文官方教程:用 numpy 和 scipy 创建扩展
- iphone导出照片到电脑_苹果手机照片删除了怎么恢复?简单方法图文教程
- 基础佛学知识-间歇博客
- 微服务架构 SpringCloud(一)组件和概念介绍
- IDEA取消双击shift出现的搜索框
- 全国大学生数学建模2018年A题高温作业专用服装设计
- 阿里云服务器 发送邮件无法连接smtp的解决方案
- 剖析《口袋妖怪复刻版》技术架构
- Centerface + Facenet实现视频人脸识别(附代码)
- qq邮箱html源码,qq邮箱源码
热门文章
- aws WorkMail和SES实战
- android 未读短信app,Android APP桌面启动图标未读信息小红点实现——在巨人的肩膀上淌坑...
- blude关注+私信脚本引流使用教程
- 三星平板T805S刷机
- Assetbundle解密问题记录: Failed to decompress data for the Assetbundle
- 2017中国之旅系列之五:广东深圳较场尾之旅
- 因为RestTemplate而认识了%257B%2522与%7B%22
- 互联网营销活动常见类型
- 我才20岁,要接受自己的平庸吗?
- html按经纬度查询距离,JS根据两点的经纬度坐标得到驾车行驶距离