routes.ts 4.41 KB
Newer Older
hucy's avatar
hucy committed
1 2
import { RouteRecordRaw } from 'vue-router';

hucy's avatar
hucy committed
3 4
import FORM_TEST from '../modules/form-test/route';
import TREE from '../modules/tree/route';
hucy's avatar
hucy committed
5
import AMIS from '../modules/amis/route';
hucy's avatar
hucy committed
6
import VUE_STUDY from '../modules/vue-study/route';
hucy's avatar
hucy committed
7
import VUE_KONVA from '../modules/vue-konva/route';
hucy's avatar
hucy committed
8
import VECTOR from '../modules/vector/route';
hucy's avatar
hucy committed
9
import VUE_KONVA_LINE from '../modules/vue-konva-line/route';
hucy's avatar
hucy committed
10 11 12 13
import JSON_VIEW from '../modules/json-view/route';
import BINARY_TREE from '../modules/binary-tree/route';
import MDN_RANGE from '../modules/MDN-Range/route';
import REVIEW_INPUT_BOX from '../modules/review-input-box/route';
hucy's avatar
hucy committed
14

hucy's avatar
hucy committed
15 16 17 18 19 20 21 22 23 24
const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'MainLayout',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'LaoutIndexPage',
        component: () => import('pages/IndexPage.vue'),
hucy's avatar
hucy committed
25
        redirect: '/home',
hucy's avatar
hucy committed
26
        children: [
hucy's avatar
hucy committed
27 28 29 30 31 32 33 34 35 36
          {
            path: 'home',
            name: 'HOME',
            component: () => import('../modules/home/PageHome.vue'),
            meta: {
              title: '主页',
              permission: ['*'],
              keepalive: false,
            },
          },
hucy's avatar
hucy committed
37 38 39 40 41
          {
            path: 'page1',
            name: 'PAGE1',
            component: () => import('../modules/page1/IndexPage.vue'),
            meta: {
hucy's avatar
hucy committed
42
              title: '图表',
hucy's avatar
hucy committed
43 44 45 46 47 48 49 50 51
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'page2',
            name: 'PAGE2',
            component: () => import('../modules/page2/IndexPage.vue'),
            meta: {
hucy's avatar
hucy committed
52
              title: '表单',
hucy's avatar
hucy committed
53 54 55 56 57 58 59 60 61
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'page4',
            name: 'PAGE4',
            component: () => import('../modules/page4/IndexPage.vue'),
            meta: {
hucy's avatar
hucy committed
62
              title: 'canvas',
hucy's avatar
hucy committed
63 64 65 66 67 68 69 70 71
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'page5',
            name: 'PAGE5',
            component: () => import('../modules/page5/IndexPage.vue'),
            meta: {
hucy's avatar
hucy committed
72
              title: '防抖节流',
hucy's avatar
hucy committed
73 74 75 76
              permission: ['*'],
              keepalive: true,
            },
          },
hucy's avatar
hucy committed
77 78 79 80 81
          {
            path: 'page7',
            name: 'PAGE7',
            component: () => import('../modules/page7/IndexPage.vue'),
            meta: {
hucy's avatar
hucy committed
82
              title: '疫情防控',
hucy's avatar
hucy committed
83 84 85 86
              permission: ['*'],
              keepalive: true,
            },
          },
hucy's avatar
hucy committed
87 88 89 90 91 92 93 94 95 96
          {
            path: 'page8',
            name: 'PAGE8',
            component: () => import('../modules/page8/IndexPage.vue'),
            meta: {
              title: '动画',
              permission: ['*'],
              keepalive: true,
            },
          },
hucy's avatar
hucy committed
97 98 99 100 101
          {
            path: 'page9',
            name: 'PAGE9',
            component: () => import('../modules/page9/IndexPage.vue'),
            meta: {
hucy's avatar
hucy committed
102
              title: '表格',
hucy's avatar
hucy committed
103 104 105 106
              permission: ['*'],
              keepalive: true,
            },
          },
hcyhuchaoyue's avatar
hcyhuchaoyue committed
107 108 109 110 111 112 113 114 115 116
          {
            path: 'page10',
            name: 'PAGE10',
            component: () => import('../modules/page10/IndexPage.vue'),
            meta: {
              title: '设计',
              permission: ['*'],
              keepalive: true,
            },
          },
hucy's avatar
hucy committed
117 118 119 120 121
          {
            path: 'js-page3',
            name: 'JS_PAGE3',
            component: () => import('../modules/page3/IndexPage.vue'),
            meta: {
hucy's avatar
hucy committed
122
              title: '链表',
hucy's avatar
hucy committed
123 124 125 126 127 128 129 130 131
              permission: ['*'],
              keepalive: true,
            },
          },
          {
            path: 'js-page6',
            name: 'JS_PAGE6',
            component: () => import('../modules/page6/IndexPage.vue'),
            meta: {
hucy's avatar
hucy committed
132
              title: 'JS',
hucy's avatar
hucy committed
133 134 135 136
              permission: ['*'],
              keepalive: true,
            },
          },
hucy's avatar
hucy committed
137 138
          ...FORM_TEST,
          ...TREE,
hucy's avatar
hucy committed
139
          ...AMIS,
hucy's avatar
hucy committed
140
          ...VUE_STUDY,
hucy's avatar
hucy committed
141
          ...VUE_KONVA,
hucy's avatar
hucy committed
142
          ...VECTOR,
hucy's avatar
hucy committed
143
          ...VUE_KONVA_LINE,
hucy's avatar
hucy committed
144 145 146 147
          ...JSON_VIEW,
          ...BINARY_TREE,
          ...MDN_RANGE,
          ...REVIEW_INPUT_BOX,
hucy's avatar
hucy committed
148 149 150 151 152 153 154 155 156 157 158 159 160 161
        ],
      },
    ],
  },

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

export default routes;