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/>'

})

 

长按二维码,即可关注

https://blog.csdn.net/qq_34089503/article/details/81329405

Logo

前往低代码交流专区

更多推荐