使用el-dialog时,报错“Unknown custom element: did you register the component correctly?...make sure to provide the 'name' option”


初学vue时,曾遇到一个无语的问题,在用el-dialog时一直显示没有导入,结果发现是因为没有把element ui引入到项目里。
需进行以下步骤:
1.执行:
npm install element-ui -s
 
2.在main.js文件里加入以下代码:
 
import ElementUI from 'element-ui' import 'element-ui/lib/theme-default/index.css' Vue.use(ElementUI)
 
3.完成以上步骤,即可正常用element ui的东西了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in ]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.解决方法 Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. vue报错[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. vue引入组建报错Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in VUE报错解决方法 Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. at src/views/index/"> [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in ---> at src/views/index/ [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.问题的解决方法 vue组件注册错误:Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM