mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 21:12:41 +08:00
wip: suppoer vite2 -- hack xlsx
This commit is contained in:
@@ -12,10 +12,11 @@ const LayoutMap = new Map<LayoutMapKey, () => Promise<typeof import('*.vue')>>()
|
||||
// 动态引入
|
||||
function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
|
||||
// TODO Because xlsx does not support vite2.0 temporarily. So filter the excel example first
|
||||
// regexp: /^(?!.*\/demo\/excel).*\.(tsx?|vue)$/,
|
||||
const dynamicViewsModules = importContext({
|
||||
dir: '/@/views',
|
||||
deep: true,
|
||||
regexp: /^(?!.*\/demo\/excel).*\.(tsx?|vue)$/,
|
||||
regexp: /\.(tsx?|vue)$/,
|
||||
dynamicImport: true,
|
||||
dynamicEnabled: 'autoImportRoute',
|
||||
});
|
||||
|
@@ -172,51 +172,51 @@ const feat: AppRouteModule = {
|
||||
title: t('routes.demo.feat.errorLog'),
|
||||
},
|
||||
},
|
||||
// {
|
||||
// path: 'excel',
|
||||
// name: 'Excel',
|
||||
// redirect: '/feat/excel/customExport',
|
||||
// component: getParentLayout('Excel'),
|
||||
// meta: {
|
||||
// // icon: 'mdi:microsoft-excel',
|
||||
// title: t('routes.demo.excel.excel'),
|
||||
// },
|
||||
{
|
||||
path: 'excel',
|
||||
name: 'Excel',
|
||||
redirect: '/feat/excel/customExport',
|
||||
component: getParentLayout('Excel'),
|
||||
meta: {
|
||||
// icon: 'mdi:microsoft-excel',
|
||||
title: t('routes.demo.excel.excel'),
|
||||
},
|
||||
|
||||
// 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'),
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
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'),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'testTab/:id',
|
||||
name: 'TestTab',
|
||||
|
Reference in New Issue
Block a user