feat.ts 6.6 KB
Newer Older
陈文彬 已提交
1 2
import type { AppRouteModule } from '/@/router/types';

V
vben 已提交
3
import { getParentLayout, LAYOUT } from '/@/router/constant';
V
vben 已提交
4
import { t } from '/@/hooks/web/useI18n';
陈文彬 已提交
5

V
vben 已提交
6
const feat: AppRouteModule = {
V
vben 已提交
7 8 9 10 11
  path: '/feat',
  name: 'FeatDemo',
  component: LAYOUT,
  redirect: '/feat/icon',
  meta: {
V
Vben 已提交
12
    icon: 'ion:git-compare-outline',
V
vben 已提交
13
    title: t('routes.demo.feat.feat'),
陈文彬 已提交
14
  },
V
vben 已提交
15
  children: [
V
vben 已提交
16
    {
V
vben 已提交
17
      path: 'icon',
V
vben 已提交
18
      name: 'IconDemo',
19
      component: () => import('/@/views/demo/feat/icon/index.vue'),
V
vben 已提交
20
      meta: {
V
vben 已提交
21
        title: t('routes.demo.feat.icon'),
V
vben 已提交
22 23
      },
    },
24 25 26 27 28 29 30 31
    {
      path: 'ws',
      name: 'WebSocket',
      component: () => import('/@/views/demo/feat/ws/index.vue'),
      meta: {
        title: t('routes.demo.feat.ws'),
      },
    },
V
Vben 已提交
32 33 34 35 36 37 38 39
    {
      path: 'print',
      name: 'Print',
      component: () => import('/@/views/demo/feat/print/index.vue'),
      meta: {
        title: t('routes.demo.feat.print'),
      },
    },
N
nebv 已提交
40
    {
V
vben 已提交
41
      path: 'tabs',
N
nebv 已提交
42 43 44
      name: 'TabsDemo',
      component: () => import('/@/views/demo/feat/tabs/index.vue'),
      meta: {
V
vben 已提交
45
        title: t('routes.demo.feat.tabs'),
N
nebv 已提交
46 47
      },
    },
V
vben 已提交
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
    {
      path: 'breadcrumb',
      name: 'BreadcrumbDemo',
      redirect: '/feat/breadcrumb/flat',
      component: getParentLayout('BreadcrumbDemo'),
      meta: {
        title: t('routes.demo.feat.breadcrumb'),
      },

      children: [
        {
          path: 'flat',
          name: 'BreadcrumbFlatDemo',
          component: () => import('/@/views/demo/feat/breadcrumb/FlatList.vue'),
          meta: {
            title: t('routes.demo.feat.breadcrumbFlat'),
          },
        },
        {
          path: 'flatDetail',
          name: 'BreadcrumbFlatDetailDemo',
          component: () => import('/@/views/demo/feat/breadcrumb/FlatListDetail.vue'),
          meta: {
            title: t('routes.demo.feat.breadcrumbFlatDetail'),
            hideMenu: true,
            hideTab: true,
            currentActiveMenu: '/feat/breadcrumb/flat',
          },
        },
        {
          path: 'children',
          name: 'BreadcrumbChildrenDemo',
          component: getParentLayout('BreadcrumbChildrenDemo'),
          redirect: '/feat/breadcrumb/children',
          meta: {
            title: t('routes.demo.feat.breadcrumbFlat'),
          },
          children: [
            {
              path: '',
              name: 'BreadcrumbChildren',
              component: () => import('/@/views/demo/feat/breadcrumb/ChildrenList.vue'),
              meta: {
                title: t('routes.demo.feat.breadcrumbChildren'),
V
Vben 已提交
92
                // hideBreadcrumb: true,
V
vben 已提交
93 94 95 96 97 98 99 100 101 102
              },
            },
            {
              path: 'childrenDetail',
              name: 'BreadcrumbChildrenDetailDemo',
              component: () => import('/@/views/demo/feat/breadcrumb/ChildrenListDetail.vue'),
              meta: {
                currentActiveMenu: '/feat/breadcrumb/children',
                title: t('routes.demo.feat.breadcrumbChildrenDetail'),
                hideTab: true,
103
                // hideMenu: true,
V
vben 已提交
104 105 106 107 108 109
              },
            },
          ],
        },
      ],
    },
N
nebv 已提交
110

陈文彬 已提交
111
    {
V
vben 已提交
112
      path: 'context-menu',
陈文彬 已提交
113 114 115
      name: 'ContextMenuDemo',
      component: () => import('/@/views/demo/feat/context-menu/index.vue'),
      meta: {
V
vben 已提交
116
        title: t('routes.demo.feat.contextMenu'),
陈文彬 已提交
117 118
      },
    },
V
vben 已提交
119
    {
V
vben 已提交
120
      path: 'download',
V
vben 已提交
121 122 123
      name: 'DownLoadDemo',
      component: () => import('/@/views/demo/feat/download/index.vue'),
      meta: {
V
vben 已提交
124
        title: t('routes.demo.feat.download'),
V
vben 已提交
125 126
      },
    },
V
vben 已提交
127
    {
V
vben 已提交
128
      path: 'click-out-side',
V
vben 已提交
129
      name: 'ClickOutSideDemo',
130
      component: () => import('/@/views/demo/feat/click-out-side/index.vue'),
V
vben 已提交
131
      meta: {
V
vben 已提交
132
        title: t('routes.demo.feat.clickOutSide'),
V
vben 已提交
133 134
      },
    },
陈文彬 已提交
135
    {
V
vben 已提交
136
      path: 'img-preview',
陈文彬 已提交
137 138 139
      name: 'ImgPreview',
      component: () => import('/@/views/demo/feat/img-preview/index.vue'),
      meta: {
V
vben 已提交
140
        title: t('routes.demo.feat.imgPreview'),
陈文彬 已提交
141 142 143
      },
    },
    {
V
vben 已提交
144
      path: 'copy',
陈文彬 已提交
145 146 147
      name: 'CopyDemo',
      component: () => import('/@/views/demo/feat/copy/index.vue'),
      meta: {
V
vben 已提交
148
        title: t('routes.demo.feat.copy'),
陈文彬 已提交
149 150 151
      },
    },
    {
V
vben 已提交
152
      path: 'msg',
陈文彬 已提交
153 154 155
      name: 'MsgDemo',
      component: () => import('/@/views/demo/feat/msg/index.vue'),
      meta: {
V
vben 已提交
156
        title: t('routes.demo.feat.msg'),
陈文彬 已提交
157 158 159
      },
    },
    {
V
vben 已提交
160
      path: 'watermark',
陈文彬 已提交
161 162 163
      name: 'WatermarkDemo',
      component: () => import('/@/views/demo/feat/watermark/index.vue'),
      meta: {
V
vben 已提交
164
        title: t('routes.demo.feat.watermark'),
陈文彬 已提交
165 166
      },
    },
V
vben 已提交
167 168 169 170 171 172 173 174
    {
      path: 'ripple',
      name: 'RippleDemo',
      component: () => import('/@/views/demo/feat/ripple/index.vue'),
      meta: {
        title: t('routes.demo.feat.ripple'),
      },
    },
陈文彬 已提交
175
    {
V
vben 已提交
176
      path: 'full-screen',
陈文彬 已提交
177 178 179
      name: 'FullScreenDemo',
      component: () => import('/@/views/demo/feat/full-screen/index.vue'),
      meta: {
V
vben 已提交
180
        title: t('routes.demo.feat.fullScreen'),
陈文彬 已提交
181 182
      },
    },
V
vben 已提交
183
    {
V
vben 已提交
184
      path: 'error-log',
V
vben 已提交
185 186 187
      name: 'ErrorLog',
      component: () => import('/@/views/sys/error-log/index.vue'),
      meta: {
V
vben 已提交
188
        title: t('routes.demo.feat.errorLog'),
V
vben 已提交
189 190
      },
    },
V
vben 已提交
191 192 193 194 195 196 197 198 199
    {
      path: 'excel',
      name: 'Excel',
      redirect: '/feat/excel/customExport',
      component: getParentLayout('Excel'),
      meta: {
        // icon: 'mdi:microsoft-excel',
        title: t('routes.demo.excel.excel'),
      },
V
vben 已提交
200

V
vben 已提交
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
      children: [
        {
          path: 'customExport',
          name: 'CustomExport',
          component: () => import('/@/views/demo/excel/CustomExport.vue'),
          meta: {
            title: t('routes.demo.excel.customExport'),
          },
        },
        {
          path: 'jsonExport',
          name: 'JsonExport',
          component: () => import('/@/views/demo/excel/JsonExport.vue'),
          meta: {
            title: t('routes.demo.excel.jsonExport'),
          },
        },
        {
          path: 'arrayExport',
          name: 'ArrayExport',
          component: () => import('/@/views/demo/excel/ArrayExport.vue'),
          meta: {
            title: t('routes.demo.excel.arrayExport'),
          },
        },
        {
          path: 'importExcel',
          name: 'ImportExcel',
          component: () => import('/@/views/demo/excel/ImportExcel.vue'),
          meta: {
            title: t('routes.demo.excel.importExcel'),
          },
        },
      ],
    },
V
vben 已提交
236
    {
V
vben 已提交
237
      path: 'testTab/:id',
V
vben 已提交
238 239 240
      name: 'TestTab',
      component: () => import('/@/views/demo/feat/tab-params/index.vue'),
      meta: {
V
vben 已提交
241
        title: t('routes.demo.feat.tab'),
V
vben 已提交
242
        carryParam: true,
V
vben 已提交
243 244
      },
    },
陈文彬 已提交
245
  ],
V
vben 已提交
246 247 248
};

export default feat;