/** The routing of this file will not show the layout. It is an independent new page. the contents of the file still need to log in to access */ import type { AppRouteModule } from '@eciol/types'; // import.meta.globEager() 直接引入所有的模块 Vite 独有的功能 const modules = import.meta.glob('./external-form/**/*.ts', { eager: true }) as any; const externalFormRouteList: AppRouteModule[] = []; // 加入到路由集合中 Object.keys(modules).forEach((key) => { const mod = modules[key].default || {}; const modList = Array.isArray(mod) ? [...mod] : [mod]; externalFormRouteList.push(...modList); }); // test // http:ip:port/main-out export const mainOutRoutes: AppRouteModule[] = [ ...externalFormRouteList, { path: '/pdf-preview/:pdfUrl', name: 'PdfPreview', component: () => import('@/components/FileUpload/src/PdfPreview.vue'), meta: { title: 'PDF预览', ignoreAuth: true, }, }, // { // path: '/main-out', // name: 'MainOut', // component: () => import('@/views/demo/main-out/index.vue'), // meta: { // title: 'MainOut', // ignoreAuth: true, // }, // }, ]; export const mainOutRouteNames = mainOutRoutes.map((item) => item.name);