问题:
did you register the component correctly? For recursive components, make sure to provid the "name" option
在做项目的时候,引入其他组件时出现以下问题
原因:
如下是原来的错误代码,因为将components写错成了component
import ComponentA from './ComponentA.vue'
import ComponentB from './ComponentB.vue'
export default {
component: {
ComponentA,ComponentB
},
// ...
}
解决方法:
将component更正为components
import ComponentA from './ComponentA.vue'
import ComponentB from './ComponentB.vue'
export default {
components: {
ComponentA,ComponentB
},
// ...
}