vue3[Vue warn]: Failed to resolve component: XXX If this is a native custom element, make sure to ex
自定义标签存在,但是没有渲染报错:原因:改正前:<script>import {milldeLayoutInMain} from "../../components/home/main/milldeLayoutInMain"export default {name: 'MainPage',components:{milldeLayoutInMain}}</script>改正
·
在职全栈,有需要各种软件开发,软件指导可以添加本人微信。15536384246,备注CSDN
自定义标签存在,但是没有渲染
报错:
原因:
改正前:
<script>
import {milldeLayoutInMain} from "../../components/home/main/milldeLayoutInMain"
export default {
name: 'MainPage',
components:{
milldeLayoutInMain
}
}
</script>
改正后
<script>
import milldeLayoutInMain from "../../components/home/main/milldeLayoutInMain"
export default {
name: 'MainPage',
components:{
milldeLayoutInMain
}
}
</script>
效果:
**
结论:引入单个自定义组件,不加{ }。
**
更多推荐
所有评论(0)