fix: 优化二维码加载错误显示

This commit is contained in:
Gsh
2025-08-31 23:53:49 +08:00
parent d29aac088a
commit 4f944a5466
4 changed files with 154 additions and 150 deletions

View File

@@ -51,7 +51,7 @@
"radash": "^12.1.1",
"reset-css": "^5.0.2",
"vue": "^3.5.17",
"vue-element-plus-x": "1.3.0",
"vue-element-plus-x": "1.3.7",
"vue-router": "4"
},
"devDependencies": {

View File

@@ -75,8 +75,8 @@ importers:
specifier: ^3.5.17
version: 3.5.17(typescript@5.8.3)
vue-element-plus-x:
specifier: 1.3.0
version: 1.3.0(@element-plus/icons-vue@2.3.1(vue@3.5.17(typescript@5.8.3)))(element-plus@2.10.4(vue@3.5.17(typescript@5.8.3)))(typescript-api-pro@0.0.7)(typescript@5.8.3)
specifier: 1.3.7
version: 1.3.7(rollup@4.41.1)(vue@3.5.17(typescript@5.8.3))
vue-router:
specifier: '4'
version: 4.5.1(vue@3.5.17(typescript@5.8.3))
@@ -866,12 +866,30 @@ packages:
cpu: [x64]
os: [win32]
'@shikijs/core@3.12.0':
resolution: {integrity: sha512-rPfCBd6gHIKBPpf2hKKWn2ISPSrmRKAFi+bYDjvZHpzs3zlksWvEwaF3Z4jnvW+xHxSRef7qDooIJkY0RpA9EA==}
'@shikijs/core@3.7.0':
resolution: {integrity: sha512-yilc0S9HvTPyahHpcum8eonYrQtmGTU0lbtwxhA6jHv4Bm1cAdlPFRCJX4AHebkCm75aKTjjRAW+DezqD1b/cg==}
'@shikijs/engine-javascript@3.12.0':
resolution: {integrity: sha512-Ni3nm4lnKxyKaDoXQQJYEayX052BL7D0ikU5laHp+ynxPpIF1WIwyhzrMU6WDN7AoAfggVR4Xqx3WN+JTS+BvA==}
'@shikijs/engine-oniguruma@3.12.0':
resolution: {integrity: sha512-IfDl3oXPbJ/Jr2K8mLeQVpnF+FxjAc7ZPDkgr38uEw/Bg3u638neSrpwqOTnTHXt1aU0Fk1/J+/RBdst1kVqLg==}
'@shikijs/langs@3.12.0':
resolution: {integrity: sha512-HIca0daEySJ8zuy9bdrtcBPhcYBo8wR1dyHk1vKrOuwDsITtZuQeGhEkcEfWc6IDyTcom7LRFCH6P7ljGSCEiQ==}
'@shikijs/themes@3.12.0':
resolution: {integrity: sha512-/lxvQxSI5s4qZLV/AuFaA4Wt61t/0Oka/P9Lmpr1UV+HydNCczO3DMHOC/CsXCCpbv4Zq8sMD0cDa7mvaVoj0Q==}
'@shikijs/transformers@3.7.0':
resolution: {integrity: sha512-VplaqIMRNsNOorCXJHkbF5S0pT6xm8Z/s7w7OPZLohf8tR93XH0krvUafpNy/ozEylrWuShJF0+ftEB+wFRwGA==}
'@shikijs/types@3.12.0':
resolution: {integrity: sha512-jsFzm8hCeTINC3OCmTZdhR9DOl/foJWplH2Px0bTi4m8z59fnsueLsweX82oGcjRQ7mfQAluQYKGoH2VzsWY4A==}
'@shikijs/types@3.7.0':
resolution: {integrity: sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==}
@@ -916,24 +934,15 @@ packages:
'@types/katex@0.16.7':
resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==}
'@types/linkify-it@5.0.0':
resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==}
'@types/lodash-es@4.17.12':
resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==}
'@types/lodash@4.17.17':
resolution: {integrity: sha512-RRVJ+J3J+WmyOTqnz3PiBLA501eKwXl2noseKOrNo/6+XEHjTAxO4xHvxQB6QuNm+s4WRbn6rSiap8+EA+ykFQ==}
'@types/markdown-it@14.1.2':
resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==}
'@types/mdast@4.0.4':
resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==}
'@types/mdurl@2.0.0':
resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==}
'@types/ms@2.1.0':
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
@@ -1565,8 +1574,8 @@ packages:
chardet@0.7.0:
resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==}
chatarea@5.5.3:
resolution: {integrity: sha512-uJqlS5ecwITPOGBKetovgOyUufumJP/JweVkgp/tEtBM9O6+WMVRGYYm5I8I1eyhkJb70HU8S+BH9esCtyk5MA==}
chatarea@5.9.3:
resolution: {integrity: sha512-rBOASntx4o5tzvylbgu1TAipA2U0G/OixxQpfYdQGsywpSYufExpzHPrq3+k16fEG9pGdm3AoBMmXU1zzs9Yng==}
chokidar@3.6.0:
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
@@ -3032,9 +3041,6 @@ packages:
lines-and-columns@1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
linkify-it@5.0.0:
resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
lint-staged@16.1.2:
resolution: {integrity: sha512-sQKw2Si2g9KUZNY3XNvRuDq4UJqpHwF0/FQzZR2M7I5MvtpWvibikCjUVJzZdGE0ByurEl3KQNvsGetd1ty1/Q==}
engines: {node: '>=20.17'}
@@ -3125,13 +3131,6 @@ packages:
resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==}
engines: {node: '>=0.10.0'}
markdown-it-async@2.2.0:
resolution: {integrity: sha512-sITME+kf799vMeO/ww/CjH6q+c05f6TLpn6VOmmWCGNqPJzSh+uFgZoMB9s0plNtW6afy63qglNAC3MhrhP/gg==}
markdown-it@14.1.0:
resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
hasBin: true
markdown-table@3.0.4:
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
@@ -3196,9 +3195,6 @@ packages:
mdn-data@2.21.0:
resolution: {integrity: sha512-+ZKPQezM5vYJIkCxaC+4DTnRrVZR1CgsKLu5zsQERQx6Tea8Y+wMx5A24rq8A8NepCeatIQufVAekKNgiBMsGQ==}
mdurl@2.0.0:
resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
memoize-one@6.0.0:
resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
@@ -3446,6 +3442,12 @@ packages:
resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}
engines: {node: '>=18'}
oniguruma-parser@0.12.1:
resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==}
oniguruma-to-es@4.3.3:
resolution: {integrity: sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==}
open@8.4.2:
resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
engines: {node: '>=12'}
@@ -3734,10 +3736,6 @@ packages:
property-information@7.1.0:
resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==}
punycode.js@2.3.1:
resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
engines: {node: '>=6'}
punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -3800,6 +3798,15 @@ packages:
resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==}
engines: {node: '>=0.10.0'}
regex-recursion@6.0.2:
resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==}
regex-utilities@2.3.0:
resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==}
regex@6.0.1:
resolution: {integrity: sha512-uorlqlzAKjKQZ5P+kTJr3eeJGSVroLKoHmquUj4zHWuR+hEyNqlXsSKlYYF5F4NI6nl7tWCs0apKJ0lmfsXAPA==}
regexp-ast-analysis@0.7.1:
resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
@@ -4080,6 +4087,9 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
shiki@3.12.0:
resolution: {integrity: sha512-E+ke51tciraTHpaXYXfqnPZFSViKHhSQ3fiugThlfs/om/EonlQ0hSldcqgzOWWqX6PcjkKKzFgrjIaiPAXoaA==}
side-channel-list@1.0.0:
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
engines: {node: '>= 0.4'}
@@ -4463,6 +4473,10 @@ packages:
peerDependencies:
typescript: '>=4.0.0'
ts-md5@2.0.1:
resolution: {integrity: sha512-yF35FCoEOFBzOclSkMNEUbFQZuv89KEQ+5Xz03HrMSGUGB1+r+El+JiGOFwsP4p9RFNzwlrydYoTLvPOuICl9w==}
engines: {node: '>=18'}
tslib@2.3.0:
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
@@ -4493,6 +4507,9 @@ packages:
resolution: {integrity: sha512-q7QNVDGTdl702bVFiI5eY4l/HkgCM6at9KhcFbgUAzezHFbOVy4+0O/lCjsABEQwbZPravVfBIiBVGo89yzHFg==}
engines: {node: '>= 0.4'}
typescript-api-pro@0.0.6:
resolution: {integrity: sha512-wRA64AFESZkwyqukGgQJAbzF1E77CCYbydy74TwtQ5QopcXql6DsY00E1aCsCSkdH+NyEwOJsb8L5UoaRvndgg==}
typescript-api-pro@0.0.7:
resolution: {integrity: sha512-lCdArKa/rbJptU+ea+Ry+oLz+JgQucYAefO3GXNQuZPIUsW9iAC6OpC3bfQ/8bEmwO2HK6AWj98LoiDMtd6AoA==}
@@ -4501,9 +4518,6 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
uc.micro@2.1.0:
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
ufo@1.6.1:
resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==}
@@ -4731,12 +4745,10 @@ packages:
'@vue/composition-api':
optional: true
vue-element-plus-x@1.3.0:
resolution: {integrity: sha512-LTR1QoPXBOcF1iEqMjXt//fA88RZkaQT/pr04NvfAbwRsNP+sb/I9dBN7bTtBC7v0O7NLzqguS1gxeBwyPYC9w==}
vue-element-plus-x@1.3.7:
resolution: {integrity: sha512-Di3i1thbtn4YAg2nZCIJwaDHAq8VQA/TspXCJ8GPzBYdD9lioaYp/iy8sgEjLzKm4hViOmao/QS0WWH4snXaog==}
peerDependencies:
'@element-plus/icons-vue': ^2.3.1
element-plus: ^2.9.7
typescript-api-pro: ^0.0.6
vue: ^3.5.17
vue-eslint-parser@10.2.0:
resolution: {integrity: sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==}
@@ -5620,6 +5632,13 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.41.1':
optional: true
'@shikijs/core@3.12.0':
dependencies:
'@shikijs/types': 3.12.0
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
hast-util-to-html: 9.0.5
'@shikijs/core@3.7.0':
dependencies:
'@shikijs/types': 3.7.0
@@ -5627,11 +5646,35 @@ snapshots:
'@types/hast': 3.0.4
hast-util-to-html: 9.0.5
'@shikijs/engine-javascript@3.12.0':
dependencies:
'@shikijs/types': 3.12.0
'@shikijs/vscode-textmate': 10.0.2
oniguruma-to-es: 4.3.3
'@shikijs/engine-oniguruma@3.12.0':
dependencies:
'@shikijs/types': 3.12.0
'@shikijs/vscode-textmate': 10.0.2
'@shikijs/langs@3.12.0':
dependencies:
'@shikijs/types': 3.12.0
'@shikijs/themes@3.12.0':
dependencies:
'@shikijs/types': 3.12.0
'@shikijs/transformers@3.7.0':
dependencies:
'@shikijs/core': 3.7.0
'@shikijs/types': 3.7.0
'@shikijs/types@3.12.0':
dependencies:
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
'@shikijs/types@3.7.0':
dependencies:
'@shikijs/vscode-textmate': 10.0.2
@@ -5677,25 +5720,16 @@ snapshots:
'@types/katex@0.16.7': {}
'@types/linkify-it@5.0.0': {}
'@types/lodash-es@4.17.12':
dependencies:
'@types/lodash': 4.17.17
'@types/lodash@4.17.17': {}
'@types/markdown-it@14.1.2':
dependencies:
'@types/linkify-it': 5.0.0
'@types/mdurl': 2.0.0
'@types/mdast@4.0.4':
dependencies:
'@types/unist': 3.0.3
'@types/mdurl@2.0.0': {}
'@types/ms@2.1.0': {}
'@types/node@12.20.55': {}
@@ -6450,7 +6484,7 @@ snapshots:
chardet@0.7.0: {}
chatarea@5.5.3: {}
chatarea@5.9.3: {}
chokidar@3.6.0:
dependencies:
@@ -8105,10 +8139,6 @@ snapshots:
lines-and-columns@1.2.4: {}
linkify-it@5.0.0:
dependencies:
uc.micro: 2.1.0
lint-staged@16.1.2:
dependencies:
chalk: 5.4.1
@@ -8207,20 +8237,6 @@ snapshots:
dependencies:
object-visit: 1.0.1
markdown-it-async@2.2.0:
dependencies:
'@types/markdown-it': 14.1.2
markdown-it: 14.1.0
markdown-it@14.1.0:
dependencies:
argparse: 2.0.1
entities: 4.5.0
linkify-it: 5.0.0
mdurl: 2.0.0
punycode.js: 2.3.1
uc.micro: 2.1.0
markdown-table@3.0.4: {}
math-intrinsics@1.1.0: {}
@@ -8375,8 +8391,6 @@ snapshots:
mdn-data@2.21.0: {}
mdurl@2.0.0: {}
memoize-one@6.0.0: {}
meow@12.1.1: {}
@@ -8749,6 +8763,14 @@ snapshots:
dependencies:
mimic-function: 5.0.1
oniguruma-parser@0.12.1: {}
oniguruma-to-es@4.3.3:
dependencies:
oniguruma-parser: 0.12.1
regex: 6.0.1
regex-recursion: 6.0.2
open@8.4.2:
dependencies:
define-lazy-prop: 2.0.0
@@ -9002,8 +9024,6 @@ snapshots:
property-information@7.1.0: {}
punycode.js@2.3.1: {}
punycode@2.3.1: {}
qrcode@1.5.4:
@@ -9075,6 +9095,16 @@ snapshots:
extend-shallow: 3.0.2
safe-regex: 1.1.0
regex-recursion@6.0.2:
dependencies:
regex-utilities: 2.3.0
regex-utilities@2.3.0: {}
regex@6.0.1:
dependencies:
regex-utilities: 2.3.0
regexp-ast-analysis@0.7.1:
dependencies:
'@eslint-community/regexpp': 4.12.1
@@ -9389,6 +9419,17 @@ snapshots:
shebang-regex@3.0.0: {}
shiki@3.12.0:
dependencies:
'@shikijs/core': 3.12.0
'@shikijs/engine-javascript': 3.12.0
'@shikijs/engine-oniguruma': 3.12.0
'@shikijs/langs': 3.12.0
'@shikijs/themes': 3.12.0
'@shikijs/types': 3.12.0
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
side-channel-list@1.0.0:
dependencies:
es-errors: 1.3.0
@@ -9847,6 +9888,8 @@ snapshots:
picomatch: 4.0.2
typescript: 5.8.3
ts-md5@2.0.1: {}
tslib@2.3.0: {}
tslib@2.8.1: {}
@@ -9899,12 +9942,12 @@ snapshots:
typed-array-buffer: 1.0.3
typed-array-byte-offset: 1.0.4
typescript-api-pro@0.0.6: {}
typescript-api-pro@0.0.7: {}
typescript@5.8.3: {}
uc.micro@2.1.0: {}
ufo@1.6.1: {}
uglify-js@3.19.3:
@@ -10191,18 +10234,16 @@ snapshots:
dependencies:
vue: 3.5.17(typescript@5.8.3)
vue-element-plus-x@1.3.0(@element-plus/icons-vue@2.3.1(vue@3.5.17(typescript@5.8.3)))(element-plus@2.10.4(vue@3.5.17(typescript@5.8.3)))(typescript-api-pro@0.0.7)(typescript@5.8.3):
vue-element-plus-x@1.3.7(rollup@4.41.1)(vue@3.5.17(typescript@5.8.3)):
dependencies:
'@element-plus/icons-vue': 2.3.1(vue@3.5.17(typescript@5.8.3))
'@shikijs/transformers': 3.7.0
'@vueuse/core': 13.5.0(vue@3.5.17(typescript@5.8.3))
chatarea: 5.5.3
chatarea: 5.9.3
deepmerge: 4.3.1
dompurify: 3.2.6
element-plus: 2.10.4(vue@3.5.17(typescript@5.8.3))
github-markdown-css: 5.8.1
highlight.js: 11.11.1
markdown-it-async: 2.2.0
prismjs: 1.30.0
property-information: 7.1.0
radash: 12.1.1
@@ -10214,13 +10255,17 @@ snapshots:
remark-math: 6.0.0
remark-parse: 11.0.0
remark-rehype: 11.1.2
rollup-plugin-visualizer: 6.0.3(rollup@4.41.1)
shiki: 3.12.0
swrv: 1.1.0(vue@3.5.17(typescript@5.8.3))
typescript-api-pro: 0.0.7
ts-md5: 2.0.1
typescript-api-pro: 0.0.6
unified: 11.0.5
vue: 3.5.17(typescript@5.8.3)
transitivePeerDependencies:
- rolldown
- rollup
- supports-color
- typescript
vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2)):
dependencies:

View File

@@ -28,7 +28,7 @@ const sceneStr = ref(''); // 场景值,用于标识二维码
const userStore = useUserStore();
const router = useRouter();
const sessionStore = useSessionStore();
const isQrCodeError = ref(false);
// 二维码倒计时实例
const { start: qrStart, stop: qrStop } = useCountdown(shallowRef(600), {
interval: 1000,
@@ -37,7 +37,10 @@ const { start: qrStart, stop: qrStop } = useCountdown(shallowRef(600), {
stopPolling();
},
});
// 计算
const isLoading = computed(() => {
return qrCodeUrl.value ? false : !isQrCodeError.value;
});
// 确认登录倒计时实例
const { start: confirmStart, stop: confirmStop } = useCountdown(confirmCountdownSeconds, {
interval: 1000,
@@ -54,19 +57,22 @@ let statusPolling: number | null = null;
// 获取登录二维码图片和二维码标识
async function fetchQRCodeInfo() {
try {
isQrCodeError.value = false;
const param = {
sceneType: QrCodeType,
};
const response = await getQrCode(param);
if (response && response.data.qrCodeUrl && response.data.scene) {
const urlObj = new URL(response.data.qrCodeUrl);
const params = new URLSearchParams(urlObj.search);
const ticketValue = params.get('ticket');
if (response && response.data.qrCodeUrl && response.data.scene && ticketValue) {
qrCodeUrl.value = response.data.qrCodeUrl;
sceneStr.value = response.data.scene;
return true;
}
return false;
}
catch (error) {
console.error('获取二维码失败:', error);
catch (err: any) {
return false;
}
}
@@ -185,6 +191,7 @@ function stopPolling() {
/** 刷新二维码 */
async function handleRefresh() {
isExpired.value = false;
isQrCodeError.value = false;
isScanned.value = false;
isConfirming.value = false;
stopPolling();
@@ -195,6 +202,8 @@ async function handleRefresh() {
startStatusPolling();
}
else {
isQrCodeError.value = true;
stopPolling();
ElMessage.error('刷新二维码失败');
}
}
@@ -218,6 +227,8 @@ onMounted(async () => {
startStatusPolling();
}
else {
isQrCodeError.value = true;
stopPolling();
ElMessage.error('初始化二维码失败');
}
});
@@ -241,12 +252,25 @@ onMounted(() => {
</div>
<div class="qr-img-wrapper">
<el-image v-loading="!qrCodeUrl" :src="qrCodeUrl" alt="登录二维码" class="qr-img">
<el-image v-loading="isLoading" :src="qrCodeUrl" alt="登录二维码" class="qr-img">
<template #error>
<el-icon><IconPicture /></el-icon>
</template>
</el-image>
<!-- 失败覆盖层 -->
<div v-if="isQrCodeError" class="expired-overlay" @click.stop="handleRefresh">
<div class="expired-content">
<p class="expired-text">
二维码获取失败
</p>
<el-button class="refresh-btn" link>
<el-icon><Refresh /></el-icon>
点击刷新
</el-button>
</div>
</div>
<!-- 过期覆盖层 -->
<div v-if="isExpired" class="expired-overlay" @click.stop="handleRefresh">
<div class="expired-content">

View File

@@ -1,65 +0,0 @@
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
// biome-ignore lint: disable
export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
AccountPassword: typeof import('./../src/components/LoginDialog/components/FormLogin/AccountPassword.vue')['default']
APIKeyManagement: typeof import('./../src/components/userPersonalCenter/components/APIKeyManagement.vue')['default']
DeepThinking: typeof import('./../src/components/DeepThinking/index.vue')['default']
ElAlert: typeof import('element-plus/es')['ElAlert']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElButton: typeof import('element-plus/es')['ElButton']
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
ElCard: typeof import('element-plus/es')['ElCard']
ElCollapse: typeof import('element-plus/es')['ElCollapse']
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElContainer: typeof import('element-plus/es')['ElContainer']
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
FilesSelect: typeof import('./../src/components/FilesSelect/index.vue')['default']
IconSelect: typeof import('./../src/components/IconSelect/index.vue')['default']
Indexl: typeof import('./../src/components/SupportModelProducts/indexl.vue')['default']
LoginDialog: typeof import('./../src/components/LoginDialog/index.vue')['default']
ModeList: typeof import('./../src/components/modeList/index.vue')['default']
ModelSelect: typeof import('./../src/components/ModelSelect/index.vue')['default']
NavDialog: typeof import('./../src/components/userPersonalCenter/NavDialog.vue')['default']
Popover: typeof import('./../src/components/Popover/index.vue')['default']
ProductPackage: typeof import('./../src/components/ProductPackage/index.vue')['default']
QrCodeLogin: typeof import('./../src/components/LoginDialog/components/QrCodeLogin/index.vue')['default']
RechargeLog: typeof import('./../src/components/userPersonalCenter/components/RechargeLog.vue')['default']
RegistrationForm: typeof import('./../src/components/LoginDialog/components/FormLogin/RegistrationForm.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SupportModelList: typeof import('./../src/components/userPersonalCenter/components/SupportModelList.vue')['default']
SvgIcon: typeof import('./../src/components/SvgIcon/index.vue')['default']
UsageStatistics: typeof import('./../src/components/userPersonalCenter/components/UsageStatistics.vue')['default']
UserManagement: typeof import('./../src/components/userPersonalCenter/components/UserManagement.vue')['default']
VerificationCode: typeof import('./../src/components/LoginDialog/components/FormLogin/VerificationCode.vue')['default']
WelecomeText: typeof import('./../src/components/WelecomeText/index.vue')['default']
}
export interface GlobalDirectives {
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
}
}