[Vue warn]: Unknown custom element: – did you register the component correctly? For recursive components, make sure to provide the “name” option.
The Vue project uses ant design. After introducing the spacing space, the name always reports an error. Adding name and modifying name are useless.
Duplicate component names or repeated import. Finally, after searching the configuration file, it is found that it is imported on-demand, and sapce of ant is not introduced. After the introduction, the error report can be solved.
const MyPlugin = {}
import bus from '@cg/bus'
import {
Result,
Button,
Space,
} from 'ant-design-vue'
MyPlugin.install = function (Vue, options) {
// To reduce the size of the dist, try to do on-demand loading
Vue.use(Button)
Vue.use(Form)
Vue.use(Result)
Vue.use(Space)
Vue.use(FormModel)
export default MyPlugin
If there is anything wrong, please correct it and exchange technology together.
Read More:
- The solution to the problem that the custom styles of UI components such as element-ui in the vue project do not take effect
- [Solved] Front end error: Unknown custom element
- Vue Import element-plus Error: Failed to resolve import “element-pluslibtheme-chalkindex.css“ from “src
- Vue warn]: vue3 element Component emit Pass Event Error
- [Solved] Vue3 Configuration routing error: Catch all routes (“*“) must now be defined using a param with a custom regexp.
- [Solved] Vue3 Import element UI error: Uncaught TypeError: Cannot read properties of underfined…
- [Solved] Vue element UI form verification error: cannot read property ‘validate’ of undefined
- How to Solve Vue add element Install Error
- Front end initialization Vue element admin error [How to Solve]
- Vue3 + vite install element-plus error [How to Solve]
- [Solved] Vue Element Date plug-in reports an error in form validation
- Vue3 Error: [vue/no-multiple-template-root] The template root requires exactly one element
- Vue element component V-for error [How to Modify)
- [Solved] Element form method resetfields() error: vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read properties of undefined (reading ‘indexOf’)
- [Solved] ERROR in ./node_modules/element-ui/lib/theme-chalk/fonts/element-icons.ttf
- Vue3.0 error: Failed to resolve component el-form-item (el element to be unable to be displayed)
- [Solved] vue3vite Error: Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist
- [Solved] Custom components with click events do not work
- Full screen scrolling by Vue + Vue awesomeswiper
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function