mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-22 11:36:37 +08:00
feat(projects): 添加页面缓存、记录在tab中的缓存页面的滚动条位置
This commit is contained in:
parent
db3c25ea14
commit
1d63a83822
@ -1,12 +1,13 @@
|
||||
/** 请求环境配置 */
|
||||
type ServiceEnv = {
|
||||
[key in Service.HttpEnv]: {
|
||||
type ServiceEnv = Record<
|
||||
Service.HttpEnv,
|
||||
{
|
||||
/** 请求环境 */
|
||||
env: Service.HttpEnv;
|
||||
/** 请求地址 */
|
||||
url: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
/** 请求的环境 */
|
||||
export const serviceEnv: ServiceEnv = {
|
||||
|
@ -11,7 +11,9 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/dashboard/analysis',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: '分析页'
|
||||
title: '分析页',
|
||||
requiresAuth: true,
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -20,13 +22,13 @@ const routes: AuthRoute.Route[] = [
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: '工作台',
|
||||
requiresAuth: true,
|
||||
permissions: ['super', 'admin']
|
||||
}
|
||||
}
|
||||
],
|
||||
meta: {
|
||||
title: '仪表盘',
|
||||
requiresAuth: true,
|
||||
icon: 'carbon:dashboard',
|
||||
order: 1
|
||||
}
|
||||
@ -41,7 +43,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/document/vue',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: 'vue文档'
|
||||
title: 'vue文档',
|
||||
requiresAuth: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -49,7 +52,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/document/vue-new',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: 'vue文档(新版)'
|
||||
title: 'vue文档(新版)',
|
||||
requiresAuth: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -57,7 +61,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/document/vite',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: 'vite文档'
|
||||
title: 'vite文档',
|
||||
requiresAuth: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -65,7 +70,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/document/naive',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: 'naive文档'
|
||||
title: 'naive文档',
|
||||
requiresAuth: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -73,6 +79,7 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/document/project',
|
||||
meta: {
|
||||
title: '项目文档(外链)',
|
||||
requiresAuth: true,
|
||||
href: 'https://docs.soybean.pro/'
|
||||
}
|
||||
}
|
||||
@ -89,7 +96,9 @@ const routes: AuthRoute.Route[] = [
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: '关于',
|
||||
requiresAuth: true,
|
||||
singleLayout: 'basic',
|
||||
keepAlive: true,
|
||||
permissions: ['super', 'admin', 'test'],
|
||||
icon: 'fluent:book-information-24-regular',
|
||||
order: 7
|
||||
@ -105,7 +114,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/exception/403',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: '异常页403'
|
||||
title: '异常页403',
|
||||
requiresAuth: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -113,7 +123,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/exception/404',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: '异常页404'
|
||||
title: '异常页404',
|
||||
requiresAuth: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -121,7 +132,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/exception/500',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: '异常页500'
|
||||
title: '异常页500',
|
||||
requiresAuth: true
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -146,7 +158,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/multi-menu/first/second',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: '二级菜单'
|
||||
title: '二级菜单',
|
||||
requiresAuth: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -159,7 +172,8 @@ const routes: AuthRoute.Route[] = [
|
||||
path: '/multi-menu/first/second-new/third',
|
||||
component: 'self',
|
||||
meta: {
|
||||
title: '三级菜单'
|
||||
title: '三级菜单',
|
||||
requiresAuth: true
|
||||
}
|
||||
}
|
||||
],
|
||||
|
12
package.json
12
package.json
@ -26,7 +26,7 @@
|
||||
"dependencies": {
|
||||
"@antv/g2plot": "^2.4.7",
|
||||
"@better-scroll/core": "^2.4.2",
|
||||
"@vueuse/core": "^7.5.3",
|
||||
"@vueuse/core": "^7.5.4",
|
||||
"axios": "^0.25.0",
|
||||
"clipboard": "^2.0.8",
|
||||
"colord": "^2.9.2",
|
||||
@ -41,9 +41,9 @@
|
||||
"vue-router": "^4.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^16.0.3",
|
||||
"@commitlint/cli": "^16.1.0",
|
||||
"@commitlint/config-conventional": "^16.0.0",
|
||||
"@iconify/json": "^1.1.458",
|
||||
"@iconify/json": "^1.1.459",
|
||||
"@iconify/vue": "^3.1.2",
|
||||
"@types/crypto-js": "^4.1.0",
|
||||
"@types/node": "^17.0.10",
|
||||
@ -64,16 +64,16 @@
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-vue": "^8.3.0",
|
||||
"husky": "^7.0.4",
|
||||
"lint-staged": "^12.2.1",
|
||||
"lint-staged": "^12.2.2",
|
||||
"mockjs": "^1.1.0",
|
||||
"patch-package": "^6.4.7",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"prettier": "^2.5.1",
|
||||
"rollup-plugin-visualizer": "^5.5.4",
|
||||
"sass": "^1.49.0",
|
||||
"typescript": "^4.5.4",
|
||||
"typescript": "^4.5.5",
|
||||
"unplugin-icons": "^0.13.0",
|
||||
"unplugin-vue-components": "^0.17.13",
|
||||
"unplugin-vue-components": "^0.17.14",
|
||||
"vite": "^2.7.13",
|
||||
"vite-plugin-html": "^2.1.2",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
|
206
pnpm-lock.yaml
206
pnpm-lock.yaml
@ -3,9 +3,9 @@ lockfileVersion: 5.3
|
||||
specifiers:
|
||||
'@antv/g2plot': ^2.4.7
|
||||
'@better-scroll/core': ^2.4.2
|
||||
'@commitlint/cli': ^16.0.3
|
||||
'@commitlint/cli': ^16.1.0
|
||||
'@commitlint/config-conventional': ^16.0.0
|
||||
'@iconify/json': ^1.1.458
|
||||
'@iconify/json': ^1.1.459
|
||||
'@iconify/vue': ^3.1.2
|
||||
'@types/crypto-js': ^4.1.0
|
||||
'@types/node': ^17.0.10
|
||||
@ -15,7 +15,7 @@ specifiers:
|
||||
'@vitejs/plugin-vue': ^2.0.1
|
||||
'@vue/eslint-config-prettier': ^7.0.0
|
||||
'@vue/eslint-config-typescript': ^10.0.0
|
||||
'@vueuse/core': ^7.5.3
|
||||
'@vueuse/core': ^7.5.4
|
||||
axios: ^0.25.0
|
||||
clipboard: ^2.0.8
|
||||
colord: ^2.9.2
|
||||
@ -33,7 +33,7 @@ specifiers:
|
||||
eslint-plugin-vue: ^8.3.0
|
||||
form-data: ^4.0.0
|
||||
husky: ^7.0.4
|
||||
lint-staged: ^12.2.1
|
||||
lint-staged: ^12.2.2
|
||||
lodash-es: ^4.17.21
|
||||
mockjs: ^1.1.0
|
||||
naive-ui: ^2.24.1
|
||||
@ -44,9 +44,9 @@ specifiers:
|
||||
qs: ^6.10.3
|
||||
rollup-plugin-visualizer: ^5.5.4
|
||||
sass: ^1.49.0
|
||||
typescript: ^4.5.4
|
||||
typescript: ^4.5.5
|
||||
unplugin-icons: ^0.13.0
|
||||
unplugin-vue-components: ^0.17.13
|
||||
unplugin-vue-components: ^0.17.14
|
||||
vite: ^2.7.13
|
||||
vite-plugin-html: ^2.1.2
|
||||
vite-plugin-mock: ^2.9.6
|
||||
@ -60,7 +60,7 @@ specifiers:
|
||||
dependencies:
|
||||
'@antv/g2plot': registry.npmmirror.com/@antv/g2plot/2.4.7
|
||||
'@better-scroll/core': registry.nlark.com/@better-scroll/core/2.4.2
|
||||
'@vueuse/core': registry.npmmirror.com/@vueuse/core/7.5.3_vue@3.2.26
|
||||
'@vueuse/core': registry.npmmirror.com/@vueuse/core/7.5.4_vue@3.2.26
|
||||
axios: registry.npmmirror.com/axios/0.25.0
|
||||
clipboard: registry.npmmirror.com/clipboard/2.0.8
|
||||
colord: registry.npmmirror.com/colord/2.9.2
|
||||
@ -69,24 +69,24 @@ dependencies:
|
||||
form-data: registry.nlark.com/form-data/4.0.0
|
||||
lodash-es: registry.npmmirror.com/lodash-es/4.17.21
|
||||
naive-ui: registry.npmmirror.com/naive-ui/2.24.1_vue@3.2.26
|
||||
pinia: registry.npmmirror.com/pinia/2.0.9_typescript@4.5.4+vue@3.2.26
|
||||
pinia: registry.npmmirror.com/pinia/2.0.9_typescript@4.5.5+vue@3.2.26
|
||||
qs: registry.npmmirror.com/qs/6.10.3
|
||||
vue: registry.npmmirror.com/vue/3.2.26
|
||||
vue-router: registry.npmmirror.com/vue-router/4.0.12_vue@3.2.26
|
||||
|
||||
devDependencies:
|
||||
'@commitlint/cli': registry.npmmirror.com/@commitlint/cli/16.0.3_@types+node@17.0.10
|
||||
'@commitlint/cli': registry.npmmirror.com/@commitlint/cli/16.1.0_@types+node@17.0.10
|
||||
'@commitlint/config-conventional': registry.npmmirror.com/@commitlint/config-conventional/16.0.0
|
||||
'@iconify/json': registry.npmmirror.com/@iconify/json/1.1.458
|
||||
'@iconify/json': registry.npmmirror.com/@iconify/json/1.1.459
|
||||
'@iconify/vue': registry.npmmirror.com/@iconify/vue/3.1.2_vue@3.2.26
|
||||
'@types/crypto-js': registry.npmmirror.com/@types/crypto-js/4.1.0
|
||||
'@types/node': registry.npmmirror.com/@types/node/17.0.10
|
||||
'@types/qs': registry.npmmirror.com/@types/qs/6.9.7
|
||||
'@typescript-eslint/eslint-plugin': registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.10.0_3b6b276e93ead7cf6063f183a5e18d1f
|
||||
'@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.10.0_eslint@8.7.0+typescript@4.5.4
|
||||
'@typescript-eslint/eslint-plugin': registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.10.0_706fb07ce74b1db611f19a02ad2ce784
|
||||
'@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.10.0_eslint@8.7.0+typescript@4.5.5
|
||||
'@vitejs/plugin-vue': registry.npmmirror.com/@vitejs/plugin-vue/2.0.1_vite@2.7.13+vue@3.2.26
|
||||
'@vue/eslint-config-prettier': registry.npmmirror.com/@vue/eslint-config-prettier/7.0.0_eslint@8.7.0+prettier@2.5.1
|
||||
'@vue/eslint-config-typescript': registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_3bd88b78ccaf1b54747cae8c2dba8166
|
||||
'@vue/eslint-config-typescript': registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_b5007341d5f2a2e7b479ac173dfc16cf
|
||||
commitizen: registry.npmmirror.com/commitizen/4.2.4_@types+node@17.0.10
|
||||
cross-env: registry.nlark.com/cross-env/7.0.3
|
||||
cz-conventional-changelog: registry.nlark.com/cz-conventional-changelog/3.3.0_@types+node@17.0.10
|
||||
@ -98,21 +98,21 @@ devDependencies:
|
||||
eslint-plugin-prettier: registry.npmmirror.com/eslint-plugin-prettier/4.0.0_4660519532e4c3b0a9e5bb6623cfedf6
|
||||
eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.3.0_eslint@8.7.0
|
||||
husky: registry.npmmirror.com/husky/7.0.4
|
||||
lint-staged: registry.npmmirror.com/lint-staged/12.2.1
|
||||
lint-staged: registry.npmmirror.com/lint-staged/12.2.2
|
||||
mockjs: registry.npmmirror.com/mockjs/1.1.0
|
||||
patch-package: registry.nlark.com/patch-package/6.4.7
|
||||
postinstall-postinstall: registry.npmmirror.com/postinstall-postinstall/2.1.0
|
||||
prettier: registry.npmmirror.com/prettier/2.5.1
|
||||
rollup-plugin-visualizer: registry.npmmirror.com/rollup-plugin-visualizer/5.5.4
|
||||
sass: registry.npmmirror.com/sass/1.49.0
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
unplugin-icons: registry.npmmirror.com/unplugin-icons/0.13.0_vite@2.7.13
|
||||
unplugin-vue-components: registry.npmmirror.com/unplugin-vue-components/0.17.13_vite@2.7.13+vue@3.2.26
|
||||
unplugin-vue-components: registry.npmmirror.com/unplugin-vue-components/0.17.14_vite@2.7.13+vue@3.2.26
|
||||
vite: registry.npmmirror.com/vite/2.7.13_sass@1.49.0
|
||||
vite-plugin-html: registry.npmmirror.com/vite-plugin-html/2.1.2_vite@2.7.13
|
||||
vite-plugin-mock: registry.npmmirror.com/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.7.13
|
||||
vite-plugin-windicss: registry.npmmirror.com/vite-plugin-windicss/1.6.3_vite@2.7.13
|
||||
vue-tsc: registry.npmmirror.com/vue-tsc/0.30.6_typescript@4.5.4
|
||||
vue-tsc: registry.npmmirror.com/vue-tsc/0.30.6_typescript@4.5.5
|
||||
vueuc: registry.npmmirror.com/vueuc/0.4.23_vue@3.2.26
|
||||
windicss: registry.npmmirror.com/windicss/3.4.3
|
||||
|
||||
@ -698,7 +698,7 @@ packages:
|
||||
longest: registry.nlark.com/longest/2.0.1
|
||||
word-wrap: registry.nlark.com/word-wrap/1.2.3
|
||||
optionalDependencies:
|
||||
'@commitlint/load': registry.npmmirror.com/@commitlint/load/16.0.0_@types+node@17.0.10
|
||||
'@commitlint/load': registry.npmmirror.com/@commitlint/load/16.1.0_@types+node@17.0.10
|
||||
transitivePeerDependencies:
|
||||
- '@swc/core'
|
||||
- '@swc/wasm'
|
||||
@ -719,7 +719,7 @@ packages:
|
||||
longest: registry.nlark.com/longest/2.0.1
|
||||
word-wrap: registry.nlark.com/word-wrap/1.2.3
|
||||
optionalDependencies:
|
||||
'@commitlint/load': registry.npmmirror.com/@commitlint/load/16.0.0_@types+node@17.0.10
|
||||
'@commitlint/load': registry.npmmirror.com/@commitlint/load/16.1.0_@types+node@17.0.10
|
||||
transitivePeerDependencies:
|
||||
- '@swc/core'
|
||||
- '@swc/wasm'
|
||||
@ -1033,7 +1033,7 @@ packages:
|
||||
version: 0.3.6
|
||||
dependencies:
|
||||
debug: registry.npmmirror.com/debug/3.2.7
|
||||
resolve: registry.npmmirror.com/resolve/1.20.0
|
||||
resolve: registry.npmmirror.com/resolve/1.21.0
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/eslint-utils/3.0.0_eslint@8.7.0:
|
||||
@ -1132,11 +1132,11 @@ packages:
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/fastq/1.13.0:
|
||||
resolution: {integrity: sha1-YWdg+Ip1Jr38WWt8q4wYk4w2uYw=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fastq/download/fastq-1.13.0.tgz}
|
||||
resolution: {integrity: sha1-YWdg+Ip1Jr38WWt8q4wYk4w2uYw=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fastq/download/fastq-1.13.0.tgz?cache=0&sync_timestamp=1631616062226&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffastq%2Fdownload%2Ffastq-1.13.0.tgz}
|
||||
name: fastq
|
||||
version: 1.13.0
|
||||
dependencies:
|
||||
reusify: registry.nlark.com/reusify/1.0.4
|
||||
reusify: registry.npmmirror.com/reusify/1.0.4
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/fecha/4.2.1:
|
||||
@ -2574,13 +2574,6 @@ packages:
|
||||
signal-exit: registry.npmmirror.com/signal-exit/3.0.6
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/reusify/1.0.4:
|
||||
resolution: {integrity: sha1-kNo4Kx4SbvwCFG6QhFqI2xKSXXY=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/reusify/download/reusify-1.0.4.tgz}
|
||||
name: reusify
|
||||
version: 1.0.4
|
||||
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/rfdc/1.3.0:
|
||||
resolution: {integrity: sha1-0LfEQasnINBdxM8m4ByJYx2doIs=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/rfdc/download/rfdc-1.3.0.tgz}
|
||||
name: rfdc
|
||||
@ -2943,7 +2936,7 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/tsutils/3.21.0_typescript@4.5.4:
|
||||
registry.nlark.com/tsutils/3.21.0_typescript@4.5.5:
|
||||
resolution: {integrity: sha1-tIcX05TOpsHglpg+7Vjp1hcVtiM=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/tsutils/download/tsutils-3.21.0.tgz}
|
||||
id: registry.nlark.com/tsutils/3.21.0
|
||||
name: tsutils
|
||||
@ -2953,7 +2946,7 @@ packages:
|
||||
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
|
||||
dependencies:
|
||||
tslib: registry.npmmirror.com/tslib/1.14.1
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
dev: true
|
||||
|
||||
registry.nlark.com/type-check/0.4.0:
|
||||
@ -3428,17 +3421,17 @@ packages:
|
||||
to-fast-properties: registry.nlark.com/to-fast-properties/2.0.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@commitlint/cli/16.0.3_@types+node@17.0.10:
|
||||
resolution: {integrity: sha512-SB1od4/1ek5SShNKjKgUdpqiVNulNVgCkjkV4Zz9zLKrxn3sPcgvXMQNh/wy0/T4WPUVgHrHGcxWYOYXxrGwpg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@commitlint/cli/download/@commitlint/cli-16.0.3.tgz}
|
||||
id: registry.npmmirror.com/@commitlint/cli/16.0.3
|
||||
registry.npmmirror.com/@commitlint/cli/16.1.0_@types+node@17.0.10:
|
||||
resolution: {integrity: sha512-x5L1knvA3isRWBRVQx+Q6D45pA9139a2aZQYpxkljMG0dj4UHZkCnsYWpnGalxPxASI7nrI0KedKfS2YeQ55cQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@commitlint/cli/download/@commitlint/cli-16.1.0.tgz}
|
||||
id: registry.npmmirror.com/@commitlint/cli/16.1.0
|
||||
name: '@commitlint/cli'
|
||||
version: 16.0.3
|
||||
version: 16.1.0
|
||||
engines: {node: '>=v12'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@commitlint/format': registry.npmmirror.com/@commitlint/format/16.0.0
|
||||
'@commitlint/lint': registry.npmmirror.com/@commitlint/lint/16.0.0
|
||||
'@commitlint/load': registry.npmmirror.com/@commitlint/load/16.0.0_@types+node@17.0.10
|
||||
'@commitlint/load': registry.npmmirror.com/@commitlint/load/16.1.0_@types+node@17.0.10
|
||||
'@commitlint/read': registry.npmmirror.com/@commitlint/read/16.0.0
|
||||
'@commitlint/types': registry.npmmirror.com/@commitlint/types/16.0.0
|
||||
lodash: registry.npmmirror.com/lodash/4.17.21
|
||||
@ -3460,10 +3453,10 @@ packages:
|
||||
conventional-changelog-conventionalcommits: registry.npmmirror.com/conventional-changelog-conventionalcommits/4.6.3
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@commitlint/config-validator/16.0.0:
|
||||
resolution: {integrity: sha512-i80DGlo1FeC5jZpuoNV9NIjQN/m2dDV3jYGWg+1Wr+KldptkUHXj+6GY1Akll66lJ3D8s6aUGi3comPLHPtWHg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@commitlint/config-validator/download/@commitlint/config-validator-16.0.0.tgz}
|
||||
registry.npmmirror.com/@commitlint/config-validator/16.1.0:
|
||||
resolution: {integrity: sha512-2cHeZPNTuf1JWbMqyA46MkExor5HMSgv8JrdmzEakUbJHUreh35/wN00FJf57qGs134exQW2thiSQ1IJUsVx2Q==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@commitlint/config-validator/download/@commitlint/config-validator-16.1.0.tgz}
|
||||
name: '@commitlint/config-validator'
|
||||
version: 16.0.0
|
||||
version: 16.1.0
|
||||
engines: {node: '>=v12'}
|
||||
dependencies:
|
||||
'@commitlint/types': registry.npmmirror.com/@commitlint/types/16.0.0
|
||||
@ -3519,23 +3512,23 @@ packages:
|
||||
'@commitlint/types': registry.npmmirror.com/@commitlint/types/16.0.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@commitlint/load/16.0.0_@types+node@17.0.10:
|
||||
resolution: {integrity: sha512-7WhrGCkP6K/XfjBBguLkkI2XUdiiIyMGlNsSoSqgRNiD352EiffhFEApMy1/XOU+viwBBm/On0n5p0NC7e9/4A==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@commitlint/load/download/@commitlint/load-16.0.0.tgz}
|
||||
id: registry.npmmirror.com/@commitlint/load/16.0.0
|
||||
registry.npmmirror.com/@commitlint/load/16.1.0_@types+node@17.0.10:
|
||||
resolution: {integrity: sha512-MtlEhKjP8jAF85jjX4mw8DUUwCxKsCgAc865hhpnwxjrfBcmGP7Up2AFE/M3ZMGDmSl1X1TMybQk/zohj8Cqdg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@commitlint/load/download/@commitlint/load-16.1.0.tgz}
|
||||
id: registry.npmmirror.com/@commitlint/load/16.1.0
|
||||
name: '@commitlint/load'
|
||||
version: 16.0.0
|
||||
version: 16.1.0
|
||||
engines: {node: '>=v12'}
|
||||
dependencies:
|
||||
'@commitlint/config-validator': registry.npmmirror.com/@commitlint/config-validator/16.0.0
|
||||
'@commitlint/config-validator': registry.npmmirror.com/@commitlint/config-validator/16.1.0
|
||||
'@commitlint/execute-rule': registry.npmmirror.com/@commitlint/execute-rule/16.0.0
|
||||
'@commitlint/resolve-extends': registry.npmmirror.com/@commitlint/resolve-extends/16.0.0
|
||||
'@commitlint/resolve-extends': registry.npmmirror.com/@commitlint/resolve-extends/16.1.0
|
||||
'@commitlint/types': registry.npmmirror.com/@commitlint/types/16.0.0
|
||||
chalk: registry.npmmirror.com/chalk/4.1.2
|
||||
cosmiconfig: registry.nlark.com/cosmiconfig/7.0.1
|
||||
cosmiconfig-typescript-loader: registry.npmmirror.com/cosmiconfig-typescript-loader/1.0.2_82b55006877de54992e74492b614ace9
|
||||
cosmiconfig-typescript-loader: registry.npmmirror.com/cosmiconfig-typescript-loader/1.0.2_9d6cd740eceb93d711351e2e9548d1bd
|
||||
lodash: registry.npmmirror.com/lodash/4.17.21
|
||||
resolve-from: registry.nlark.com/resolve-from/5.0.0
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
transitivePeerDependencies:
|
||||
- '@swc/core'
|
||||
- '@swc/wasm'
|
||||
@ -3572,13 +3565,13 @@ packages:
|
||||
git-raw-commits: registry.npmmirror.com/git-raw-commits/2.0.11
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@commitlint/resolve-extends/16.0.0:
|
||||
resolution: {integrity: sha512-Z/w9MAQUcxeawpCLtjmkVNXAXOmB2nhW+LYmHEZcx9O6UTauF/1+uuZ2/r0MtzTe1qw2JD+1QHVhEWYHVPlkdA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@commitlint/resolve-extends/download/@commitlint/resolve-extends-16.0.0.tgz}
|
||||
registry.npmmirror.com/@commitlint/resolve-extends/16.1.0:
|
||||
resolution: {integrity: sha512-8182s6AFoUFX6+FT1PgQDt15nO2ogdR/EN8SYVAdhNXw1rLz8kT5saB/ICw567GuRAUgFTUMGCXy3ctMOXPEDg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@commitlint/resolve-extends/download/@commitlint/resolve-extends-16.1.0.tgz}
|
||||
name: '@commitlint/resolve-extends'
|
||||
version: 16.0.0
|
||||
version: 16.1.0
|
||||
engines: {node: '>=v12'}
|
||||
dependencies:
|
||||
'@commitlint/config-validator': registry.npmmirror.com/@commitlint/config-validator/16.0.0
|
||||
'@commitlint/config-validator': registry.npmmirror.com/@commitlint/config-validator/16.1.0
|
||||
'@commitlint/types': registry.npmmirror.com/@commitlint/types/16.0.0
|
||||
import-fresh: registry.nlark.com/import-fresh/3.3.0
|
||||
lodash: registry.npmmirror.com/lodash/4.17.21
|
||||
@ -3705,10 +3698,10 @@ packages:
|
||||
version: 1.2.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@iconify/json/1.1.458:
|
||||
resolution: {integrity: sha512-ZAU4WGRIqCwvIj65Lxp2yMgZx7CjRRlgBcwOUL53qnQMAVC9x/mGYxwOALQBwx3WNqvYOSkcNMvmwhFbdsn+6w==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@iconify/json/download/@iconify/json-1.1.458.tgz}
|
||||
registry.npmmirror.com/@iconify/json/1.1.459:
|
||||
resolution: {integrity: sha512-ToupL/TZCWIx2OeISEnZUqGIsYzOcc9exHbzQV3rhGARxoao+fl5a6C/YG2St/tocOCcHExwuGnV0fO9wpdJMA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@iconify/json/download/@iconify/json-1.1.459.tgz}
|
||||
name: '@iconify/json'
|
||||
version: 1.1.458
|
||||
version: 1.1.459
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@iconify/types/1.0.12:
|
||||
@ -3926,7 +3919,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/yargs-parser': registry.npmmirror.com/@types/yargs-parser/20.2.1
|
||||
|
||||
registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.10.0_3b6b276e93ead7cf6063f183a5e18d1f:
|
||||
registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.10.0_706fb07ce74b1db611f19a02ad2ce784:
|
||||
resolution: {integrity: sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-5.10.0.tgz}
|
||||
id: registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.10.0
|
||||
name: '@typescript-eslint/eslint-plugin'
|
||||
@ -3940,23 +3933,23 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.10.0_eslint@8.7.0+typescript@4.5.4
|
||||
'@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.10.0_eslint@8.7.0+typescript@4.5.5
|
||||
'@typescript-eslint/scope-manager': registry.npmmirror.com/@typescript-eslint/scope-manager/5.10.0
|
||||
'@typescript-eslint/type-utils': registry.npmmirror.com/@typescript-eslint/type-utils/5.10.0_eslint@8.7.0+typescript@4.5.4
|
||||
'@typescript-eslint/utils': registry.npmmirror.com/@typescript-eslint/utils/5.10.0_eslint@8.7.0+typescript@4.5.4
|
||||
'@typescript-eslint/type-utils': registry.npmmirror.com/@typescript-eslint/type-utils/5.10.0_eslint@8.7.0+typescript@4.5.5
|
||||
'@typescript-eslint/utils': registry.npmmirror.com/@typescript-eslint/utils/5.10.0_eslint@8.7.0+typescript@4.5.5
|
||||
debug: registry.npmmirror.com/debug/4.3.3
|
||||
eslint: registry.npmmirror.com/eslint/8.7.0
|
||||
functional-red-black-tree: registry.nlark.com/functional-red-black-tree/1.0.1
|
||||
ignore: registry.npmmirror.com/ignore/5.2.0
|
||||
regexpp: registry.nlark.com/regexpp/3.2.0
|
||||
semver: registry.nlark.com/semver/7.3.5
|
||||
tsutils: registry.nlark.com/tsutils/3.21.0_typescript@4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
tsutils: registry.nlark.com/tsutils/3.21.0_typescript@4.5.5
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@typescript-eslint/parser/5.10.0_eslint@8.7.0+typescript@4.5.4:
|
||||
registry.npmmirror.com/@typescript-eslint/parser/5.10.0_eslint@8.7.0+typescript@4.5.5:
|
||||
resolution: {integrity: sha512-pJB2CCeHWtwOAeIxv8CHVGJhI5FNyJAIpx5Pt72YkK3QfEzt6qAlXZuyaBmyfOdM62qU0rbxJzNToPTVeJGrQw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@typescript-eslint/parser/download/@typescript-eslint/parser-5.10.0.tgz}
|
||||
id: registry.npmmirror.com/@typescript-eslint/parser/5.10.0
|
||||
name: '@typescript-eslint/parser'
|
||||
@ -3971,10 +3964,10 @@ packages:
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': registry.npmmirror.com/@typescript-eslint/scope-manager/5.10.0
|
||||
'@typescript-eslint/types': registry.npmmirror.com/@typescript-eslint/types/5.10.0
|
||||
'@typescript-eslint/typescript-estree': registry.npmmirror.com/@typescript-eslint/typescript-estree/5.10.0_typescript@4.5.4
|
||||
'@typescript-eslint/typescript-estree': registry.npmmirror.com/@typescript-eslint/typescript-estree/5.10.0_typescript@4.5.5
|
||||
debug: registry.npmmirror.com/debug/4.3.3
|
||||
eslint: registry.npmmirror.com/eslint/8.7.0
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@ -3989,7 +3982,7 @@ packages:
|
||||
'@typescript-eslint/visitor-keys': registry.npmmirror.com/@typescript-eslint/visitor-keys/5.10.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@typescript-eslint/type-utils/5.10.0_eslint@8.7.0+typescript@4.5.4:
|
||||
registry.npmmirror.com/@typescript-eslint/type-utils/5.10.0_eslint@8.7.0+typescript@4.5.5:
|
||||
resolution: {integrity: sha512-TzlyTmufJO5V886N+hTJBGIfnjQDQ32rJYxPaeiyWKdjsv2Ld5l8cbS7pxim4DeNs62fKzRSt8Q14Evs4JnZyQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@typescript-eslint/type-utils/download/@typescript-eslint/type-utils-5.10.0.tgz}
|
||||
id: registry.npmmirror.com/@typescript-eslint/type-utils/5.10.0
|
||||
name: '@typescript-eslint/type-utils'
|
||||
@ -4002,11 +3995,11 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/utils': registry.npmmirror.com/@typescript-eslint/utils/5.10.0_eslint@8.7.0+typescript@4.5.4
|
||||
'@typescript-eslint/utils': registry.npmmirror.com/@typescript-eslint/utils/5.10.0_eslint@8.7.0+typescript@4.5.5
|
||||
debug: registry.npmmirror.com/debug/4.3.3
|
||||
eslint: registry.npmmirror.com/eslint/8.7.0
|
||||
tsutils: registry.nlark.com/tsutils/3.21.0_typescript@4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
tsutils: registry.nlark.com/tsutils/3.21.0_typescript@4.5.5
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@ -4018,7 +4011,7 @@ packages:
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@typescript-eslint/typescript-estree/5.10.0_typescript@4.5.4:
|
||||
registry.npmmirror.com/@typescript-eslint/typescript-estree/5.10.0_typescript@4.5.5:
|
||||
resolution: {integrity: sha512-x+7e5IqfwLwsxTdliHRtlIYkgdtYXzE0CkFeV6ytAqq431ZyxCFzNMNR5sr3WOlIG/ihVZr9K/y71VHTF/DUQA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@typescript-eslint/typescript-estree/download/@typescript-eslint/typescript-estree-5.10.0.tgz}
|
||||
id: registry.npmmirror.com/@typescript-eslint/typescript-estree/5.10.0
|
||||
name: '@typescript-eslint/typescript-estree'
|
||||
@ -4036,13 +4029,13 @@ packages:
|
||||
globby: registry.npmmirror.com/globby/11.0.4
|
||||
is-glob: registry.npmmirror.com/is-glob/4.0.3
|
||||
semver: registry.nlark.com/semver/7.3.5
|
||||
tsutils: registry.nlark.com/tsutils/3.21.0_typescript@4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
tsutils: registry.nlark.com/tsutils/3.21.0_typescript@4.5.5
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@typescript-eslint/utils/5.10.0_eslint@8.7.0+typescript@4.5.4:
|
||||
registry.npmmirror.com/@typescript-eslint/utils/5.10.0_eslint@8.7.0+typescript@4.5.5:
|
||||
resolution: {integrity: sha512-IGYwlt1CVcFoE2ueW4/ioEwybR60RAdGeiJX/iDAw0t5w0wK3S7QncDwpmsM70nKgGTuVchEWB8lwZwHqPAWRg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@typescript-eslint/utils/download/@typescript-eslint/utils-5.10.0.tgz}
|
||||
id: registry.npmmirror.com/@typescript-eslint/utils/5.10.0
|
||||
name: '@typescript-eslint/utils'
|
||||
@ -4054,7 +4047,7 @@ packages:
|
||||
'@types/json-schema': registry.npmmirror.com/@types/json-schema/7.0.9
|
||||
'@typescript-eslint/scope-manager': registry.npmmirror.com/@typescript-eslint/scope-manager/5.10.0
|
||||
'@typescript-eslint/types': registry.npmmirror.com/@typescript-eslint/types/5.10.0
|
||||
'@typescript-eslint/typescript-estree': registry.npmmirror.com/@typescript-eslint/typescript-estree/5.10.0_typescript@4.5.4
|
||||
'@typescript-eslint/typescript-estree': registry.npmmirror.com/@typescript-eslint/typescript-estree/5.10.0_typescript@4.5.5
|
||||
eslint: registry.npmmirror.com/eslint/8.7.0
|
||||
eslint-scope: registry.npmmirror.com/eslint-scope/5.1.1
|
||||
eslint-utils: registry.nlark.com/eslint-utils/3.0.0_eslint@8.7.0
|
||||
@ -4250,7 +4243,7 @@ packages:
|
||||
prettier: registry.npmmirror.com/prettier/2.5.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_3bd88b78ccaf1b54747cae8c2dba8166:
|
||||
registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_b5007341d5f2a2e7b479ac173dfc16cf:
|
||||
resolution: {integrity: sha512-F94cL8ug3FaYXlCfU5/wiGjk1qeadmoBpRGAOBq+qre3Smdupa59dd6ZJrsfRODpsMPyTG7330juMDsUvpZ3Rw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vue/eslint-config-typescript/download/@vue/eslint-config-typescript-10.0.0.tgz}
|
||||
id: registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0
|
||||
name: '@vue/eslint-config-typescript'
|
||||
@ -4260,8 +4253,8 @@ packages:
|
||||
eslint: ^6.2.0 || ^7.0.0 || ^8.0.0
|
||||
eslint-plugin-vue: ^8.0.1
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.10.0_3b6b276e93ead7cf6063f183a5e18d1f
|
||||
'@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.10.0_eslint@8.7.0+typescript@4.5.4
|
||||
'@typescript-eslint/eslint-plugin': registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.10.0_706fb07ce74b1db611f19a02ad2ce784
|
||||
'@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.10.0_eslint@8.7.0+typescript@4.5.5
|
||||
eslint: registry.npmmirror.com/eslint/8.7.0
|
||||
eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.3.0_eslint@8.7.0
|
||||
vue-eslint-parser: registry.npmmirror.com/vue-eslint-parser/8.0.1_eslint@8.7.0
|
||||
@ -4342,11 +4335,11 @@ packages:
|
||||
version: 3.2.27
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@vueuse/core/7.5.3_vue@3.2.26:
|
||||
resolution: {integrity: sha512-D9j5ymHFMFRXQqCp0yZJkf/bvBGiz0MrKUa364p+L8dMyd5zyq2K1JmHyvoBd4xbTFRfmQ1h878u6YE5LCkDVQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vueuse/core/download/@vueuse/core-7.5.3.tgz}
|
||||
id: registry.npmmirror.com/@vueuse/core/7.5.3
|
||||
registry.npmmirror.com/@vueuse/core/7.5.4_vue@3.2.26:
|
||||
resolution: {integrity: sha512-PKmyHN2lZuttGgKmsoMMqiSojSYYKraszilP0gpQIGcLt2YoLABaG3VFjdPs2tY6DM+HG3o70HuzOMEQCY8fqQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vueuse/core/download/@vueuse/core-7.5.4.tgz}
|
||||
id: registry.npmmirror.com/@vueuse/core/7.5.4
|
||||
name: '@vueuse/core'
|
||||
version: 7.5.3
|
||||
version: 7.5.4
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.1.0
|
||||
vue: ^2.6.0 || ^3.2.0
|
||||
@ -4356,16 +4349,16 @@ packages:
|
||||
vue:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vueuse/shared': registry.npmmirror.com/@vueuse/shared/7.5.3_vue@3.2.26
|
||||
'@vueuse/shared': registry.npmmirror.com/@vueuse/shared/7.5.4_vue@3.2.26
|
||||
vue: registry.npmmirror.com/vue/3.2.26
|
||||
vue-demi: registry.npmmirror.com/vue-demi/0.12.1_vue@3.2.26
|
||||
dev: false
|
||||
|
||||
registry.npmmirror.com/@vueuse/shared/7.5.3_vue@3.2.26:
|
||||
resolution: {integrity: sha512-BJ71cxHN5VByW1S58Gl85NFJaQu93F7Vs7K/MuAKsIIuHm9PBbkR5Vxkg9ko9cBdiKVt+FNoo13BhdbA+Vwycg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vueuse/shared/download/@vueuse/shared-7.5.3.tgz}
|
||||
id: registry.npmmirror.com/@vueuse/shared/7.5.3
|
||||
registry.npmmirror.com/@vueuse/shared/7.5.4_vue@3.2.26:
|
||||
resolution: {integrity: sha512-750RnGUEgg1+K4jGVkv7M5UOStAa/IjAInV6BugyBOvRYL2l1lcIDUi4V/qIKTlhd2oUAByCEnlqIpFD2a3tfw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vueuse/shared/download/@vueuse/shared-7.5.4.tgz}
|
||||
id: registry.npmmirror.com/@vueuse/shared/7.5.4
|
||||
name: '@vueuse/shared'
|
||||
version: 7.5.3
|
||||
version: 7.5.4
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.1.0
|
||||
vue: ^2.6.0 || ^3.2.0
|
||||
@ -4797,7 +4790,7 @@ packages:
|
||||
through2: registry.nlark.com/through2/4.0.2
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/cosmiconfig-typescript-loader/1.0.2_82b55006877de54992e74492b614ace9:
|
||||
registry.npmmirror.com/cosmiconfig-typescript-loader/1.0.2_9d6cd740eceb93d711351e2e9548d1bd:
|
||||
resolution: {integrity: sha512-27ZehvijYqAKVzta5xtZBS3PAliC8CmnWkGXN0vgxAZz7yqxpMjf3aG7flxF5rEiu8FAD7nZZXtOI+xUGn+bVg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/cosmiconfig-typescript-loader/download/cosmiconfig-typescript-loader-1.0.2.tgz}
|
||||
id: registry.npmmirror.com/cosmiconfig-typescript-loader/1.0.2
|
||||
name: cosmiconfig-typescript-loader
|
||||
@ -4809,8 +4802,8 @@ packages:
|
||||
dependencies:
|
||||
'@types/node': registry.npmmirror.com/@types/node/17.0.10
|
||||
cosmiconfig: registry.nlark.com/cosmiconfig/7.0.1
|
||||
ts-node: registry.npmmirror.com/ts-node/10.4.0_82b55006877de54992e74492b614ace9
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
ts-node: registry.npmmirror.com/ts-node/10.4.0_9d6cd740eceb93d711351e2e9548d1bd
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
transitivePeerDependencies:
|
||||
- '@swc/core'
|
||||
- '@swc/wasm'
|
||||
@ -5942,10 +5935,10 @@ packages:
|
||||
version: 1.2.4
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/lint-staged/12.2.1:
|
||||
resolution: {integrity: sha512-VCVcA9C2Vt5HHxSR4EZVZFJcQRJH984CGBeY+cJ/xed4mBd+JidbM/xbKcCq5ASaygAV0iITtdsCTnID7h/1OQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/lint-staged/download/lint-staged-12.2.1.tgz}
|
||||
registry.npmmirror.com/lint-staged/12.2.2:
|
||||
resolution: {integrity: sha512-bcHEoM1M/f+K1BYdHcEuIn8K+zMOSJR3mkny6PAuQiTgcSUcRbUWaUD6porAYypxF4k1vYZZ2HutZt1p94Z1jQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/lint-staged/download/lint-staged-12.2.2.tgz}
|
||||
name: lint-staged
|
||||
version: 12.2.1
|
||||
version: 12.2.2
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
@ -6288,7 +6281,7 @@ packages:
|
||||
engines: {node: '>=8.6'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/pinia/2.0.9_typescript@4.5.4+vue@3.2.26:
|
||||
registry.npmmirror.com/pinia/2.0.9_typescript@4.5.5+vue@3.2.26:
|
||||
resolution: {integrity: sha512-iuYdxLJKQ07YPyOHYH05wNG9eKWqkP/4y4GE8+RqEYtz5fwHgPA5kr6zQbg/DoEJGnR2XCm1w1vdt6ppzL9ATg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pinia/download/pinia-2.0.9.tgz}
|
||||
id: registry.npmmirror.com/pinia/2.0.9
|
||||
name: pinia
|
||||
@ -6304,7 +6297,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vue/devtools-api': registry.npmmirror.com/@vue/devtools-api/6.0.0-beta.21.1
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
vue: registry.npmmirror.com/vue/3.2.26
|
||||
vue-demi: registry.npmmirror.com/vue-demi/0.12.1_vue@3.2.26
|
||||
dev: false
|
||||
@ -6450,6 +6443,13 @@ packages:
|
||||
through: registry.nlark.com/through/2.3.8
|
||||
dev: false
|
||||
|
||||
registry.npmmirror.com/reusify/1.0.4:
|
||||
resolution: {integrity: sha1-kNo4Kx4SbvwCFG6QhFqI2xKSXXY=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/reusify/download/reusify-1.0.4.tgz}
|
||||
name: reusify
|
||||
version: 1.0.4
|
||||
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/rimraf/2.6.3:
|
||||
resolution: {integrity: sha1-stEE/g2Psnz54KHNqCYt04M8bKs=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rimraf/download/rimraf-2.6.3.tgz}
|
||||
name: rimraf
|
||||
@ -6793,7 +6793,7 @@ packages:
|
||||
version: 0.3.9
|
||||
dev: false
|
||||
|
||||
registry.npmmirror.com/ts-node/10.4.0_82b55006877de54992e74492b614ace9:
|
||||
registry.npmmirror.com/ts-node/10.4.0_9d6cd740eceb93d711351e2e9548d1bd:
|
||||
resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ts-node/download/ts-node-10.4.0.tgz}
|
||||
id: registry.npmmirror.com/ts-node/10.4.0
|
||||
name: ts-node
|
||||
@ -6822,7 +6822,7 @@ packages:
|
||||
create-require: registry.nlark.com/create-require/1.1.1
|
||||
diff: registry.nlark.com/diff/4.0.2
|
||||
make-error: registry.nlark.com/make-error/1.3.6
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
yn: registry.nlark.com/yn/3.1.1
|
||||
dev: true
|
||||
|
||||
@ -6882,10 +6882,10 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/typescript/4.5.4:
|
||||
resolution: {integrity: sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/typescript/download/typescript-4.5.4.tgz}
|
||||
registry.npmmirror.com/typescript/4.5.5:
|
||||
resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/typescript/download/typescript-4.5.5.tgz}
|
||||
name: typescript
|
||||
version: 4.5.4
|
||||
version: 4.5.5
|
||||
engines: {node: '>=4.2.0'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
@ -6937,11 +6937,11 @@ packages:
|
||||
- webpack
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/unplugin-vue-components/0.17.13_vite@2.7.13+vue@3.2.26:
|
||||
resolution: {integrity: sha512-WII6hAW+HSvlXDx4t0LqcAvLg4ESsoBz1nuUDMPx6ZGuKBPjSRP4Wmnk559nZ6qpaOW41iY48cBeUpWSPjH7WA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/unplugin-vue-components/download/unplugin-vue-components-0.17.13.tgz}
|
||||
id: registry.npmmirror.com/unplugin-vue-components/0.17.13
|
||||
registry.npmmirror.com/unplugin-vue-components/0.17.14_vite@2.7.13+vue@3.2.26:
|
||||
resolution: {integrity: sha512-PSJ2EwFTxFSVg/HhUDyoYa5/s6hWqdQzlbJLOIEr0bv4Qczp5YRpTlObld5cjgieFtgPtq2W21A77ucB/msgeg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/unplugin-vue-components/download/unplugin-vue-components-0.17.14.tgz}
|
||||
id: registry.npmmirror.com/unplugin-vue-components/0.17.14
|
||||
name: unplugin-vue-components
|
||||
version: 0.17.13
|
||||
version: 0.17.14
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
'@babel/parser': ^7.15.8
|
||||
@ -7333,7 +7333,7 @@ packages:
|
||||
vue: registry.npmmirror.com/vue/3.2.26
|
||||
dev: false
|
||||
|
||||
registry.npmmirror.com/vue-tsc/0.30.6_typescript@4.5.4:
|
||||
registry.npmmirror.com/vue-tsc/0.30.6_typescript@4.5.5:
|
||||
resolution: {integrity: sha512-p+lemuubzFgwr1Az3pqQ70uvWraf36qTrKkC6C7anv5S1G3aPerc4eY5Rjz3eVDOkK94E+KeBHevvpZbmVwvHA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vue-tsc/download/vue-tsc-0.30.6.tgz}
|
||||
id: registry.npmmirror.com/vue-tsc/0.30.6
|
||||
name: vue-tsc
|
||||
@ -7343,7 +7343,7 @@ packages:
|
||||
typescript: '*'
|
||||
dependencies:
|
||||
'@volar/shared': registry.npmmirror.com/@volar/shared/0.30.6
|
||||
typescript: registry.npmmirror.com/typescript/4.5.4
|
||||
typescript: registry.npmmirror.com/typescript/4.5.5
|
||||
vscode-vue-languageservice: registry.npmmirror.com/vscode-vue-languageservice/0.30.6
|
||||
dev: true
|
||||
|
||||
|
@ -51,7 +51,7 @@ const { bool: isHover, setTrue, setFalse } = useBoolean();
|
||||
const isIconActive = computed(() => props.isActive || isHover.value);
|
||||
|
||||
const buttonStyle = computed(() => {
|
||||
const style: { [key: string]: string } = {};
|
||||
const style: Record<string, string> = {};
|
||||
if (isIconActive.value) {
|
||||
style.color = props.primaryColor;
|
||||
style.borderColor = addColorAlpha(props.primaryColor, 0.3);
|
||||
|
@ -1,3 +1,9 @@
|
||||
/** 布局组件的名称 */
|
||||
export enum EnumLayoutComponentName {
|
||||
basic = 'basic-layout',
|
||||
blank = 'blank-layout'
|
||||
}
|
||||
|
||||
/** 登录模块 */
|
||||
export enum EnumLoginModule {
|
||||
'pwd-login' = '账密登录',
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {
|
||||
EnumLayoutComponentName,
|
||||
EnumThemeLayoutMode,
|
||||
EnumThemeTabMode,
|
||||
EnumThemeHorizontalMenuPosition,
|
||||
@ -6,6 +7,9 @@ import {
|
||||
EnumLoginModule
|
||||
} from '@/enum';
|
||||
|
||||
/** 布局组件名称 */
|
||||
export type LayoutComponentName = keyof typeof EnumLayoutComponentName;
|
||||
|
||||
/** 布局模式 */
|
||||
export type ThemeLayoutMode = keyof typeof EnumThemeLayoutMode;
|
||||
|
||||
|
@ -23,4 +23,10 @@ export type GlobalBreadcrumb = DropdownOption & {
|
||||
};
|
||||
|
||||
/** 多页签Tab的路由 */
|
||||
export type GlobalTabRoute = Pick<RouteLocationNormalizedLoaded, 'name' | 'path' | 'meta'>;
|
||||
export interface GlobalTabRoute extends Pick<RouteLocationNormalizedLoaded, 'name' | 'path' | 'meta'> {
|
||||
/** 滚动的位置 */
|
||||
scrollPosition: {
|
||||
left: number;
|
||||
top: number;
|
||||
};
|
||||
}
|
||||
|
@ -3,16 +3,18 @@
|
||||
:class="{ 'p-16px': showPadding }"
|
||||
class="h-full bg-[#f6f9f8] dark:bg-[#101014] transition duration-300 ease-in-out"
|
||||
>
|
||||
<router-view v-slot="{ Component }">
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<transition name="fade-slide" mode="out-in" appear>
|
||||
<component :is="Component" v-if="app.reloadFlag" />
|
||||
<keep-alive :include="routeStore.cacheRoutes">
|
||||
<component :is="Component" v-if="app.reloadFlag" :key="route.path" />
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useAppStore } from '@/store';
|
||||
import { useAppStore, useRouteStore } from '@/store';
|
||||
|
||||
interface Props {
|
||||
/** 显示padding */
|
||||
@ -24,5 +26,6 @@ withDefaults(defineProps<Props>(), {
|
||||
});
|
||||
|
||||
const app = useAppStore();
|
||||
const routeStore = useRouteStore();
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
@ -33,13 +33,14 @@ interface Props {
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
type LayoutConfig = {
|
||||
[key in ThemeLayoutMode]: {
|
||||
type LayoutConfig = Record<
|
||||
ThemeLayoutMode,
|
||||
{
|
||||
placement: FollowerPlacement;
|
||||
menuClass: string;
|
||||
mainClass: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
const layoutConfig: LayoutConfig = {
|
||||
vertical: {
|
||||
|
1
src/router/helpers/index.ts
Normal file
1
src/router/helpers/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './scroll';
|
33
src/router/helpers/scroll.ts
Normal file
33
src/router/helpers/scroll.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import type { RouterScrollBehavior } from 'vue-router';
|
||||
import { useTabStore } from '@/store';
|
||||
|
||||
export const scrollBehavior: RouterScrollBehavior = (to, from) => {
|
||||
return new Promise(resolve => {
|
||||
const tab = useTabStore();
|
||||
|
||||
if (to.hash) {
|
||||
resolve({
|
||||
el: to.hash,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
|
||||
const { left, top } = tab.getTabScrollPosition(to.path);
|
||||
const scrollPosition = {
|
||||
left,
|
||||
top
|
||||
};
|
||||
const { scrollLeft, scrollTop } = document.documentElement;
|
||||
|
||||
const isFromCached = Boolean(from.meta.keepAlive);
|
||||
if (isFromCached) {
|
||||
tab.recordTabScrollPosition(from.path, { left: scrollLeft, top: scrollTop });
|
||||
}
|
||||
|
||||
const duration = !scrollPosition.left && !scrollPosition.top ? 0 : 350;
|
||||
|
||||
setTimeout(() => {
|
||||
resolve(scrollPosition);
|
||||
}, duration);
|
||||
});
|
||||
};
|
@ -2,6 +2,7 @@ import type { App } from 'vue';
|
||||
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router';
|
||||
import { transformAuthRoutesToVueRoutes } from '@/utils';
|
||||
import { constantRoutes } from './routes';
|
||||
import { scrollBehavior } from './helpers';
|
||||
import { createRouterGuard } from './guard';
|
||||
|
||||
const createHistoryFunc = import.meta.env.VITE_IS_VERCEL === '1' ? createWebHashHistory : createWebHistory;
|
||||
@ -9,7 +10,7 @@ const createHistoryFunc = import.meta.env.VITE_IS_VERCEL === '1' ? createWebHash
|
||||
export const router = createRouter({
|
||||
history: createHistoryFunc(import.meta.env.BASE_URL),
|
||||
routes: transformAuthRoutesToVueRoutes(constantRoutes),
|
||||
scrollBehavior: () => ({ left: 0, top: 0 })
|
||||
scrollBehavior
|
||||
});
|
||||
|
||||
export async function setupRouter(app: App) {
|
||||
|
@ -34,6 +34,9 @@ export const useAppStore = defineStore('app-store', {
|
||||
} else {
|
||||
this.reloadFlag = true;
|
||||
}
|
||||
setTimeout(() => {
|
||||
document.documentElement.scrollTo({ left: 0, top: 0 });
|
||||
}, 100);
|
||||
},
|
||||
/** 打开设置抽屉 */
|
||||
openSettingDrawer() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { Router } from 'vue-router';
|
||||
import { defineStore } from 'pinia';
|
||||
import { fetchUserRoutes } from '@/service';
|
||||
import { transformAuthRouteToMenu, transformAuthRoutesToVueRoutes } from '@/utils';
|
||||
import { transformAuthRouteToMenu, transformAuthRoutesToVueRoutes, getCacheRoutes } from '@/utils';
|
||||
import type { GlobalMenuOption } from '@/interface';
|
||||
import { useTabStore } from '../tab';
|
||||
|
||||
@ -12,13 +12,16 @@ interface RouteState {
|
||||
routeHomeName: AuthRoute.RouteKey;
|
||||
/** 菜单 */
|
||||
menus: GlobalMenuOption[];
|
||||
/** 缓存的路由名称 */
|
||||
cacheRoutes: string[];
|
||||
}
|
||||
|
||||
export const useRouteStore = defineStore('route-store', {
|
||||
state: (): RouteState => ({
|
||||
isAddedDynamicRoute: false,
|
||||
routeHomeName: 'dashboard_analysis',
|
||||
menus: []
|
||||
menus: [],
|
||||
cacheRoutes: []
|
||||
}),
|
||||
actions: {
|
||||
/**
|
||||
@ -38,6 +41,8 @@ export const useRouteStore = defineStore('route-store', {
|
||||
router.addRoute(route);
|
||||
});
|
||||
|
||||
this.cacheRoutes = getCacheRoutes(vueRoutes);
|
||||
|
||||
initHomeTab(data.home, router);
|
||||
this.isAddedDynamicRoute = true;
|
||||
}
|
||||
|
@ -9,7 +9,11 @@ export function getTabRouteByVueRoute(route: RouteRecordNormalized | RouteLocati
|
||||
const tabRoute: GlobalTabRoute = {
|
||||
name: route.name,
|
||||
path: route.path,
|
||||
meta: route.meta
|
||||
meta: route.meta,
|
||||
scrollPosition: {
|
||||
left: 0,
|
||||
top: 0
|
||||
}
|
||||
};
|
||||
return tabRoute;
|
||||
}
|
||||
|
@ -23,6 +23,10 @@ export const useTabStore = defineStore('tab-store', {
|
||||
path: '/',
|
||||
meta: {
|
||||
title: 'root'
|
||||
},
|
||||
scrollPosition: {
|
||||
left: 0,
|
||||
top: 0
|
||||
}
|
||||
},
|
||||
activeTab: ''
|
||||
@ -132,6 +136,32 @@ export const useTabStore = defineStore('tab-store', {
|
||||
routerPush(path);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 记录tab滚动位置
|
||||
* @param path - 路由path
|
||||
* @param position - tab当前页的滚动位置
|
||||
*/
|
||||
recordTabScrollPosition(path: string, position: { left: number; top: number }) {
|
||||
const index = getIndexInTabRoutes(this.tabs, path);
|
||||
if (index > -1) {
|
||||
this.tabs[index].scrollPosition = position;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取tab滚动位置
|
||||
* @param path - 路由path
|
||||
*/
|
||||
getTabScrollPosition(path: string) {
|
||||
const position = {
|
||||
left: 0,
|
||||
top: 0
|
||||
};
|
||||
const index = getIndexInTabRoutes(this.tabs, path);
|
||||
if (index > -1) {
|
||||
Object.assign(position, this.tabs[index].scrollPosition);
|
||||
}
|
||||
return position;
|
||||
},
|
||||
/** 初始化Tab状态 */
|
||||
iniTabStore(currentRoute: RouteLocationNormalizedLoaded) {
|
||||
const theme = useThemeStore();
|
||||
|
@ -37,7 +37,7 @@ function getThemeColors(colors: [ColorType, string][]) {
|
||||
}
|
||||
|
||||
/** 获取naive的主题颜色 */
|
||||
export function getNaiveThemeOverrides(colors: { [key in ColorType]: string }): GlobalThemeOverrides {
|
||||
export function getNaiveThemeOverrides(colors: Record<ColorType, string>): GlobalThemeOverrides {
|
||||
const { primary, info, success, warning, error } = colors;
|
||||
const themeColors = getThemeColors([
|
||||
['primary', primary],
|
||||
|
@ -1,4 +1,4 @@
|
||||
/** 设置对象数据 */
|
||||
export function objectAssign<T extends { [key: string]: any }>(target: T, source: Partial<T>) {
|
||||
export function objectAssign<T extends Record<string, any>>(target: T, source: Partial<T>) {
|
||||
Object.assign(target, source);
|
||||
}
|
||||
|
35
src/utils/router/cache.ts
Normal file
35
src/utils/router/cache.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
/**
|
||||
* 获取缓存的路由对应组件的名称
|
||||
* @param routes - 转换后的vue路由
|
||||
*/
|
||||
export function getCacheRoutes(routes: RouteRecordRaw[]) {
|
||||
const cacheNames: string[] = [];
|
||||
routes.forEach(route => {
|
||||
// 只需要获取二级路由的缓存的组件名
|
||||
if (hasChildren(route)) {
|
||||
route.children!.forEach(item => {
|
||||
if (isKeepAlive(item)) {
|
||||
cacheNames.push(item.name as string);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return cacheNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* 路由是否缓存
|
||||
* @param route
|
||||
*/
|
||||
function isKeepAlive(route: RouteRecordRaw) {
|
||||
return Boolean(route?.meta?.keepAlive);
|
||||
}
|
||||
/**
|
||||
* 是否有二级路由
|
||||
* @param route
|
||||
*/
|
||||
function hasChildren(route: RouteRecordRaw) {
|
||||
return Boolean(route.children && route.children.length);
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
import type { Component } from 'vue';
|
||||
import { EnumLayoutComponentName } from '@/enum';
|
||||
import { BasicLayout, BlankLayout } from '@/layouts';
|
||||
import {
|
||||
Login,
|
||||
NoPermission,
|
||||
@ -14,6 +16,21 @@ import {
|
||||
MultiMenuFirstSecond,
|
||||
MultiMenuFirstSecondNewThird
|
||||
} from '@/views';
|
||||
import type { LayoutComponentName } from '@/interface';
|
||||
|
||||
type LayoutComponent = Record<LayoutComponentName, () => Promise<Component>>;
|
||||
|
||||
/**
|
||||
* 获取页面导入的vue文件(懒加载的方式)
|
||||
* @param layoutType - 布局类型
|
||||
*/
|
||||
export function getLayoutComponent(layoutType: LayoutComponentName) {
|
||||
const layoutComponent: LayoutComponent = {
|
||||
basic: BasicLayout,
|
||||
blank: BlankLayout
|
||||
};
|
||||
return () => setViewComponentName(layoutComponent[layoutType], EnumLayoutComponentName[layoutType]);
|
||||
}
|
||||
|
||||
/** 需要用到自身vue组件的页面 */
|
||||
type ViewComponentKey = Exclude<
|
||||
@ -28,12 +45,11 @@ type ViewComponentKey = Exclude<
|
||||
| 'exception'
|
||||
>;
|
||||
|
||||
type ViewComponent = {
|
||||
[key in ViewComponentKey]: () => Promise<Component>;
|
||||
};
|
||||
type ViewComponent = Record<ViewComponentKey, () => Promise<Component>>;
|
||||
|
||||
/**
|
||||
* 获取页面导入的vue文件(懒加载的方式)
|
||||
* @param routeKey - 路由key
|
||||
*/
|
||||
export function getViewComponent(routeKey: AuthRoute.RouteKey) {
|
||||
const keys: ViewComponentKey[] = [
|
||||
|
@ -1,15 +1,13 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import { BasicLayout, BlankLayout } from '@/layouts';
|
||||
import { consoleError } from '../common';
|
||||
import { getViewComponent } from './component';
|
||||
import { getLayoutComponent, getViewComponent } from './component';
|
||||
|
||||
type ComponentAction = {
|
||||
[key in AuthRoute.RouteComponent]: () => void;
|
||||
};
|
||||
type ComponentAction = Record<AuthRoute.RouteComponent, () => void>;
|
||||
|
||||
/**
|
||||
* 将权限路由转换成vue路由
|
||||
* @param routes - 权限路由
|
||||
* @description 所有多级路由都会被转换成二级路由
|
||||
*/
|
||||
export function transformAuthRoutesToVueRoutes(routes: AuthRoute.Route[]) {
|
||||
return routes.map(route => transformAuthRouteToVueRoute(route)).flat(1);
|
||||
@ -38,10 +36,10 @@ function transformAuthRouteToVueRoute(item: AuthRoute.Route) {
|
||||
if (hasComponent(item)) {
|
||||
const action: ComponentAction = {
|
||||
basic() {
|
||||
itemRoute.component = BasicLayout;
|
||||
itemRoute.component = getLayoutComponent('basic');
|
||||
},
|
||||
blank() {
|
||||
itemRoute.component = BlankLayout;
|
||||
itemRoute.component = getLayoutComponent('blank');
|
||||
},
|
||||
multi() {
|
||||
// 多级路由一定有子路由
|
||||
@ -81,7 +79,7 @@ function transformAuthRouteToVueRoute(item: AuthRoute.Route) {
|
||||
} else {
|
||||
const parentPath = `${itemRoute.path}-parent` as AuthRoute.SingleRouteParentPath;
|
||||
|
||||
const layout = item.meta.singleLayout === 'basic' ? BasicLayout : BlankLayout;
|
||||
const layout = item.meta.singleLayout === 'basic' ? getLayoutComponent('basic') : getLayoutComponent('blank');
|
||||
|
||||
const parentRoute: RouteRecordRaw = {
|
||||
path: parentPath,
|
||||
@ -120,22 +118,42 @@ function transformAuthRouteToVueRoute(item: AuthRoute.Route) {
|
||||
return resultRoute;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有外链
|
||||
* @param item - 权限路由
|
||||
*/
|
||||
function hasHref(item: AuthRoute.Route) {
|
||||
return Boolean(item.meta.href);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有动态路由path
|
||||
* @param item - 权限路由
|
||||
*/
|
||||
function hasDynamicPath(item: AuthRoute.Route) {
|
||||
return Boolean(item.meta.dynamicPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有路由组件
|
||||
* @param item - 权限路由
|
||||
*/
|
||||
function hasComponent(item: AuthRoute.Route) {
|
||||
return Boolean(item.component);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有子路由
|
||||
* @param item - 权限路由
|
||||
*/
|
||||
function hasChildren(item: AuthRoute.Route) {
|
||||
return Boolean(item.children && item.children.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是单层级路由
|
||||
* @param item - 权限路由
|
||||
*/
|
||||
function isSingleRoute(item: AuthRoute.Route) {
|
||||
return Boolean(item.meta.singleLayout);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
export * from './helpers';
|
||||
export * from './cache';
|
||||
export * from './menu';
|
||||
export * from './breadcrumb';
|
||||
export * from './tab';
|
||||
|
@ -12,7 +12,14 @@ export function getTabRoutes() {
|
||||
const routes: GlobalTabRoute[] = [];
|
||||
const data = getLocal<GlobalTabRoute[]>(EnumStorageKey['tab-routes']);
|
||||
if (data) {
|
||||
routes.push(...data);
|
||||
const defaultTabRoutes = data.map(item => ({
|
||||
...item,
|
||||
scrollPosition: {
|
||||
left: 0,
|
||||
top: 0
|
||||
}
|
||||
}));
|
||||
routes.push(...defaultTabRoutes);
|
||||
}
|
||||
return routes;
|
||||
}
|
||||
|
@ -9,12 +9,8 @@ export interface PkgVersionInfo {
|
||||
interface Package {
|
||||
name: string;
|
||||
version: string;
|
||||
dependencies: {
|
||||
[key: string]: string;
|
||||
};
|
||||
devDependencies: {
|
||||
[key: string]: string;
|
||||
};
|
||||
dependencies: Record<string, string>;
|
||||
devDependencies: Record<string, string>;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
@ -23,9 +23,7 @@ interface Props {
|
||||
type: ExceptionType;
|
||||
}
|
||||
|
||||
type ExceptionComponent = {
|
||||
[key in ExceptionType]: Component;
|
||||
};
|
||||
type ExceptionComponent = Record<ExceptionType, Component>;
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user