routes.ts 3.32 KB
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: '/page9',
        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: '一些js练习',
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'page7',
            name: 'PAGE7',
            component: () => import('../modules/page7/IndexPage.vue'),
            meta: {
              title: '页面7',
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'page8',
            name: 'PAGE8',
            component: () => import('../modules/page8/IndexPage.vue'),
            meta: {
              title: '动画',
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'page9',
            name: 'PAGE9',
            component: () => import('../modules/page9/IndexPage.vue'),
            meta: {
              title: '动画2',
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'page10',
            name: 'PAGE10',
            component: () => import('../modules/page10/IndexPage.vue'),
            meta: {
              title: '设计',
              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;