vue中router正确但子页面没办法出现东西,没有报错。
import Vue from 'vue'
import VueRouter from 'vue-router'
import accoutPage from '../views/accout/wallet/accoutPage.vue'
import a from '../src/views/accout/a.vue'
import b from '../src/views/accout/b.vue'
import c from '../src/views/accout/c.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/accoutPage',
name: 'accoutPage',
component: accoutPage,
redirect:
{ name: 'a' },
children:
[
{
path: '/account/wallet',
name: '/account/wallet',
redirect: '/account/wallet/a',
component: a,
meta: {
title: '页面a'
}
},
{
path: '/account/wallet',
name: '/account/wallet',
redirect: '/account/wallet/b',
component: b,
meta: {
title: '页面B'
}
},
{
path: 'c',
name: 'c',
component: c,
meta: {
title: '页面c'
}
}
]
}
]
const router = new VueRouter({
routes
})
export default router