前端报错Unknown custom element
报错chunk-vendors.js:2128 [Vue warn]: Unknown custom element:- did you register the component correctly? For recursive components, make sure to provide the “name” option.未知自定义元素:-您是否正确注册了组件?对于递归组件,请确保提供
·
报错
chunk-vendors.js:2128 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the “name” option.未知自定义元素:-您是否正确注册了组件?对于递归组件,请确保提供“name”选项
原因
未注册el组件
解决办法
- 下载elementUI
npm i element-ui -S
- 引入
打开main.js添加三行代码
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
- 运行成功
更多推荐
已为社区贡献3条内容
所有评论(0)