关于vue未注册组件报错问题
webpack-internal:///./node_modules/vue/dist/vue.esm.js:629 [Vue warn]: Unknown custom element: <van-tabs> - did you register the component correctly? For recursive components, make sure to provi
webpack-internal:///./node_modules/vue/dist/vue.esm.js:629 [Vue warn]: Unknown custom element: <van-tabs> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <Renzheng> at src/components/EditPersonal.vue
<App> at src/App.vue
<Root>
解决方案:
在main.js里面注册全局组件
mport Vue from 'vue'
import App from './App'
import router from './router'
import Header from './components/public/Header'
import Footer from './components/public/Footer'
Vue.config.productionTip = false
//全局注册组件
Vue.component("app-header",Header)
Vue.component("app-footer",Footer)
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App,},
template: '<App/>'
})
长按二维码,即可关注
更多推荐
所有评论(0)