Closed i-ked-ii closed 6 years ago
Added support for child routes. See example: https://github.com/ktquez/vue-extend-layout/blob/master/example/src/pages/About/index.vue https://github.com/ktquez/vue-extend-layout/blob/master/example/src/router.js
@ktquez Are your sure this code can use? I have problem.
[Vue warn]: Unknown custom element: <layout-default> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
My router
{
name: 'TournamentList',
path: '/tournament',
component: () => System.import('@/modules/tournament/views/List'),
meta: {
layout: 'layoutDefault'
},
children: [
{
name: 'List.Item',
path: '/clash',
component: () => System.import(/* webpackChunkName: "User" */ '@/modules/tournament/views/Item')
}
]
}
src/layouts/default.vue
export default {
name: 'default' // Instead of layoutDefault
}
your router
{
name: 'TournamentList',
path: '/tournament',
component: () => System.import('@/modules/tournament/views/List'),
meta: {
layout: 'default' // optional, when it does not inform, the plugin takes the default layout
},
children: [
{
name: 'List.Item',
path: '/clash',
component: () => System.import(/* webpackChunkName: "User" */ '@/modules/tournament/views/Item')
}
]
}
E.g. https://github.com/ktquez/vue-extend-layout#create-and-using-layouts
I have more link in website. I want to know, how to use vue-extend-layout with router child