import { RouteRecordRaw } from 'vue-router'; const routes: RouteRecordRaw[] = [ { path: '/', name: 'MainLayout', component: () => import('layouts/MainLayout.vue'), children: [ { path: '', name: 'LaoutIndexPage', component: () => import('pages/IndexPage.vue'), redirect: '/page6', children: [ { path: 'page1', name: 'PAGE1', component: () => import('../modules/page1/IndexPage.vue'), meta: { title: '页面1', permission: ['*'], keepalive: true, }, }, { path: 'page2', name: 'PAGE2', component: () => import('../modules/page2/IndexPage.vue'), meta: { title: '页面2', permission: ['*'], keepalive: true, }, }, { path: 'page3', name: 'PAGE3', component: () => import('../modules/page3/IndexPage.vue'), meta: { title: '页面3', permission: ['*'], keepalive: true, }, }, { path: 'page4', name: 'PAGE4', component: () => import('../modules/page4/IndexPage.vue'), meta: { title: '页面4', permission: ['*'], keepalive: true, }, }, { path: 'page5', name: 'PAGE5', component: () => import('../modules/page5/IndexPage.vue'), meta: { title: '页面5', permission: ['*'], keepalive: true, }, }, { path: 'page6', name: 'PAGE6', component: () => import('../modules/page6/IndexPage.vue'), meta: { title: '页面6', permission: ['*'], keepalive: true, }, }, ], }, ], }, // Always leave this as last one, // but you can also remove it { path: '/:catchAll(.*)*', component: () => import('pages/ErrorNotFound.vue'), }, ]; export default routes;