feat: optimize parameter

This commit is contained in:
jsong93 2023-02-26 11:30:59 +08:00
parent 8284d106e2
commit 957dfc95dd
4 changed files with 134 additions and 51 deletions

View File

@ -90,7 +90,8 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
},
"editor.defaultFormatter": "Vue.volar"
},
"i18n-ally.localesPaths": ["src/locales/lang"],
"i18n-ally.keystyle": "nested",

View File

@ -57,6 +57,7 @@
"nprogress": "^0.2.0",
"path-to-regexp": "^6.2.0",
"pinia": "2.0.12",
"pnpm": "^7.27.1",
"print-js": "^1.6.0",
"qrcode": "^1.5.0",
"qs": "^6.10.3",
@ -70,11 +71,11 @@
"vue-json-pretty": "^2.0.6",
"vue-router": "^4.0.14",
"vue-types": "^4.1.1",
"vuedraggable": "^4.1.0",
"vxe-table": "^4.3.9",
"vxe-table-plugin-export-xlsx": "^3.0.4",
"xe-utils": "^3.5.7",
"xlsx": "^0.18.5",
"vuedraggable": "^4.1.0"
"xlsx": "^0.18.5"
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",

138
pnpm-lock.yaml generated
View File

@ -1,4 +1,4 @@
lockfileVersion: 5.3
lockfileVersion: 5.4
overrides:
bin-wrapper: npm:bin-wrapper-china
@ -72,6 +72,7 @@ specifiers:
path-to-regexp: ^6.2.0
picocolors: ^1.0.0
pinia: 2.0.12
pnpm: ^7.27.1
postcss: ^8.4.12
postcss-html: ^1.4.1
postcss-less: ^6.0.0
@ -146,7 +147,8 @@ dependencies:
mockjs: 1.1.0
nprogress: 0.2.0
path-to-regexp: 6.2.1
pinia: 2.0.12_typescript@4.9.5+vue@3.2.47
pinia: 2.0.12_hmuptsblhheur2tugfgucj7gc4
pnpm: 7.27.1
print-js: 1.6.0
qrcode: 1.5.1
qs: 6.11.0
@ -184,8 +186,8 @@ devDependencies:
'@types/qs': 6.9.7
'@types/showdown': 1.9.4
'@types/sortablejs': 1.15.0
'@typescript-eslint/eslint-plugin': 5.51.0_0fb7d53160f0e41e16372a0eab719cf9
'@typescript-eslint/parser': 5.51.0_eslint@8.33.0+typescript@4.9.5
'@typescript-eslint/eslint-plugin': 5.51.0_b635kmla6dsb4frxfihkw4m47e
'@typescript-eslint/parser': 5.51.0_4vsywjlpuriuw3tl5oq6zy5a64
'@vitejs/plugin-legacy': 1.8.2_vite@2.9.15
'@vitejs/plugin-vue': 2.3.4_vite@2.9.15+vue@3.2.47
'@vitejs/plugin-vue-jsx': 1.3.10
@ -199,7 +201,7 @@ devDependencies:
dotenv: 16.0.3
eslint: 8.33.0
eslint-config-prettier: 8.6.0_eslint@8.33.0
eslint-plugin-prettier: 4.2.1_80353385657558523d8688bf9d3ac177
eslint-plugin-prettier: 4.2.1_qa2thblfovmfepmgrc7z2owbo4
eslint-plugin-vue: 8.7.1_eslint@8.33.0
esno: 0.14.1
fs-extra: 10.1.0
@ -220,17 +222,17 @@ devDependencies:
stylelint: 14.16.1
stylelint-config-prettier: 9.0.4_stylelint@14.16.1
stylelint-config-recommended: 7.0.0_stylelint@14.16.1
stylelint-config-recommended-vue: 1.4.0_5066edc4db6a582cccfa8c6462b57280
stylelint-config-recommended-vue: 1.4.0_kbto3rg3njmczth2rrsgfnlsqa
stylelint-config-standard: 25.0.0_stylelint@14.16.1
stylelint-order: 5.0.0_stylelint@14.16.1
ts-node: 10.9.1_121bb9107e71cb273c2c9f9d1b903c77
ts-node: 10.9.1_cin3sed6ohfsopbmt6orxeb4o4
typescript: 4.9.5
vite: 2.9.15_less@4.1.3+sass@1.58.0
vite-plugin-compression: 0.5.1_vite@2.9.15
vite-plugin-html: 3.2.0_vite@2.9.15
vite-plugin-imagemin: 0.6.1_vite@2.9.15
vite-plugin-mkcert: 1.13.0_vite@2.9.15
vite-plugin-mock: 2.9.6_5ff0b938b7352aba80836520b1cf4235
vite-plugin-mock: 2.9.6_l7ylsofxguvlvaedmuqldt2cgu
vite-plugin-purge-icons: 0.8.2_vite@2.9.15
vite-plugin-pwa: 0.11.13_vite@2.9.15
vite-plugin-style-import: 2.0.0_vite@2.9.15
@ -528,12 +530,10 @@ packages:
/@babel/helper-string-parser/7.19.4:
resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==}
engines: {node: '>=6.9.0'}
dev: true
/@babel/helper-validator-identifier/7.19.1:
resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==}
engines: {node: '>=6.9.0'}
dev: true
/@babel/helper-validator-option/7.18.6:
resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==}
@ -576,6 +576,8 @@ packages:
resolution: {integrity: sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==}
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
'@babel/types': 7.20.7
/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/7.18.6_@babel+core@7.20.12:
resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==}
@ -1474,7 +1476,6 @@ packages:
'@babel/helper-string-parser': 7.19.4
'@babel/helper-validator-identifier': 7.19.1
to-fast-properties: 2.0.0
dev: true
/@commitlint/cli/16.3.0:
resolution: {integrity: sha512-P+kvONlfsuTMnxSwWE1H+ZcPMY3STFaHb2kAacsqoIkNx66O0T7sTpBxpxkMrFPyhkJiLJnJWMhk4bbvYD3BMA==}
@ -1560,7 +1561,7 @@ packages:
'@types/node': 17.0.45
chalk: 4.1.2
cosmiconfig: 7.1.0
cosmiconfig-typescript-loader: 2.0.2_121bb9107e71cb273c2c9f9d1b903c77
cosmiconfig-typescript-loader: 2.0.2_cin3sed6ohfsopbmt6orxeb4o4
lodash: 4.17.21
resolve-from: 5.0.0
typescript: 4.9.5
@ -1642,7 +1643,7 @@ packages:
'@jridgewell/trace-mapping': 0.3.9
dev: true
/@csstools/selector-specificity/2.1.1_b0132eb4833290a175e2a58939fd6432:
/@csstools/selector-specificity/2.1.1_wajs5nedgkikc5pcuwett7legi:
resolution: {integrity: sha512-jwx+WCqszn53YHOfvFMJJRd/B2GqkCBt+1MJSG6o5/s8+ytHMvDZXsJgUEWLk12UnLd7HYKac4BYU5i/Ron1Cw==}
engines: {node: ^14 || ^16 || >=18}
peerDependencies:
@ -2214,7 +2215,7 @@ packages:
'@iconify/iconify': 2.2.1
dev: true
/@rollup/plugin-babel/5.3.1_d8e457a9eec5694be0a6185ede2794cb:
/@rollup/plugin-babel/5.3.1_3dsfpkpoyvuuxyfgdbpn4j4uzm:
resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==}
engines: {node: '>= 10.0.0'}
peerDependencies:
@ -2421,6 +2422,12 @@ packages:
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
dev: true
/@types/keyv/3.1.4:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies:
'@types/node': 17.0.45
dev: true
/@types/lodash-es/4.17.6:
resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==}
dependencies:
@ -2482,6 +2489,12 @@ packages:
'@types/node': 17.0.45
dev: true
/@types/responselike/1.0.0:
resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}
dependencies:
'@types/node': 17.0.45
dev: true
/@types/semver/7.3.13:
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
dev: true
@ -2524,7 +2537,7 @@ packages:
resolution: {integrity: sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A==}
dev: false
/@typescript-eslint/eslint-plugin/5.51.0_0fb7d53160f0e41e16372a0eab719cf9:
/@typescript-eslint/eslint-plugin/5.51.0_b635kmla6dsb4frxfihkw4m47e:
resolution: {integrity: sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -2535,10 +2548,10 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.51.0_eslint@8.33.0+typescript@4.9.5
'@typescript-eslint/parser': 5.51.0_4vsywjlpuriuw3tl5oq6zy5a64
'@typescript-eslint/scope-manager': 5.51.0
'@typescript-eslint/type-utils': 5.51.0_eslint@8.33.0+typescript@4.9.5
'@typescript-eslint/utils': 5.51.0_eslint@8.33.0+typescript@4.9.5
'@typescript-eslint/type-utils': 5.51.0_4vsywjlpuriuw3tl5oq6zy5a64
'@typescript-eslint/utils': 5.51.0_4vsywjlpuriuw3tl5oq6zy5a64
debug: 4.3.4
eslint: 8.33.0
grapheme-splitter: 1.0.4
@ -2552,7 +2565,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.51.0_eslint@8.33.0+typescript@4.9.5:
/@typescript-eslint/parser/5.51.0_4vsywjlpuriuw3tl5oq6zy5a64:
resolution: {integrity: sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -2580,7 +2593,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.51.0
dev: true
/@typescript-eslint/type-utils/5.51.0_eslint@8.33.0+typescript@4.9.5:
/@typescript-eslint/type-utils/5.51.0_4vsywjlpuriuw3tl5oq6zy5a64:
resolution: {integrity: sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -2591,7 +2604,7 @@ packages:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.51.0_typescript@4.9.5
'@typescript-eslint/utils': 5.51.0_eslint@8.33.0+typescript@4.9.5
'@typescript-eslint/utils': 5.51.0_4vsywjlpuriuw3tl5oq6zy5a64
debug: 4.3.4
eslint: 8.33.0
tsutils: 3.21.0_typescript@4.9.5
@ -2626,7 +2639,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/utils/5.51.0_eslint@8.33.0+typescript@4.9.5:
/@typescript-eslint/utils/5.51.0_4vsywjlpuriuw3tl5oq6zy5a64:
resolution: {integrity: sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -2810,7 +2823,6 @@ packages:
dependencies:
'@vue/reactivity': 3.2.47
'@vue/shared': 3.2.47
dev: false
/@vue/runtime-dom/3.2.47:
resolution: {integrity: sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==}
@ -2818,7 +2830,6 @@ packages:
'@vue/runtime-core': 3.2.47
'@vue/shared': 3.2.47
csstype: 2.6.21
dev: false
/@vue/server-renderer/3.2.47_vue@3.2.47:
resolution: {integrity: sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==}
@ -2828,7 +2839,6 @@ packages:
'@vue/compiler-ssr': 3.2.47
'@vue/shared': 3.2.47
vue: 3.2.47
dev: false
/@vue/shared/3.2.47:
resolution: {integrity: sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==}
@ -3414,6 +3424,8 @@ packages:
snapdragon-node: 2.1.1
split-string: 3.1.0
to-regex: 3.0.2
transitivePeerDependencies:
- supports-color
dev: true
/braces/3.0.2:
@ -3740,7 +3752,7 @@ packages:
dev: true
/clone-response/1.0.2:
resolution: {integrity: sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=}
resolution: {integrity: sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==}
dependencies:
mimic-response: 1.0.1
dev: true
@ -3809,7 +3821,6 @@ packages:
/commander/10.0.0:
resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==}
engines: {node: '>=14'}
dev: false
/commander/2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
@ -3883,6 +3894,8 @@ packages:
finalhandler: 1.1.2
parseurl: 1.3.3
utils-merge: 1.0.1
transitivePeerDependencies:
- supports-color
dev: true
/consola/2.15.3:
@ -4062,8 +4075,8 @@ packages:
engines: {node: '>=10'}
hasBin: true
dependencies:
is-text-path: 1.0.1
JSONStream: 1.3.5
is-text-path: 1.0.1
lodash: 4.17.21
meow: 8.1.2
split2: 3.2.2
@ -4106,7 +4119,7 @@ packages:
vary: 1.1.2
dev: true
/cosmiconfig-typescript-loader/2.0.2_121bb9107e71cb273c2c9f9d1b903c77:
/cosmiconfig-typescript-loader/2.0.2_cin3sed6ohfsopbmt6orxeb4o4:
resolution: {integrity: sha512-KmE+bMjWMXJbkWCeY4FJX/npHuZPNr9XF9q9CIQ/bpFwi1qHfCmSiKarrCcRa0LO4fWjk93pVoeRtJAkTGcYNw==}
engines: {node: '>=12', npm: '>=6'}
peerDependencies:
@ -4115,7 +4128,7 @@ packages:
dependencies:
'@types/node': 17.0.45
cosmiconfig: 7.1.0
ts-node: 10.9.1_121bb9107e71cb273c2c9f9d1b903c77
ts-node: 10.9.1_cin3sed6ohfsopbmt6orxeb4o4
typescript: 4.9.5
transitivePeerDependencies:
- '@swc/core'
@ -4251,7 +4264,6 @@ packages:
/csstype/2.6.21:
resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==}
dev: false
/currently-unhandled/0.4.1:
resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==}
@ -4298,12 +4310,22 @@ packages:
/debug/2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: 2.0.0
dev: true
/debug/3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: 2.1.3
dev: true
@ -5100,7 +5122,7 @@ packages:
eslint: 8.33.0
dev: true
/eslint-plugin-prettier/4.2.1_80353385657558523d8688bf9d3ac177:
/eslint-plugin-prettier/4.2.1_qa2thblfovmfepmgrc7z2owbo4:
resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==}
engines: {node: '>=12.0.0'}
peerDependencies:
@ -5381,6 +5403,8 @@ packages:
regex-not: 1.0.2
snapdragon: 0.8.2
to-regex: 3.0.2
transitivePeerDependencies:
- supports-color
dev: true
/ext-list/2.2.2:
@ -5434,6 +5458,8 @@ packages:
regex-not: 1.0.2
snapdragon: 0.8.2
to-regex: 3.0.2
transitivePeerDependencies:
- supports-color
dev: true
/fast-csv/4.3.6:
@ -5599,6 +5625,8 @@ packages:
parseurl: 1.3.3
statuses: 1.5.0
unpipe: 1.0.0
transitivePeerDependencies:
- supports-color
dev: true
/find-up/1.1.2:
@ -6026,6 +6054,8 @@ packages:
resolution: {integrity: sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==}
engines: {node: '>=4'}
dependencies:
'@types/keyv': 3.1.4
'@types/responselike': 1.0.0
decompress-response: 3.3.0
duplexer3: 0.1.5
get-stream: 3.0.0
@ -6047,6 +6077,8 @@ packages:
engines: {node: '>=4'}
dependencies:
'@sindresorhus/is': 0.7.0
'@types/keyv': 3.1.4
'@types/responselike': 1.0.0
cacheable-request: 2.1.4
decompress-response: 3.3.0
duplexer3: 0.1.5
@ -6958,7 +6990,7 @@ packages:
dev: true
/json-buffer/3.0.0:
resolution: {integrity: sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=}
resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==}
dev: true
/json-parse-better-errors/1.0.2:
@ -7095,6 +7127,8 @@ packages:
mime: 1.6.0
needle: 3.2.0
source-map: 0.6.1
transitivePeerDependencies:
- supports-color
dev: true
/leven/3.1.0:
@ -7560,6 +7594,8 @@ packages:
regex-not: 1.0.2
snapdragon: 0.8.2
to-regex: 3.0.2
transitivePeerDependencies:
- supports-color
dev: true
/micromatch/4.0.5:
@ -7648,7 +7684,6 @@ packages:
hasBin: true
dependencies:
commander: 10.0.0
dev: false
/modify-values/1.0.1:
resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==}
@ -7710,6 +7745,8 @@ packages:
regex-not: 1.0.2
snapdragon: 0.8.2
to-regex: 3.0.2
transitivePeerDependencies:
- supports-color
dev: true
/nanopop/2.2.0:
@ -7733,6 +7770,8 @@ packages:
debug: 3.2.7
iconv-lite: 0.6.3
sax: 1.2.4
transitivePeerDependencies:
- supports-color
dev: true
optional: true
@ -8307,7 +8346,7 @@ packages:
engines: {node: '>=6'}
dev: true
/pinia/2.0.12_typescript@4.9.5+vue@3.2.47:
/pinia/2.0.12_hmuptsblhheur2tugfgucj7gc4:
resolution: {integrity: sha512-tUeuYGFrLU5irmGyRAIxp35q1OTcZ8sKpGT4XkPeVcG35W4R6cfXDbCGexzmVqH5lTQJJTXXbNGutIu9yS5yew==}
peerDependencies:
'@vue/composition-api': ^1.4.0
@ -8353,6 +8392,12 @@ packages:
execa: 4.1.0
dev: true
/pnpm/7.27.1:
resolution: {integrity: sha512-IpBeZ+71slENbuOXwbV4U6yxOMfEWEvlVuT6+ChZ1D80oF0eHyN4h/hc13UrzVXpXI3bf7sPfRWGb8TYkrvJUA==}
engines: {node: '>=14.6'}
hasBin: true
dev: false
/posix-character-classes/0.1.1:
resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==}
engines: {node: '>=0.10.0'}
@ -8841,7 +8886,7 @@ packages:
dev: true
/responselike/1.0.2:
resolution: {integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=}
resolution: {integrity: sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==}
dependencies:
lowercase-keys: 1.0.1
dev: true
@ -9195,6 +9240,8 @@ packages:
source-map: 0.5.7
source-map-resolve: 0.5.3
use: 3.1.1
transitivePeerDependencies:
- supports-color
dev: true
/sort-keys-length/1.0.1:
@ -9525,7 +9572,7 @@ packages:
resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==}
dev: true
/stylelint-config-html/1.1.0_5066edc4db6a582cccfa8c6462b57280:
/stylelint-config-html/1.1.0_kbto3rg3njmczth2rrsgfnlsqa:
resolution: {integrity: sha512-IZv4IVESjKLumUGi+HWeb7skgO6/g4VMuAYrJdlqQFndgbj6WJAXPhaysvBiXefX79upBdQVumgYcdd17gCpjQ==}
engines: {node: ^12 || >=14}
peerDependencies:
@ -9546,7 +9593,7 @@ packages:
stylelint: 14.16.1
dev: true
/stylelint-config-recommended-vue/1.4.0_5066edc4db6a582cccfa8c6462b57280:
/stylelint-config-recommended-vue/1.4.0_kbto3rg3njmczth2rrsgfnlsqa:
resolution: {integrity: sha512-DVJqyX2KvMCn9U0+keL12r7xlsH26K4Vg8NrIZuq5MoF7g82DpMp326Om4E0Q+Il1o+bTHuUyejf2XAI0iD04Q==}
engines: {node: ^12 || >=14}
peerDependencies:
@ -9556,7 +9603,7 @@ packages:
postcss-html: 1.5.0
semver: 7.3.8
stylelint: 14.16.1
stylelint-config-html: 1.1.0_5066edc4db6a582cccfa8c6462b57280
stylelint-config-html: 1.1.0_kbto3rg3njmczth2rrsgfnlsqa
stylelint-config-recommended: 7.0.0_stylelint@14.16.1
dev: true
@ -9592,7 +9639,7 @@ packages:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
hasBin: true
dependencies:
'@csstools/selector-specificity': 2.1.1_b0132eb4833290a175e2a58939fd6432
'@csstools/selector-specificity': 2.1.1_wajs5nedgkikc5pcuwett7legi
balanced-match: 2.0.0
colord: 2.9.3
cosmiconfig: 7.1.0
@ -9694,6 +9741,8 @@ packages:
posthtml-svg-mode: 1.0.3
query-string: 4.3.4
traverse: 0.6.7
transitivePeerDependencies:
- supports-color
dev: true
/svg-tags/1.0.0:
@ -9860,7 +9909,6 @@ packages:
/to-fast-properties/2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'}
dev: true
/to-object-path/0.3.0:
resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==}
@ -9929,7 +9977,7 @@ packages:
escape-string-regexp: 1.0.5
dev: true
/ts-node/10.9.1_121bb9107e71cb273c2c9f9d1b903c77:
/ts-node/10.9.1_cin3sed6ohfsopbmt6orxeb4o4:
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
peerDependencies:
@ -10042,7 +10090,6 @@ packages:
resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/uglify-js/3.17.4:
resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==}
@ -10335,7 +10382,7 @@ packages:
- supports-color
dev: true
/vite-plugin-mock/2.9.6_5ff0b938b7352aba80836520b1cf4235:
/vite-plugin-mock/2.9.6_l7ylsofxguvlvaedmuqldt2cgu:
resolution: {integrity: sha512-/Rm59oPppe/ncbkSrUuAxIQihlI2YcBmnbR4ST1RA2VzM1C0tEQc1KlbQvnUGhXECAGTaQN2JyasiwXP6EtKgg==}
engines: {node: '>=12.0.0'}
peerDependencies:
@ -10601,7 +10648,6 @@ packages:
'@vue/runtime-dom': 3.2.47
'@vue/server-renderer': 3.2.47_vue@3.2.47
'@vue/shared': 3.2.47
dev: false
/vuedraggable/4.1.0_vue@3.2.47:
resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
@ -10752,7 +10798,7 @@ packages:
'@babel/core': 7.20.12
'@babel/preset-env': 7.20.2_@babel+core@7.20.12
'@babel/runtime': 7.20.13
'@rollup/plugin-babel': 5.3.1_d8e457a9eec5694be0a6185ede2794cb
'@rollup/plugin-babel': 5.3.1_3dsfpkpoyvuuxyfgdbpn4j4uzm
'@rollup/plugin-node-resolve': 11.2.1_rollup@2.79.1
'@rollup/plugin-replace': 2.4.2_rollup@2.79.1
'@surma/rollup-plugin-off-main-thread': 2.2.3

View File

@ -42,6 +42,40 @@
const inputRef = ref<HTMLInputElement | null>(null);
const loadingRef = ref<Boolean>(false);
function shapeWorkSheel(sheet: XLSX.WorkSheet, range: XLSX.Range) {
let str = ' ',
char = 65,
customWorkSheet = {
t: 's',
v: str,
r: '<t> </t><phoneticPr fontId="1" type="noConversion"/>',
h: str,
w: str,
};
if (!sheet || !sheet['!ref']) return [];
let c = 0,
r = 1;
while (c < range.e.c + 1) {
while (r < range.e.r + 1) {
if (!sheet[String.fromCharCode(char) + r]) {
sheet[String.fromCharCode(char) + r] = customWorkSheet;
}
r++;
}
r = 1;
str += ' ';
customWorkSheet = {
t: 's',
v: str,
r: '<t> </t><phoneticPr fontId="1" type="noConversion"/>',
h: str,
w: str,
};
c++;
char++;
}
}
/**
* @description: 第一行作为头部
*/
@ -49,8 +83,8 @@
if (!sheet || !sheet['!ref']) return [];
const headers: string[] = [];
// A3:B7=>{s:{c:0, r:2}, e:{c:1, r:6}}
const range = XLSX.utils.decode_range(sheet['!ref']);
const range: XLSX.Range = XLSX.utils.decode_range(sheet['!ref']);
shapeWorkSheel(sheet, range);
const R = range.s.r;
/* start in the first row */
for (let C = range.s.c; C <= range.e.c; ++C) {
@ -108,6 +142,7 @@
function readerData(rawFile: File) {
loadingRef.value = true;
return new Promise((resolve, reject) => {
debugger;
const reader = new FileReader();
reader.onload = async (e) => {
try {