天天看点

Unknown custom element: - did you register the component correctly?

ant design结合vue项目报错,出现如下问题:

Unknown custom element: - did you register the component correctly?

原因:

按需加载,剔除掉了一些不需要的框架组件,减少了编译支持库包大小。

解决:

当需要更多组件依赖时,在文件加入即可.

找到components_use.js 文件,

import {
  autoComplete,
  }

Vue.use(autoComplete)
           

保存刷新即可

效果如下:

Unknown custom element: - did you register the component correctly?