refactor(projects): 完善路由配置

This commit is contained in:
Soybean 2021-09-14 01:31:29 +08:00
parent 1dcdcdc485
commit ab77d58e46
24 changed files with 441 additions and 301 deletions

View File

@ -18,7 +18,7 @@
"*.{vue,js,jsx,ts,tsx}": "eslint --fix"
},
"dependencies": {
"@vueuse/core": "^6.3.2",
"@vueuse/core": "^6.3.3",
"axios": "^0.21.4",
"chroma-js": "^2.1.2",
"dayjs": "^1.10.7",
@ -33,14 +33,14 @@
"devDependencies": {
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@iconify/json": "^1.1.400",
"@iconify/json": "^1.1.401",
"@iconify/vue": "^3.0.0",
"@types/chroma-js": "^2.1.3",
"@types/nprogress": "^0.2.0",
"@types/qs": "^6.9.7",
"@types/smoothscroll-polyfill": "^0.3.1",
"@typescript-eslint/eslint-plugin": "^4.31.0",
"@typescript-eslint/parser": "^4.31.0",
"@typescript-eslint/eslint-plugin": "^4.31.1",
"@typescript-eslint/parser": "^4.31.1",
"@vitejs/plugin-vue": "^1.6.2",
"@vue/compiler-sfc": "^3.2.11",
"@vue/eslint-config-prettier": "^6.0.0",
@ -62,9 +62,9 @@
"prettier": "^2.4.0",
"sass": "^1.39.2",
"typescript": "^4.4.3",
"unplugin-icons": "^0.7.6",
"unplugin-icons": "^0.9.0",
"unplugin-vue-components": "^0.15.0",
"vite": "^2.5.6",
"vite": "^2.5.7",
"vite-plugin-html": "^2.1.0",
"vite-plugin-windicss": "^1.4.2",
"vue-tsc": "^0.3.0",

View File

@ -3,19 +3,19 @@ lockfileVersion: 5.3
specifiers:
'@commitlint/cli': ^13.1.0
'@commitlint/config-conventional': ^13.1.0
'@iconify/json': ^1.1.400
'@iconify/json': ^1.1.401
'@iconify/vue': ^3.0.0
'@types/chroma-js': ^2.1.3
'@types/nprogress': ^0.2.0
'@types/qs': ^6.9.7
'@types/smoothscroll-polyfill': ^0.3.1
'@typescript-eslint/eslint-plugin': ^4.31.0
'@typescript-eslint/parser': ^4.31.0
'@typescript-eslint/eslint-plugin': ^4.31.1
'@typescript-eslint/parser': ^4.31.1
'@vitejs/plugin-vue': ^1.6.2
'@vue/compiler-sfc': ^3.2.11
'@vue/eslint-config-prettier': ^6.0.0
'@vue/eslint-config-typescript': ^7.0.0
'@vueuse/core': ^6.3.2
'@vueuse/core': ^6.3.3
axios: ^0.21.4
chroma-js: ^2.1.2
commitizen: ^4.2.4
@ -41,9 +41,9 @@ specifiers:
sass: ^1.39.2
smoothscroll-polyfill: ^0.4.4
typescript: ^4.4.3
unplugin-icons: ^0.7.6
unplugin-icons: ^0.9.0
unplugin-vue-components: ^0.15.0
vite: ^2.5.6
vite: ^2.5.7
vite-plugin-html: ^2.1.0
vite-plugin-windicss: ^1.4.2
vue: ^3.2.10
@ -52,7 +52,7 @@ specifiers:
windicss: ^3.1.7
dependencies:
'@vueuse/core': registry.nlark.com/@vueuse/core/6.3.2_vue@3.2.10
'@vueuse/core': registry.nlark.com/@vueuse/core/6.3.3_vue@3.2.10
axios: registry.nlark.com/axios/0.21.4
chroma-js: registry.nlark.com/chroma-js/2.1.2
dayjs: registry.nlark.com/dayjs/1.10.7
@ -67,18 +67,18 @@ dependencies:
devDependencies:
'@commitlint/cli': registry.nlark.com/@commitlint/cli/13.1.0
'@commitlint/config-conventional': registry.nlark.com/@commitlint/config-conventional/13.1.0
'@iconify/json': registry.nlark.com/@iconify/json/1.1.400
'@iconify/json': registry.nlark.com/@iconify/json/1.1.401
'@iconify/vue': registry.nlark.com/@iconify/vue/3.0.0_vue@3.2.10
'@types/chroma-js': registry.nlark.com/@types/chroma-js/2.1.3
'@types/nprogress': registry.nlark.com/@types/nprogress/0.2.0
'@types/qs': registry.nlark.com/@types/qs/6.9.7
'@types/smoothscroll-polyfill': registry.nlark.com/@types/smoothscroll-polyfill/0.3.1
'@typescript-eslint/eslint-plugin': registry.nlark.com/@typescript-eslint/eslint-plugin/4.31.0_d9c1bc16c4e2aea4e8e177a5961dd3bf
'@typescript-eslint/parser': registry.nlark.com/@typescript-eslint/parser/4.31.0_eslint@7.32.0+typescript@4.4.3
'@typescript-eslint/eslint-plugin': registry.nlark.com/@typescript-eslint/eslint-plugin/4.31.1_e2d3c88d378335c4183365c112128ce9
'@typescript-eslint/parser': registry.nlark.com/@typescript-eslint/parser/4.31.1_eslint@7.32.0+typescript@4.4.3
'@vitejs/plugin-vue': registry.nlark.com/@vitejs/plugin-vue/1.6.2_@vue+compiler-sfc@3.2.11
'@vue/compiler-sfc': registry.nlark.com/@vue/compiler-sfc/3.2.11
'@vue/eslint-config-prettier': 6.0.0_b4d73ff40db55d7af7de6f3602f2b630
'@vue/eslint-config-typescript': 7.0.0_0643334a6dbf62beef45105491db6c15
'@vue/eslint-config-typescript': 7.0.0_ca87bee0483b94db258860da701ed809
commitizen: registry.nlark.com/commitizen/4.2.4
cz-conventional-changelog: registry.nlark.com/cz-conventional-changelog/3.3.0
cz-customizable: registry.nlark.com/cz-customizable/6.3.0
@ -96,11 +96,11 @@ devDependencies:
prettier: registry.nlark.com/prettier/2.4.0
sass: registry.nlark.com/sass/1.39.2
typescript: registry.nlark.com/typescript/4.4.3
unplugin-icons: registry.nlark.com/unplugin-icons/0.7.6_ab88f3ed6cd34af3ce86467cf77018e8
unplugin-vue-components: registry.nlark.com/unplugin-vue-components/0.15.0_vite@2.5.6+vue@3.2.10
vite: registry.nlark.com/vite/2.5.6
vite-plugin-html: registry.nlark.com/vite-plugin-html/2.1.0_vite@2.5.6
vite-plugin-windicss: registry.nlark.com/vite-plugin-windicss/1.4.2_typescript@4.4.3+vite@2.5.6
unplugin-icons: registry.nlark.com/unplugin-icons/0.9.0_54da2e3458e54be8937824c348b2c77e
unplugin-vue-components: registry.nlark.com/unplugin-vue-components/0.15.0_vite@2.5.7+vue@3.2.10
vite: registry.nlark.com/vite/2.5.7
vite-plugin-html: registry.nlark.com/vite-plugin-html/2.1.0_vite@2.5.7
vite-plugin-windicss: registry.nlark.com/vite-plugin-windicss/1.4.2_typescript@4.4.3+vite@2.5.7
vue-tsc: registry.nlark.com/vue-tsc/0.3.0_typescript@4.4.3
windicss: registry.nlark.com/windicss/3.1.7
@ -127,7 +127,7 @@ packages:
prettier: registry.nlark.com/prettier/2.4.0
dev: true
/@vue/eslint-config-typescript/7.0.0_0643334a6dbf62beef45105491db6c15:
/@vue/eslint-config-typescript/7.0.0_ca87bee0483b94db258860da701ed809:
resolution: {integrity: sha1-Igxwwu33olPnOSmFJfTUAbjvADg=, tarball: '@vue/eslint-config-typescript/download/@vue/eslint-config-typescript-7.0.0.tgz'}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@ -136,13 +136,11 @@ packages:
eslint: ^5.0.0 || ^6.0.0 || ^7.0.0
eslint-plugin-vue: ^5.2.3 || ^6.0.0 || ^7.0.0
dependencies:
'@typescript-eslint/eslint-plugin': registry.nlark.com/@typescript-eslint/eslint-plugin/4.31.0_d9c1bc16c4e2aea4e8e177a5961dd3bf
'@typescript-eslint/parser': registry.nlark.com/@typescript-eslint/parser/4.31.0_eslint@7.32.0+typescript@4.4.3
'@typescript-eslint/eslint-plugin': registry.nlark.com/@typescript-eslint/eslint-plugin/4.31.1_e2d3c88d378335c4183365c112128ce9
'@typescript-eslint/parser': registry.nlark.com/@typescript-eslint/parser/4.31.1_eslint@7.32.0+typescript@4.4.3
eslint: registry.nlark.com/eslint/7.32.0
eslint-plugin-vue: registry.nlark.com/eslint-plugin-vue/7.17.0_eslint@7.32.0
vue-eslint-parser: registry.nlark.com/vue-eslint-parser/7.10.0_eslint@7.32.0
transitivePeerDependencies:
- supports-color
dev: true
/@yarnpkg/lockfile/1.1.0:
@ -215,7 +213,7 @@ packages:
dev: true
/array-union/2.1.0:
resolution: {integrity: sha1-t5hCCtvrHego2ErNii4j0+/oXo0=, tarball: array-union/download/array-union-2.1.0.tgz}
resolution: {integrity: sha1-t5hCCtvrHego2ErNii4j0+/oXo0=, tarball: https://registry.npm.taobao.org/array-union/download/array-union-2.1.0.tgz}
engines: {node: '>=8'}
dev: true
@ -465,10 +463,10 @@ packages:
dev: true
/dir-glob/3.0.1:
resolution: {integrity: sha1-Vtv3PZkqSpO6FYT0U0Bj/S5BcX8=, tarball: dir-glob/download/dir-glob-3.0.1.tgz}
resolution: {integrity: sha1-Vtv3PZkqSpO6FYT0U0Bj/S5BcX8=, tarball: https://registry.npm.taobao.org/dir-glob/download/dir-glob-3.0.1.tgz}
engines: {node: '>=8'}
dependencies:
path-type: 4.0.0
path-type: registry.nlark.com/path-type/4.0.0
dev: true
/doctrine/2.1.0:
@ -834,7 +832,7 @@ packages:
dev: true
/ignore/5.1.8:
resolution: {integrity: sha1-8VCotQo0KJsz4i9YiavU2AFvDlc=, tarball: ignore/download/ignore-5.1.8.tgz}
resolution: {integrity: sha1-8VCotQo0KJsz4i9YiavU2AFvDlc=, tarball: https://registry.npm.taobao.org/ignore/download/ignore-5.1.8.tgz}
engines: {node: '>= 4'}
dev: true
@ -891,7 +889,7 @@ packages:
dev: true
/is-extglob/2.1.1:
resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=, tarball: is-extglob/download/is-extglob-2.1.1.tgz}
resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=, tarball: https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz}
engines: {node: '>=0.10.0'}
dev: true
@ -1164,7 +1162,7 @@ packages:
dev: true
/merge2/1.4.1:
resolution: {integrity: sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=, tarball: merge2/download/merge2-1.4.1.tgz}
resolution: {integrity: sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=, tarball: https://registry.npm.taobao.org/merge2/download/merge2-1.4.1.tgz}
engines: {node: '>= 8'}
dev: true
@ -1611,7 +1609,7 @@ packages:
dev: true
/resolve/1.20.0:
resolution: {integrity: sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=, tarball: resolve/download/resolve-1.20.0.tgz}
resolution: {integrity: sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=, tarball: https://registry.npm.taobao.org/resolve/download/resolve-1.20.0.tgz}
dependencies:
is-core-module: registry.nlark.com/is-core-module/2.6.0
path-parse: registry.nlark.com/path-parse/1.0.7
@ -1720,11 +1718,6 @@ packages:
engines: {node: '>=6'}
dev: true
/slash/3.0.0:
resolution: {integrity: sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ=, tarball: slash/download/slash-3.0.0.tgz}
engines: {node: '>=8'}
dev: true
/slice-ansi/3.0.0:
resolution: {integrity: sha1-Md3BCTCht+C2ewjJbC9Jt3p4l4c=, tarball: slice-ansi/download/slice-ansi-3.0.0.tgz}
engines: {node: '>=8'}
@ -1899,7 +1892,7 @@ packages:
dev: true
/tsutils/3.21.0_typescript@4.4.3:
resolution: {integrity: sha1-tIcX05TOpsHglpg+7Vjp1hcVtiM=, tarball: tsutils/download/tsutils-3.21.0.tgz}
resolution: {integrity: sha1-tIcX05TOpsHglpg+7Vjp1hcVtiM=, tarball: https://registry.npm.taobao.org/tsutils/download/tsutils-3.21.0.tgz?cache=0&sync_timestamp=1615138184534&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftsutils%2Fdownload%2Ftsutils-3.21.0.tgz}
engines: {node: '>= 6'}
peerDependencies:
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'
@ -1928,7 +1921,7 @@ packages:
dev: true
/upath/2.0.1:
resolution: {integrity: sha1-UMc96mjW9rmQ9R0nnOYIFmXWGos=, tarball: upath/download/upath-2.0.1.tgz}
resolution: {integrity: sha1-UMc96mjW9rmQ9R0nnOYIFmXWGos=, tarball: https://registry.npm.taobao.org/upath/download/upath-2.0.1.tgz}
engines: {node: '>=4'}
dev: true
@ -2031,6 +2024,10 @@ packages:
resolution: {integrity: sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=, tarball: yallist/download/yallist-3.1.1.tgz}
dev: true
/yallist/4.0.0:
resolution: {integrity: sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=, tarball: https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz}
dev: true
registry.nlark.com/@antfu/utils/0.2.4:
resolution: {integrity: sha1-x9M/xvqg06b8wlVWc/XpsZwPvBU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@antfu/utils/download/@antfu/utils-0.2.4.tgz}
name: '@antfu/utils'
@ -2316,8 +2313,6 @@ packages:
js-yaml: 3.14.1
minimatch: 3.0.4
strip-json-comments: 3.1.1
transitivePeerDependencies:
- supports-color
dev: true
registry.nlark.com/@humanwhocodes/config-array/0.5.0:
@ -2329,8 +2324,6 @@ packages:
'@humanwhocodes/object-schema': registry.nlark.com/@humanwhocodes/object-schema/1.2.0
debug: registry.nlark.com/debug/4.3.2
minimatch: 3.0.4
transitivePeerDependencies:
- supports-color
dev: true
registry.nlark.com/@humanwhocodes/object-schema/1.2.0:
@ -2340,15 +2333,15 @@ packages:
dev: true
registry.nlark.com/@iconify/json-tools/1.0.10:
resolution: {integrity: sha1-2acFDbvouynWhNSz+URu0tC+o8w=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@iconify/json-tools/download/@iconify/json-tools-1.0.10.tgz}
resolution: {integrity: sha1-2acFDbvouynWhNSz+URu0tC+o8w=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@iconify/json-tools/download/@iconify/json-tools-1.0.10.tgz}
name: '@iconify/json-tools'
version: 1.0.10
dev: true
registry.nlark.com/@iconify/json/1.1.400:
resolution: {integrity: sha1-ZlZgMgOxo4klDH396+BrL9+LGwE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@iconify/json/download/@iconify/json-1.1.400.tgz}
registry.nlark.com/@iconify/json/1.1.401:
resolution: {integrity: sha1-vB7u8ft/WerHwNIgE52ZW2A1A2s=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@iconify/json/download/@iconify/json-1.1.401.tgz}
name: '@iconify/json'
version: 1.1.400
version: 1.1.401
dev: true
registry.nlark.com/@iconify/vue/3.0.0_vue@3.2.10:
@ -2456,7 +2449,7 @@ packages:
dev: false
registry.nlark.com/@types/json-schema/7.0.9:
resolution: {integrity: sha1-l+3JA36gw4WFMgsolk3eOznkZg0=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@types/json-schema/download/@types/json-schema-7.0.9.tgz}
resolution: {integrity: sha1-l+3JA36gw4WFMgsolk3eOznkZg0=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@types/json-schema/download/@types/json-schema-7.0.9.tgz}
name: '@types/json-schema'
version: 7.0.9
dev: true
@ -2549,126 +2542,109 @@ packages:
'@types/yargs-parser': registry.nlark.com/@types/yargs-parser/20.2.1
dev: false
registry.nlark.com/@typescript-eslint/eslint-plugin/4.31.0_d9c1bc16c4e2aea4e8e177a5961dd3bf:
resolution: {integrity: sha1-nD+m9EuteJqWJCatlRtUaVvTr2s=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-4.31.0.tgz}
id: registry.nlark.com/@typescript-eslint/eslint-plugin/4.31.0
registry.nlark.com/@typescript-eslint/eslint-plugin/4.31.1_e2d3c88d378335c4183365c112128ce9:
resolution: {integrity: sha1-6ThgOhNvAdyr7s4GnaX7LjMdRJg=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-4.31.1.tgz?cache=0&sync_timestamp=1631554210620&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40typescript-eslint%2Feslint-plugin%2Fdownload%2F%40typescript-eslint%2Feslint-plugin-4.31.1.tgz}
id: registry.nlark.com/@typescript-eslint/eslint-plugin/4.31.1
name: '@typescript-eslint/eslint-plugin'
version: 4.31.0
version: 4.31.1
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
'@typescript-eslint/parser': ^4.0.0
eslint: ^5.0.0 || ^6.0.0 || ^7.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/experimental-utils': registry.nlark.com/@typescript-eslint/experimental-utils/4.31.0_eslint@7.32.0+typescript@4.4.3
'@typescript-eslint/parser': registry.nlark.com/@typescript-eslint/parser/4.31.0_eslint@7.32.0+typescript@4.4.3
'@typescript-eslint/scope-manager': registry.nlark.com/@typescript-eslint/scope-manager/4.31.0
'@typescript-eslint/experimental-utils': registry.nlark.com/@typescript-eslint/experimental-utils/4.31.1_eslint@7.32.0+typescript@4.4.3
'@typescript-eslint/parser': registry.nlark.com/@typescript-eslint/parser/4.31.1_eslint@7.32.0+typescript@4.4.3
'@typescript-eslint/scope-manager': registry.nlark.com/@typescript-eslint/scope-manager/4.31.1
debug: registry.nlark.com/debug/4.3.2
eslint: registry.nlark.com/eslint/7.32.0
functional-red-black-tree: 1.0.1
functional-red-black-tree: registry.nlark.com/functional-red-black-tree/1.0.1
regexpp: registry.nlark.com/regexpp/3.2.0
semver: registry.nlark.com/semver/7.3.5
tsutils: 3.21.0_typescript@4.4.3
typescript: registry.nlark.com/typescript/4.4.3
transitivePeerDependencies:
- supports-color
- typescript
dev: true
registry.nlark.com/@typescript-eslint/experimental-utils/4.31.0_eslint@7.32.0+typescript@4.4.3:
resolution: {integrity: sha1-DvHV2GwzT5g6APMQ5Dwc5MFOBU0=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/experimental-utils/download/@typescript-eslint/experimental-utils-4.31.0.tgz}
id: registry.nlark.com/@typescript-eslint/experimental-utils/4.31.0
registry.nlark.com/@typescript-eslint/experimental-utils/4.31.1_eslint@7.32.0+typescript@4.4.3:
resolution: {integrity: sha1-DJAPgy8nC4jhPlF1NkewLQg3HOU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/experimental-utils/download/@typescript-eslint/experimental-utils-4.31.1.tgz}
id: registry.nlark.com/@typescript-eslint/experimental-utils/4.31.1
name: '@typescript-eslint/experimental-utils'
version: 4.31.0
version: 4.31.1
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
eslint: '*'
dependencies:
'@types/json-schema': registry.nlark.com/@types/json-schema/7.0.9
'@typescript-eslint/scope-manager': registry.nlark.com/@typescript-eslint/scope-manager/4.31.0
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.0
'@typescript-eslint/typescript-estree': registry.nlark.com/@typescript-eslint/typescript-estree/4.31.0_typescript@4.4.3
'@typescript-eslint/scope-manager': registry.nlark.com/@typescript-eslint/scope-manager/4.31.1
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.1
'@typescript-eslint/typescript-estree': registry.nlark.com/@typescript-eslint/typescript-estree/4.31.1_typescript@4.4.3
eslint: registry.nlark.com/eslint/7.32.0
eslint-scope: registry.nlark.com/eslint-scope/5.1.1
eslint-utils: registry.nlark.com/eslint-utils/3.0.0_eslint@7.32.0
transitivePeerDependencies:
- supports-color
- typescript
dev: true
registry.nlark.com/@typescript-eslint/parser/4.31.0_eslint@7.32.0+typescript@4.4.3:
resolution: {integrity: sha1-h7fNFrJLkXDHdZXYsTY/gEcSHgU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/parser/download/@typescript-eslint/parser-4.31.0.tgz}
id: registry.nlark.com/@typescript-eslint/parser/4.31.0
registry.nlark.com/@typescript-eslint/parser/4.31.1_eslint@7.32.0+typescript@4.4.3:
resolution: {integrity: sha1-j5omcgM+b20zscAmDuvcDd9TkGQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/parser/download/@typescript-eslint/parser-4.31.1.tgz?cache=0&sync_timestamp=1631554209475&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40typescript-eslint%2Fparser%2Fdownload%2F%40typescript-eslint%2Fparser-4.31.1.tgz}
id: registry.nlark.com/@typescript-eslint/parser/4.31.1
name: '@typescript-eslint/parser'
version: 4.31.0
version: 4.31.1
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
eslint: ^5.0.0 || ^6.0.0 || ^7.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': registry.nlark.com/@typescript-eslint/scope-manager/4.31.0
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.0
'@typescript-eslint/typescript-estree': registry.nlark.com/@typescript-eslint/typescript-estree/4.31.0_typescript@4.4.3
'@typescript-eslint/scope-manager': registry.nlark.com/@typescript-eslint/scope-manager/4.31.1
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.1
'@typescript-eslint/typescript-estree': registry.nlark.com/@typescript-eslint/typescript-estree/4.31.1_typescript@4.4.3
debug: registry.nlark.com/debug/4.3.2
eslint: registry.nlark.com/eslint/7.32.0
typescript: registry.nlark.com/typescript/4.4.3
transitivePeerDependencies:
- supports-color
- typescript
dev: true
registry.nlark.com/@typescript-eslint/scope-manager/4.31.0:
resolution: {integrity: sha1-m+M67U6ZAdt1OAO6Iztw15qH/D4=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/scope-manager/download/@typescript-eslint/scope-manager-4.31.0.tgz}
registry.nlark.com/@typescript-eslint/scope-manager/4.31.1:
resolution: {integrity: sha1-DCHoUB9gjWolyEL89ZVB708atWE=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/scope-manager/download/@typescript-eslint/scope-manager-4.31.1.tgz}
name: '@typescript-eslint/scope-manager'
version: 4.31.0
version: 4.31.1
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
dependencies:
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.0
'@typescript-eslint/visitor-keys': registry.nlark.com/@typescript-eslint/visitor-keys/4.31.0
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.1
'@typescript-eslint/visitor-keys': registry.nlark.com/@typescript-eslint/visitor-keys/4.31.1
dev: true
registry.nlark.com/@typescript-eslint/types/4.31.0:
resolution: {integrity: sha1-mnyG/MFiAYlWfcTkbK1++gfujc4=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/types/download/@typescript-eslint/types-4.31.0.tgz}
registry.nlark.com/@typescript-eslint/types/4.31.1:
resolution: {integrity: sha1-XyVbaVYnoTQB0v26X3E4vHlFDWY=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/types/download/@typescript-eslint/types-4.31.1.tgz}
name: '@typescript-eslint/types'
version: 4.31.0
version: 4.31.1
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
dev: true
registry.nlark.com/@typescript-eslint/typescript-estree/4.31.0_typescript@4.4.3:
resolution: {integrity: sha1-TaTLYnSn7zsh1T+ecUfMdvJ4oHg=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/typescript-estree/download/@typescript-eslint/typescript-estree-4.31.0.tgz}
id: registry.nlark.com/@typescript-eslint/typescript-estree/4.31.0
registry.nlark.com/@typescript-eslint/typescript-estree/4.31.1_typescript@4.4.3:
resolution: {integrity: sha1-SgTVIyzxAxIytxJKnAMQtXemLRc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/typescript-estree/download/@typescript-eslint/typescript-estree-4.31.1.tgz}
id: registry.nlark.com/@typescript-eslint/typescript-estree/4.31.1
name: '@typescript-eslint/typescript-estree'
version: 4.31.0
version: 4.31.1
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.0
'@typescript-eslint/visitor-keys': registry.nlark.com/@typescript-eslint/visitor-keys/4.31.0
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.1
'@typescript-eslint/visitor-keys': registry.nlark.com/@typescript-eslint/visitor-keys/4.31.1
debug: registry.nlark.com/debug/4.3.2
globby: registry.nlark.com/globby/11.0.4
is-glob: 4.0.1
is-glob: registry.nlark.com/is-glob/4.0.1
semver: registry.nlark.com/semver/7.3.5
tsutils: 3.21.0_typescript@4.4.3
typescript: registry.nlark.com/typescript/4.4.3
transitivePeerDependencies:
- supports-color
- typescript
dev: true
registry.nlark.com/@typescript-eslint/visitor-keys/4.31.0:
resolution: {integrity: sha1-Toe3dhy04OYn3CBHAhqmk/x26is=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/visitor-keys/download/@typescript-eslint/visitor-keys-4.31.0.tgz}
registry.nlark.com/@typescript-eslint/visitor-keys/4.31.1:
resolution: {integrity: sha1-8uehTH8gxK4H1/w8WHjERBodqcw=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@typescript-eslint/visitor-keys/download/@typescript-eslint/visitor-keys-4.31.1.tgz}
name: '@typescript-eslint/visitor-keys'
version: 4.31.0
version: 4.31.1
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
dependencies:
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.0
'@typescript-eslint/types': registry.nlark.com/@typescript-eslint/types/4.31.1
eslint-visitor-keys: registry.nlark.com/eslint-visitor-keys/2.1.0
dev: true
@ -2944,38 +2920,28 @@ packages:
version: 3.2.4
dev: true
registry.nlark.com/@vueuse/core/6.3.2_vue@3.2.10:
resolution: {integrity: sha1-M2WyGi0JTVr8QrYH6EeS/takxGM=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@vueuse/core/download/@vueuse/core-6.3.2.tgz}
id: registry.nlark.com/@vueuse/core/6.3.2
registry.nlark.com/@vueuse/core/6.3.3_vue@3.2.10:
resolution: {integrity: sha1-BoLAG1DSjpHT128nJ4YA7haS+iQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@vueuse/core/download/@vueuse/core-6.3.3.tgz}
id: registry.nlark.com/@vueuse/core/6.3.3
name: '@vueuse/core'
version: 6.3.2
version: 6.3.3
peerDependencies:
'@vue/composition-api': ^1.1.0
vue: ^2.6.0 || ^3.2.0
peerDependenciesMeta:
'@vue/composition-api':
optional: true
vue:
optional: true
dependencies:
'@vueuse/shared': registry.nlark.com/@vueuse/shared/6.3.2_vue@3.2.10
'@vueuse/shared': registry.nlark.com/@vueuse/shared/6.3.3_vue@3.2.10
vue: registry.nlark.com/vue/3.2.10
vue-demi: registry.nlark.com/vue-demi/0.11.4_vue@3.2.10
dev: false
registry.nlark.com/@vueuse/shared/6.3.2_vue@3.2.10:
resolution: {integrity: sha1-NaghVh/U+x6i4ktvqQhvPQ1QYxY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@vueuse/shared/download/@vueuse/shared-6.3.2.tgz}
id: registry.nlark.com/@vueuse/shared/6.3.2
registry.nlark.com/@vueuse/shared/6.3.3_vue@3.2.10:
resolution: {integrity: sha1-TlxgCtHtW/KoYwrQvTjtsfQmnzc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@vueuse/shared/download/@vueuse/shared-6.3.3.tgz}
id: registry.nlark.com/@vueuse/shared/6.3.3
name: '@vueuse/shared'
version: 6.3.2
version: 6.3.3
peerDependencies:
'@vue/composition-api': ^1.1.0
vue: ^2.6.0 || ^3.2.0
peerDependenciesMeta:
'@vue/composition-api':
optional: true
vue:
optional: true
dependencies:
vue: registry.nlark.com/vue/3.2.10
vue-demi: registry.nlark.com/vue-demi/0.11.4_vue@3.2.10
@ -2992,7 +2958,6 @@ packages:
tsup: registry.nlark.com/tsup/4.14.0_typescript@4.4.3
windicss: registry.nlark.com/windicss/3.1.7
transitivePeerDependencies:
- supports-color
- ts-node
- typescript
dev: true
@ -3011,7 +2976,6 @@ packages:
micromatch: 4.0.4
windicss: registry.nlark.com/windicss/3.1.7
transitivePeerDependencies:
- supports-color
- ts-node
- typescript
dev: true
@ -3484,15 +3448,10 @@ packages:
dev: true
registry.nlark.com/debug/4.3.2:
resolution: {integrity: sha1-8KScGKyHeeMdSgxgKd+3aHPHQos=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/debug/download/debug-4.3.2.tgz}
resolution: {integrity: sha1-8KScGKyHeeMdSgxgKd+3aHPHQos=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/debug/download/debug-4.3.2.tgz}
name: debug
version: 4.3.2
engines: {node: '>=6.0'}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: registry.nlark.com/ms/2.1.2
dev: true
@ -3611,7 +3570,7 @@ packages:
dev: true
registry.nlark.com/esbuild/0.12.21:
resolution: {integrity: sha1-f/Mqmsc85DEPnLYepMPal1ZXDUY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/esbuild/download/esbuild-0.12.21.tgz?cache=0&sync_timestamp=1630598715108&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fesbuild%2Fdownload%2Fesbuild-0.12.21.tgz}
resolution: {integrity: sha1-f/Mqmsc85DEPnLYepMPal1ZXDUY=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/esbuild/download/esbuild-0.12.21.tgz?cache=0&sync_timestamp=1631497076947&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fesbuild%2Fdownload%2Fesbuild-0.12.21.tgz}
name: esbuild
version: 0.12.21
hasBin: true
@ -3723,8 +3682,6 @@ packages:
natural-compare: 1.4.0
semver: 6.3.0
vue-eslint-parser: registry.nlark.com/vue-eslint-parser/7.10.0_eslint@7.32.0
transitivePeerDependencies:
- supports-color
dev: true
registry.nlark.com/eslint-scope/5.1.1:
@ -3747,7 +3704,7 @@ packages:
dev: true
registry.nlark.com/eslint-utils/3.0.0_eslint@7.32.0:
resolution: {integrity: sha1-iuuvrOc0W7M1WdsKHxOh0tSMNnI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/eslint-utils/download/eslint-utils-3.0.0.tgz?cache=0&sync_timestamp=1620977666265&other_urls=https%3A%2F%2Fregistry.nlark.com%2Feslint-utils%2Fdownload%2Feslint-utils-3.0.0.tgz}
resolution: {integrity: sha1-iuuvrOc0W7M1WdsKHxOh0tSMNnI=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/eslint-utils/download/eslint-utils-3.0.0.tgz}
id: registry.nlark.com/eslint-utils/3.0.0
name: eslint-utils
version: 3.0.0
@ -3820,8 +3777,6 @@ packages:
table: registry.nlark.com/table/6.7.1
text-table: 0.2.0
v8-compile-cache: 2.3.0
transitivePeerDependencies:
- supports-color
dev: true
registry.nlark.com/espree/6.2.1:
@ -4006,7 +3961,7 @@ packages:
dev: true
registry.nlark.com/fsevents/2.3.2:
resolution: {integrity: sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fsevents/download/fsevents-2.3.2.tgz}
resolution: {integrity: sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fsevents/download/fsevents-2.3.2.tgz}
name: fsevents
version: 2.3.2
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@ -4014,6 +3969,12 @@ packages:
dev: true
optional: true
registry.nlark.com/functional-red-black-tree/1.0.1:
resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz}
name: functional-red-black-tree
version: 1.0.1
dev: true
registry.nlark.com/glob-parent/5.1.2:
resolution: {integrity: sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/glob-parent/download/glob-parent-5.1.2.tgz}
name: glob-parent
@ -4072,7 +4033,7 @@ packages:
dev: true
registry.nlark.com/globby/11.0.4:
resolution: {integrity: sha1-LLr/d8Lypi5x6bKBOme5ejowAaU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/globby/download/globby-11.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglobby%2Fdownload%2Fglobby-11.0.4.tgz}
resolution: {integrity: sha1-LLr/d8Lypi5x6bKBOme5ejowAaU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/globby/download/globby-11.0.4.tgz}
name: globby
version: 11.0.4
engines: {node: '>=10'}
@ -4082,7 +4043,7 @@ packages:
fast-glob: registry.nlark.com/fast-glob/3.2.7
ignore: 5.1.8
merge2: 1.4.1
slash: 3.0.0
slash: registry.nlark.com/slash/3.0.0
dev: true
registry.nlark.com/graceful-fs/4.2.8:
@ -4105,7 +4066,7 @@ packages:
engines: {node: '>=8'}
registry.nlark.com/has-pkg/0.0.1:
resolution: {integrity: sha1-+dkTntg+JIferl60rBMYKi6QOFc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/has-pkg/download/has-pkg-0.0.1.tgz}
resolution: {integrity: sha1-+dkTntg+JIferl60rBMYKi6QOFc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/has-pkg/download/has-pkg-0.0.1.tgz}
name: has-pkg
version: 0.0.1
dev: true
@ -4296,7 +4257,7 @@ packages:
dev: true
registry.nlark.com/is-glob/4.0.1:
resolution: {integrity: sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-glob/download/is-glob-4.0.1.tgz?cache=0&sync_timestamp=1624543039732&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-glob%2Fdownload%2Fis-glob-4.0.1.tgz}
resolution: {integrity: sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-glob/download/is-glob-4.0.1.tgz?cache=0&sync_timestamp=1624543039732&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-glob%2Fdownload%2Fis-glob-4.0.1.tgz}
name: is-glob
version: 4.0.1
engines: {node: '>=0.10.0'}
@ -4472,8 +4433,6 @@ packages:
please-upgrade-node: 3.2.0
string-argv: 0.3.1
stringify-object: 3.3.0
transitivePeerDependencies:
- supports-color
dev: true
registry.nlark.com/listr2/3.11.0_enquirer@2.3.6:
@ -4539,6 +4498,15 @@ packages:
yallist: 3.1.1
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}
name: lru-cache
version: 6.0.0
engines: {node: '>=10'}
dependencies:
yallist: 4.0.0
dev: true
registry.nlark.com/magic-string/0.25.7:
resolution: {integrity: sha1-P0l9b9NMZpxnmNy4IfLvMfVEUFE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/magic-string/download/magic-string-0.25.7.tgz?cache=0&sync_timestamp=1618847046304&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmagic-string%2Fdownload%2Fmagic-string-0.25.7.tgz}
name: magic-string
@ -4627,7 +4595,7 @@ packages:
dev: true
registry.nlark.com/ms/2.1.2:
resolution: {integrity: sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ms/download/ms-2.1.2.tgz}
resolution: {integrity: sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ms/download/ms-2.1.2.tgz}
name: ms
version: 2.1.2
dev: true
@ -4852,11 +4820,18 @@ packages:
dev: true
registry.nlark.com/path-parse/1.0.7:
resolution: {integrity: sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/path-parse/download/path-parse-1.0.7.tgz}
resolution: {integrity: sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/path-parse/download/path-parse-1.0.7.tgz}
name: path-parse
version: 1.0.7
dev: true
registry.nlark.com/path-type/4.0.0:
resolution: {integrity: sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/path-type/download/path-type-4.0.0.tgz}
name: path-type
version: 4.0.0
engines: {node: '>=8'}
dev: true
registry.nlark.com/picomatch/2.3.0:
resolution: {integrity: sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz}
name: picomatch
@ -5195,13 +5170,13 @@ packages:
dev: false
registry.nlark.com/semver/7.3.5:
resolution: {integrity: sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/semver/download/semver-7.3.5.tgz}
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=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz}
name: semver
version: 7.3.5
engines: {node: '>=10'}
hasBin: true
dependencies:
lru-cache: 6.0.0
lru-cache: registry.nlark.com/lru-cache/6.0.0
dev: true
registry.nlark.com/shebang-regex/1.0.0:
@ -5223,6 +5198,13 @@ packages:
version: 3.0.3
dev: true
registry.nlark.com/slash/3.0.0:
resolution: {integrity: sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/slash/download/slash-3.0.0.tgz}
name: slash
version: 3.0.0
engines: {node: '>=8'}
dev: true
registry.nlark.com/smoothscroll-polyfill/0.4.4:
resolution: {integrity: sha1-OiWRMdxpMObKgAA+HLA7YDtpq/g=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/smoothscroll-polyfill/download/smoothscroll-polyfill-0.4.4.tgz}
name: smoothscroll-polyfill
@ -5438,7 +5420,7 @@ packages:
dev: true
registry.nlark.com/tslib/1.14.1:
resolution: {integrity: sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz}
resolution: {integrity: sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz?cache=0&sync_timestamp=1628722556410&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz}
name: tslib
version: 1.14.1
dev: true
@ -5476,7 +5458,6 @@ packages:
tree-kill: registry.nlark.com/tree-kill/1.2.2
typescript: registry.nlark.com/typescript/4.4.3
transitivePeerDependencies:
- supports-color
- ts-node
dev: true
@ -5532,39 +5513,30 @@ packages:
hasBin: true
dev: true
registry.nlark.com/unplugin-icons/0.7.6_ab88f3ed6cd34af3ce86467cf77018e8:
resolution: {integrity: sha1-CLYc+b2imJyKfcbU6oBStluwkKA=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/unplugin-icons/download/unplugin-icons-0.7.6.tgz}
id: registry.nlark.com/unplugin-icons/0.7.6
registry.nlark.com/unplugin-icons/0.9.0_54da2e3458e54be8937824c348b2c77e:
resolution: {integrity: sha1-f7DUp5NHSM8C9PrsXq9du8efBEo=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/unplugin-icons/download/unplugin-icons-0.9.0.tgz}
id: registry.nlark.com/unplugin-icons/0.9.0
name: unplugin-icons
version: 0.7.6
version: 0.9.0
peerDependencies:
'@iconify/json': '*'
'@svgr/core': ^5.5.0
'@vue/compiler-sfc': ^3.0.2
vue-template-compiler: ^2.6.12
vue-template-es2015-compiler: ^1.9.0
peerDependenciesMeta:
'@svgr/core':
optional: true
'@vue/compiler-sfc':
optional: true
vue-template-compiler:
optional: true
vue-template-es2015-compiler:
optional: true
dependencies:
'@iconify/json': registry.nlark.com/@iconify/json/1.1.400
'@iconify/json': registry.nlark.com/@iconify/json/1.1.401
'@iconify/json-tools': registry.nlark.com/@iconify/json-tools/1.0.10
'@vue/compiler-sfc': registry.nlark.com/@vue/compiler-sfc/3.2.11
has-pkg: registry.nlark.com/has-pkg/0.0.1
unplugin: registry.nlark.com/unplugin/0.2.7_vite@2.5.6
unplugin: registry.nlark.com/unplugin/0.2.9_vite@2.5.7
transitivePeerDependencies:
- rollup
- vite
- webpack
dev: true
registry.nlark.com/unplugin-vue-components/0.15.0_vite@2.5.6+vue@3.2.10:
registry.nlark.com/unplugin-vue-components/0.15.0_vite@2.5.7+vue@3.2.10:
resolution: {integrity: sha1-XxJNcPFm+KzgWtnOkjCoToswasU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/unplugin-vue-components/download/unplugin-vue-components-0.15.0.tgz}
id: registry.nlark.com/unplugin-vue-components/0.15.0
name: unplugin-vue-components
@ -5581,16 +5553,15 @@ packages:
magic-string: registry.nlark.com/magic-string/0.25.7
minimatch: registry.nlark.com/minimatch/3.0.4
resolve: 1.20.0
unplugin: registry.nlark.com/unplugin/0.2.7_vite@2.5.6
unplugin: registry.nlark.com/unplugin/0.2.7_vite@2.5.7
vue: registry.nlark.com/vue/3.2.10
transitivePeerDependencies:
- rollup
- supports-color
- vite
- webpack
dev: true
registry.nlark.com/unplugin/0.2.7_vite@2.5.6:
registry.nlark.com/unplugin/0.2.7_vite@2.5.7:
resolution: {integrity: sha1-QAchRSh5Q6u8VSGF7n3xUlkyEz0=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/unplugin/download/unplugin-0.2.7.tgz}
id: registry.nlark.com/unplugin/0.2.7
name: unplugin
@ -5608,7 +5579,22 @@ packages:
optional: true
dependencies:
upath: 2.0.1
vite: registry.nlark.com/vite/2.5.6
vite: registry.nlark.com/vite/2.5.7
webpack-virtual-modules: registry.nlark.com/webpack-virtual-modules/0.4.3
dev: true
registry.nlark.com/unplugin/0.2.9_vite@2.5.7:
resolution: {integrity: sha1-iEYSEROpDfjqTveLFxzXOeNrAUM=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/unplugin/download/unplugin-0.2.9.tgz}
id: registry.nlark.com/unplugin/0.2.9
name: unplugin
version: 0.2.9
peerDependencies:
rollup: ^2.50.0
vite: ^2.3.0
webpack: 4 || 5
dependencies:
upath: 2.0.1
vite: registry.nlark.com/vite/2.5.7
webpack-virtual-modules: registry.nlark.com/webpack-virtual-modules/0.4.3
dev: true
@ -5637,7 +5623,7 @@ packages:
version: 0.1.0
dev: false
registry.nlark.com/vite-plugin-html/2.1.0_vite@2.5.6:
registry.nlark.com/vite-plugin-html/2.1.0_vite@2.5.7:
resolution: {integrity: sha1-d7buEdnNvfdmtXMf1Ba6zyZ0T84=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/vite-plugin-html/download/vite-plugin-html-2.1.0.tgz}
id: registry.nlark.com/vite-plugin-html/2.1.0
name: vite-plugin-html
@ -5651,10 +5637,10 @@ packages:
ejs: 3.1.6
fs-extra: registry.nlark.com/fs-extra/10.0.0
html-minifier-terser: 5.1.1
vite: registry.nlark.com/vite/2.5.6
vite: registry.nlark.com/vite/2.5.7
dev: true
registry.nlark.com/vite-plugin-windicss/1.4.2_typescript@4.4.3+vite@2.5.6:
registry.nlark.com/vite-plugin-windicss/1.4.2_typescript@4.4.3+vite@2.5.7:
resolution: {integrity: sha1-B1z160lGk9FtQLSr6Yh7YfR8Du8=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/vite-plugin-windicss/download/vite-plugin-windicss-1.4.2.tgz}
id: registry.nlark.com/vite-plugin-windicss/1.4.2
name: vite-plugin-windicss
@ -5665,18 +5651,17 @@ packages:
'@windicss/plugin-utils': registry.nlark.com/@windicss/plugin-utils/1.4.2_typescript@4.4.3
chalk: registry.nlark.com/chalk/4.1.2
debug: registry.nlark.com/debug/4.3.2
vite: registry.nlark.com/vite/2.5.6
vite: registry.nlark.com/vite/2.5.7
windicss: registry.nlark.com/windicss/3.1.7
transitivePeerDependencies:
- supports-color
- ts-node
- typescript
dev: true
registry.nlark.com/vite/2.5.6:
resolution: {integrity: sha1-UUMbtbmbBBKJWVMAuhWUe60Piao=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/vite/download/vite-2.5.6.tgz?cache=0&sync_timestamp=1631117758830&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvite%2Fdownload%2Fvite-2.5.6.tgz}
registry.nlark.com/vite/2.5.7:
resolution: {integrity: sha1-5JW+nYvL+dMMcUHv3MrN50buASU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/vite/download/vite-2.5.7.tgz}
name: vite
version: 2.5.6
version: 2.5.7
engines: {node: '>=12.2.0'}
hasBin: true
dependencies:
@ -5848,7 +5833,7 @@ packages:
dev: true
registry.nlark.com/vue-demi/0.11.4_vue@3.2.10:
resolution: {integrity: sha1-YQGZL+RyTPVjQBihbpU/MFLpTio=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/vue-demi/download/vue-demi-0.11.4.tgz}
resolution: {integrity: sha1-YQGZL+RyTPVjQBihbpU/MFLpTio=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/vue-demi/download/vue-demi-0.11.4.tgz}
id: registry.nlark.com/vue-demi/0.11.4
name: vue-demi
version: 0.11.4
@ -5879,8 +5864,6 @@ packages:
esquery: 1.4.0
lodash: 4.17.21
semver: 6.3.0
transitivePeerDependencies:
- supports-color
dev: true
registry.nlark.com/vue-router/4.0.11_vue@3.2.10:
@ -5938,7 +5921,7 @@ packages:
dev: false
registry.nlark.com/webpack-virtual-modules/0.4.3:
resolution: {integrity: sha1-zVl8bVHVpey0c+6hmDpY+ooX3tk=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/webpack-virtual-modules/download/webpack-virtual-modules-0.4.3.tgz}
resolution: {integrity: sha1-zVl8bVHVpey0c+6hmDpY+ooX3tk=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/webpack-virtual-modules/download/webpack-virtual-modules-0.4.3.tgz?cache=0&sync_timestamp=1620993523325&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fwebpack-virtual-modules%2Fdownload%2Fwebpack-virtual-modules-0.4.3.tgz}
name: webpack-virtual-modules
version: 0.4.3
dev: true

View File

@ -1,4 +1,5 @@
export { ContentType, EnumDataType, EnumLoginModule } from './common';
export { EnumAnimate } from './animate';
export { EnumNavMode, EnumNavTheme } from './theme';
export { EnumRoutePaths } from './route';
export { EnumRoutePath, EnumRouteTitle } from './route';
export { EnumStorageKey } from './storage';

View File

@ -1,12 +1,32 @@
export enum EnumRoutePaths {
export enum EnumRoutePath {
'root' = '/',
'system' = '/system',
'login' = '/login',
'not-found' = '/exception/404',
'no-permission' = '/exception/403',
'service-error' = '/exception/500',
'not-found' = '/404',
'no-permission' = '/403',
'service-error' = '/500',
// 自定义路由
'dashboard' = '/dashboard',
'dashboard-analysis' = '/dashboard/analysis',
'dashboard-workbench' = '/dashboard/workbench',
'exception-403' = '/exception/e403',
'exception-404' = '/exception/e404',
'exception-500' = '/exception/e500'
'exception' = '/exception',
'exception-403' = '/exception/403',
'exception-404' = '/exception/404',
'exception-500' = '/exception/500'
}
export enum EnumRouteTitle {
'root' = 'root',
'system' = '系统',
'login' = '登录',
'not-found' = '未找到',
'no-permission' = '无权限',
'service-error' = '服务器错误',
'dashboard' = '仪表盘',
'dashboard-analysis' = '分析页',
'dashboard-workbench' = '工作台',
'exception' = '异常页',
'exception-403' = '异常页-403',
'exception-404' = '异常页-404',
'exception-500' = '异常页-500'
}

6
src/enum/storage.ts Normal file
View File

@ -0,0 +1,6 @@
export enum EnumStorageKey {
/** 用户token */
'token' = '__TOKEN__',
/** 用户信息 */
'user-info' = '__USER_INFO__'
}

View File

@ -1,5 +1,6 @@
import useAppTitle from './useAppTitle';
import useCreateContext from './useCreateContext';
import useRouterChange from './useRouterChange';
import useRouteParam from './useRouteParam';
export { useAppTitle, useCreateContext, useRouterChange };
export { useAppTitle, useCreateContext, useRouterChange, useRouteParam };

View File

@ -0,0 +1,20 @@
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { RouteNameMap } from '@/router';
export default function useRouteParam() {
const route = useRoute();
/** 登录跳转链接 */
const loginRedirectUrl = computed(() => {
let url = '';
if (route.name === RouteNameMap.get('login')) {
url = (route.params?.redirectUrl as string) ?? '';
}
return url;
});
return {
loginRedirectUrl
};
}

View File

@ -1,11 +1,16 @@
import { useRouter } from 'vue-router';
import { EnumRoutePaths } from '@/enum';
import { EnumRoutePath } from '@/enum';
import { RouteNameMap } from '@/router';
import type { LoginModuleType } from '@/interface';
export default function useRouterChange() {
const router = useRouter();
/** 跳转首页 */
function toHome() {
router.push('/');
}
/**
* (vue路由)
* @param module -
@ -28,7 +33,7 @@ export default function useRouterChange() {
* @param redirectUrl -
*/
function toLoginByLocation(module: LoginModuleType = 'pwd-login', redirectUrl?: string) {
let href = `${window.location.origin + EnumRoutePaths.login}/${module}`;
let href = `${window.location.origin + EnumRoutePath.login}/${module}`;
if (redirectUrl) {
href += redirectUrl;
}
@ -36,6 +41,7 @@ export default function useRouterChange() {
}
return {
toHome,
toLogin,
toLoginByLocation
};

View File

@ -1,2 +1,2 @@
export { useAppTitle, useCreateContext, useRouterChange } from './common';
export { useAppTitle, useCreateContext, useRouterChange, useRouteParam } from './common';
export { useCountDown, useSmsCode } from './business';

View File

@ -1,10 +1,16 @@
import { EnumRoutePaths, EnumLoginModule } from '@/enum';
import { EnumRoutePath, EnumLoginModule } from '@/enum';
/** 路由描述 */
export interface RouteMeta {
/** 路由名称 */
title?: string;
/** 页面100%视高 */
fullPage?: boolean;
/** 作为菜单 */
asMenu?: boolean;
/** 菜单和面包屑对应的图标 */
icon?: string;
}
export type RoutePathKey = keyof typeof EnumRoutePaths;
export type RoutePathKey = keyof typeof EnumRoutePath;
export type LoginModuleType = keyof typeof EnumLoginModule;

View File

@ -1,4 +1,7 @@
import type { Router } from 'vue-router';
import { useTitle } from '@vueuse/core';
import { getToken, getLoginRedirectUrl } from '@/utils';
import { RouteNameMap, whitelistRoutes } from './routes';
/**
*
@ -7,9 +10,26 @@ import type { Router } from 'vue-router';
export default function createRouterGuide(router: Router) {
router.beforeEach((to, from, next) => {
window.$loadingBar?.start();
next();
const token = getToken();
if (whitelistRoutes.includes(to.name as string)) {
if (to.name === RouteNameMap.get('login') && token) {
next('/');
return;
}
next();
return;
}
if (token) {
next();
} else {
const redirectUrl = getLoginRedirectUrl();
next({ name: RouteNameMap.get('login'), query: { redirectUrl } });
}
});
router.afterEach(() => {
router.afterEach(to => {
// 设置document title
useTitle(to.meta.title as string);
// 结束 loadingBar
window.$loadingBar?.finish();
});
}

View File

@ -1,12 +1,12 @@
import type { RouteRecordRaw } from 'vue-router';
import { BasicLayout, BlankLayout } from '@/layouts';
import { EnumRoutePaths } from '@/enum';
import { EnumRoutePath, EnumRouteTitle } from '@/enum';
import type { RoutePathKey, LoginModuleType } from '@/interface';
import { getLoginModuleRegExp } from '@/utils';
/** 路由名称 */
export const RouteNameMap = new Map<RoutePathKey, RoutePathKey>(
(Object.keys(EnumRoutePaths) as RoutePathKey[]).map(v => [v, v])
(Object.keys(EnumRoutePath) as RoutePathKey[]).map(v => [v, v])
);
const loginModuleRegExp = getLoginModuleRegExp();
@ -15,17 +15,20 @@ const loginModuleRegExp = getLoginModuleRegExp();
*
* @description !
*/
export const constantRoutes: Array<RouteRecordRaw> = [
export const constantRoutes: RouteRecordRaw[] = [
{
name: 'system',
path: '/system',
name: RouteNameMap.get('system'),
path: EnumRoutePath.system,
component: BlankLayout,
redirect: { name: 'not-found' },
redirect: { name: RouteNameMap.get('not-found') },
meta: {
title: EnumRouteTitle.system
},
children: [
// 登录
{
name: RouteNameMap.get('login'),
path: `${EnumRoutePaths.login}/:module(/${loginModuleRegExp}/)?`,
path: `${EnumRoutePath.login}/:module(/${loginModuleRegExp}/)?`,
component: () => import('@/views/system/login/index.vue'),
props: route => {
const moduleType: LoginModuleType = (route.params.module as LoginModuleType) || 'pwd-login';
@ -34,33 +37,37 @@ export const constantRoutes: Array<RouteRecordRaw> = [
};
},
meta: {
title: EnumRouteTitle.login,
fullPage: true
}
},
// 404
{
name: RouteNameMap.get('not-found'),
path: EnumRoutePaths['not-found'],
path: EnumRoutePath['not-found'],
component: () => import('@/views/system/exception/404.vue'),
meta: {
title: EnumRouteTitle['not-found'],
fullPage: true
}
},
// 403
{
name: RouteNameMap.get('no-permission'),
path: EnumRoutePaths['no-permission'],
path: EnumRoutePath['no-permission'],
component: () => import('@/views/system/exception/403.vue'),
meta: {
title: EnumRouteTitle['no-permission'],
fullPage: true
}
},
// 500
{
name: RouteNameMap.get('service-error'),
path: EnumRoutePaths['service-error'],
path: EnumRoutePath['service-error'],
component: () => import('@/views/system/exception/500.vue'),
meta: {
title: EnumRouteTitle['service-error'],
fullPage: true
}
}
@ -78,48 +85,89 @@ export const constantRoutes: Array<RouteRecordRaw> = [
*/
export const customRoutes: Array<RouteRecordRaw> = [
{
name: 'root',
path: '/',
redirect: { name: RouteNameMap.get('dashboard-analysis') }
name: RouteNameMap.get('root'),
path: EnumRoutePath.root,
redirect: { name: RouteNameMap.get('dashboard-analysis') },
meta: {
asMenu: false
}
},
{
name: 'dashboard',
path: '/dashboard',
name: RouteNameMap.get('dashboard'),
path: EnumRoutePath.dashboard,
component: BasicLayout,
redirect: { name: RouteNameMap.get('dashboard-analysis') },
meta: {
title: EnumRouteTitle.dashboard,
asMenu: true,
icon: 'mdi:view-dashboard'
},
children: [
{
name: RouteNameMap.get('dashboard-analysis'),
path: EnumRoutePaths['dashboard-analysis'],
component: () => import('@/views/dashboard/analysis/index.vue')
path: EnumRoutePath['dashboard-analysis'],
component: () => import('@/views/dashboard/analysis/index.vue'),
meta: {
title: EnumRouteTitle['dashboard-analysis'],
asMenu: true
}
},
{
name: RouteNameMap.get('dashboard-workbench'),
path: EnumRoutePaths['dashboard-workbench'],
component: () => import('@/views/dashboard/workbench/index.vue')
path: EnumRoutePath['dashboard-workbench'],
component: () => import('@/views/dashboard/workbench/index.vue'),
meta: {
title: EnumRouteTitle['dashboard-workbench'],
asMenu: true
}
}
]
},
{
name: 'exception',
path: '/exception',
name: RouteNameMap.get('exception'),
path: EnumRoutePath.exception,
component: BasicLayout,
meta: {
title: EnumRouteTitle.exception,
asMenu: true,
icon: 'ant-design:exception-outlined'
},
children: [
{
name: RouteNameMap.get('exception-403'),
path: EnumRoutePaths['exception-403'],
component: () => import('@/views/system/exception/403.vue')
path: EnumRoutePath['exception-403'],
component: () => import('@/views/system/exception/403.vue'),
meta: {
title: EnumRouteTitle['exception-403'],
asMenu: true
}
},
{
name: RouteNameMap.get('exception-404'),
path: EnumRoutePaths['exception-404'],
component: () => import('@/views/system/exception/404.vue')
path: EnumRoutePath['exception-404'],
component: () => import('@/views/system/exception/404.vue'),
meta: {
title: EnumRouteTitle['exception-404'],
asMenu: true
}
},
{
name: RouteNameMap.get('exception-500'),
path: EnumRoutePaths['exception-500'],
component: () => import('@/views/system/exception/500.vue')
path: EnumRoutePath['exception-500'],
component: () => import('@/views/system/exception/500.vue'),
meta: {
title: EnumRouteTitle['exception-500'],
asMenu: true
}
}
]
}
];
/** 路由白名单(不需要登录) */
export const whitelistRoutes: string[] = [
RouteNameMap.get('login')!,
RouteNameMap.get('exception-403')!,
RouteNameMap.get('exception-404')!,
RouteNameMap.get('exception-500')!
];

View File

@ -1,13 +1,2 @@
import type { LoginModuleType } from '@/interface';
export function getToken() {
return '';
}
export function getUserInfo() {}
/** 获取登录模块的正则字符串 */
export function getLoginModuleRegExp() {
const arr: LoginModuleType[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
return arr.join('|');
}
export { getToken, setToken, getUserInfo, getLoginModuleRegExp } from './user';
export { getLoginRedirectUrl, toLoginRedirectUrl, toHomeByLocation } from './location';

View File

@ -0,0 +1,14 @@
/** 获取登录重定向的地址 */
export function getLoginRedirectUrl() {
return window.location.href;
}
/** 登录后跳转重定向的地址 */
export function toLoginRedirectUrl(redirectUrl: string) {
window.location.href = redirectUrl;
}
/** 回到首页 */
export function toHomeByLocation() {
window.location.href = '/';
}

21
src/utils/auth/user.ts Normal file
View File

@ -0,0 +1,21 @@
import { EnumStorageKey } from '@/enum';
import type { LoginModuleType } from '@/interface';
import { setLocal, getLocal } from '../storage';
/** 设置token */
export function getToken() {
return getLocal<string>(EnumStorageKey.token) || '';
}
/** 获取token */
export function setToken(token: string) {
setLocal(EnumStorageKey.token, token);
}
export function getUserInfo() {}
/** 获取登录模块的正则字符串 */
export function getLoginModuleRegExp() {
const arr: LoginModuleType[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
return arr.join('|');
}

View File

@ -1,4 +1,13 @@
export { getToken, getUserInfo, getLoginModuleRegExp } from './auth';
export {
setToken,
getToken,
getUserInfo,
getLoginModuleRegExp,
getLoginRedirectUrl,
toLoginRedirectUrl,
toHomeByLocation
} from './auth';
export {
isNumber,
isString,
@ -14,3 +23,5 @@ export {
brightenColor,
darkenColor
} from './common';
export { setLocal, getLocal, setSession, getSession } from './storage';

View File

@ -0,0 +1,2 @@
export { setLocal, getLocal } from './local';
export { setSession, getSession } from './session';

View File

@ -0,0 +1,12 @@
export function setLocal(key: string, value: unknown) {
const json = JSON.stringify(value);
localStorage.setItem(key, json);
}
export function getLocal<T>(key: string) {
const json = localStorage.getItem(key);
if (json) {
return JSON.parse(json) as T;
}
return json;
}

View File

@ -0,0 +1,12 @@
export function setSession(key: string, value: unknown) {
const json = JSON.stringify(value);
sessionStorage.setItem(key, json);
}
export function getSession<T>(key: string) {
const json = sessionStorage.getItem(key);
if (json) {
return JSON.parse(json) as T;
}
return json;
}

View File

@ -2,14 +2,14 @@
<div class="p-10px">
<data-card :loading="loading" />
<nav-card :loading="loading" />
<router-link :to="EnumRoutePaths['dashboard-workbench']">workbench</router-link>
<router-link :to="EnumRoutePath['dashboard-workbench']">workbench</router-link>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { DataCard, NavCard } from './components';
import { EnumRoutePaths } from '@/enum';
import { EnumRoutePath } from '@/enum';
const loading = ref(true);

View File

@ -1,7 +1,7 @@
<template>
<div>
<h2>工作台</h2>
<router-link :to="EnumRoutePaths['dashboard-analysis']">analysis</router-link>
<router-link :to="EnumRoutePath['dashboard-analysis']">analysis</router-link>
<n-button @click="removeCurrent">去除</n-button>
</div>
</template>
@ -9,7 +9,7 @@
<script lang="ts" setup>
import { NButton } from 'naive-ui';
import { useRouter } from 'vue-router';
import { EnumRoutePaths } from '@/enum';
import { EnumRoutePath } from '@/enum';
import { RouteNameMap } from '@/router';
const router = useRouter();

View File

@ -1,25 +0,0 @@
<template>
<div>
<h3>System</h3>
<n-button>
<router-link to="/home">home</router-link>
</n-button>
<n-switch :value="true" />
<n-button @click="showModal = true">来吧</n-button>
<n-modal v-model:show="showModal">
<n-card style="width: 600px" title="模态框" :bordered="false" size="huge">
<template #header-extra></template>
内容
<template #footer>尾部</template>
</n-card>
</n-modal>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { NButton, NSwitch, NModal, NCard } from 'naive-ui';
const showModal = ref(false);
</script>
<style scoped></style>

View File

@ -28,19 +28,21 @@
<script lang="ts" setup>
import { reactive, ref } from 'vue';
import { NForm, NFormItem, NInput, NSpace, NCheckbox, NButton, useMessage } from 'naive-ui';
import { NForm, NFormItem, NInput, NSpace, NCheckbox, NButton, useNotification } from 'naive-ui';
import type { FormInst } from 'naive-ui';
import { EnumLoginModule } from '@/enum';
import { useRouterChange } from '@/hooks';
import { useRouterChange, useRouteParam } from '@/hooks';
import { setToken, toLoginRedirectUrl } from '@/utils';
import { OtherLogin } from '../common';
const { toLogin } = useRouterChange();
const message = useMessage();
const { toLogin, toHome } = useRouterChange();
const { loginRedirectUrl } = useRouteParam();
const notification = useNotification();
const formRef = ref<(HTMLElement & FormInst) | null>(null);
const model = reactive({
phone: '',
pwd: ''
phone: '15170283876',
pwd: '123456'
});
const rules = {
phone: {
@ -62,9 +64,17 @@ function handleSubmit(e: MouseEvent) {
formRef.value.validate(errors => {
if (!errors) {
message.success('验证成功');
} else {
message.error('验证失败');
setToken('temp-token');
if (loginRedirectUrl.value) {
toLoginRedirectUrl(loginRedirectUrl.value);
} else {
toHome();
}
notification.success({
title: '登录成功!',
content: '欢迎回来Soybean!'
});
}
});
}

View File

@ -1,17 +0,0 @@
import type { Ref } from 'vue';
import { useCreateContext } from '@/hooks';
import { LoginModuleType } from '@/interface';
interface ShareState {
activeModule: Ref<LoginModuleType>;
handleLoginModule(module: LoginModuleType): void;
}
const { useContext, useProvider } = useCreateContext<ShareState>();
export function useLoginContext() {
return {
useContext,
useProvider
};
}