请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

报错,请问是哪里的问题

[Vue warn]: Unknown custom element: <router-view> - did you register the component correctly? For recursive components, make sure to provide the "name" option.


found in


---> <App> at src/App.vue

       <Root>



//app.vue

<template>

<div id="app">

<v-header></v-header>

<div class="tab">i am tab</div>

<div class="content">i am content</div>

<router-view/>

</div>

</template>


<script>

import header from './components/header/header'

export default {

name: 'app',

components:{

'v-header':header

}

};

</script>


<style>

</style>


//main.js

import Vue from 'vue'

import App from './App'

Vue.config.productionTip = false

/* eslint-disable no-new */

new Vue({

el: '#app',

template: '<App/>',

components: { App }

})



//header.vue

<template>

<div class="header">我是header</div>

</template>


<script>



export default {}

</script>


<style lang="stylus" rel="stylesheet/stylus">


</style>

//请问是哪里的问题


正在回答 回答被采纳积分+3

1回答

提问者 qq_上帝之手_3 2017-12-20 15:02:59

已解决

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号