fix(projects): 修复面包屑数据

This commit is contained in:
Soybean 2022-01-14 14:17:34 +08:00
parent 839b82ba8b
commit 28b5d22401
6 changed files with 193 additions and 132 deletions

View File

@ -59,7 +59,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.2.0",
"eslint-plugin-vue": "^8.3.0",
"husky": "^7.0.4",
"lint-staged": "^12.1.7",
"mockjs": "^1.1.0",
@ -67,16 +67,16 @@
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.5.1",
"rollup-plugin-visualizer": "^5.5.2",
"sass": "^1.47.0",
"sass": "^1.48.0",
"typescript": "^4.5.4",
"unplugin-icons": "^0.13.0",
"unplugin-vue-components": "^0.17.11",
"vite": "^2.7.10",
"vite": "^2.7.12",
"vite-plugin-html": "^2.1.2",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-windicss": "^1.6.2",
"vue-tsc": "^0.30.2",
"vueuc": "^0.4.21",
"vueuc": "^0.4.22",
"windicss": "^3.4.2"
}
}

View File

@ -29,7 +29,7 @@ specifiers:
eslint-config-prettier: ^8.3.0
eslint-plugin-import: ^2.25.4
eslint-plugin-prettier: ^4.0.0
eslint-plugin-vue: ^8.2.0
eslint-plugin-vue: ^8.3.0
form-data: ^4.0.0
husky: ^7.0.4
lint-staged: ^12.1.7
@ -42,18 +42,18 @@ specifiers:
prettier: ^2.5.1
qs: ^6.10.3
rollup-plugin-visualizer: ^5.5.2
sass: ^1.47.0
sass: ^1.48.0
typescript: ^4.5.4
unplugin-icons: ^0.13.0
unplugin-vue-components: ^0.17.11
vite: ^2.7.10
vite: ^2.7.12
vite-plugin-html: ^2.1.2
vite-plugin-mock: ^2.9.6
vite-plugin-windicss: ^1.6.2
vue: ^3.2.26
vue-router: ^4.0.12
vue-tsc: ^0.30.2
vueuc: ^0.4.21
vueuc: ^0.4.22
windicss: ^3.4.2
dependencies:
@ -82,9 +82,9 @@ devDependencies:
'@types/qs': registry.npmmirror.com/@types/qs/6.9.7
'@typescript-eslint/eslint-plugin': registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.9.1_b7b2e42b32ee097737cd3e626b10847b
'@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.9.1_eslint@8.6.0+typescript@4.5.4
'@vitejs/plugin-vue': registry.npmmirror.com/@vitejs/plugin-vue/2.0.1_vite@2.7.10+vue@3.2.26
'@vitejs/plugin-vue': registry.npmmirror.com/@vitejs/plugin-vue/2.0.1_vite@2.7.12+vue@3.2.26
'@vue/eslint-config-prettier': registry.npmmirror.com/@vue/eslint-config-prettier/7.0.0_eslint@8.6.0+prettier@2.5.1
'@vue/eslint-config-typescript': registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_57f850728139557a3a27f1248f77f964
'@vue/eslint-config-typescript': registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_e5275a3381928a55897f97722d1207a6
commitizen: registry.npmmirror.com/commitizen/4.2.4_@types+node@17.0.8
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.8
@ -94,7 +94,7 @@ devDependencies:
eslint-config-prettier: registry.nlark.com/eslint-config-prettier/8.3.0_eslint@8.6.0
eslint-plugin-import: registry.npmmirror.com/eslint-plugin-import/2.25.4_eslint@8.6.0
eslint-plugin-prettier: registry.npmmirror.com/eslint-plugin-prettier/4.0.0_1c588f61426b1faf18812943f1678311
eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.2.0_eslint@8.6.0
eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.3.0_eslint@8.6.0
husky: registry.npmmirror.com/husky/7.0.4
lint-staged: registry.npmmirror.com/lint-staged/12.1.7
mockjs: registry.npmmirror.com/mockjs/1.1.0
@ -102,16 +102,16 @@ devDependencies:
postinstall-postinstall: registry.npmmirror.com/postinstall-postinstall/2.1.0
prettier: registry.npmmirror.com/prettier/2.5.1
rollup-plugin-visualizer: registry.nlark.com/rollup-plugin-visualizer/5.5.2
sass: registry.npmmirror.com/sass/1.47.0
sass: registry.npmmirror.com/sass/1.48.0
typescript: registry.npmmirror.com/typescript/4.5.4
unplugin-icons: registry.npmmirror.com/unplugin-icons/0.13.0_vite@2.7.10
unplugin-vue-components: registry.npmmirror.com/unplugin-vue-components/0.17.11_vite@2.7.10+vue@3.2.26
vite: registry.npmmirror.com/vite/2.7.10_sass@1.47.0
vite-plugin-html: registry.npmmirror.com/vite-plugin-html/2.1.2_vite@2.7.10
vite-plugin-mock: registry.npmmirror.com/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.7.10
vite-plugin-windicss: registry.npmmirror.com/vite-plugin-windicss/1.6.2_vite@2.7.10
unplugin-icons: registry.npmmirror.com/unplugin-icons/0.13.0_vite@2.7.12
unplugin-vue-components: registry.npmmirror.com/unplugin-vue-components/0.17.11_vite@2.7.12+vue@3.2.26
vite: registry.npmmirror.com/vite/2.7.12_sass@1.48.0
vite-plugin-html: registry.npmmirror.com/vite-plugin-html/2.1.2_vite@2.7.12
vite-plugin-mock: registry.npmmirror.com/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.7.12
vite-plugin-windicss: registry.npmmirror.com/vite-plugin-windicss/1.6.2_vite@2.7.12
vue-tsc: registry.npmmirror.com/vue-tsc/0.30.2_typescript@4.5.4
vueuc: registry.npmmirror.com/vueuc/0.4.21_vue@3.2.26
vueuc: registry.npmmirror.com/vueuc/0.4.22_vue@3.2.26
windicss: registry.npmmirror.com/windicss/3.4.2
packages:
@ -357,7 +357,7 @@ packages:
color-convert: registry.npmmirror.com/color-convert/2.0.1
registry.nlark.com/anymatch/3.1.2:
resolution: {integrity: sha1-wFV8CWrzLxBhmPT04qODU343hxY=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/anymatch/download/anymatch-3.1.2.tgz}
resolution: {integrity: sha1-wFV8CWrzLxBhmPT04qODU343hxY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/anymatch/download/anymatch-3.1.2.tgz}
name: anymatch
version: 3.1.2
engines: {node: '>= 8'}
@ -425,7 +425,7 @@ packages:
version: 1.0.2
registry.nlark.com/binary-extensions/2.2.0:
resolution: {integrity: sha1-dfUC7q+f/eQvyYgpZFvk6na9ni0=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/binary-extensions/download/binary-extensions-2.2.0.tgz}
resolution: {integrity: sha1-dfUC7q+f/eQvyYgpZFvk6na9ni0=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/binary-extensions/download/binary-extensions-2.2.0.tgz}
name: binary-extensions
version: 2.2.0
engines: {node: '>=8'}
@ -440,7 +440,7 @@ packages:
concat-map: registry.nlark.com/concat-map/0.0.1
registry.nlark.com/braces/3.0.2:
resolution: {integrity: sha1-NFThpGLujVmeI23zNs2epPiv4Qc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/braces/download/braces-3.0.2.tgz}
resolution: {integrity: sha1-NFThpGLujVmeI23zNs2epPiv4Qc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/braces/download/braces-3.0.2.tgz}
name: braces
version: 3.0.2
engines: {node: '>=8'}
@ -1182,7 +1182,7 @@ packages:
dev: true
registry.nlark.com/fill-range/7.0.1:
resolution: {integrity: sha1-GRmmp8df44ssfHflGYU12prN2kA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fill-range/download/fill-range-7.0.1.tgz}
resolution: {integrity: sha1-GRmmp8df44ssfHflGYU12prN2kA=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fill-range/download/fill-range-7.0.1.tgz}
name: fill-range
version: 7.0.1
engines: {node: '>=8'}
@ -1556,7 +1556,7 @@ packages:
has-bigints: registry.nlark.com/has-bigints/1.0.1
registry.nlark.com/is-binary-path/2.1.0:
resolution: {integrity: sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-binary-path/download/is-binary-path-2.1.0.tgz}
resolution: {integrity: sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-binary-path/download/is-binary-path-2.1.0.tgz}
name: is-binary-path
version: 2.1.0
engines: {node: '>=8'}
@ -1641,7 +1641,7 @@ packages:
has-tostringtag: registry.nlark.com/has-tostringtag/1.0.0
registry.nlark.com/is-number/7.0.0:
resolution: {integrity: sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-number/download/is-number-7.0.0.tgz}
resolution: {integrity: sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-number/download/is-number-7.0.0.tgz}
name: is-number
version: 7.0.0
engines: {node: '>=0.12.0'}
@ -1939,7 +1939,7 @@ packages:
dev: true
registry.nlark.com/lru-cache/6.0.0:
resolution: {integrity: sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/lru-cache/download/lru-cache-6.0.0.tgz}
resolution: {integrity: sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/lru-cache/download/lru-cache-6.0.0.tgz}
name: lru-cache
version: 6.0.0
engines: {node: '>=10'}
@ -2040,7 +2040,7 @@ packages:
dev: true
registry.nlark.com/natural-compare/1.4.0:
resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/natural-compare/download/natural-compare-1.4.0.tgz}
resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/natural-compare/download/natural-compare-1.4.0.tgz}
name: natural-compare
version: 1.4.0
dev: true
@ -2084,7 +2084,7 @@ packages:
dev: true
registry.nlark.com/normalize-path/3.0.0:
resolution: {integrity: sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/normalize-path/download/normalize-path-3.0.0.tgz?cache=0&sync_timestamp=1631501916645&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-path%2Fdownload%2Fnormalize-path-3.0.0.tgz}
resolution: {integrity: sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/normalize-path/download/normalize-path-3.0.0.tgz?cache=0&sync_timestamp=1631501916645&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-path%2Fdownload%2Fnormalize-path-3.0.0.tgz}
name: normalize-path
version: 3.0.0
engines: {node: '>=0.10.0'}
@ -2506,7 +2506,7 @@ packages:
dev: true
registry.nlark.com/readdirp/3.6.0:
resolution: {integrity: sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/readdirp/download/readdirp-3.6.0.tgz}
resolution: {integrity: sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/readdirp/download/readdirp-3.6.0.tgz}
name: readdirp
version: 3.6.0
engines: {node: '>=8.10.0'}
@ -2563,7 +2563,7 @@ packages:
dev: true
registry.nlark.com/resize-observer-polyfill/1.5.1:
resolution: {integrity: sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz}
resolution: {integrity: sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz}
name: resize-observer-polyfill
version: 1.5.1
@ -2715,7 +2715,7 @@ packages:
dev: true
registry.nlark.com/semver/7.3.5:
resolution: {integrity: sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1631500167672&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz}
resolution: {integrity: sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1631500167672&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz}
name: semver
version: 7.3.5
engines: {node: '>=10'}
@ -3016,7 +3016,7 @@ packages:
dev: true
registry.nlark.com/to-regex-range/5.0.1:
resolution: {integrity: sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/to-regex-range/download/to-regex-range-5.0.1.tgz}
resolution: {integrity: sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/to-regex-range/download/to-regex-range-5.0.1.tgz}
name: to-regex-range
version: 5.0.1
engines: {node: '>=8.0'}
@ -3252,7 +3252,7 @@ packages:
dev: true
registry.nlark.com/yallist/4.0.0:
resolution: {integrity: sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/yallist/download/yallist-4.0.0.tgz}
resolution: {integrity: sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/yallist/download/yallist-4.0.0.tgz}
name: yallist
version: 4.0.0
dev: true
@ -4175,7 +4175,7 @@ packages:
eslint-visitor-keys: registry.npmmirror.com/eslint-visitor-keys/3.1.0
dev: true
registry.npmmirror.com/@vitejs/plugin-vue/2.0.1_vite@2.7.10+vue@3.2.26:
registry.npmmirror.com/@vitejs/plugin-vue/2.0.1_vite@2.7.12+vue@3.2.26:
resolution: {integrity: sha512-wtdMnGVvys9K8tg+DxowU1ytTrdVveXr3LzdhaKakysgGXyrsfaeds2cDywtvujEASjWOwWL/OgWM+qoeM8Plg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vitejs/plugin-vue/download/@vitejs/plugin-vue-2.0.1.tgz}
id: registry.npmmirror.com/@vitejs/plugin-vue/2.0.1
name: '@vitejs/plugin-vue'
@ -4185,7 +4185,7 @@ packages:
vite: ^2.5.10
vue: ^3.2.25
dependencies:
vite: registry.npmmirror.com/vite/2.7.10_sass@1.47.0
vite: registry.npmmirror.com/vite/2.7.12_sass@1.48.0
vue: registry.npmmirror.com/vue/3.2.26
dev: true
@ -4329,7 +4329,7 @@ packages:
prettier: registry.npmmirror.com/prettier/2.5.1
dev: true
registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_57f850728139557a3a27f1248f77f964:
registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_e5275a3381928a55897f97722d1207a6:
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'
@ -4342,7 +4342,7 @@ packages:
'@typescript-eslint/eslint-plugin': registry.npmmirror.com/@typescript-eslint/eslint-plugin/5.9.1_b7b2e42b32ee097737cd3e626b10847b
'@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser/5.9.1_eslint@8.6.0+typescript@4.5.4
eslint: registry.npmmirror.com/eslint/8.6.0
eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.2.0_eslint@8.6.0
eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.3.0_eslint@8.6.0
vue-eslint-parser: registry.npmmirror.com/vue-eslint-parser/8.0.1_eslint@8.6.0
transitivePeerDependencies:
- supports-color
@ -4668,7 +4668,7 @@ packages:
dev: true
registry.npmmirror.com/chokidar/3.5.2:
resolution: {integrity: sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chokidar/download/chokidar-3.5.2.tgz}
resolution: {integrity: sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chokidar/download/chokidar-3.5.2.tgz}
name: chokidar
version: 3.5.2
engines: {node: '>= 8.10.0'}
@ -5281,7 +5281,7 @@ packages:
dev: true
registry.npmmirror.com/esbuild/0.13.15:
resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild/download/esbuild-0.13.15.tgz}
resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild/download/esbuild-0.13.15.tgz}
name: esbuild
version: 0.13.15
hasBin: true
@ -5379,11 +5379,11 @@ packages:
prettier-linter-helpers: registry.nlark.com/prettier-linter-helpers/1.0.0
dev: true
registry.npmmirror.com/eslint-plugin-vue/8.2.0_eslint@8.6.0:
resolution: {integrity: sha512-cLIdTuOAMXyHeQ4drYKcZfoyzdwdBpH279X8/N0DgmotEI9yFKb5O/cAgoie/CkQZCH/MOmh0xw/KEfS90zY2A==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eslint-plugin-vue/download/eslint-plugin-vue-8.2.0.tgz}
id: registry.npmmirror.com/eslint-plugin-vue/8.2.0
registry.npmmirror.com/eslint-plugin-vue/8.3.0_eslint@8.6.0:
resolution: {integrity: sha512-IIuLHw4vQxGlHcoP2dG6t/2OVdQf2qoyAzEGAxreU1afZOHGA7y3TWq8I+r3ZA6Wjs6xpeUWGHlT31QGr9Rb5g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eslint-plugin-vue/download/eslint-plugin-vue-8.3.0.tgz}
id: registry.npmmirror.com/eslint-plugin-vue/8.3.0
name: eslint-plugin-vue
version: 8.2.0
version: 8.3.0
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.2.0 || ^7.0.0 || ^8.0.0
@ -5651,7 +5651,7 @@ packages:
dev: false
registry.npmmirror.com/glob-parent/5.1.2:
resolution: {integrity: sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/glob-parent/download/glob-parent-5.1.2.tgz}
resolution: {integrity: sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/glob-parent/download/glob-parent-5.1.2.tgz}
name: glob-parent
version: 5.1.2
engines: {node: '>= 6'}
@ -5819,7 +5819,7 @@ packages:
dev: true
registry.npmmirror.com/immutable/4.0.0:
resolution: {integrity: sha1-uG943mre82CDle+yaakUYnl+LCM=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/immutable/download/immutable-4.0.0.tgz}
resolution: {integrity: sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/immutable/download/immutable-4.0.0.tgz}
name: immutable
version: 4.0.0
dev: true
@ -6163,7 +6163,7 @@ packages:
vfonts: registry.npmmirror.com/vfonts/0.0.3
vooks: registry.npmmirror.com/vooks/0.2.12_vue@3.2.26
vue: registry.npmmirror.com/vue/3.2.26
vueuc: registry.npmmirror.com/vueuc/0.4.21_7fea039e05dc0d0bb67319189a00d1ad
vueuc: registry.npmmirror.com/vueuc/0.4.22_7fea039e05dc0d0bb67319189a00d1ad
dev: false
registry.npmmirror.com/nanoid/3.1.30:
@ -6284,12 +6284,12 @@ packages:
dev: true
registry.npmmirror.com/picocolors/1.0.0:
resolution: {integrity: sha1-y1vcdP8/UYkiNur3nWi8RFZKuBw=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picocolors/download/picocolors-1.0.0.tgz}
resolution: {integrity: sha1-y1vcdP8/UYkiNur3nWi8RFZKuBw=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picocolors/download/picocolors-1.0.0.tgz}
name: picocolors
version: 1.0.0
registry.npmmirror.com/picomatch/2.3.0:
resolution: {integrity: sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picomatch/download/picomatch-2.3.0.tgz}
resolution: {integrity: sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picomatch/download/picomatch-2.3.0.tgz}
name: picomatch
version: 2.3.0
engines: {node: '>=8.6'}
@ -6317,7 +6317,7 @@ packages:
dev: false
registry.npmmirror.com/postcss/8.4.5:
resolution: {integrity: sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/postcss/download/postcss-8.4.5.tgz}
resolution: {integrity: sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/postcss/download/postcss-8.4.5.tgz}
name: postcss
version: 8.4.5
engines: {node: ^10 || ^12 || >=14}
@ -6469,7 +6469,7 @@ packages:
dev: true
registry.npmmirror.com/rollup/0.25.8:
resolution: {integrity: sha1-v2zoO4dRDRY0Ru6qV37WpvxYNeA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup/download/rollup-0.25.8.tgz}
resolution: {integrity: sha1-v2zoO4dRDRY0Ru6qV37WpvxYNeA=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup/download/rollup-0.25.8.tgz}
name: rollup
version: 0.25.8
hasBin: true
@ -6480,7 +6480,7 @@ packages:
dev: false
registry.npmmirror.com/rollup/2.62.0:
resolution: {integrity: sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup/download/rollup-2.62.0.tgz}
resolution: {integrity: sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup/download/rollup-2.62.0.tgz}
name: rollup
version: 2.62.0
engines: {node: '>=10.0.0'}
@ -6512,10 +6512,10 @@ packages:
tslib: registry.npmmirror.com/tslib/2.3.1
dev: true
registry.npmmirror.com/sass/1.47.0:
resolution: {integrity: sha512-GtXwvwgD7/6MLUZPnlA5/8cdRgC9SzT5kAnnJMRmEZQFRE3J56Foswig4NyyyQGsnmNvg6EUM/FP0Pe9Y2zywQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sass/download/sass-1.47.0.tgz}
registry.npmmirror.com/sass/1.48.0:
resolution: {integrity: sha512-hQi5g4DcfjcipotoHZ80l7GNJHGqQS5LwMBjVYB/TaT0vcSSpbgM8Ad7cgfsB2M0MinbkEQQPO9+sjjSiwxqmw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sass/download/sass-1.48.0.tgz}
name: sass
version: 1.47.0
version: 1.48.0
engines: {node: '>=8.9.0'}
hasBin: true
dependencies:
@ -6538,7 +6538,7 @@ packages:
dev: true
registry.npmmirror.com/source-map-js/1.0.1:
resolution: {integrity: sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-map-js/download/source-map-js-1.0.1.tgz}
resolution: {integrity: sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-map-js/download/source-map-js-1.0.1.tgz}
name: source-map-js
version: 1.0.1
engines: {node: '>=0.10.0'}
@ -6849,7 +6849,7 @@ packages:
uglify-to-browserify: registry.nlark.com/uglify-to-browserify/1.0.2
dev: false
registry.npmmirror.com/unplugin-icons/0.13.0_vite@2.7.10:
registry.npmmirror.com/unplugin-icons/0.13.0_vite@2.7.12:
resolution: {integrity: sha512-CyAl0HV3bZUGT7ut9agpPRhEYXCvufr80Fh72yrkD57BVCTZ7ze10Rt63ZrvPXiJQpd+aI/Bizm2aqOf3WPSfg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/unplugin-icons/download/unplugin-icons-0.13.0.tgz}
id: registry.npmmirror.com/unplugin-icons/0.13.0
name: unplugin-icons
@ -6875,7 +6875,7 @@ packages:
debug: registry.npmmirror.com/debug/4.3.3
kolorist: registry.npmmirror.com/kolorist/1.5.1
local-pkg: registry.npmmirror.com/local-pkg/0.4.0
unplugin: registry.npmmirror.com/unplugin/0.2.21_vite@2.7.10
unplugin: registry.npmmirror.com/unplugin/0.2.21_vite@2.7.12
transitivePeerDependencies:
- rollup
- supports-color
@ -6883,7 +6883,7 @@ packages:
- webpack
dev: true
registry.npmmirror.com/unplugin-vue-components/0.17.11_vite@2.7.10+vue@3.2.26:
registry.npmmirror.com/unplugin-vue-components/0.17.11_vite@2.7.12+vue@3.2.26:
resolution: {integrity: sha512-u5MQ0TbikszRelCt6EA/HskGtGkGLDxi7tQ4/4tcEPWkH3yXSZRJCOeLF5MSdxN1SiGjaJ0I9zeHjoZFC3FvRw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/unplugin-vue-components/download/unplugin-vue-components-0.17.11.tgz}
id: registry.npmmirror.com/unplugin-vue-components/0.17.11
name: unplugin-vue-components
@ -6908,7 +6908,7 @@ packages:
magic-string: registry.nlark.com/magic-string/0.25.7
minimatch: registry.nlark.com/minimatch/3.0.4
resolve: registry.nlark.com/resolve/1.20.0
unplugin: registry.npmmirror.com/unplugin/0.2.21_vite@2.7.10
unplugin: registry.npmmirror.com/unplugin/0.2.21_vite@2.7.12
vue: registry.npmmirror.com/vue/3.2.26
transitivePeerDependencies:
- rollup
@ -6917,7 +6917,7 @@ packages:
- webpack
dev: true
registry.npmmirror.com/unplugin/0.2.21_vite@2.7.10:
registry.npmmirror.com/unplugin/0.2.21_vite@2.7.12:
resolution: {integrity: sha512-IJ15/L5XbhnV7J09Zjk0FT5HEkBjkXucWAXQWRsmEtUxmmxwh23yavrmDbCF6ZPxWiVB28+wnKIHePTRRpQPbQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/unplugin/download/unplugin-0.2.21.tgz}
id: registry.npmmirror.com/unplugin/0.2.21
name: unplugin
@ -6934,7 +6934,7 @@ packages:
webpack:
optional: true
dependencies:
vite: registry.npmmirror.com/vite/2.7.10_sass@1.47.0
vite: registry.npmmirror.com/vite/2.7.12_sass@1.48.0
webpack-virtual-modules: registry.nlark.com/webpack-virtual-modules/0.4.3
dev: true
@ -6964,7 +6964,7 @@ packages:
version: 0.0.3
dev: false
registry.npmmirror.com/vite-plugin-html/2.1.2_vite@2.7.10:
registry.npmmirror.com/vite-plugin-html/2.1.2_vite@2.7.12:
resolution: {integrity: sha512-7HXkL6n7M2qDEaUV4Vnz8yM2glW4gV36d5HSBIM5gOoAG1PkuQb4Vv9FTPgPiQxq4sPRf/6IgABX0MeLVW+CyQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-html/download/vite-plugin-html-2.1.2.tgz}
id: registry.npmmirror.com/vite-plugin-html/2.1.2
name: vite-plugin-html
@ -6978,12 +6978,12 @@ packages:
ejs: registry.npmmirror.com/ejs/3.1.6
fs-extra: registry.nlark.com/fs-extra/10.0.0
html-minifier-terser: registry.npmmirror.com/html-minifier-terser/6.1.0
vite: registry.npmmirror.com/vite/2.7.10_sass@1.47.0
vite: registry.npmmirror.com/vite/2.7.12_sass@1.48.0
transitivePeerDependencies:
- acorn
dev: true
registry.npmmirror.com/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.7.10:
registry.npmmirror.com/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.7.12:
resolution: {integrity: sha1-BN0j3muqBS+qW5rTF1FMkNYgXiU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-mock/download/vite-plugin-mock-2.9.6.tgz}
id: registry.npmmirror.com/vite-plugin-mock/2.9.6
name: vite-plugin-mock
@ -7003,13 +7003,13 @@ packages:
fast-glob: registry.nlark.com/fast-glob/3.2.7
mockjs: registry.npmmirror.com/mockjs/1.1.0
path-to-regexp: registry.nlark.com/path-to-regexp/6.2.0
vite: registry.npmmirror.com/vite/2.7.10_sass@1.47.0
vite: registry.npmmirror.com/vite/2.7.12_sass@1.48.0
transitivePeerDependencies:
- rollup
- supports-color
dev: true
registry.npmmirror.com/vite-plugin-windicss/1.6.2_vite@2.7.10:
registry.npmmirror.com/vite-plugin-windicss/1.6.2_vite@2.7.12:
resolution: {integrity: sha512-JFZmWo2XumDIoOk6wOW7RugVFpq0ACJ7DRT0dPi8KJ0fCNyYF+Wu6xyig7/QOQEAfoMbYxnVeU3CWGU4D5PlyA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-windicss/download/vite-plugin-windicss-1.6.2.tgz}
id: registry.npmmirror.com/vite-plugin-windicss/1.6.2
name: vite-plugin-windicss
@ -7020,17 +7020,17 @@ packages:
'@windicss/plugin-utils': registry.npmmirror.com/@windicss/plugin-utils/1.6.2
debug: registry.npmmirror.com/debug/4.3.3
kolorist: registry.npmmirror.com/kolorist/1.5.1
vite: registry.npmmirror.com/vite/2.7.10_sass@1.47.0
vite: registry.npmmirror.com/vite/2.7.12_sass@1.48.0
windicss: registry.npmmirror.com/windicss/3.4.2
transitivePeerDependencies:
- supports-color
dev: true
registry.npmmirror.com/vite/2.7.10_sass@1.47.0:
resolution: {integrity: sha512-KEY96ntXUid1/xJihJbgmLZx7QSC2D4Tui0FdS0Old5OokYzFclcofhtxtjDdGOk/fFpPbHv9yw88+rB93Tb8w==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite/download/vite-2.7.10.tgz}
id: registry.npmmirror.com/vite/2.7.10
registry.npmmirror.com/vite/2.7.12_sass@1.48.0:
resolution: {integrity: sha512-KvPYToRQWhRfBeVkyhkZ5hASuHQkqZUUdUcE3xyYtq5oYEPIJ0h9LWiWTO6v990glmSac2cEPeYeXzpX5Z6qKQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite/download/vite-2.7.12.tgz}
id: registry.npmmirror.com/vite/2.7.12
name: vite
version: 2.7.10
version: 2.7.12
engines: {node: '>=12.2.0'}
hasBin: true
peerDependencies:
@ -7047,9 +7047,9 @@ packages:
dependencies:
esbuild: registry.npmmirror.com/esbuild/0.13.15
postcss: registry.npmmirror.com/postcss/8.4.5
resolve: registry.nlark.com/resolve/1.20.0
resolve: registry.npmmirror.com/resolve/1.20.0
rollup: registry.npmmirror.com/rollup/2.62.0
sass: registry.npmmirror.com/sass/1.47.0
sass: registry.npmmirror.com/sass/1.48.0
optionalDependencies:
fsevents: registry.npmmirror.com/fsevents/2.3.2
dev: true
@ -7291,11 +7291,11 @@ packages:
'@vue/shared': registry.npmmirror.com/@vue/shared/3.2.26
dev: false
registry.npmmirror.com/vueuc/0.4.21_7fea039e05dc0d0bb67319189a00d1ad:
resolution: {integrity: sha512-BVBvhYEdsOKy0yGS1ut5IdWa/iiz4j+bvgPTlxRhdGiBsLZN0oQRWisVllJp+dOh3gxbjD4IC+dHaXg5jtMLEw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vueuc/download/vueuc-0.4.21.tgz}
id: registry.npmmirror.com/vueuc/0.4.21
registry.npmmirror.com/vueuc/0.4.22_7fea039e05dc0d0bb67319189a00d1ad:
resolution: {integrity: sha512-NqyBnS46+Fiuk9nEVqNocchRZ4PjVIzREA7lFOn/RrzpAjaX/3Srlee8BmIkNGhVcvrd7oCOgOl/vv12ls1C+Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vueuc/download/vueuc-0.4.22.tgz}
id: registry.npmmirror.com/vueuc/0.4.22
name: vueuc
version: 0.4.21
version: 0.4.22
peerDependencies:
'@css-render/vue3-ssr': ^0.15.7
vue: ^3.0.11
@ -7310,11 +7310,11 @@ packages:
vue: registry.npmmirror.com/vue/3.2.26
dev: false
registry.npmmirror.com/vueuc/0.4.21_vue@3.2.26:
resolution: {integrity: sha512-BVBvhYEdsOKy0yGS1ut5IdWa/iiz4j+bvgPTlxRhdGiBsLZN0oQRWisVllJp+dOh3gxbjD4IC+dHaXg5jtMLEw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vueuc/download/vueuc-0.4.21.tgz}
id: registry.npmmirror.com/vueuc/0.4.21
registry.npmmirror.com/vueuc/0.4.22_vue@3.2.26:
resolution: {integrity: sha512-NqyBnS46+Fiuk9nEVqNocchRZ4PjVIzREA7lFOn/RrzpAjaX/3Srlee8BmIkNGhVcvrd7oCOgOl/vv12ls1C+Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vueuc/download/vueuc-0.4.22.tgz}
id: registry.npmmirror.com/vueuc/0.4.22
name: vueuc
version: 0.4.21
version: 0.4.22
peerDependencies:
'@css-render/vue3-ssr': ^0.15.7
vue: ^3.0.11

View File

@ -1,34 +1,69 @@
import { watch, onUnmounted } from 'vue';
import { computed, watch, onUnmounted } from 'vue';
import type { ComputedRef } from 'vue';
import useBoolean from './useBoolean';
interface ScrollBodyStyle {
overflow: string;
paddingRight: string;
}
/**
* 使
* @param hide - html滚动条
* @param hideScroll - html滚动条
* @param duration -
*/
export default function useModalVisible(hideScroll = true) {
export default function useModalVisible(hideScroll = true, duration = 300) {
const { bool: visible, setTrue: openModal, setFalse: closeModal, toggle: toggleModal } = useBoolean();
const stopHandle = watch(visible, async newValue => {
const defaultStyle: ScrollBodyStyle = {
overflow: '',
paddingRight: ''
};
function getInitBodyStyle() {
if (hideScroll) {
const className = 'overflow-hidden';
if (newValue) {
document.body.classList.add(className);
} else {
setTimeout(() => {
document.body.classList.remove(className);
}, 300);
}
const { overflow, paddingRight } = document.body.style;
Object.assign(defaultStyle, { overflow, paddingRight });
}
});
}
function setScrollBodyStyle() {
document.body.style.paddingRight = `${window.innerWidth - document.body.clientWidth}px`;
document.body.style.overflow = 'hidden';
}
function resetScrollBodyStyle() {
document.body.style.overflow = defaultStyle.overflow;
document.body.style.paddingRight = defaultStyle.paddingRight;
}
onUnmounted(() => {
stopHandle();
});
function modalVisibleWatcher(visible: ComputedRef<boolean>) {
const stopHandle = watch(visible, async newValue => {
if (hideScroll) {
if (newValue) {
setScrollBodyStyle();
} else {
setTimeout(() => {
resetScrollBodyStyle();
}, duration);
}
}
});
onUnmounted(() => {
stopHandle();
});
}
function init() {
getInitBodyStyle();
modalVisibleWatcher(computed(() => visible.value));
}
init();
return {
visible,
openModal,
closeModal,
toggleModal
toggleModal,
modalVisibleWatcher
};
}

View File

@ -13,6 +13,5 @@ export type GlobalBreadcrumb = DropdownOption & {
disabled: boolean;
routeName: string;
hasChildren: boolean;
iconName?: string;
children?: GlobalBreadcrumb[];
};

View File

@ -9,10 +9,6 @@ import type { GlobalMenuOption } from '@/interface';
/** 路由状态 */
interface RouteStore {
/** 动态路由 */
routes: Ref<AuthRoute.Route[]>;
/** 设置动态路由数据 */
setRoutes(data: AuthRoute.Route[]): void;
/** 是否添加过动态路由 */
isAddedDynamicRoute: Ref<boolean>;
/** 初始化动态路由 */
@ -22,11 +18,6 @@ interface RouteStore {
}
export const useRouteStore = defineStore('route-store', () => {
const routes = ref<AuthRoute.Route[]>([]);
function setRoutes(data: AuthRoute.Route[]) {
routes.value = data;
}
const menus = ref<GlobalMenuOption[]>([]) as Ref<GlobalMenuOption[]>;
function getMenus(data: AuthRoute.Route[]) {
const transform = transformAuthRouteToMenu(data);
@ -49,8 +40,6 @@ export const useRouteStore = defineStore('route-store', () => {
}
const routeStore: RouteStore = {
routes,
setRoutes,
isAddedDynamicRoute,
initDynamicRoute,
menus

View File

@ -7,29 +7,67 @@ import type { GlobalMenuOption, GlobalBreadcrumb } from '@/interface';
* @param rootPath -
*/
export function getBreadcrumbByRouteKey(activeKey: string, menus: GlobalMenuOption[], rootPath: string) {
return menus.map(menu => getBreadcrumbItem(activeKey, menu, rootPath)).flat(1);
const breadcrumbMenu = getBreadcrumbMenu(activeKey, menus);
const breadcrumb = breadcrumbMenu.map(item => transformBreadcrumbMenuToBreadcrumb(item, rootPath));
return breadcrumb;
}
function getBreadcrumbItem(activeKey: string, menu: GlobalMenuOption, rootPath: string) {
const list: GlobalBreadcrumb[] = [];
if (activeKey.includes(menu.routeName)) {
const breadcrumb: GlobalBreadcrumb = {
key: menu.routeName,
label: menu.label as string,
routeName: menu.routeName,
disabled: menu.routePath === rootPath,
hasChildren: false
};
if (menu.icon) {
breadcrumb.icon = menu.icon;
/**
*
* @param activeKey - key
* @param menus -
*/
function getBreadcrumbMenu(activeKey: string, menus: GlobalMenuOption[]) {
const breadcrumbMenu: GlobalMenuOption[] = [];
menus.some(menu => {
const flag = activeKey.includes(menu.routeName);
if (flag) {
breadcrumbMenu.push(...getBreadcrumbMenuItem(activeKey, menu));
}
if (menu.children && menu.children.length) {
breadcrumb.hasChildren = true;
breadcrumb.children = menu.children
.map(item => getBreadcrumbItem(activeKey, item as GlobalMenuOption, rootPath))
.flat(1);
}
list.push(breadcrumb);
}
return list;
return flag;
});
return breadcrumbMenu;
}
/**
*
* @param activeKey - key
* @param menu -
*/
function getBreadcrumbMenuItem(activeKey: string, menu: GlobalMenuOption) {
const breadcrumbMenu: GlobalMenuOption[] = [];
if (activeKey.includes(menu.routeName)) {
breadcrumbMenu.push(menu);
}
if (menu.children && menu.children.length) {
breadcrumbMenu.push(
...menu.children.map(item => getBreadcrumbMenuItem(activeKey, item as GlobalMenuOption)).flat(1)
);
}
return breadcrumbMenu;
}
/**
*
* @param menu -
* @param rootPath -
*/
function transformBreadcrumbMenuToBreadcrumb(menu: GlobalMenuOption, rootPath: string) {
const hasChildren = Boolean(menu.children && menu.children.length);
const breadcrumb: GlobalBreadcrumb = {
key: menu.routeName,
label: menu.label as string,
routeName: menu.routeName,
disabled: menu.routePath === rootPath,
hasChildren
};
if (menu.icon) {
breadcrumb.icon = menu.icon;
}
if (hasChildren) {
breadcrumb.children = menu.children?.map(item =>
transformBreadcrumbMenuToBreadcrumb(item as GlobalMenuOption, rootPath)
);
}
return breadcrumb;
}