import { RouterView } from 'vue-router'; const wagonCard = { name: 'WagonCard', path: ':id', component: () => import('src/pages/Wagon/Card/WagonCard.vue'), redirect: { name: 'WagonEdit' }, meta: { menu: ['WagonEdit'], }, children: [ { path: 'edit', name: 'WagonEdit', meta: { title: 'wagonEdit', icon: 'edit', }, component: () => import('src/pages/Wagon/WagonCreate.vue'), }, ], }; export default { name: 'Wagon', path: '/wagon', meta: { title: 'wagons', icon: 'vn:trolley', moduleName: 'Wagon', menu: ['WagonList', 'WagonTypeList', 'WagonCounter'], }, component: RouterView, redirect: { name: 'WagonMain' }, children: [ { path: '', name: 'WagonMain', component: () => import('src/components/common/VnModule.vue'), redirect: { name: 'WagonIndexMain' }, children: [ { path: '', name: 'WagonIndexMain', redirect: { name: 'WagonList' }, component: () => import('src/pages/Wagon/WagonList.vue'), children: [ { name: 'WagonList', path: 'list', meta: { title: 'list', icon: 'view_list', }, }, wagonCard, ], }, { path: 'counter', name: 'WagonCounter', meta: { title: 'wagonCounter', icon: 'add_circle', }, component: () => import('src/pages/Wagon/WagonCounter.vue'), }, { path: 'type', name: 'WagonTypeMain', redirect: { name: 'WagonTypeList' }, children: [ { path: 'list', name: 'WagonTypeList', meta: { title: 'typesList', icon: 'view_list', }, component: () => import('src/pages/Wagon/Type/WagonTypeList.vue'), }, { path: ':id/edit', name: 'WagonTypeEdit', meta: { title: 'typeEdit', icon: 'edit', }, component: () => import('src/pages/Wagon/Type/WagonTypeEdit.vue'), }, ], }, ], }, ], };