mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-24 13:30:19 +08:00
refactor(projects): use new elegant-router plugin
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -33,3 +33,5 @@ package-lock.json
|
|||||||
yarn.lock
|
yarn.lock
|
||||||
|
|
||||||
.VSCodeCounter
|
.VSCodeCounter
|
||||||
|
|
||||||
|
.temp
|
||||||
@@ -2,7 +2,7 @@ import type { PluginOption } from 'vite';
|
|||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||||
import progress from 'vite-plugin-progress';
|
import progress from 'vite-plugin-progress';
|
||||||
import { setupElegantRouter } from './router';
|
import elegantRouter from 'elegant-router/vite';
|
||||||
import { setupUnocss } from './unocss';
|
import { setupUnocss } from './unocss';
|
||||||
import { setupUnplugin } from './unplugin';
|
import { setupUnplugin } from './unplugin';
|
||||||
import { setupHtmlPlugin } from './html';
|
import { setupHtmlPlugin } from './html';
|
||||||
@@ -13,7 +13,7 @@ export function setupVitePlugins(viteEnv: Env.ImportMeta, buildTime: string) {
|
|||||||
vue(),
|
vue(),
|
||||||
vueJsx(),
|
vueJsx(),
|
||||||
setupDevtoolsPlugin(viteEnv),
|
setupDevtoolsPlugin(viteEnv),
|
||||||
setupElegantRouter(),
|
elegantRouter(),
|
||||||
setupUnocss(viteEnv),
|
setupUnocss(viteEnv),
|
||||||
...setupUnplugin(viteEnv),
|
...setupUnplugin(viteEnv),
|
||||||
progress(),
|
progress(),
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
import type { RouteMeta } from 'vue-router';
|
|
||||||
import ElegantVueRouter from '@elegant-router/vue/vite';
|
|
||||||
import type { RouteKey } from '@elegant-router/types';
|
|
||||||
|
|
||||||
export function setupElegantRouter() {
|
|
||||||
return ElegantVueRouter({
|
|
||||||
layouts: {
|
|
||||||
base: 'src/layouts/base-layout/index.vue',
|
|
||||||
blank: 'src/layouts/blank-layout/index.vue'
|
|
||||||
},
|
|
||||||
routePathTransformer(routeName, routePath) {
|
|
||||||
const key = routeName as RouteKey;
|
|
||||||
|
|
||||||
if (key === 'login') {
|
|
||||||
const modules: UnionKey.LoginModule[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
|
|
||||||
|
|
||||||
const moduleReg = modules.join('|');
|
|
||||||
|
|
||||||
return `/login/:module(${moduleReg})?`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return routePath;
|
|
||||||
},
|
|
||||||
onRouteMetaGen(routeName) {
|
|
||||||
const key = routeName as RouteKey;
|
|
||||||
|
|
||||||
const constantRoutes: RouteKey[] = ['login', '403', '404', '500'];
|
|
||||||
|
|
||||||
const meta: Partial<RouteMeta> = {
|
|
||||||
title: key,
|
|
||||||
i18nKey: `route.${key}` as App.I18n.I18nKey
|
|
||||||
};
|
|
||||||
|
|
||||||
if (constantRoutes.includes(key)) {
|
|
||||||
meta.constant = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return meta;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
37
er.config.ts
Normal file
37
er.config.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import type { RouteMeta } from 'vue-router';
|
||||||
|
import { defineConfig } from 'elegant-router';
|
||||||
|
import type { RouteKey } from '@elegant-router/types';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
pageDir: ['src/views'],
|
||||||
|
layouts: {
|
||||||
|
base: 'src/layouts/base-layout/index.vue',
|
||||||
|
blank: 'src/layouts/blank-layout/index.vue'
|
||||||
|
},
|
||||||
|
getRoutePath: node => {
|
||||||
|
if (node.name === 'Login') {
|
||||||
|
const modules: UnionKey.LoginModule[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
|
||||||
|
|
||||||
|
const moduleReg = modules.join('|');
|
||||||
|
|
||||||
|
return `/login/:module(${moduleReg})?`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return node.path;
|
||||||
|
},
|
||||||
|
getRouteMeta: node => {
|
||||||
|
const constantRoutes: RouteKey[] = ['Login', '403', '404', '500'];
|
||||||
|
|
||||||
|
const name = node.name as RouteKey;
|
||||||
|
|
||||||
|
const meta: Partial<RouteMeta> = {
|
||||||
|
title: name
|
||||||
|
};
|
||||||
|
|
||||||
|
if (constantRoutes.includes(name)) {
|
||||||
|
meta.constant = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return meta;
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -86,6 +86,7 @@
|
|||||||
"@vitejs/plugin-vue": "6.0.3",
|
"@vitejs/plugin-vue": "6.0.3",
|
||||||
"@vitejs/plugin-vue-jsx": "5.1.2",
|
"@vitejs/plugin-vue-jsx": "5.1.2",
|
||||||
"consola": "3.4.2",
|
"consola": "3.4.2",
|
||||||
|
"elegant-router": "1.1.0",
|
||||||
"eslint": "9.39.2",
|
"eslint": "9.39.2",
|
||||||
"eslint-plugin-vue": "10.6.2",
|
"eslint-plugin-vue": "10.6.2",
|
||||||
"kolorist": "1.8.0",
|
"kolorist": "1.8.0",
|
||||||
|
|||||||
189
pnpm-lock.yaml
generated
189
pnpm-lock.yaml
generated
@@ -86,7 +86,7 @@ importers:
|
|||||||
version: link:packages/uno-preset
|
version: link:packages/uno-preset
|
||||||
'@soybeanjs/eslint-config':
|
'@soybeanjs/eslint-config':
|
||||||
specifier: 1.7.4
|
specifier: 1.7.4
|
||||||
version: 1.7.4(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))
|
version: 1.7.4(@types/eslint@9.6.1)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: 25.0.3
|
specifier: 25.0.3
|
||||||
version: 25.0.3
|
version: 25.0.3
|
||||||
@@ -110,16 +110,19 @@ importers:
|
|||||||
version: 66.5.10
|
version: 66.5.10
|
||||||
'@unocss/vite':
|
'@unocss/vite':
|
||||||
specifier: 66.5.10
|
specifier: 66.5.10
|
||||||
version: 66.5.10(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))
|
version: 66.5.10(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))
|
||||||
'@vitejs/plugin-vue':
|
'@vitejs/plugin-vue':
|
||||||
specifier: 6.0.3
|
specifier: 6.0.3
|
||||||
version: 6.0.3(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))
|
version: 6.0.3(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))
|
||||||
'@vitejs/plugin-vue-jsx':
|
'@vitejs/plugin-vue-jsx':
|
||||||
specifier: 5.1.2
|
specifier: 5.1.2
|
||||||
version: 5.1.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))
|
version: 5.1.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))
|
||||||
consola:
|
consola:
|
||||||
specifier: 3.4.2
|
specifier: 3.4.2
|
||||||
version: 3.4.2
|
version: 3.4.2
|
||||||
|
elegant-router:
|
||||||
|
specifier: 1.1.0
|
||||||
|
version: 1.1.0
|
||||||
eslint:
|
eslint:
|
||||||
specifier: 9.39.2
|
specifier: 9.39.2
|
||||||
version: 9.39.2(jiti@2.6.1)
|
version: 9.39.2(jiti@2.6.1)
|
||||||
@@ -149,16 +152,16 @@ importers:
|
|||||||
version: 30.0.0(@babel/parser@7.28.5)(vue@3.5.26(typescript@5.9.3))
|
version: 30.0.0(@babel/parser@7.28.5)(vue@3.5.26(typescript@5.9.3))
|
||||||
vite:
|
vite:
|
||||||
specifier: 7.3.0
|
specifier: 7.3.0
|
||||||
version: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
version: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
vite-plugin-progress:
|
vite-plugin-progress:
|
||||||
specifier: 0.0.7
|
specifier: 0.0.7
|
||||||
version: 0.0.7(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))
|
version: 0.0.7(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))
|
||||||
vite-plugin-svg-icons:
|
vite-plugin-svg-icons:
|
||||||
specifier: 2.0.1
|
specifier: 2.0.1
|
||||||
version: 2.0.1(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))
|
version: 2.0.1(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))
|
||||||
vite-plugin-vue-devtools:
|
vite-plugin-vue-devtools:
|
||||||
specifier: 8.0.5
|
specifier: 8.0.5
|
||||||
version: 8.0.5(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))
|
version: 8.0.5(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))
|
||||||
vue-eslint-parser:
|
vue-eslint-parser:
|
||||||
specifier: 10.2.0
|
specifier: 10.2.0
|
||||||
version: 10.2.0(eslint@9.39.2(jiti@2.6.1))
|
version: 10.2.0(eslint@9.39.2(jiti@2.6.1))
|
||||||
@@ -232,7 +235,7 @@ importers:
|
|||||||
devDependencies:
|
devDependencies:
|
||||||
'@soybeanjs/changelog':
|
'@soybeanjs/changelog':
|
||||||
specifier: 0.3.25
|
specifier: 0.3.25
|
||||||
version: 0.3.25(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))
|
version: 0.3.25(@types/eslint@9.6.1)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))
|
||||||
bumpp:
|
bumpp:
|
||||||
specifier: 10.3.2
|
specifier: 10.3.2
|
||||||
version: 10.3.2(magicast@0.3.4)
|
version: 10.3.2(magicast@0.3.4)
|
||||||
@@ -746,6 +749,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
|
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
|
||||||
engines: {node: '>=6.0.0'}
|
engines: {node: '>=6.0.0'}
|
||||||
|
|
||||||
|
'@jridgewell/source-map@0.3.11':
|
||||||
|
resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==}
|
||||||
|
|
||||||
'@jridgewell/sourcemap-codec@1.5.5':
|
'@jridgewell/sourcemap-codec@1.5.5':
|
||||||
resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}
|
resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}
|
||||||
|
|
||||||
@@ -1064,12 +1070,18 @@ packages:
|
|||||||
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
|
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
|
||||||
engines: {node: '>=10.13.0'}
|
engines: {node: '>=10.13.0'}
|
||||||
|
|
||||||
|
'@ts-morph/common@0.28.1':
|
||||||
|
resolution: {integrity: sha512-W74iWf7ILp1ZKNYXY5qbddNaml7e9Sedv5lvU1V8lftlitkc9Pq1A+jlH23ltDgWYeZFFEqGCD1Ies9hqu3O+g==}
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
||||||
|
|
||||||
'@types/crypto-js@4.2.2':
|
'@types/crypto-js@4.2.2':
|
||||||
resolution: {integrity: sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==}
|
resolution: {integrity: sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==}
|
||||||
|
|
||||||
|
'@types/eslint@9.6.1':
|
||||||
|
resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==}
|
||||||
|
|
||||||
'@types/estree@1.0.8':
|
'@types/estree@1.0.8':
|
||||||
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
|
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
|
||||||
|
|
||||||
@@ -1606,6 +1618,9 @@ packages:
|
|||||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
buffer-from@1.1.2:
|
||||||
|
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
|
||||||
|
|
||||||
builtin-modules@5.0.0:
|
builtin-modules@5.0.0:
|
||||||
resolution: {integrity: sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==}
|
resolution: {integrity: sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==}
|
||||||
engines: {node: '>=18.20'}
|
engines: {node: '>=18.20'}
|
||||||
@@ -1711,6 +1726,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==}
|
resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==}
|
||||||
engines: {node: '>=0.8'}
|
engines: {node: '>=0.8'}
|
||||||
|
|
||||||
|
code-block-writer@13.0.3:
|
||||||
|
resolution: {integrity: sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==}
|
||||||
|
|
||||||
collection-visit@1.0.0:
|
collection-visit@1.0.0:
|
||||||
resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==}
|
resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
@@ -1732,6 +1750,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
|
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
|
||||||
engines: {node: '>= 0.8'}
|
engines: {node: '>= 0.8'}
|
||||||
|
|
||||||
|
commander@2.20.3:
|
||||||
|
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
|
||||||
|
|
||||||
commander@7.2.0:
|
commander@7.2.0:
|
||||||
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
|
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
@@ -1966,6 +1987,10 @@ packages:
|
|||||||
electron-to-chromium@1.5.267:
|
electron-to-chromium@1.5.267:
|
||||||
resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==}
|
resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==}
|
||||||
|
|
||||||
|
elegant-router@1.1.0:
|
||||||
|
resolution: {integrity: sha512-akiwtaaNJwoMrUM5Q29iMKkSASR4GQWeWCagKv+FHrlusFJgyo6B3cNzZHZecHE8WXWs1xAQjO6QndFBlTfaYQ==}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
emoji-regex@8.0.0:
|
emoji-regex@8.0.0:
|
||||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||||
|
|
||||||
@@ -3504,6 +3529,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==}
|
resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==}
|
||||||
deprecated: See https://github.com/lydell/source-map-resolve#deprecated
|
deprecated: See https://github.com/lydell/source-map-resolve#deprecated
|
||||||
|
|
||||||
|
source-map-support@0.5.21:
|
||||||
|
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
|
||||||
|
|
||||||
source-map-url@0.4.1:
|
source-map-url@0.4.1:
|
||||||
resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==}
|
resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==}
|
||||||
deprecated: See https://github.com/lydell/source-map-url#deprecated
|
deprecated: See https://github.com/lydell/source-map-url#deprecated
|
||||||
@@ -3591,6 +3619,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
|
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
|
||||||
|
strip-json-comments@5.0.3:
|
||||||
|
resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==}
|
||||||
|
engines: {node: '>=14.16'}
|
||||||
|
|
||||||
superjson@2.2.6:
|
superjson@2.2.6:
|
||||||
resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==}
|
resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==}
|
||||||
engines: {node: '>=16'}
|
engines: {node: '>=16'}
|
||||||
@@ -3635,6 +3667,11 @@ packages:
|
|||||||
resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==}
|
resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
|
|
||||||
|
terser@5.44.1:
|
||||||
|
resolution: {integrity: sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
tiny-emitter@2.1.0:
|
tiny-emitter@2.1.0:
|
||||||
resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}
|
resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}
|
||||||
|
|
||||||
@@ -3687,6 +3724,9 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '>=4.0.0'
|
typescript: '>=4.0.0'
|
||||||
|
|
||||||
|
ts-morph@27.0.2:
|
||||||
|
resolution: {integrity: sha512-fhUhgeljcrdZ+9DZND1De1029PrE+cMkIP7ooqkLRTrRLTqcki2AstsyJm0vRNbTbVCNJ0idGlbBrfqc7/nA8w==}
|
||||||
|
|
||||||
tslib@2.3.0:
|
tslib@2.3.0:
|
||||||
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
|
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
|
||||||
|
|
||||||
@@ -4528,6 +4568,12 @@ snapshots:
|
|||||||
|
|
||||||
'@jridgewell/resolve-uri@3.1.2': {}
|
'@jridgewell/resolve-uri@3.1.2': {}
|
||||||
|
|
||||||
|
'@jridgewell/source-map@0.3.11':
|
||||||
|
dependencies:
|
||||||
|
'@jridgewell/gen-mapping': 0.3.13
|
||||||
|
'@jridgewell/trace-mapping': 0.3.31
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@jridgewell/sourcemap-codec@1.5.5': {}
|
'@jridgewell/sourcemap-codec@1.5.5': {}
|
||||||
|
|
||||||
'@jridgewell/trace-mapping@0.3.31':
|
'@jridgewell/trace-mapping@0.3.31':
|
||||||
@@ -4702,9 +4748,9 @@ snapshots:
|
|||||||
|
|
||||||
'@sindresorhus/merge-streams@4.0.0': {}
|
'@sindresorhus/merge-streams@4.0.0': {}
|
||||||
|
|
||||||
'@soybeanjs/changelog@0.3.25(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))':
|
'@soybeanjs/changelog@0.3.25(@types/eslint@9.6.1)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@soybeanjs/eslint-config': 1.7.4(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))
|
'@soybeanjs/eslint-config': 1.7.4(@types/eslint@9.6.1)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))
|
||||||
cli-progress: 3.12.0
|
cli-progress: 3.12.0
|
||||||
convert-gitmoji: 0.1.5
|
convert-gitmoji: 0.1.5
|
||||||
dayjs: 1.11.15
|
dayjs: 1.11.15
|
||||||
@@ -4734,7 +4780,7 @@ snapshots:
|
|||||||
- typescript
|
- typescript
|
||||||
- vue-eslint-parser
|
- vue-eslint-parser
|
||||||
|
|
||||||
'@soybeanjs/eslint-config@1.7.4(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))':
|
'@soybeanjs/eslint-config@1.7.4(@types/eslint@9.6.1)(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-config@66.5.10(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1))))(eslint@9.39.2(jiti@2.6.1))(svelte-eslint-parser@1.4.1)(typescript@5.9.3)(vue-eslint-parser@10.2.0(eslint@9.39.2(jiti@2.6.1)))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/eslint-define-config': 1.23.0-2
|
'@antfu/eslint-define-config': 1.23.0-2
|
||||||
'@antfu/install-pkg': 1.1.0
|
'@antfu/install-pkg': 1.1.0
|
||||||
@@ -4748,7 +4794,7 @@ snapshots:
|
|||||||
eslint-parser-plain: 0.1.1
|
eslint-parser-plain: 0.1.1
|
||||||
eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))
|
eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.50.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))
|
||||||
eslint-plugin-n: 17.23.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
eslint-plugin-n: 17.23.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||||
eslint-plugin-prettier: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1))(prettier@3.7.4)
|
eslint-plugin-prettier: 5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1))(prettier@3.7.4)
|
||||||
eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1))
|
eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1))
|
||||||
globals: 16.5.0
|
globals: 16.5.0
|
||||||
local-pkg: 1.1.2
|
local-pkg: 1.1.2
|
||||||
@@ -4769,6 +4815,12 @@ snapshots:
|
|||||||
|
|
||||||
'@trysound/sax@0.2.0': {}
|
'@trysound/sax@0.2.0': {}
|
||||||
|
|
||||||
|
'@ts-morph/common@0.28.1':
|
||||||
|
dependencies:
|
||||||
|
minimatch: 10.1.1
|
||||||
|
path-browserify: 1.0.1
|
||||||
|
tinyglobby: 0.2.15
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
@@ -4776,6 +4828,12 @@ snapshots:
|
|||||||
|
|
||||||
'@types/crypto-js@4.2.2': {}
|
'@types/crypto-js@4.2.2': {}
|
||||||
|
|
||||||
|
'@types/eslint@9.6.1':
|
||||||
|
dependencies:
|
||||||
|
'@types/estree': 1.0.8
|
||||||
|
'@types/json-schema': 7.0.15
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@types/estree@1.0.8': {}
|
'@types/estree@1.0.8': {}
|
||||||
|
|
||||||
'@types/json-schema@7.0.15': {}
|
'@types/json-schema@7.0.15': {}
|
||||||
@@ -4976,7 +5034,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@unocss/core': 66.5.10
|
'@unocss/core': 66.5.10
|
||||||
|
|
||||||
'@unocss/vite@66.5.10(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))':
|
'@unocss/vite@66.5.10(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@jridgewell/remapping': 2.3.5
|
'@jridgewell/remapping': 2.3.5
|
||||||
'@unocss/config': 66.5.10
|
'@unocss/config': 66.5.10
|
||||||
@@ -4987,7 +5045,7 @@ snapshots:
|
|||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
tinyglobby: 0.2.15
|
tinyglobby: 0.2.15
|
||||||
unplugin-utils: 0.3.1
|
unplugin-utils: 0.3.1
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
|
|
||||||
'@unrs/resolver-binding-android-arm-eabi@1.11.1':
|
'@unrs/resolver-binding-android-arm-eabi@1.11.1':
|
||||||
optional: true
|
optional: true
|
||||||
@@ -5048,22 +5106,22 @@ snapshots:
|
|||||||
'@unrs/resolver-binding-win32-x64-msvc@1.11.1':
|
'@unrs/resolver-binding-win32-x64-msvc@1.11.1':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@vitejs/plugin-vue-jsx@5.1.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))':
|
'@vitejs/plugin-vue-jsx@5.1.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.28.5
|
'@babel/core': 7.28.5
|
||||||
'@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5)
|
'@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5)
|
||||||
'@babel/plugin-transform-typescript': 7.28.5(@babel/core@7.28.5)
|
'@babel/plugin-transform-typescript': 7.28.5(@babel/core@7.28.5)
|
||||||
'@rolldown/pluginutils': 1.0.0-beta.56
|
'@rolldown/pluginutils': 1.0.0-beta.56
|
||||||
'@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.28.5)
|
'@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.28.5)
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
vue: 3.5.26(typescript@5.9.3)
|
vue: 3.5.26(typescript@5.9.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@vitejs/plugin-vue@6.0.3(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))':
|
'@vitejs/plugin-vue@6.0.3(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rolldown/pluginutils': 1.0.0-beta.53
|
'@rolldown/pluginutils': 1.0.0-beta.53
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
vue: 3.5.26(typescript@5.9.3)
|
vue: 3.5.26(typescript@5.9.3)
|
||||||
|
|
||||||
'@volar/language-core@2.4.27':
|
'@volar/language-core@2.4.27':
|
||||||
@@ -5172,14 +5230,14 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-kit': 7.7.9
|
'@vue/devtools-kit': 7.7.9
|
||||||
|
|
||||||
'@vue/devtools-core@8.0.5(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))':
|
'@vue/devtools-core@8.0.5(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-kit': 8.0.5
|
'@vue/devtools-kit': 8.0.5
|
||||||
'@vue/devtools-shared': 8.0.5
|
'@vue/devtools-shared': 8.0.5
|
||||||
mitt: 3.0.1
|
mitt: 3.0.1
|
||||||
nanoid: 5.1.6
|
nanoid: 5.1.6
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
vite-hot-client: 2.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))
|
vite-hot-client: 2.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))
|
||||||
vue: 3.5.26(typescript@5.9.3)
|
vue: 3.5.26(typescript@5.9.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- vite
|
- vite
|
||||||
@@ -5420,6 +5478,9 @@ snapshots:
|
|||||||
node-releases: 2.0.27
|
node-releases: 2.0.27
|
||||||
update-browserslist-db: 1.2.3(browserslist@4.28.1)
|
update-browserslist-db: 1.2.3(browserslist@4.28.1)
|
||||||
|
|
||||||
|
buffer-from@1.1.2:
|
||||||
|
optional: true
|
||||||
|
|
||||||
builtin-modules@5.0.0: {}
|
builtin-modules@5.0.0: {}
|
||||||
|
|
||||||
bumpp@10.3.2(magicast@0.3.4):
|
bumpp@10.3.2(magicast@0.3.4):
|
||||||
@@ -5566,6 +5627,8 @@ snapshots:
|
|||||||
|
|
||||||
clone@2.1.2: {}
|
clone@2.1.2: {}
|
||||||
|
|
||||||
|
code-block-writer@13.0.3: {}
|
||||||
|
|
||||||
collection-visit@1.0.0:
|
collection-visit@1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
map-visit: 1.0.0
|
map-visit: 1.0.0
|
||||||
@@ -5585,6 +5648,9 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
delayed-stream: 1.0.0
|
delayed-stream: 1.0.0
|
||||||
|
|
||||||
|
commander@2.20.3:
|
||||||
|
optional: true
|
||||||
|
|
||||||
commander@7.2.0: {}
|
commander@7.2.0: {}
|
||||||
|
|
||||||
comment-parser@1.4.1: {}
|
comment-parser@1.4.1: {}
|
||||||
@@ -5801,6 +5867,22 @@ snapshots:
|
|||||||
|
|
||||||
electron-to-chromium@1.5.267: {}
|
electron-to-chromium@1.5.267: {}
|
||||||
|
|
||||||
|
elegant-router@1.1.0:
|
||||||
|
dependencies:
|
||||||
|
cac: 6.7.14
|
||||||
|
chokidar: 5.0.0
|
||||||
|
consola: 3.4.2
|
||||||
|
enquirer: 2.4.1
|
||||||
|
kolorist: 1.8.0
|
||||||
|
pathe: 2.0.3
|
||||||
|
picomatch: 4.0.3
|
||||||
|
strip-json-comments: 5.0.3
|
||||||
|
tinyglobby: 0.2.15
|
||||||
|
ts-morph: 27.0.2
|
||||||
|
unconfig: 7.4.2
|
||||||
|
unplugin: 2.3.11
|
||||||
|
unplugin-utils: 0.3.1
|
||||||
|
|
||||||
emoji-regex@8.0.0: {}
|
emoji-regex@8.0.0: {}
|
||||||
|
|
||||||
emoji-regex@9.2.2: {}
|
emoji-regex@9.2.2: {}
|
||||||
@@ -6000,13 +6082,14 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1))(prettier@3.7.4):
|
eslint-plugin-prettier@5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1))(prettier@3.7.4):
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.39.2(jiti@2.6.1)
|
eslint: 9.39.2(jiti@2.6.1)
|
||||||
prettier: 3.7.4
|
prettier: 3.7.4
|
||||||
prettier-linter-helpers: 1.0.0
|
prettier-linter-helpers: 1.0.0
|
||||||
synckit: 0.11.11
|
synckit: 0.11.11
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
'@types/eslint': 9.6.1
|
||||||
eslint-config-prettier: 10.1.8(eslint@9.39.2(jiti@2.6.1))
|
eslint-config-prettier: 10.1.8(eslint@9.39.2(jiti@2.6.1))
|
||||||
|
|
||||||
eslint-plugin-unicorn@62.0.0(eslint@9.39.2(jiti@2.6.1)):
|
eslint-plugin-unicorn@62.0.0(eslint@9.39.2(jiti@2.6.1)):
|
||||||
@@ -7501,6 +7584,12 @@ snapshots:
|
|||||||
source-map-url: 0.4.1
|
source-map-url: 0.4.1
|
||||||
urix: 0.1.0
|
urix: 0.1.0
|
||||||
|
|
||||||
|
source-map-support@0.5.21:
|
||||||
|
dependencies:
|
||||||
|
buffer-from: 1.1.2
|
||||||
|
source-map: 0.6.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
source-map-url@0.4.1: {}
|
source-map-url@0.4.1: {}
|
||||||
|
|
||||||
source-map@0.5.7: {}
|
source-map@0.5.7: {}
|
||||||
@@ -7586,6 +7675,8 @@ snapshots:
|
|||||||
|
|
||||||
strip-json-comments@3.1.1: {}
|
strip-json-comments@3.1.1: {}
|
||||||
|
|
||||||
|
strip-json-comments@5.0.3: {}
|
||||||
|
|
||||||
superjson@2.2.6:
|
superjson@2.2.6:
|
||||||
dependencies:
|
dependencies:
|
||||||
copy-anything: 4.0.5
|
copy-anything: 4.0.5
|
||||||
@@ -7645,6 +7736,14 @@ snapshots:
|
|||||||
|
|
||||||
tapable@2.3.0: {}
|
tapable@2.3.0: {}
|
||||||
|
|
||||||
|
terser@5.44.1:
|
||||||
|
dependencies:
|
||||||
|
'@jridgewell/source-map': 0.3.11
|
||||||
|
acorn: 8.15.0
|
||||||
|
commander: 2.20.3
|
||||||
|
source-map-support: 0.5.21
|
||||||
|
optional: true
|
||||||
|
|
||||||
tiny-emitter@2.1.0: {}
|
tiny-emitter@2.1.0: {}
|
||||||
|
|
||||||
tiny-invariant@1.3.3: {}
|
tiny-invariant@1.3.3: {}
|
||||||
@@ -7695,6 +7794,11 @@ snapshots:
|
|||||||
picomatch: 4.0.3
|
picomatch: 4.0.3
|
||||||
typescript: 5.9.3
|
typescript: 5.9.3
|
||||||
|
|
||||||
|
ts-morph@27.0.2:
|
||||||
|
dependencies:
|
||||||
|
'@ts-morph/common': 0.28.1
|
||||||
|
code-block-writer: 13.0.3
|
||||||
|
|
||||||
tslib@2.3.0: {}
|
tslib@2.3.0: {}
|
||||||
|
|
||||||
tslib@2.8.1: {}
|
tslib@2.8.1: {}
|
||||||
@@ -7906,17 +8010,17 @@ snapshots:
|
|||||||
evtd: 0.2.4
|
evtd: 0.2.4
|
||||||
vue: 3.5.26(typescript@5.9.3)
|
vue: 3.5.26(typescript@5.9.3)
|
||||||
|
|
||||||
vite-dev-rpc@1.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)):
|
vite-dev-rpc@1.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
birpc: 2.9.0
|
birpc: 2.9.0
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
vite-hot-client: 2.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))
|
vite-hot-client: 2.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))
|
||||||
|
|
||||||
vite-hot-client@2.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)):
|
vite-hot-client@2.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
|
|
||||||
vite-plugin-inspect@11.3.3(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)):
|
vite-plugin-inspect@11.3.3(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
ansis: 4.2.0
|
ansis: 4.2.0
|
||||||
debug: 4.4.3
|
debug: 4.4.3
|
||||||
@@ -7926,19 +8030,19 @@ snapshots:
|
|||||||
perfect-debounce: 2.0.0
|
perfect-debounce: 2.0.0
|
||||||
sirv: 3.0.2
|
sirv: 3.0.2
|
||||||
unplugin-utils: 0.3.1
|
unplugin-utils: 0.3.1
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
vite-dev-rpc: 1.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))
|
vite-dev-rpc: 1.1.0(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
vite-plugin-progress@0.0.7(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)):
|
vite-plugin-progress@0.0.7(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
picocolors: 1.1.1
|
picocolors: 1.1.1
|
||||||
progress: 2.0.3
|
progress: 2.0.3
|
||||||
rd: 2.0.1
|
rd: 2.0.1
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
|
|
||||||
vite-plugin-svg-icons@2.0.1(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)):
|
vite-plugin-svg-icons@2.0.1(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/svgo': 2.6.4
|
'@types/svgo': 2.6.4
|
||||||
cors: 2.8.5
|
cors: 2.8.5
|
||||||
@@ -7948,25 +8052,25 @@ snapshots:
|
|||||||
pathe: 0.2.0
|
pathe: 0.2.0
|
||||||
svg-baker: 1.7.0
|
svg-baker: 1.7.0
|
||||||
svgo: 2.8.0
|
svgo: 2.8.0
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
vite-plugin-vue-devtools@8.0.5(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3)):
|
vite-plugin-vue-devtools@8.0.5(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-core': 8.0.5(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))
|
'@vue/devtools-core': 8.0.5(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(vue@3.5.26(typescript@5.9.3))
|
||||||
'@vue/devtools-kit': 8.0.5
|
'@vue/devtools-kit': 8.0.5
|
||||||
'@vue/devtools-shared': 8.0.5
|
'@vue/devtools-shared': 8.0.5
|
||||||
sirv: 3.0.2
|
sirv: 3.0.2
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
vite-plugin-inspect: 11.3.3(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))
|
vite-plugin-inspect: 11.3.3(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))
|
||||||
vite-plugin-vue-inspector: 5.3.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2))
|
vite-plugin-vue-inspector: 5.3.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@nuxt/kit'
|
- '@nuxt/kit'
|
||||||
- supports-color
|
- supports-color
|
||||||
- vue
|
- vue
|
||||||
|
|
||||||
vite-plugin-vue-inspector@5.3.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)):
|
vite-plugin-vue-inspector@5.3.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.28.5
|
'@babel/core': 7.28.5
|
||||||
'@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.5)
|
'@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.5)
|
||||||
@@ -7977,11 +8081,11 @@ snapshots:
|
|||||||
'@vue/compiler-dom': 3.5.26
|
'@vue/compiler-dom': 3.5.26
|
||||||
kolorist: 1.8.0
|
kolorist: 1.8.0
|
||||||
magic-string: 0.30.21
|
magic-string: 0.30.21
|
||||||
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2)
|
vite: 7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(tsx@4.21.0)(yaml@2.8.2):
|
vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(sass@1.97.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: 0.27.2
|
esbuild: 0.27.2
|
||||||
fdir: 6.5.0(picomatch@4.0.3)
|
fdir: 6.5.0(picomatch@4.0.3)
|
||||||
@@ -7994,6 +8098,7 @@ snapshots:
|
|||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
jiti: 2.6.1
|
jiti: 2.6.1
|
||||||
sass: 1.97.1
|
sass: 1.97.1
|
||||||
|
terser: 5.44.1
|
||||||
tsx: 4.21.0
|
tsx: 4.21.0
|
||||||
yaml: 2.8.2
|
yaml: 2.8.2
|
||||||
|
|
||||||
|
|||||||
27
src/router/_generated/imports.ts
Normal file
27
src/router/_generated/imports.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
/* oxlint-disable */
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
// Generated by elegant-router
|
||||||
|
// Read more: https://github.com/soybeanjs/elegant-router
|
||||||
|
|
||||||
|
import type { RouteFileKey, RouteLayoutKey, RawRouteComponent } from "@elegant-router/types";
|
||||||
|
|
||||||
|
export const layouts: Record<RouteLayoutKey, RawRouteComponent> = {
|
||||||
|
base: () => import("@/layouts/base-layout/index.vue"),
|
||||||
|
blank: () => import("@/layouts/blank-layout/index.vue"),
|
||||||
|
};
|
||||||
|
|
||||||
|
export const views: Record<RouteFileKey, RawRouteComponent> = {
|
||||||
|
403: () => import("@/views/(builtin)/403/index.vue"),
|
||||||
|
404: () => import("@/views/(builtin)/404/index.vue"),
|
||||||
|
500: () => import("@/views/(builtin)/500/index.vue"),
|
||||||
|
Home: () => import("@/views/home/index.vue"),
|
||||||
|
IframeUrl: () => import("@/views/(builtin)/iframe/[url].vue"),
|
||||||
|
Login: () => import("@/views/(builtin)/login/index.vue"),
|
||||||
|
ManageMenu: () => import("@/views/manage/menu/index.vue"),
|
||||||
|
ManageRole: () => import("@/views/manage/role/index.vue"),
|
||||||
|
ManageRoute: () => import("@/views/manage/route/index.vue"),
|
||||||
|
ManageUser: () => import("@/views/manage/user/index.vue"),
|
||||||
|
Wip: () => import("@/views/(builtin)/wip/index.vue"),
|
||||||
|
};
|
||||||
130
src/router/_generated/routes.ts
Normal file
130
src/router/_generated/routes.ts
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
// Generated by elegant-router
|
||||||
|
// Read more: https://github.com/soybeanjs/elegant-router
|
||||||
|
|
||||||
|
import type { AutoRouterRoute } from '@elegant-router/types';
|
||||||
|
|
||||||
|
export const routes: AutoRouterRoute[] = [
|
||||||
|
{
|
||||||
|
name: 'Root',
|
||||||
|
path: '/',
|
||||||
|
redirect: '/home',
|
||||||
|
meta: {
|
||||||
|
title: "Root"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NotFound',
|
||||||
|
path: '/:pathMatch(.*)*',
|
||||||
|
layout: 'base',
|
||||||
|
component: '404',
|
||||||
|
meta: {
|
||||||
|
title: "NotFound"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '403',
|
||||||
|
path: '/403',
|
||||||
|
layout: 'base',
|
||||||
|
component: '403',
|
||||||
|
meta: {
|
||||||
|
title: "403",
|
||||||
|
constant: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '404',
|
||||||
|
path: '/404',
|
||||||
|
layout: 'base',
|
||||||
|
component: '404',
|
||||||
|
meta: {
|
||||||
|
title: "404",
|
||||||
|
constant: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '500',
|
||||||
|
path: '/500',
|
||||||
|
layout: 'base',
|
||||||
|
component: '500',
|
||||||
|
meta: {
|
||||||
|
title: "500",
|
||||||
|
constant: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Home',
|
||||||
|
path: '/home',
|
||||||
|
layout: 'base',
|
||||||
|
component: 'Home',
|
||||||
|
meta: {
|
||||||
|
title: "Home"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'IframeUrl',
|
||||||
|
path: '/iframe/:url',
|
||||||
|
layout: 'base',
|
||||||
|
component: 'IframeUrl',
|
||||||
|
meta: {
|
||||||
|
title: "IframeUrl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Login',
|
||||||
|
path: '/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?',
|
||||||
|
layout: 'base',
|
||||||
|
component: 'Login',
|
||||||
|
meta: {
|
||||||
|
title: "Login",
|
||||||
|
constant: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ManageMenu',
|
||||||
|
path: '/manage/menu',
|
||||||
|
layout: 'base',
|
||||||
|
component: 'ManageMenu',
|
||||||
|
meta: {
|
||||||
|
title: "ManageMenu"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ManageRole',
|
||||||
|
path: '/manage/role',
|
||||||
|
layout: 'base',
|
||||||
|
component: 'ManageRole',
|
||||||
|
meta: {
|
||||||
|
title: "ManageRole"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ManageRoute',
|
||||||
|
path: '/manage/route',
|
||||||
|
layout: 'base',
|
||||||
|
component: 'ManageRoute',
|
||||||
|
meta: {
|
||||||
|
title: "ManageRoute"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ManageUser',
|
||||||
|
path: '/manage/user',
|
||||||
|
layout: 'base',
|
||||||
|
component: 'ManageUser',
|
||||||
|
meta: {
|
||||||
|
title: "ManageUser"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Wip',
|
||||||
|
path: '/wip',
|
||||||
|
layout: 'base',
|
||||||
|
component: 'Wip',
|
||||||
|
meta: {
|
||||||
|
title: "Wip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
28
src/router/_generated/shared.ts
Normal file
28
src/router/_generated/shared.ts
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
/* oxlint-disable */
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
// Generated by elegant-router
|
||||||
|
// Read more: https://github.com/soybeanjs/elegant-router
|
||||||
|
|
||||||
|
import type { RouteKey, RoutePathMap } from '@elegant-router/types';
|
||||||
|
|
||||||
|
const routePathMap: RoutePathMap = {
|
||||||
|
"Root": "/",
|
||||||
|
"NotFound": "/:pathMatch(.*)*",
|
||||||
|
"403": "/403",
|
||||||
|
"404": "/404",
|
||||||
|
"500": "/500",
|
||||||
|
"Home": "/home",
|
||||||
|
"IframeUrl": "/iframe/:url",
|
||||||
|
"Login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?",
|
||||||
|
"ManageMenu": "/manage/menu",
|
||||||
|
"ManageRole": "/manage/role",
|
||||||
|
"ManageRoute": "/manage/route",
|
||||||
|
"ManageUser": "/manage/user",
|
||||||
|
"Wip": "/wip",
|
||||||
|
};
|
||||||
|
|
||||||
|
export function getRoutePath(key: RouteKey) {
|
||||||
|
return routePathMap[key];
|
||||||
|
}
|
||||||
70
src/router/_generated/transformer.ts
Normal file
70
src/router/_generated/transformer.ts
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
/* oxlint-disable */
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
// Generated by elegant-router
|
||||||
|
// Read more: https://github.com/soybeanjs/elegant-router
|
||||||
|
|
||||||
|
import type { RouteRecordRaw } from 'vue-router';
|
||||||
|
import type {
|
||||||
|
AutoRouterRedirect,
|
||||||
|
AutoRouterRoute,
|
||||||
|
AutoRouterSingleView,
|
||||||
|
RawRouteComponent,
|
||||||
|
RouteFileKey,
|
||||||
|
RouteLayoutKey
|
||||||
|
} from '@elegant-router/types';
|
||||||
|
|
||||||
|
export function transformToVueRoutes(
|
||||||
|
routes: AutoRouterRoute[],
|
||||||
|
layouts: Record<RouteLayoutKey, RawRouteComponent>,
|
||||||
|
views: Record<RouteFileKey, RawRouteComponent>
|
||||||
|
) {
|
||||||
|
const { redirects, groupedRoutes } = getFormattedRoutes(routes);
|
||||||
|
|
||||||
|
const vueRoutes: RouteRecordRaw[] = [...redirects];
|
||||||
|
|
||||||
|
groupedRoutes.forEach((items, layout) => {
|
||||||
|
const layoutRoute: RouteRecordRaw = {
|
||||||
|
path: `/${layout}-layout`,
|
||||||
|
component: layouts[layout],
|
||||||
|
children: items.map(item => {
|
||||||
|
const { layout: _, component, ...rest } = item;
|
||||||
|
|
||||||
|
return {
|
||||||
|
component: views[component],
|
||||||
|
...rest
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
vueRoutes.push(layoutRoute);
|
||||||
|
});
|
||||||
|
|
||||||
|
return vueRoutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFormattedRoutes(routes: AutoRouterRoute[]) {
|
||||||
|
const groupedRoutes = new Map<RouteLayoutKey, AutoRouterSingleView[]>();
|
||||||
|
const redirects: AutoRouterRedirect[] = [];
|
||||||
|
|
||||||
|
routes.forEach(route => {
|
||||||
|
if (isAutoRouterRedirect(route)) {
|
||||||
|
redirects.push(route);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const items = groupedRoutes.get(route.layout) || [];
|
||||||
|
items.push(route);
|
||||||
|
groupedRoutes.set(route.layout, items);
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
redirects,
|
||||||
|
groupedRoutes
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function isAutoRouterRedirect(route: AutoRouterRoute): route is AutoRouterRedirect {
|
||||||
|
return 'redirect' in route;
|
||||||
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* prettier-ignore */
|
|
||||||
// Generated by elegant-router
|
|
||||||
// Read more: https://github.com/soybeanjs/elegant-router
|
|
||||||
|
|
||||||
import type { RouteComponent } from "vue-router";
|
|
||||||
import type { LastLevelRouteKey, RouteLayout } from "@elegant-router/types";
|
|
||||||
|
|
||||||
import BaseLayout from "@/layouts/base-layout/index.vue";
|
|
||||||
import BlankLayout from "@/layouts/blank-layout/index.vue";
|
|
||||||
|
|
||||||
export const layouts: Record<RouteLayout, RouteComponent | (() => Promise<RouteComponent>)> = {
|
|
||||||
base: BaseLayout,
|
|
||||||
blank: BlankLayout,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<RouteComponent>)> = {
|
|
||||||
403: () => import("@/views/_builtin/403/index.vue"),
|
|
||||||
404: () => import("@/views/_builtin/404/index.vue"),
|
|
||||||
500: () => import("@/views/_builtin/500/index.vue"),
|
|
||||||
"iframe-page": () => import("@/views/_builtin/iframe-page/[url].vue"),
|
|
||||||
login: () => import("@/views/_builtin/login/index.vue"),
|
|
||||||
home: () => import("@/views/home/index.vue"),
|
|
||||||
};
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* prettier-ignore */
|
|
||||||
// Generated by elegant-router
|
|
||||||
// Read more: https://github.com/soybeanjs/elegant-router
|
|
||||||
|
|
||||||
import type { GeneratedRoute } from '@elegant-router/types';
|
|
||||||
|
|
||||||
export const generatedRoutes: GeneratedRoute[] = [
|
|
||||||
{
|
|
||||||
name: '403',
|
|
||||||
path: '/403',
|
|
||||||
component: 'layout.blank$view.403',
|
|
||||||
meta: {
|
|
||||||
title: '403',
|
|
||||||
i18nKey: 'route.403',
|
|
||||||
constant: true,
|
|
||||||
hideInMenu: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '404',
|
|
||||||
path: '/404',
|
|
||||||
component: 'layout.blank$view.404',
|
|
||||||
meta: {
|
|
||||||
title: '404',
|
|
||||||
i18nKey: 'route.404',
|
|
||||||
constant: true,
|
|
||||||
hideInMenu: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '500',
|
|
||||||
path: '/500',
|
|
||||||
component: 'layout.blank$view.500',
|
|
||||||
meta: {
|
|
||||||
title: '500',
|
|
||||||
i18nKey: 'route.500',
|
|
||||||
constant: true,
|
|
||||||
hideInMenu: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'home',
|
|
||||||
path: '/home',
|
|
||||||
component: 'layout.base$view.home',
|
|
||||||
meta: {
|
|
||||||
title: 'home',
|
|
||||||
i18nKey: 'route.home',
|
|
||||||
icon: 'mdi:monitor-dashboard',
|
|
||||||
order: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'iframe-page',
|
|
||||||
path: '/iframe-page/:url',
|
|
||||||
component: 'layout.base$view.iframe-page',
|
|
||||||
props: true,
|
|
||||||
meta: {
|
|
||||||
title: 'iframe-page',
|
|
||||||
i18nKey: 'route.iframe-page',
|
|
||||||
constant: true,
|
|
||||||
hideInMenu: true,
|
|
||||||
keepAlive: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'login',
|
|
||||||
path: '/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?',
|
|
||||||
component: 'layout.blank$view.login',
|
|
||||||
props: true,
|
|
||||||
meta: {
|
|
||||||
title: 'login',
|
|
||||||
i18nKey: 'route.login',
|
|
||||||
constant: true,
|
|
||||||
hideInMenu: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,192 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* prettier-ignore */
|
|
||||||
// Generated by elegant-router
|
|
||||||
// Read more: https://github.com/soybeanjs/elegant-router
|
|
||||||
|
|
||||||
import type { RouteRecordRaw, RouteComponent } from 'vue-router';
|
|
||||||
import type { ElegantConstRoute } from '@elegant-router/vue';
|
|
||||||
import type { RouteMap, RouteKey, RoutePath } from '@elegant-router/types';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* transform elegant const routes to vue routes
|
|
||||||
* @param routes elegant const routes
|
|
||||||
* @param layouts layout components
|
|
||||||
* @param views view components
|
|
||||||
*/
|
|
||||||
export function transformElegantRoutesToVueRoutes(
|
|
||||||
routes: ElegantConstRoute[],
|
|
||||||
layouts: Record<string, RouteComponent | (() => Promise<RouteComponent>)>,
|
|
||||||
views: Record<string, RouteComponent | (() => Promise<RouteComponent>)>
|
|
||||||
) {
|
|
||||||
return routes.flatMap(route => transformElegantRouteToVueRoute(route, layouts, views));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* transform elegant route to vue route
|
|
||||||
* @param route elegant const route
|
|
||||||
* @param layouts layout components
|
|
||||||
* @param views view components
|
|
||||||
*/
|
|
||||||
function transformElegantRouteToVueRoute(
|
|
||||||
route: ElegantConstRoute,
|
|
||||||
layouts: Record<string, RouteComponent | (() => Promise<RouteComponent>)>,
|
|
||||||
views: Record<string, RouteComponent | (() => Promise<RouteComponent>)>
|
|
||||||
) {
|
|
||||||
const LAYOUT_PREFIX = 'layout.';
|
|
||||||
const VIEW_PREFIX = 'view.';
|
|
||||||
const ROUTE_DEGREE_SPLITTER = '_';
|
|
||||||
const FIRST_LEVEL_ROUTE_COMPONENT_SPLIT = '$';
|
|
||||||
|
|
||||||
function isLayout(component: string) {
|
|
||||||
return component.startsWith(LAYOUT_PREFIX);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getLayoutName(component: string) {
|
|
||||||
const layout = component.replace(LAYOUT_PREFIX, '');
|
|
||||||
|
|
||||||
if(!layouts[layout]) {
|
|
||||||
throw new Error(`Layout component "${layout}" not found`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return layout;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isView(component: string) {
|
|
||||||
return component.startsWith(VIEW_PREFIX);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getViewName(component: string) {
|
|
||||||
const view = component.replace(VIEW_PREFIX, '');
|
|
||||||
|
|
||||||
if(!views[view]) {
|
|
||||||
throw new Error(`View component "${view}" not found`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isFirstLevelRoute(item: ElegantConstRoute) {
|
|
||||||
return !item.name.includes(ROUTE_DEGREE_SPLITTER);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isSingleLevelRoute(item: ElegantConstRoute) {
|
|
||||||
return isFirstLevelRoute(item) && !item.children?.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSingleLevelRouteComponent(component: string) {
|
|
||||||
const [layout, view] = component.split(FIRST_LEVEL_ROUTE_COMPONENT_SPLIT);
|
|
||||||
|
|
||||||
return {
|
|
||||||
layout: getLayoutName(layout),
|
|
||||||
view: getViewName(view)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const vueRoutes: RouteRecordRaw[] = [];
|
|
||||||
|
|
||||||
// add props: true to route
|
|
||||||
if (route.path.includes(':') && !route.props) {
|
|
||||||
route.props = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { name, path, component, children, ...rest } = route;
|
|
||||||
|
|
||||||
const vueRoute = { name, path, ...rest } as RouteRecordRaw;
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (component) {
|
|
||||||
if (isSingleLevelRoute(route)) {
|
|
||||||
const { layout, view } = getSingleLevelRouteComponent(component);
|
|
||||||
|
|
||||||
const singleLevelRoute: RouteRecordRaw = {
|
|
||||||
path,
|
|
||||||
component: layouts[layout],
|
|
||||||
meta: {
|
|
||||||
title: route.meta?.title || ''
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name,
|
|
||||||
path: '',
|
|
||||||
component: views[view],
|
|
||||||
...rest
|
|
||||||
} as RouteRecordRaw
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
return [singleLevelRoute];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isLayout(component)) {
|
|
||||||
const layoutName = getLayoutName(component);
|
|
||||||
|
|
||||||
vueRoute.component = layouts[layoutName];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isView(component)) {
|
|
||||||
const viewName = getViewName(component);
|
|
||||||
|
|
||||||
vueRoute.component = views[viewName];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
} catch (error: any) {
|
|
||||||
console.error(`Error transforming route "${route.name}": ${error.toString()}`);
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
// add redirect to child
|
|
||||||
if (children?.length && !vueRoute.redirect) {
|
|
||||||
vueRoute.redirect = {
|
|
||||||
name: children[0].name
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (children?.length) {
|
|
||||||
const childRoutes = children.flatMap(child => transformElegantRouteToVueRoute(child, layouts, views));
|
|
||||||
|
|
||||||
if(isFirstLevelRoute(route)) {
|
|
||||||
vueRoute.children = childRoutes;
|
|
||||||
} else {
|
|
||||||
vueRoutes.push(...childRoutes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
vueRoutes.unshift(vueRoute);
|
|
||||||
|
|
||||||
return vueRoutes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* map of route name and route path
|
|
||||||
*/
|
|
||||||
const routeMap: RouteMap = {
|
|
||||||
"root": "/",
|
|
||||||
"not-found": "/:pathMatch(.*)*",
|
|
||||||
"403": "/403",
|
|
||||||
"404": "/404",
|
|
||||||
"500": "/500",
|
|
||||||
"home": "/home",
|
|
||||||
"iframe-page": "/iframe-page/:url",
|
|
||||||
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?"
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get route path by route name
|
|
||||||
* @param name route name
|
|
||||||
*/
|
|
||||||
export function getRoutePath<T extends RouteKey>(name: T) {
|
|
||||||
return routeMap[name];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get route name by route path
|
|
||||||
* @param path route path
|
|
||||||
*/
|
|
||||||
export function getRouteName(path: RoutePath) {
|
|
||||||
const routeEntries = Object.entries(routeMap) as [RouteKey, RoutePath][];
|
|
||||||
|
|
||||||
const routeName: RouteKey | null = routeEntries.find(([, routePath]) => routePath === path)?.[0] || null;
|
|
||||||
|
|
||||||
return routeName;
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
import type { App } from 'vue';
|
import type { App } from 'vue';
|
||||||
import {
|
import { createMemoryHistory, createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
|
||||||
type RouterHistory,
|
import type { RouterHistory } from 'vue-router';
|
||||||
createMemoryHistory,
|
|
||||||
createRouter,
|
|
||||||
createWebHashHistory,
|
|
||||||
createWebHistory
|
|
||||||
} from 'vue-router';
|
|
||||||
import { createBuiltinVueRoutes } from './routes/builtin';
|
|
||||||
import { createRouterGuard } from './guard';
|
import { createRouterGuard } from './guard';
|
||||||
|
|
||||||
const { VITE_ROUTER_HISTORY_MODE = 'history', VITE_BASE_URL } = import.meta.env;
|
const { VITE_ROUTER_HISTORY_MODE = 'history', VITE_BASE_URL } = import.meta.env;
|
||||||
@@ -19,7 +13,7 @@ const historyCreatorMap: Record<Env.RouterHistoryMode, (base?: string) => Router
|
|||||||
|
|
||||||
export const router = createRouter({
|
export const router = createRouter({
|
||||||
history: historyCreatorMap[VITE_ROUTER_HISTORY_MODE](VITE_BASE_URL),
|
history: historyCreatorMap[VITE_ROUTER_HISTORY_MODE](VITE_BASE_URL),
|
||||||
routes: createBuiltinVueRoutes()
|
routes: []
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Setup Vue Router */
|
/** Setup Vue Router */
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
import type { CustomRoute } from '@elegant-router/types';
|
|
||||||
import { layouts, views } from '../elegant/imports';
|
|
||||||
import { getRoutePath, transformElegantRoutesToVueRoutes } from '../elegant/transform';
|
|
||||||
|
|
||||||
export const ROOT_ROUTE: CustomRoute = {
|
|
||||||
name: 'root',
|
|
||||||
path: '/',
|
|
||||||
redirect: getRoutePath(import.meta.env.VITE_ROUTE_HOME) || '/home',
|
|
||||||
meta: {
|
|
||||||
title: 'root',
|
|
||||||
constant: true
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const NOT_FOUND_ROUTE: CustomRoute = {
|
|
||||||
name: 'not-found',
|
|
||||||
path: '/:pathMatch(.*)*',
|
|
||||||
component: 'layout.blank$view.404',
|
|
||||||
meta: {
|
|
||||||
title: 'not-found',
|
|
||||||
constant: true
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/** builtin routes, it must be constant and setup in vue-router */
|
|
||||||
const builtinRoutes: CustomRoute[] = [ROOT_ROUTE, NOT_FOUND_ROUTE];
|
|
||||||
|
|
||||||
/** create builtin vue routes */
|
|
||||||
export function createBuiltinVueRoutes() {
|
|
||||||
return transformElegantRoutesToVueRoutes(builtinRoutes, layouts, views);
|
|
||||||
}
|
|
||||||
@@ -1,40 +1,39 @@
|
|||||||
import type { CustomRoute, ElegantConstRoute, ElegantRoute } from '@elegant-router/types';
|
import type { AutoRouterRedirect, AutoRouterRoute } from '@elegant-router/types';
|
||||||
import { generatedRoutes } from '../elegant/routes';
|
import { routes } from '../_generated/routes';
|
||||||
import { layouts, views } from '../elegant/imports';
|
import { layouts, views } from '../_generated/imports';
|
||||||
import { transformElegantRoutesToVueRoutes } from '../elegant/transform';
|
import { transformToVueRoutes } from '../_generated/transformer';
|
||||||
|
|
||||||
/**
|
|
||||||
* custom routes
|
|
||||||
*
|
|
||||||
* @link https://github.com/soybeanjs/elegant-router?tab=readme-ov-file#custom-route
|
|
||||||
*/
|
|
||||||
const customRoutes: CustomRoute[] = [];
|
|
||||||
|
|
||||||
/** create routes when the auth route mode is static */
|
/** create routes when the auth route mode is static */
|
||||||
export function createStaticRoutes() {
|
export function createStaticRoutes() {
|
||||||
const constantRoutes: ElegantRoute[] = [];
|
const constantRoutes: AutoRouterRoute[] = [];
|
||||||
|
const authRoutes: AutoRouterRoute[] = [];
|
||||||
|
|
||||||
const authRoutes: ElegantRoute[] = [];
|
let rootRoute: AutoRouterRedirect | undefined;
|
||||||
|
|
||||||
[...customRoutes, ...generatedRoutes].forEach(item => {
|
routes.forEach(item => {
|
||||||
if (item.meta?.constant) {
|
if (item.meta?.constant) {
|
||||||
constantRoutes.push(item);
|
constantRoutes.push(item);
|
||||||
} else {
|
} else {
|
||||||
authRoutes.push(item);
|
authRoutes.push(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.name === 'Root') {
|
||||||
|
rootRoute = item as AutoRouterRedirect;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
constantRoutes,
|
constantRoutes,
|
||||||
authRoutes
|
authRoutes,
|
||||||
|
rootRoute: rootRoute as AutoRouterRedirect
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get auth vue routes
|
* Get auth vue routes
|
||||||
*
|
*
|
||||||
* @param routes Elegant routes
|
* @param authRoutes Elegant routes
|
||||||
*/
|
*/
|
||||||
export function getAuthVueRoutes(routes: ElegantConstRoute[]) {
|
export function getAuthVueRoutes(authRoutes: AutoRouterRoute[]) {
|
||||||
return transformElegantRoutesToVueRoutes(routes, layouts, views);
|
return transformToVueRoutes(authRoutes, layouts, views);
|
||||||
}
|
}
|
||||||
|
|||||||
70
src/typings/api/common.d.ts
vendored
70
src/typings/api/common.d.ts
vendored
@@ -5,46 +5,38 @@
|
|||||||
*/
|
*/
|
||||||
declare namespace Api {
|
declare namespace Api {
|
||||||
namespace Common {
|
namespace Common {
|
||||||
/** common params of paginating */
|
interface CreatedUpdatedDTO {
|
||||||
interface PaginatingCommonParams {
|
/** 创建人 */
|
||||||
/** current page number */
|
createdBy: string;
|
||||||
current: number;
|
/** 创建时间 */
|
||||||
/** page size */
|
createdTime: string;
|
||||||
size: number;
|
/** 更新人 */
|
||||||
/** total count */
|
updatedBy: string;
|
||||||
|
/** 更新时间 */
|
||||||
|
updatedTime: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CommonRecordDTO extends CreatedUpdatedDTO {
|
||||||
|
/** 主键 */
|
||||||
|
id: number;
|
||||||
|
/**
|
||||||
|
* 启用状态 Enable status
|
||||||
|
*
|
||||||
|
* - "1": 启用
|
||||||
|
* - "2": 禁用
|
||||||
|
*/
|
||||||
|
status: Union.EnableStatus | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PaginationQueryDTO {
|
||||||
|
page: number;
|
||||||
|
pageSize: number;
|
||||||
|
sort: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PaginationDTO extends Pick<PaginationQueryDTO, 'page' | 'pageSize'> {
|
||||||
|
/** 总条数 */
|
||||||
total: number;
|
total: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** common params of paginating query list data */
|
|
||||||
interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
|
|
||||||
records: T[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** common search params of table */
|
|
||||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* enable status
|
|
||||||
*
|
|
||||||
* - "1": enabled
|
|
||||||
* - "2": disabled
|
|
||||||
*/
|
|
||||||
type EnableStatus = '1' | '2';
|
|
||||||
|
|
||||||
/** common record */
|
|
||||||
type CommonRecord<T = any> = {
|
|
||||||
/** record id */
|
|
||||||
id: number;
|
|
||||||
/** record creator */
|
|
||||||
createBy: string;
|
|
||||||
/** record create time */
|
|
||||||
createTime: string;
|
|
||||||
/** record updater */
|
|
||||||
updateBy: string;
|
|
||||||
/** record update time */
|
|
||||||
updateTime: string;
|
|
||||||
/** record status */
|
|
||||||
status: EnableStatus | null;
|
|
||||||
} & T;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
42
src/typings/api/menu.d.ts
vendored
Normal file
42
src/typings/api/menu.d.ts
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
declare namespace Api {
|
||||||
|
namespace Menu {
|
||||||
|
type RouteKey = import('@elegant-router/types').RouteKey;
|
||||||
|
|
||||||
|
interface Menu extends Common.CommonRecordDTO {
|
||||||
|
/** 菜单名称 */
|
||||||
|
name: string;
|
||||||
|
/** 菜单类型 */
|
||||||
|
menuType: Union.MenuType;
|
||||||
|
/** 菜单描述 */
|
||||||
|
description?: string | null;
|
||||||
|
/** 菜单图标 */
|
||||||
|
icon?: string | null;
|
||||||
|
/** 菜单图标类型 */
|
||||||
|
iconType?: string | null;
|
||||||
|
/** 父级菜单ID */
|
||||||
|
parentId?: number | null;
|
||||||
|
/** 菜单排序 */
|
||||||
|
order?: number | null;
|
||||||
|
/** 是否隐藏 */
|
||||||
|
isHidden?: boolean | null;
|
||||||
|
/** iframe 页面URL */
|
||||||
|
iframeUrl?: string | null;
|
||||||
|
/** 链接 */
|
||||||
|
href?: string | null;
|
||||||
|
/** 路由名称 */
|
||||||
|
routeName?: RouteKey | null;
|
||||||
|
/** 路由查询参数 */
|
||||||
|
routeQueries?: Record<string, string | number | boolean> | null;
|
||||||
|
/** 路由路径参数 */
|
||||||
|
routeParams?: Record<string, string | number | boolean> | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MenuListDTO extends Common.PaginationDTO {
|
||||||
|
list: Menu[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MenuTreeDTO extends Menu {
|
||||||
|
children?: MenuTreeDTO[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
39
src/typings/api/route.d.ts
vendored
39
src/typings/api/route.d.ts
vendored
@@ -1,19 +1,34 @@
|
|||||||
declare namespace Api {
|
declare namespace Api {
|
||||||
/**
|
|
||||||
* namespace Route
|
|
||||||
*
|
|
||||||
* backend api module: "route"
|
|
||||||
*/
|
|
||||||
namespace Route {
|
namespace Route {
|
||||||
type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;
|
interface RouteDTO extends Common.CommonRecordDTO {
|
||||||
|
/** 路由路径 */
|
||||||
interface MenuRoute extends ElegantConstRoute {
|
path: string;
|
||||||
id: string;
|
/** 路由名称 */
|
||||||
|
name: string;
|
||||||
|
/** 路由布局 */
|
||||||
|
layout: string;
|
||||||
|
/** 路由组件 */
|
||||||
|
component: string;
|
||||||
|
/** 重定向路径 */
|
||||||
|
redirect?: string | null;
|
||||||
|
/** 路由图标 */
|
||||||
|
icon?: string | null;
|
||||||
|
/** 路由图标类型 */
|
||||||
|
iconType?: string | null;
|
||||||
|
/** 是否缓存 */
|
||||||
|
isCache?: boolean | null;
|
||||||
|
/** 是否支持多开 */
|
||||||
|
isMultiple?: boolean | null;
|
||||||
|
/** 固定索引 */
|
||||||
|
fixedIndex?: number | null;
|
||||||
|
/** 是否需要权限 */
|
||||||
|
requireAuth?: boolean | null;
|
||||||
|
/** 路由属性 */
|
||||||
|
props?: Record<string, string | number | boolean> | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface UserRoute {
|
interface RouteListDTO extends Common.PaginationDTO {
|
||||||
routes: MenuRoute[];
|
list: RouteDTO[];
|
||||||
home: import('@elegant-router/types').LastLevelRouteKey;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
31
src/typings/api/union.d.ts
vendored
Normal file
31
src/typings/api/union.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
declare namespace Api {
|
||||||
|
namespace Union {
|
||||||
|
/**
|
||||||
|
* 是否 Yes or No
|
||||||
|
*
|
||||||
|
* - "Y": yes
|
||||||
|
* - "N": no
|
||||||
|
*/
|
||||||
|
type YesOrNo = 'Y' | 'N';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用状态 Enable status
|
||||||
|
*
|
||||||
|
* - "1": 启用
|
||||||
|
* - "2": 禁用
|
||||||
|
*/
|
||||||
|
type EnableStatus = '1' | '2';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单类型
|
||||||
|
*
|
||||||
|
* - "directory": 目录
|
||||||
|
* - "menu": 菜单
|
||||||
|
* - "iframe": iframe 页面(iframe 嵌入页面)
|
||||||
|
* - "link": 链接(跳转外部链接)
|
||||||
|
* - "page": 页面(不展示在菜单中,可用于作为菜单类型的子菜单展示在面包屑中)
|
||||||
|
* - "other": 其他(作用自行定义)
|
||||||
|
*/
|
||||||
|
type MenuType = 'page' | 'directory' | 'menu' | 'iframe' | 'link' | 'other';
|
||||||
|
}
|
||||||
|
}
|
||||||
92
src/typings/app.d.ts
vendored
92
src/typings/app.d.ts
vendored
@@ -188,9 +188,9 @@ declare namespace App {
|
|||||||
type VNode = import('vue').VNode;
|
type VNode = import('vue').VNode;
|
||||||
type RouteLocationNormalizedLoaded = import('vue-router').RouteLocationNormalizedLoaded;
|
type RouteLocationNormalizedLoaded = import('vue-router').RouteLocationNormalizedLoaded;
|
||||||
type RouteKey = import('@elegant-router/types').RouteKey;
|
type RouteKey = import('@elegant-router/types').RouteKey;
|
||||||
type RouteMap = import('@elegant-router/types').RouteMap;
|
type RoutePathMap = import('@elegant-router/types').RoutePathMap;
|
||||||
type RoutePath = import('@elegant-router/types').RoutePath;
|
type RoutePath = import('@elegant-router/types').RoutePath;
|
||||||
type LastLevelRouteKey = import('@elegant-router/types').LastLevelRouteKey;
|
type RouteFileKey = import('@elegant-router/types').RouteFileKey;
|
||||||
|
|
||||||
/** The router push options */
|
/** The router push options */
|
||||||
type RouterPushOptions = {
|
type RouterPushOptions = {
|
||||||
@@ -208,77 +208,25 @@ declare namespace App {
|
|||||||
showMenu?: boolean;
|
showMenu?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MenuType = 'page' | 'directory' | 'menu' | 'iframe' | 'link' | 'button' | 'other';
|
||||||
|
|
||||||
/** The global menu */
|
/** The global menu */
|
||||||
type Menu = {
|
interface Menu {
|
||||||
/**
|
id: number;
|
||||||
* The menu key
|
name: string;
|
||||||
*
|
menuType: MenuType;
|
||||||
* Equal to the route key
|
description?: string | null;
|
||||||
*/
|
icon?: string | null;
|
||||||
key: string;
|
iconType?: string | null;
|
||||||
/** The menu label */
|
parentId?: number | null;
|
||||||
label: string;
|
order?: number | null;
|
||||||
/** The menu i18n key */
|
isHidden?: boolean | null;
|
||||||
i18nKey?: I18n.I18nKey | null;
|
iframeUrl?: string | null;
|
||||||
/** The route key */
|
href?: string | null;
|
||||||
routeKey: RouteKey;
|
routeName?: RouteKey | null;
|
||||||
/** The route path */
|
routeQueries?: Record<string, string | number | boolean> | null;
|
||||||
routePath: RoutePath;
|
routeParams?: Record<string, string | number | boolean> | null;
|
||||||
/** The menu icon */
|
}
|
||||||
icon?: () => VNode;
|
|
||||||
/** The menu children */
|
|
||||||
children?: Menu[];
|
|
||||||
};
|
|
||||||
|
|
||||||
type Breadcrumb = Omit<Menu, 'children'> & {
|
|
||||||
options?: Breadcrumb[];
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Tab route */
|
|
||||||
type TabRoute = Pick<RouteLocationNormalizedLoaded, 'name' | 'path' | 'meta'> &
|
|
||||||
Partial<Pick<RouteLocationNormalizedLoaded, 'fullPath' | 'query' | 'matched'>>;
|
|
||||||
|
|
||||||
/** The global tab */
|
|
||||||
type Tab = {
|
|
||||||
/** The tab id */
|
|
||||||
id: string;
|
|
||||||
/** The tab label */
|
|
||||||
label: string;
|
|
||||||
/**
|
|
||||||
* The new tab label
|
|
||||||
*
|
|
||||||
* If set, the tab label will be replaced by this value
|
|
||||||
*/
|
|
||||||
newLabel?: string;
|
|
||||||
/**
|
|
||||||
* The old tab label
|
|
||||||
*
|
|
||||||
* when reset the tab label, the tab label will be replaced by this value
|
|
||||||
*/
|
|
||||||
oldLabel?: string;
|
|
||||||
/** The tab route key */
|
|
||||||
routeKey: LastLevelRouteKey;
|
|
||||||
/** The tab route path */
|
|
||||||
routePath: RouteMap[LastLevelRouteKey];
|
|
||||||
/** The tab route full path */
|
|
||||||
fullPath: string;
|
|
||||||
/** The tab fixed index */
|
|
||||||
fixedIndex?: number | null;
|
|
||||||
/**
|
|
||||||
* Tab icon
|
|
||||||
*
|
|
||||||
* Iconify icon
|
|
||||||
*/
|
|
||||||
icon?: string;
|
|
||||||
/**
|
|
||||||
* Tab local icon
|
|
||||||
*
|
|
||||||
* Local icon
|
|
||||||
*/
|
|
||||||
localIcon?: string;
|
|
||||||
/** I18n key */
|
|
||||||
i18nKey?: I18n.I18nKey | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Form rule */
|
/** Form rule */
|
||||||
type FormRule = import('naive-ui').FormItemRule;
|
type FormRule = import('naive-ui').FormItemRule;
|
||||||
|
|||||||
236
src/typings/elegant-router.d.ts
vendored
236
src/typings/elegant-router.d.ts
vendored
@@ -1,240 +1,100 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
|
/* oxlint-disable */
|
||||||
|
// biome-ignore lint: disable
|
||||||
// Generated by elegant-router
|
// Generated by elegant-router
|
||||||
// Read more: https://github.com/soybeanjs/elegant-router
|
// Read more: https://github.com/soybeanjs/elegant-router
|
||||||
|
|
||||||
declare module "@elegant-router/types" {
|
declare module "@elegant-router/types" {
|
||||||
type ElegantConstRoute = import('@elegant-router/vue').ElegantConstRoute;
|
type RouteRecordSingleView = import("vue-router").RouteRecordSingleView;
|
||||||
|
type RouteRecordRedirect = import("vue-router").RouteRecordRedirect;
|
||||||
|
type RouteComponent = import("vue-router").RouteComponent;
|
||||||
|
|
||||||
|
type Lazy<T> = () => Promise<T>;
|
||||||
|
|
||||||
|
export type RawRouteComponent = RouteComponent | Lazy<RouteComponent>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* route layout
|
* route layout key
|
||||||
*/
|
*/
|
||||||
export type RouteLayout = "base" | "blank";
|
export type RouteLayoutKey = "base" | "blank";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* route map
|
* route path map
|
||||||
*/
|
*/
|
||||||
export type RouteMap = {
|
export type RoutePathMap = {
|
||||||
"root": "/";
|
"Root": "/";
|
||||||
"not-found": "/:pathMatch(.*)*";
|
"NotFound": "/:pathMatch(.*)*";
|
||||||
"403": "/403";
|
"403": "/403";
|
||||||
"404": "/404";
|
"404": "/404";
|
||||||
"500": "/500";
|
"500": "/500";
|
||||||
"home": "/home";
|
"Home": "/home";
|
||||||
"iframe-page": "/iframe-page/:url";
|
"IframeUrl": "/iframe/:url";
|
||||||
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
|
"Login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
|
||||||
|
"ManageMenu": "/manage/menu";
|
||||||
|
"ManageRole": "/manage/role";
|
||||||
|
"ManageRoute": "/manage/route";
|
||||||
|
"ManageUser": "/manage/user";
|
||||||
|
"Wip": "/wip";
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* route key
|
* route key
|
||||||
*/
|
*/
|
||||||
export type RouteKey = keyof RouteMap;
|
export type RouteKey = keyof RoutePathMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* route path
|
* route path
|
||||||
*/
|
*/
|
||||||
export type RoutePath = RouteMap[RouteKey];
|
export type RoutePath = RoutePathMap[RouteKey];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* custom route key
|
* root route key
|
||||||
*/
|
*/
|
||||||
export type CustomRouteKey = Extract<
|
export type RootRouteKey = 'Root';
|
||||||
RouteKey,
|
|
||||||
| "root"
|
|
||||||
| "not-found"
|
|
||||||
>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the generated route key
|
* not found route key
|
||||||
*/
|
*/
|
||||||
export type GeneratedRouteKey = Exclude<RouteKey, CustomRouteKey>;
|
export type NotFoundRouteKey = 'NotFound';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the first level route key, which contain the layout of the route
|
* builtin route key
|
||||||
*/
|
*/
|
||||||
export type FirstLevelRouteKey = Extract<
|
export type BuiltinRouteKey = RootRouteKey | NotFoundRouteKey;
|
||||||
RouteKey,
|
|
||||||
| "403"
|
|
||||||
| "404"
|
|
||||||
| "500"
|
|
||||||
| "home"
|
|
||||||
| "iframe-page"
|
|
||||||
| "login"
|
|
||||||
>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the custom first level route key
|
* reuse route key
|
||||||
*/
|
*/
|
||||||
export type CustomFirstLevelRouteKey = Extract<
|
export type ReuseRouteKey = never;
|
||||||
CustomRouteKey,
|
|
||||||
| "root"
|
|
||||||
| "not-found"
|
|
||||||
>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the last level route key, which has the page file
|
* the route file key, which has it's own file
|
||||||
*/
|
*/
|
||||||
export type LastLevelRouteKey = Extract<
|
export type RouteFileKey = Exclude<RouteKey, BuiltinRouteKey | ReuseRouteKey>;
|
||||||
RouteKey,
|
|
||||||
| "403"
|
|
||||||
| "404"
|
|
||||||
| "500"
|
|
||||||
| "iframe-page"
|
|
||||||
| "login"
|
|
||||||
| "home"
|
|
||||||
>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the custom last level route key
|
* mapped name and path
|
||||||
*/
|
*/
|
||||||
export type CustomLastLevelRouteKey = Extract<
|
type MappedNamePath = {
|
||||||
CustomRouteKey,
|
[K in RouteKey]: { name: K; path: RoutePathMap[K] };
|
||||||
| "root"
|
}[RouteKey];
|
||||||
| "not-found"
|
|
||||||
>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the single level route key
|
* auto router single view
|
||||||
*/
|
*/
|
||||||
export type SingleLevelRouteKey = FirstLevelRouteKey & LastLevelRouteKey;
|
export type AutoRouterSingleView = Omit<RouteRecordSingleView, 'component' | 'name' | 'path'> & {
|
||||||
|
component: RouteFileKey;
|
||||||
|
layout: RouteLayoutKey;
|
||||||
|
} & MappedNamePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the custom single level route key
|
* auto router redirect
|
||||||
*/
|
*/
|
||||||
export type CustomSingleLevelRouteKey = CustomFirstLevelRouteKey & CustomLastLevelRouteKey;
|
export type AutoRouterRedirect = Omit<RouteRecordRedirect, 'children' | 'name' | 'path'> & MappedNamePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the first level route key, but not the single level
|
* auto router route
|
||||||
*/
|
*/
|
||||||
export type FirstLevelRouteNotSingleKey = Exclude<FirstLevelRouteKey, SingleLevelRouteKey>;
|
export type AutoRouterRoute = AutoRouterSingleView | AutoRouterRedirect;
|
||||||
|
|
||||||
/**
|
|
||||||
* the custom first level route key, but not the single level
|
|
||||||
*/
|
|
||||||
export type CustomFirstLevelRouteNotSingleKey = Exclude<CustomFirstLevelRouteKey, CustomSingleLevelRouteKey>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the center level route key
|
|
||||||
*/
|
|
||||||
export type CenterLevelRouteKey = Exclude<GeneratedRouteKey, FirstLevelRouteKey | LastLevelRouteKey>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the custom center level route key
|
|
||||||
*/
|
|
||||||
export type CustomCenterLevelRouteKey = Exclude<CustomRouteKey, CustomFirstLevelRouteKey | CustomLastLevelRouteKey>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the center level route key
|
|
||||||
*/
|
|
||||||
type GetChildRouteKey<K extends RouteKey, T extends RouteKey = RouteKey> = T extends `${K}_${infer R}`
|
|
||||||
? R extends `${string}_${string}`
|
|
||||||
? never
|
|
||||||
: T
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the single level route
|
|
||||||
*/
|
|
||||||
type SingleLevelRoute<K extends SingleLevelRouteKey = SingleLevelRouteKey> = K extends string
|
|
||||||
? Omit<ElegantConstRoute, 'children'> & {
|
|
||||||
name: K;
|
|
||||||
path: RouteMap[K];
|
|
||||||
component: `layout.${RouteLayout}$view.${K}`;
|
|
||||||
}
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the last level route
|
|
||||||
*/
|
|
||||||
type LastLevelRoute<K extends GeneratedRouteKey> = K extends LastLevelRouteKey
|
|
||||||
? Omit<ElegantConstRoute, 'children'> & {
|
|
||||||
name: K;
|
|
||||||
path: RouteMap[K];
|
|
||||||
component: `view.${K}`;
|
|
||||||
}
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the center level route
|
|
||||||
*/
|
|
||||||
type CenterLevelRoute<K extends GeneratedRouteKey> = K extends CenterLevelRouteKey
|
|
||||||
? Omit<ElegantConstRoute, 'component'> & {
|
|
||||||
name: K;
|
|
||||||
path: RouteMap[K];
|
|
||||||
children: (CenterLevelRoute<GetChildRouteKey<K>> | LastLevelRoute<GetChildRouteKey<K>>)[];
|
|
||||||
}
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the multi level route
|
|
||||||
*/
|
|
||||||
type MultiLevelRoute<K extends FirstLevelRouteNotSingleKey = FirstLevelRouteNotSingleKey> = K extends string
|
|
||||||
? ElegantConstRoute & {
|
|
||||||
name: K;
|
|
||||||
path: RouteMap[K];
|
|
||||||
component: `layout.${RouteLayout}`;
|
|
||||||
children: (CenterLevelRoute<GetChildRouteKey<K>> | LastLevelRoute<GetChildRouteKey<K>>)[];
|
|
||||||
}
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the custom first level route
|
|
||||||
*/
|
|
||||||
type CustomSingleLevelRoute<K extends CustomFirstLevelRouteKey = CustomFirstLevelRouteKey> = K extends string
|
|
||||||
? Omit<ElegantConstRoute, 'children'> & {
|
|
||||||
name: K;
|
|
||||||
path: RouteMap[K];
|
|
||||||
component?: `layout.${RouteLayout}$view.${LastLevelRouteKey}`;
|
|
||||||
}
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the custom last level route
|
|
||||||
*/
|
|
||||||
type CustomLastLevelRoute<K extends CustomRouteKey> = K extends CustomLastLevelRouteKey
|
|
||||||
? Omit<ElegantConstRoute, 'children'> & {
|
|
||||||
name: K;
|
|
||||||
path: RouteMap[K];
|
|
||||||
component?: `view.${LastLevelRouteKey}`;
|
|
||||||
}
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the custom center level route
|
|
||||||
*/
|
|
||||||
type CustomCenterLevelRoute<K extends CustomRouteKey> = K extends CustomCenterLevelRouteKey
|
|
||||||
? Omit<ElegantConstRoute, 'component'> & {
|
|
||||||
name: K;
|
|
||||||
path: RouteMap[K];
|
|
||||||
children: (CustomCenterLevelRoute<GetChildRouteKey<K>> | CustomLastLevelRoute<GetChildRouteKey<K>>)[];
|
|
||||||
}
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the custom multi level route
|
|
||||||
*/
|
|
||||||
type CustomMultiLevelRoute<K extends CustomFirstLevelRouteNotSingleKey = CustomFirstLevelRouteNotSingleKey> =
|
|
||||||
K extends string
|
|
||||||
? ElegantConstRoute & {
|
|
||||||
name: K;
|
|
||||||
path: RouteMap[K];
|
|
||||||
component: `layout.${RouteLayout}`;
|
|
||||||
children: (CustomCenterLevelRoute<GetChildRouteKey<K>> | CustomLastLevelRoute<GetChildRouteKey<K>>)[];
|
|
||||||
}
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the custom route
|
|
||||||
*/
|
|
||||||
type CustomRoute = CustomSingleLevelRoute | CustomMultiLevelRoute;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the generated route
|
|
||||||
*/
|
|
||||||
type GeneratedRoute = SingleLevelRoute | MultiLevelRoute;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the elegant route
|
|
||||||
*/
|
|
||||||
type ElegantRoute = GeneratedRoute | CustomRoute;
|
|
||||||
}
|
}
|
||||||
|
|||||||
4
src/typings/router.d.ts
vendored
4
src/typings/router.d.ts
vendored
@@ -1,7 +1,7 @@
|
|||||||
import 'vue-router';
|
export {};
|
||||||
|
|
||||||
declare module 'vue-router' {
|
declare module 'vue-router' {
|
||||||
interface RouteMeta {
|
export interface RouteMeta {
|
||||||
/**
|
/**
|
||||||
* Title of the route
|
* Title of the route
|
||||||
*
|
*
|
||||||
|
|||||||
40
src/typings/typed-router.d.ts
vendored
Normal file
40
src/typings/typed-router.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
/* prettier-ignore */
|
||||||
|
/* oxlint-disable */
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
// Generated by elegant-router
|
||||||
|
// Read more: https://github.com/soybeanjs/elegant-router
|
||||||
|
|
||||||
|
export {}
|
||||||
|
|
||||||
|
declare module "vue-router" {
|
||||||
|
type RouteNamedMap = import("vue-router/auto-routes").RouteNamedMap;
|
||||||
|
|
||||||
|
export interface TypesConfig {
|
||||||
|
RouteNamedMap: RouteNamedMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module "vue-router/auto-routes" {
|
||||||
|
import type { RouteParamsRawGeneric, RouteParamsGeneric, RouteMeta, RouteRecordInfo, ParamValue, ParamValueZeroOrOne } from "vue-router";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* route named map
|
||||||
|
*/
|
||||||
|
export interface RouteNamedMap {
|
||||||
|
"Root": RouteRecordInfo<"Root", "/", Record<never, never>, Record<never, never>>;
|
||||||
|
"NotFound": RouteRecordInfo<"NotFound", "/:pathMatch(.*)*", Record<never, never>, Record<never, never>>;
|
||||||
|
"403": RouteRecordInfo<"403", "/403", Record<never, never>, Record<never, never>>;
|
||||||
|
"404": RouteRecordInfo<"404", "/404", Record<never, never>, Record<never, never>>;
|
||||||
|
"500": RouteRecordInfo<"500", "/500", Record<never, never>, Record<never, never>>;
|
||||||
|
"Home": RouteRecordInfo<"Home", "/home", Record<never, never>, Record<never, never>>;
|
||||||
|
"IframeUrl": RouteRecordInfo<"IframeUrl", "/iframe/:url", { url: ParamValue<true> }, { url: ParamValue<false> }>;
|
||||||
|
"Login": RouteRecordInfo<"Login", "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?", { module?: ParamValueZeroOrOne<true> }, { module?: ParamValueZeroOrOne<false> }>;
|
||||||
|
"ManageMenu": RouteRecordInfo<"ManageMenu", "/manage/menu", Record<never, never>, Record<never, never>>;
|
||||||
|
"ManageRole": RouteRecordInfo<"ManageRole", "/manage/role", Record<never, never>, Record<never, never>>;
|
||||||
|
"ManageRoute": RouteRecordInfo<"ManageRoute", "/manage/route", Record<never, never>, Record<never, never>>;
|
||||||
|
"ManageUser": RouteRecordInfo<"ManageUser", "/manage/user", Record<never, never>, Record<never, never>>;
|
||||||
|
"Wip": RouteRecordInfo<"Wip", "/wip", Record<never, never>, Record<never, never>>
|
||||||
|
}
|
||||||
|
}
|
||||||
5
src/views/(builtin)/wip/index.vue
Normal file
5
src/views/(builtin)/wip/index.vue
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<LookForward />
|
||||||
|
</template>
|
||||||
5
src/views/manage/menu/index.vue
Normal file
5
src/views/manage/menu/index.vue
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>ManageMenu</div>
|
||||||
|
</template>
|
||||||
5
src/views/manage/role/index.vue
Normal file
5
src/views/manage/role/index.vue
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>ManageRole</div>
|
||||||
|
</template>
|
||||||
5
src/views/manage/route/index.vue
Normal file
5
src/views/manage/route/index.vue
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>ManageRoute</div>
|
||||||
|
</template>
|
||||||
5
src/views/manage/user/index.vue
Normal file
5
src/views/manage/user/index.vue
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>ManageUser</div>
|
||||||
|
</template>
|
||||||
Reference in New Issue
Block a user