routes.ts 2.77 KB
Newer Older
hucy's avatar
hucy committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
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: {
hucy's avatar
hucy committed
70 71 72 73 74 75 76 77 78 79 80
              title: '一些js练习',
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'page7',
            name: 'PAGE7',
            component: () => import('../modules/page7/IndexPage.vue'),
            meta: {
              title: '页面7',
hucy's avatar
hucy committed
81 82 83 84
              permission: ['*'],
              keepalive: true,
            },
          },
hucy's avatar
hucy committed
85 86 87 88 89 90 91 92 93 94
          {
            path: 'page8',
            name: 'PAGE8',
            component: () => import('../modules/page8/IndexPage.vue'),
            meta: {
              title: '动画',
              permission: ['*'],
              keepalive: true,
            },
          },
hucy's avatar
hucy committed
95 96 97 98 99 100 101 102 103 104 105 106 107 108
        ],
      },
    ],
  },

  // Always leave this as last one,
  // but you can also remove it
  {
    path: '/:catchAll(.*)*',
    component: () => import('pages/ErrorNotFound.vue'),
  },
];

export default routes;