mirror of
https://gitee.com/HuLaSpark/HuLa.git
synced 2024-11-29 10:18:35 +08:00
perf(services): ⚡ 优化请求接口以及消息提示
更新vue版本修复_ctx报警告问题 更新naive-ui版本修复该版本已知问题
This commit is contained in:
parent
e17cb7c24a
commit
0355f976b8
@ -42,13 +42,14 @@
|
||||
"axios": "^1.6.8",
|
||||
"colorthief": "^2.4.0",
|
||||
"dayjs": "^1.11.10",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"lodash-es": "^4.17.21",
|
||||
"mitt": "^3.0.1",
|
||||
"naive-ui": "^2.38.1",
|
||||
"naive-ui": "^2.38.2",
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
"pinia-shared-state": "^0.5.1",
|
||||
"vue": "^3.4.23",
|
||||
"vue": "^3.4.26",
|
||||
"vue-draggable-plus": "^0.4.0",
|
||||
"vue-router": "^4.3.0"
|
||||
},
|
||||
|
268
pnpm-lock.yaml
268
pnpm-lock.yaml
@ -20,6 +20,9 @@ importers:
|
||||
dayjs:
|
||||
specifier: ^1.11.10
|
||||
version: 1.11.10
|
||||
grapheme-splitter:
|
||||
specifier: ^1.0.4
|
||||
version: 1.0.4
|
||||
lodash-es:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
@ -27,26 +30,26 @@ importers:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
naive-ui:
|
||||
specifier: ^2.38.1
|
||||
version: 2.38.1(vue@3.4.23(typescript@5.4.3))
|
||||
specifier: ^2.38.2
|
||||
version: 2.38.2(vue@3.4.26(typescript@5.4.3))
|
||||
pinia:
|
||||
specifier: ^2.1.7
|
||||
version: 2.1.7(typescript@5.4.3)(vue@3.4.23(typescript@5.4.3))
|
||||
version: 2.1.7(typescript@5.4.3)(vue@3.4.26(typescript@5.4.3))
|
||||
pinia-plugin-persistedstate:
|
||||
specifier: ^3.2.1
|
||||
version: 3.2.1(pinia@2.1.7(typescript@5.4.3)(vue@3.4.23(typescript@5.4.3)))
|
||||
version: 3.2.1(pinia@2.1.7(typescript@5.4.3)(vue@3.4.26(typescript@5.4.3)))
|
||||
pinia-shared-state:
|
||||
specifier: ^0.5.1
|
||||
version: 0.5.1(pinia@2.1.7(typescript@5.4.3)(vue@3.4.23(typescript@5.4.3)))(vue@3.4.23(typescript@5.4.3))
|
||||
version: 0.5.1(pinia@2.1.7(typescript@5.4.3)(vue@3.4.26(typescript@5.4.3)))(vue@3.4.26(typescript@5.4.3))
|
||||
vue:
|
||||
specifier: ^3.4.23
|
||||
version: 3.4.23(typescript@5.4.3)
|
||||
specifier: ^3.4.26
|
||||
version: 3.4.26(typescript@5.4.3)
|
||||
vue-draggable-plus:
|
||||
specifier: ^0.4.0
|
||||
version: 0.4.0(@types/sortablejs@1.15.8)
|
||||
vue-router:
|
||||
specifier: ^4.3.0
|
||||
version: 4.3.0(vue@3.4.23(typescript@5.4.3))
|
||||
version: 4.3.0(vue@3.4.26(typescript@5.4.3))
|
||||
devDependencies:
|
||||
'@babel/eslint-parser':
|
||||
specifier: ^7.23.3
|
||||
@ -92,13 +95,13 @@ importers:
|
||||
version: 0.59.4(rollup@4.14.3)(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: ^5.0.4
|
||||
version: 5.0.4(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))(vue@3.4.23(typescript@5.4.3))
|
||||
version: 5.0.4(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))(vue@3.4.26(typescript@5.4.3))
|
||||
'@vitejs/plugin-vue-jsx':
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))(vue@3.4.23(typescript@5.4.3))
|
||||
version: 3.1.0(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))(vue@3.4.26(typescript@5.4.3))
|
||||
'@vueuse/core':
|
||||
specifier: ^10.8.0
|
||||
version: 10.8.0(vue@3.4.23(typescript@5.4.3))
|
||||
version: 10.8.0(vue@3.4.26(typescript@5.4.3))
|
||||
commitizen:
|
||||
specifier: ^4.3.0
|
||||
version: 4.3.0(@types/node@20.11.7)(typescript@5.4.3)
|
||||
@ -149,10 +152,10 @@ importers:
|
||||
version: 5.4.3
|
||||
unplugin-auto-import:
|
||||
specifier: ^0.17.2
|
||||
version: 0.17.5(@vueuse/core@10.8.0(vue@3.4.23(typescript@5.4.3)))(rollup@4.14.3)
|
||||
version: 0.17.5(@vueuse/core@10.8.0(vue@3.4.26(typescript@5.4.3)))(rollup@4.14.3)
|
||||
unplugin-vue-components:
|
||||
specifier: ^0.26.0
|
||||
version: 0.26.0(@babel/parser@7.24.4)(rollup@4.14.3)(vue@3.4.23(typescript@5.4.3))
|
||||
version: 0.26.0(@babel/parser@7.24.5)(rollup@4.14.3)(vue@3.4.26(typescript@5.4.3))
|
||||
vite:
|
||||
specifier: 5.2.9
|
||||
version: 5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1)
|
||||
@ -270,10 +273,18 @@ packages:
|
||||
resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@babel/helper-string-parser@7.24.1':
|
||||
resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@babel/helper-validator-identifier@7.22.20':
|
||||
resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@babel/helper-validator-identifier@7.24.5':
|
||||
resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@babel/helper-validator-option@7.23.5':
|
||||
resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
@ -296,8 +307,8 @@ packages:
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
|
||||
'@babel/parser@7.24.4':
|
||||
resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==}
|
||||
'@babel/parser@7.24.5':
|
||||
resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
|
||||
@ -343,6 +354,10 @@ packages:
|
||||
resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@babel/types@7.24.5':
|
||||
resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@commitlint/cli@19.2.2':
|
||||
resolution: {integrity: sha512-P8cbOHfg2PQRzfICLSrzUVOCVMqjEZ8Hlth6mtJ4yOEjT47Q5PbIGymgX3rLVylNw+3IAT2Djn9IJ2wHbXFzBg==}
|
||||
engines: {node: '>=v18'}
|
||||
@ -1071,26 +1086,26 @@ packages:
|
||||
'@vue/compiler-core@3.4.21':
|
||||
resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==}
|
||||
|
||||
'@vue/compiler-core@3.4.23':
|
||||
resolution: {integrity: sha512-HAFmuVEwNqNdmk+w4VCQ2pkLk1Vw4XYiiyxEp3z/xvl14aLTUBw2OfVH3vBcx+FtGsynQLkkhK410Nah1N2yyQ==}
|
||||
'@vue/compiler-core@3.4.26':
|
||||
resolution: {integrity: sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ==}
|
||||
|
||||
'@vue/compiler-dom@3.4.21':
|
||||
resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==}
|
||||
|
||||
'@vue/compiler-dom@3.4.23':
|
||||
resolution: {integrity: sha512-t0b9WSTnCRrzsBGrDd1LNR5HGzYTr7LX3z6nNBG+KGvZLqrT0mY6NsMzOqlVMBKKXKVuusbbB5aOOFgTY+senw==}
|
||||
'@vue/compiler-dom@3.4.26':
|
||||
resolution: {integrity: sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA==}
|
||||
|
||||
'@vue/compiler-sfc@3.4.21':
|
||||
resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==}
|
||||
|
||||
'@vue/compiler-sfc@3.4.23':
|
||||
resolution: {integrity: sha512-fSDTKTfzaRX1kNAUiaj8JB4AokikzStWgHooMhaxyjZerw624L+IAP/fvI4ZwMpwIh8f08PVzEnu4rg8/Npssw==}
|
||||
'@vue/compiler-sfc@3.4.26':
|
||||
resolution: {integrity: sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw==}
|
||||
|
||||
'@vue/compiler-ssr@3.4.21':
|
||||
resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==}
|
||||
|
||||
'@vue/compiler-ssr@3.4.23':
|
||||
resolution: {integrity: sha512-hb6Uj2cYs+tfqz71Wj6h3E5t6OKvb4MVcM2Nl5i/z1nv1gjEhw+zYaNOV+Xwn+SSN/VZM0DgANw5TuJfxfezPg==}
|
||||
'@vue/compiler-ssr@3.4.26':
|
||||
resolution: {integrity: sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ==}
|
||||
|
||||
'@vue/devtools-api@6.5.1':
|
||||
resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==}
|
||||
@ -1103,25 +1118,25 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
'@vue/reactivity@3.4.23':
|
||||
resolution: {integrity: sha512-GlXR9PL+23fQ3IqnbSQ8OQKLodjqCyoCrmdLKZk3BP7jN6prWheAfU7a3mrltewTkoBm+N7qMEb372VHIkQRMQ==}
|
||||
'@vue/reactivity@3.4.26':
|
||||
resolution: {integrity: sha512-E/ynEAu/pw0yotJeLdvZEsp5Olmxt+9/WqzvKff0gE67tw73gmbx6tRkiagE/eH0UCubzSlGRebCbidB1CpqZQ==}
|
||||
|
||||
'@vue/runtime-core@3.4.23':
|
||||
resolution: {integrity: sha512-FeQ9MZEXoFzFkFiw9MQQ/FWs3srvrP+SjDKSeRIiQHIhtkzoj0X4rWQlRNHbGuSwLra6pMyjAttwixNMjc/xLw==}
|
||||
'@vue/runtime-core@3.4.26':
|
||||
resolution: {integrity: sha512-AFJDLpZvhT4ujUgZSIL9pdNcO23qVFh7zWCsNdGQBw8ecLNxOOnPcK9wTTIYCmBJnuPHpukOwo62a2PPivihqw==}
|
||||
|
||||
'@vue/runtime-dom@3.4.23':
|
||||
resolution: {integrity: sha512-RXJFwwykZWBkMiTPSLEWU3kgVLNAfActBfWFlZd0y79FTUxexogd0PLG4HH2LfOktjRxV47Nulygh0JFXe5f9A==}
|
||||
'@vue/runtime-dom@3.4.26':
|
||||
resolution: {integrity: sha512-UftYA2hUXR2UOZD/Fc3IndZuCOOJgFxJsWOxDkhfVcwLbsfh2CdXE2tG4jWxBZuDAs9J9PzRTUFt1PgydEtItw==}
|
||||
|
||||
'@vue/server-renderer@3.4.23':
|
||||
resolution: {integrity: sha512-LDwGHtnIzvKFNS8dPJ1SSU5Gvm36p2ck8wCZc52fc3k/IfjKcwCyrWEf0Yag/2wTFUBXrqizfhK9c/mC367dXQ==}
|
||||
'@vue/server-renderer@3.4.26':
|
||||
resolution: {integrity: sha512-xoGAqSjYDPGAeRWxeoYwqJFD/gw7mpgzOvSxEmjWaFO2rE6qpbD1PC172YRpvKhrihkyHJkNDADFXTfCyVGhKw==}
|
||||
peerDependencies:
|
||||
vue: 3.4.23
|
||||
vue: 3.4.26
|
||||
|
||||
'@vue/shared@3.4.21':
|
||||
resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==}
|
||||
|
||||
'@vue/shared@3.4.23':
|
||||
resolution: {integrity: sha512-wBQ0gvf+SMwsCQOyusNw/GoXPV47WGd1xB5A1Pgzy0sQ3Bi5r5xm3n+92y3gCnB3MWqnRDdvfkRGxhKtbBRNgg==}
|
||||
'@vue/shared@3.4.26':
|
||||
resolution: {integrity: sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ==}
|
||||
|
||||
'@vueuse/core@10.8.0':
|
||||
resolution: {integrity: sha512-G9Ok9fjx10TkNIPn8V1dJmK1NcdJCtYmDRyYiTMUyJ1p0Tywc1zmOoCQ2xhHYyz8ULBU4KjIJQ9n+Lrty74iVw==}
|
||||
@ -2016,6 +2031,9 @@ packages:
|
||||
graceful-fs@4.2.11:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
|
||||
grapheme-splitter@1.0.4:
|
||||
resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
|
||||
|
||||
graphemer@1.4.0:
|
||||
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
|
||||
|
||||
@ -2536,8 +2554,8 @@ packages:
|
||||
mute-stream@0.0.8:
|
||||
resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
|
||||
|
||||
naive-ui@2.38.1:
|
||||
resolution: {integrity: sha512-AnU1FQ7K/CbhguAX++V4kCFjk7h7RvWt4nvZPRjORMpq+fUIlzD+EcQ5Cv1VqDloNF8+eMv4Akc2Ogacc9S+5A==}
|
||||
naive-ui@2.38.2:
|
||||
resolution: {integrity: sha512-WhZ+6DW61aYSmFyfH7evcSGFmd2xR68Yq1mNRrVdJwBhZsnNdAUsMN9IeNCVEPMCND/jzYZghkStoNoR5Xa09g==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.0
|
||||
|
||||
@ -3390,8 +3408,8 @@ packages:
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
|
||||
vue@3.4.23:
|
||||
resolution: {integrity: sha512-X1y6yyGJ28LMUBJ0k/qIeKHstGd+BlWQEOT40x3auJFTmpIhpbKLgN7EFsqalnJXq1Km5ybDEsp6BhuWKciUDg==}
|
||||
vue@3.4.26:
|
||||
resolution: {integrity: sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
peerDependenciesMeta:
|
||||
@ -3619,8 +3637,12 @@ snapshots:
|
||||
|
||||
'@babel/helper-string-parser@7.23.4': {}
|
||||
|
||||
'@babel/helper-string-parser@7.24.1': {}
|
||||
|
||||
'@babel/helper-validator-identifier@7.22.20': {}
|
||||
|
||||
'@babel/helper-validator-identifier@7.24.5': {}
|
||||
|
||||
'@babel/helper-validator-option@7.23.5': {}
|
||||
|
||||
'@babel/helpers@7.23.9':
|
||||
@ -3645,9 +3667,9 @@ snapshots:
|
||||
dependencies:
|
||||
'@babel/types': 7.24.0
|
||||
|
||||
'@babel/parser@7.24.4':
|
||||
'@babel/parser@7.24.5':
|
||||
dependencies:
|
||||
'@babel/types': 7.24.0
|
||||
'@babel/types': 7.24.5
|
||||
|
||||
'@babel/plugin-syntax-jsx@7.23.3(@babel/core@7.23.9)':
|
||||
dependencies:
|
||||
@ -3708,6 +3730,12 @@ snapshots:
|
||||
'@babel/helper-validator-identifier': 7.22.20
|
||||
to-fast-properties: 2.0.0
|
||||
|
||||
'@babel/types@7.24.5':
|
||||
dependencies:
|
||||
'@babel/helper-string-parser': 7.24.1
|
||||
'@babel/helper-validator-identifier': 7.24.5
|
||||
to-fast-properties: 2.0.0
|
||||
|
||||
'@commitlint/cli@19.2.2(@types/node@20.11.7)(typescript@5.4.3)':
|
||||
dependencies:
|
||||
'@commitlint/format': 19.0.3
|
||||
@ -3823,9 +3851,9 @@ snapshots:
|
||||
dependencies:
|
||||
css-render: 0.15.12
|
||||
|
||||
'@css-render/vue3-ssr@0.15.12(vue@3.4.23(typescript@5.4.3))':
|
||||
'@css-render/vue3-ssr@0.15.12(vue@3.4.26(typescript@5.4.3))':
|
||||
dependencies:
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
'@emotion/hash@0.8.0': {}
|
||||
|
||||
@ -4330,20 +4358,20 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
|
||||
'@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))(vue@3.4.23(typescript@5.4.3))':
|
||||
'@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))(vue@3.4.26(typescript@5.4.3))':
|
||||
dependencies:
|
||||
'@babel/core': 7.23.9
|
||||
'@babel/plugin-transform-typescript': 7.23.6(@babel/core@7.23.9)
|
||||
'@vue/babel-plugin-jsx': 1.2.1(@babel/core@7.23.9)
|
||||
vite: 5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1)
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@vitejs/plugin-vue@5.0.4(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))(vue@3.4.23(typescript@5.4.3))':
|
||||
'@vitejs/plugin-vue@5.0.4(vite@5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1))(vue@3.4.26(typescript@5.4.3))':
|
||||
dependencies:
|
||||
vite: 5.2.9(@types/node@20.11.7)(sass@1.71.1)(terser@5.28.1)
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
'@volar/language-core@2.1.2':
|
||||
dependencies:
|
||||
@ -4395,10 +4423,10 @@ snapshots:
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.2.0
|
||||
|
||||
'@vue/compiler-core@3.4.23':
|
||||
'@vue/compiler-core@3.4.26':
|
||||
dependencies:
|
||||
'@babel/parser': 7.24.4
|
||||
'@vue/shared': 3.4.23
|
||||
'@babel/parser': 7.24.5
|
||||
'@vue/shared': 3.4.26
|
||||
entities: 4.5.0
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.2.0
|
||||
@ -4408,10 +4436,10 @@ snapshots:
|
||||
'@vue/compiler-core': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
|
||||
'@vue/compiler-dom@3.4.23':
|
||||
'@vue/compiler-dom@3.4.26':
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.4.23
|
||||
'@vue/shared': 3.4.23
|
||||
'@vue/compiler-core': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
|
||||
'@vue/compiler-sfc@3.4.21':
|
||||
dependencies:
|
||||
@ -4425,13 +4453,13 @@ snapshots:
|
||||
postcss: 8.4.35
|
||||
source-map-js: 1.2.0
|
||||
|
||||
'@vue/compiler-sfc@3.4.23':
|
||||
'@vue/compiler-sfc@3.4.26':
|
||||
dependencies:
|
||||
'@babel/parser': 7.24.4
|
||||
'@vue/compiler-core': 3.4.23
|
||||
'@vue/compiler-dom': 3.4.23
|
||||
'@vue/compiler-ssr': 3.4.23
|
||||
'@vue/shared': 3.4.23
|
||||
'@babel/parser': 7.24.5
|
||||
'@vue/compiler-core': 3.4.26
|
||||
'@vue/compiler-dom': 3.4.26
|
||||
'@vue/compiler-ssr': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.10
|
||||
postcss: 8.4.38
|
||||
@ -4442,10 +4470,10 @@ snapshots:
|
||||
'@vue/compiler-dom': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
|
||||
'@vue/compiler-ssr@3.4.23':
|
||||
'@vue/compiler-ssr@3.4.26':
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.4.23
|
||||
'@vue/shared': 3.4.23
|
||||
'@vue/compiler-dom': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
|
||||
'@vue/devtools-api@6.5.1': {}
|
||||
|
||||
@ -4461,46 +4489,46 @@ snapshots:
|
||||
optionalDependencies:
|
||||
typescript: 5.4.3
|
||||
|
||||
'@vue/reactivity@3.4.23':
|
||||
'@vue/reactivity@3.4.26':
|
||||
dependencies:
|
||||
'@vue/shared': 3.4.23
|
||||
'@vue/shared': 3.4.26
|
||||
|
||||
'@vue/runtime-core@3.4.23':
|
||||
'@vue/runtime-core@3.4.26':
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.4.23
|
||||
'@vue/shared': 3.4.23
|
||||
'@vue/reactivity': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
|
||||
'@vue/runtime-dom@3.4.23':
|
||||
'@vue/runtime-dom@3.4.26':
|
||||
dependencies:
|
||||
'@vue/runtime-core': 3.4.23
|
||||
'@vue/shared': 3.4.23
|
||||
'@vue/runtime-core': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
csstype: 3.1.3
|
||||
|
||||
'@vue/server-renderer@3.4.23(vue@3.4.23(typescript@5.4.3))':
|
||||
'@vue/server-renderer@3.4.26(vue@3.4.26(typescript@5.4.3))':
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.4.23
|
||||
'@vue/shared': 3.4.23
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
'@vue/compiler-ssr': 3.4.26
|
||||
'@vue/shared': 3.4.26
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
'@vue/shared@3.4.21': {}
|
||||
|
||||
'@vue/shared@3.4.23': {}
|
||||
'@vue/shared@3.4.26': {}
|
||||
|
||||
'@vueuse/core@10.8.0(vue@3.4.23(typescript@5.4.3))':
|
||||
'@vueuse/core@10.8.0(vue@3.4.26(typescript@5.4.3))':
|
||||
dependencies:
|
||||
'@types/web-bluetooth': 0.0.20
|
||||
'@vueuse/metadata': 10.8.0
|
||||
'@vueuse/shared': 10.8.0(vue@3.4.23(typescript@5.4.3))
|
||||
vue-demi: 0.14.7(vue@3.4.23(typescript@5.4.3))
|
||||
'@vueuse/shared': 10.8.0(vue@3.4.26(typescript@5.4.3))
|
||||
vue-demi: 0.14.7(vue@3.4.26(typescript@5.4.3))
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
|
||||
'@vueuse/metadata@10.8.0': {}
|
||||
|
||||
'@vueuse/shared@10.8.0(vue@3.4.23(typescript@5.4.3))':
|
||||
'@vueuse/shared@10.8.0(vue@3.4.26(typescript@5.4.3))':
|
||||
dependencies:
|
||||
vue-demi: 0.14.7(vue@3.4.23(typescript@5.4.3))
|
||||
vue-demi: 0.14.7(vue@3.4.26(typescript@5.4.3))
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
@ -5559,6 +5587,8 @@ snapshots:
|
||||
|
||||
graceful-fs@4.2.11: {}
|
||||
|
||||
grapheme-splitter@1.0.4: {}
|
||||
|
||||
graphemer@1.4.0: {}
|
||||
|
||||
gzip-size@6.0.0:
|
||||
@ -6015,10 +6045,10 @@ snapshots:
|
||||
|
||||
mute-stream@0.0.8: {}
|
||||
|
||||
naive-ui@2.38.1(vue@3.4.23(typescript@5.4.3)):
|
||||
naive-ui@2.38.2(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
'@css-render/plugin-bem': 0.15.12(css-render@0.15.12)
|
||||
'@css-render/vue3-ssr': 0.15.12(vue@3.4.23(typescript@5.4.3))
|
||||
'@css-render/vue3-ssr': 0.15.12(vue@3.4.26(typescript@5.4.3))
|
||||
'@types/katex': 0.16.7
|
||||
'@types/lodash': 4.14.202
|
||||
'@types/lodash-es': 4.17.12
|
||||
@ -6033,10 +6063,10 @@ snapshots:
|
||||
lodash-es: 4.17.21
|
||||
seemly: 0.3.8
|
||||
treemate: 0.3.11
|
||||
vdirs: 0.1.8(vue@3.4.23(typescript@5.4.3))
|
||||
vooks: 0.2.12(vue@3.4.23(typescript@5.4.3))
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vueuc: 0.4.58(vue@3.4.23(typescript@5.4.3))
|
||||
vdirs: 0.1.8(vue@3.4.26(typescript@5.4.3))
|
||||
vooks: 0.2.12(vue@3.4.26(typescript@5.4.3))
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
vueuc: 0.4.58(vue@3.4.26(typescript@5.4.3))
|
||||
|
||||
nanoid@3.3.7: {}
|
||||
|
||||
@ -6235,24 +6265,24 @@ snapshots:
|
||||
|
||||
pidtree@0.6.0: {}
|
||||
|
||||
pinia-plugin-persistedstate@3.2.1(pinia@2.1.7(typescript@5.4.3)(vue@3.4.23(typescript@5.4.3))):
|
||||
pinia-plugin-persistedstate@3.2.1(pinia@2.1.7(typescript@5.4.3)(vue@3.4.26(typescript@5.4.3))):
|
||||
dependencies:
|
||||
pinia: 2.1.7(typescript@5.4.3)(vue@3.4.23(typescript@5.4.3))
|
||||
pinia: 2.1.7(typescript@5.4.3)(vue@3.4.26(typescript@5.4.3))
|
||||
|
||||
pinia-shared-state@0.5.1(pinia@2.1.7(typescript@5.4.3)(vue@3.4.23(typescript@5.4.3)))(vue@3.4.23(typescript@5.4.3)):
|
||||
pinia-shared-state@0.5.1(pinia@2.1.7(typescript@5.4.3)(vue@3.4.26(typescript@5.4.3)))(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
broadcast-channel: 7.0.0
|
||||
pinia: 2.1.7(typescript@5.4.3)(vue@3.4.23(typescript@5.4.3))
|
||||
vue-demi: 0.14.7(vue@3.4.23(typescript@5.4.3))
|
||||
pinia: 2.1.7(typescript@5.4.3)(vue@3.4.26(typescript@5.4.3))
|
||||
vue-demi: 0.14.7(vue@3.4.26(typescript@5.4.3))
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
|
||||
pinia@2.1.7(typescript@5.4.3)(vue@3.4.23(typescript@5.4.3)):
|
||||
pinia@2.1.7(typescript@5.4.3)(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
'@vue/devtools-api': 6.5.1
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue-demi: 0.14.6(vue@3.4.23(typescript@5.4.3))
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
vue-demi: 0.14.6(vue@3.4.26(typescript@5.4.3))
|
||||
optionalDependencies:
|
||||
typescript: 5.4.3
|
||||
|
||||
@ -6779,7 +6809,7 @@ snapshots:
|
||||
|
||||
unload@2.4.1: {}
|
||||
|
||||
unplugin-auto-import@0.17.5(@vueuse/core@10.8.0(vue@3.4.23(typescript@5.4.3)))(rollup@4.14.3):
|
||||
unplugin-auto-import@0.17.5(@vueuse/core@10.8.0(vue@3.4.26(typescript@5.4.3)))(rollup@4.14.3):
|
||||
dependencies:
|
||||
'@antfu/utils': 0.7.7
|
||||
'@rollup/pluginutils': 5.1.0(rollup@4.14.3)
|
||||
@ -6790,11 +6820,11 @@ snapshots:
|
||||
unimport: 3.7.1(rollup@4.14.3)
|
||||
unplugin: 1.6.0
|
||||
optionalDependencies:
|
||||
'@vueuse/core': 10.8.0(vue@3.4.23(typescript@5.4.3))
|
||||
'@vueuse/core': 10.8.0(vue@3.4.26(typescript@5.4.3))
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
|
||||
unplugin-vue-components@0.26.0(@babel/parser@7.24.4)(rollup@4.14.3)(vue@3.4.23(typescript@5.4.3)):
|
||||
unplugin-vue-components@0.26.0(@babel/parser@7.24.5)(rollup@4.14.3)(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
'@antfu/utils': 0.7.7
|
||||
'@rollup/pluginutils': 5.1.0(rollup@4.14.3)
|
||||
@ -6806,9 +6836,9 @@ snapshots:
|
||||
minimatch: 9.0.3
|
||||
resolve: 1.22.8
|
||||
unplugin: 1.6.0
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
optionalDependencies:
|
||||
'@babel/parser': 7.24.4
|
||||
'@babel/parser': 7.24.5
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
- supports-color
|
||||
@ -6839,10 +6869,10 @@ snapshots:
|
||||
spdx-correct: 3.2.0
|
||||
spdx-expression-parse: 3.0.1
|
||||
|
||||
vdirs@0.1.8(vue@3.4.23(typescript@5.4.3)):
|
||||
vdirs@0.1.8(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
evtd: 0.2.4
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
verror@1.10.0:
|
||||
dependencies:
|
||||
@ -6861,18 +6891,18 @@ snapshots:
|
||||
sass: 1.71.1
|
||||
terser: 5.28.1
|
||||
|
||||
vooks@0.2.12(vue@3.4.23(typescript@5.4.3)):
|
||||
vooks@0.2.12(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
evtd: 0.2.4
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
vue-demi@0.14.6(vue@3.4.23(typescript@5.4.3)):
|
||||
vue-demi@0.14.6(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
vue-demi@0.14.7(vue@3.4.23(typescript@5.4.3)):
|
||||
vue-demi@0.14.7(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
vue-draggable-plus@0.4.0(@types/sortablejs@1.15.8):
|
||||
dependencies:
|
||||
@ -6891,10 +6921,10 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
vue-router@4.3.0(vue@3.4.23(typescript@5.4.3)):
|
||||
vue-router@4.3.0(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
'@vue/devtools-api': 6.5.1
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
vue-template-compiler@2.7.16:
|
||||
dependencies:
|
||||
@ -6908,26 +6938,26 @@ snapshots:
|
||||
semver: 7.6.0
|
||||
typescript: 5.4.3
|
||||
|
||||
vue@3.4.23(typescript@5.4.3):
|
||||
vue@3.4.26(typescript@5.4.3):
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.4.23
|
||||
'@vue/compiler-sfc': 3.4.23
|
||||
'@vue/runtime-dom': 3.4.23
|
||||
'@vue/server-renderer': 3.4.23(vue@3.4.23(typescript@5.4.3))
|
||||
'@vue/shared': 3.4.23
|
||||
'@vue/compiler-dom': 3.4.26
|
||||
'@vue/compiler-sfc': 3.4.26
|
||||
'@vue/runtime-dom': 3.4.26
|
||||
'@vue/server-renderer': 3.4.26(vue@3.4.26(typescript@5.4.3))
|
||||
'@vue/shared': 3.4.26
|
||||
optionalDependencies:
|
||||
typescript: 5.4.3
|
||||
|
||||
vueuc@0.4.58(vue@3.4.23(typescript@5.4.3)):
|
||||
vueuc@0.4.58(vue@3.4.26(typescript@5.4.3)):
|
||||
dependencies:
|
||||
'@css-render/vue3-ssr': 0.15.12(vue@3.4.23(typescript@5.4.3))
|
||||
'@css-render/vue3-ssr': 0.15.12(vue@3.4.26(typescript@5.4.3))
|
||||
'@juggle/resize-observer': 3.4.0
|
||||
css-render: 0.15.12
|
||||
evtd: 0.2.4
|
||||
seemly: 0.3.8
|
||||
vdirs: 0.1.8(vue@3.4.23(typescript@5.4.3))
|
||||
vooks: 0.2.12(vue@3.4.23(typescript@5.4.3))
|
||||
vue: 3.4.23(typescript@5.4.3)
|
||||
vdirs: 0.1.8(vue@3.4.26(typescript@5.4.3))
|
||||
vooks: 0.2.12(vue@3.4.26(typescript@5.4.3))
|
||||
vue: 3.4.26(typescript@5.4.3)
|
||||
|
||||
wcwidth@1.0.1:
|
||||
dependencies:
|
||||
|
@ -8,8 +8,10 @@
|
||||
<n-dialog-provider>
|
||||
<n-notification-provider :max="notificMax">
|
||||
<n-message-provider :max="messageMax">
|
||||
<slot></slot>
|
||||
<naive-provider-content />
|
||||
<n-modal-provider>
|
||||
<slot></slot>
|
||||
<naive-provider-content />
|
||||
</n-modal-provider>
|
||||
</n-message-provider>
|
||||
</n-notification-provider>
|
||||
</n-dialog-provider>
|
||||
@ -135,6 +137,7 @@ const registerNaiveTools = () => {
|
||||
window.$dialog = useDialog()
|
||||
window.$message = useMessage()
|
||||
window.$notification = useNotification()
|
||||
window.$modal = useModal()
|
||||
}
|
||||
|
||||
const NaiveProviderContent = defineComponent({
|
||||
|
@ -12,7 +12,7 @@
|
||||
:item-size="itemSize"
|
||||
:items="items">
|
||||
<template #default="{ item }">
|
||||
<main
|
||||
<div
|
||||
:key="item.key"
|
||||
class="flex-y-center min-h-58px"
|
||||
:class="[
|
||||
@ -72,7 +72,6 @@
|
||||
class="select-none"
|
||||
:src="item.accountId === userId ? item.avatar : activeItem.avatar"
|
||||
:class="item.accountId === userId ? '' : 'mr-10px'"
|
||||
fallback-src="/logo.png"
|
||||
:render-placeholder="() => null"
|
||||
:intersection-observer-options="{
|
||||
root: '#image-chat-main'
|
||||
@ -218,7 +217,7 @@
|
||||
</n-flex>
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
</n-virtual-list>
|
||||
|
||||
@ -447,7 +446,7 @@ const jumpToReplyMsg = (key: number) => {
|
||||
* @param index 下标
|
||||
* @param id 用户ID
|
||||
*/
|
||||
const addToDomUpdateQueue = (index: number, id: string) => {
|
||||
const addToDomUpdateQueue = (index: number, id: number) => {
|
||||
// 使用 nextTick 确保虚拟列表渲染完最新的项目后进行滚动
|
||||
nextTick(() => {
|
||||
if (!floatFooter.value || id === userId.value) {
|
||||
|
@ -21,9 +21,9 @@ export enum RCodeEnum {
|
||||
/**URL*/
|
||||
export enum URLEnum {
|
||||
/**用户*/
|
||||
USER = '/user',
|
||||
/**文章*/
|
||||
ARTICLE = '/article'
|
||||
USER = '/api/user',
|
||||
/** 用户背包 */
|
||||
USER_BACKPACK = '/api/userBackpack'
|
||||
}
|
||||
|
||||
/** tauri原生跨窗口通信时传输的类型 */
|
||||
|
@ -71,7 +71,7 @@
|
||||
</n-flex>
|
||||
|
||||
<n-flex justify="center" align="center" :size="40">
|
||||
<n-button secondary> 编辑资料 </n-button>
|
||||
<n-button secondary @click="handleEditing"> 编辑资料 </n-button>
|
||||
</n-flex>
|
||||
</n-flex>
|
||||
</n-popover>
|
||||
@ -128,6 +128,43 @@
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- 编辑资料弹窗 -->
|
||||
<n-modal v-model:show="editInfo.show" class="rounded-8px" transform-origin="center" :mask-closable="false">
|
||||
<div class="bg-[--bg-edit] w-480px h-530px box-border flex flex-col">
|
||||
<n-flex vertical :size="6">
|
||||
<n-flex justify="center" class="text-(14px --text-color) select-none pt-6px">编辑资料</n-flex>
|
||||
<svg
|
||||
@click="editInfo.show = false"
|
||||
class="size-14px ml-a cursor-pointer pt-6px select-none absolute right-6px">
|
||||
<use href="#close"></use>
|
||||
</svg>
|
||||
<span class="h-1px w-full bg-[--line-color]"></span>
|
||||
</n-flex>
|
||||
<n-flex vertical :size="20" class="p-22px select-none">
|
||||
<!-- 头像 -->
|
||||
<n-flex justify="center">
|
||||
<n-avatar style="border: 3px solid #fff" round :size="80" :src="editInfo.content.avatar" />
|
||||
</n-flex>
|
||||
|
||||
<n-input
|
||||
ref="inputInstRef"
|
||||
v-model:value="editInfo.content.name"
|
||||
clearable
|
||||
placeholder="请输入你的昵称"
|
||||
type="text"
|
||||
:default-value="editInfo.content.name"
|
||||
show-count
|
||||
:maxlength="8"
|
||||
:count-graphemes="countGraphemes"
|
||||
class="rounded-6px">
|
||||
<template #prefix>
|
||||
<span class="pr-6px text-#909090">昵称</span>
|
||||
</template>
|
||||
</n-input>
|
||||
</n-flex>
|
||||
</div>
|
||||
</n-modal>
|
||||
</main>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@ -141,6 +178,8 @@ import { itemsTop, itemsBottom, moreList } from './config.ts'
|
||||
import { onlineStatus } from '@/stores/onlineStatus.ts'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { setting } from '@/stores/setting.ts'
|
||||
import apis from '@/services/apis.ts'
|
||||
import GraphemeSplitter from 'grapheme-splitter'
|
||||
|
||||
const prefers = matchMedia('(prefers-color-scheme: dark)')
|
||||
const { createWebviewWindow } = useWindow()
|
||||
@ -156,6 +195,14 @@ const infoShow = ref(false)
|
||||
const themeColor = ref(themes.value.content === ThemeEnum.DARK ? 'rgba(63,63,63, 0.2)' : 'rgba(241,241,241, 0.2)')
|
||||
/** 已打开窗口的列表 */
|
||||
const openWindowsList = ref(new Set())
|
||||
/** 编辑资料弹窗 */
|
||||
// TODO 这里考虑是否查接口查实时的用户信息还是直接查本地存储的用户信息 (nyh -> 2024-05-05 01:12:36)
|
||||
const editInfo = ref({
|
||||
show: false,
|
||||
content: {
|
||||
...login.value.accountInfo
|
||||
}
|
||||
})
|
||||
|
||||
/** 跟随系统主题模式切换主题 */
|
||||
const followOS = () => {
|
||||
@ -180,8 +227,26 @@ watchEffect(() => {
|
||||
} else {
|
||||
prefers.removeEventListener('change', followOS)
|
||||
}
|
||||
// 初始化编辑资料弹窗内容
|
||||
if (!editInfo.value.show) {
|
||||
editInfo.value.content = {
|
||||
...login.value.accountInfo
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/** 计算字符长度 */
|
||||
const countGraphemes = (value: string) => {
|
||||
const splitter = new GraphemeSplitter()
|
||||
return splitter.countGraphemes(value)
|
||||
}
|
||||
|
||||
/* 打开并且创建modal */
|
||||
const handleEditing = () => {
|
||||
infoShow.value = false
|
||||
editInfo.value.show = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 统一跳转路由方法
|
||||
* @param url 跳转的路由
|
||||
@ -219,6 +284,9 @@ const closeMenu = (event: any) => {
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
apis.getBadgeList().then((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
/** 页面加载的时候默认显示消息列表 */
|
||||
pageJumps(activeUrl.value)
|
||||
window.addEventListener('click', closeMenu, true)
|
||||
|
@ -25,7 +25,7 @@ export const MockList = ref<MockItem[]>(
|
||||
key: i,
|
||||
avatar: `${avatars}?${i}`,
|
||||
type: type,
|
||||
accountId: `${i}`,
|
||||
accountId: i,
|
||||
accountName: generateRandomString(Math.floor(Math.random() * 10) + 1, type)
|
||||
}
|
||||
})
|
||||
|
@ -1,20 +1,17 @@
|
||||
import { createAxios } from '@/services/request'
|
||||
import urls from '@/services/urls'
|
||||
import type { login, Response } from '@/services/types'
|
||||
import { parameter } from '@/services/types'
|
||||
import type { Response } from '@/services/types'
|
||||
|
||||
const request = createAxios()
|
||||
|
||||
const GET = <T>(url: string, params?: any) => request.get<T, Response>(url, params)
|
||||
const POST = <T>(url: string, params?: any) => request.post<T, Response>(url, params)
|
||||
// const POST = <T>(url: string, params?: any) => request.post<T, Response>(url, params)
|
||||
// const PUT = <T>(url: string, params?: any) => request.put<T, Response>(url, params)
|
||||
// const DELETE = <T>(url: string, params?: any) => request.delete<T, Response>(url, params)
|
||||
|
||||
export default {
|
||||
/**登录 请求*/
|
||||
login: (form: login): Promise<Response> => POST(urls.login, form),
|
||||
/**退出 请求*/
|
||||
logout: (): Promise<Response> => GET(urls.logout),
|
||||
/**获取文章列表*/
|
||||
getArticlePage: (params: parameter): Promise<Response> => GET(urls.articlePage, { params })
|
||||
/** 获取用户信息 */
|
||||
getUserInfo: (): Promise<Response> => GET(urls.getUserInfo),
|
||||
/** 获取徽章列表 */
|
||||
getBadgeList: (): Promise<Response> => GET(urls.getBadgeList)
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'
|
||||
import { userStore } from '@/stores/user.ts'
|
||||
import { setting } from '@/stores/setting.ts'
|
||||
|
||||
/** 是否是测试环境 */
|
||||
const isTest = computed(() => {
|
||||
return setting().login.accountInfo.token === 'test'
|
||||
})
|
||||
|
||||
//请求配置
|
||||
export const createAxios = (config?: AxiosRequestConfig): AxiosInstance => {
|
||||
@ -19,15 +24,25 @@ export const createAxios = (config?: AxiosRequestConfig): AxiosInstance => {
|
||||
instance.interceptors.request.use(
|
||||
function (config: any) {
|
||||
//判断是否有token 根据自己的需求判断
|
||||
const token = userStore().getBearerToken
|
||||
if (token != undefined) {
|
||||
//如果要求携带在参数中
|
||||
const token = setting().login.accountInfo.token
|
||||
if (isTest.value) {
|
||||
// 如果token为'test',阻止请求并返回一个错误对象
|
||||
return Promise.reject(
|
||||
window.$message.create('当前为测试环境,请注意辨别', {
|
||||
type: 'warning',
|
||||
closable: true,
|
||||
duration: 0
|
||||
})
|
||||
)
|
||||
}
|
||||
if (token != void 0) {
|
||||
// //如果要求携带在参数中
|
||||
// config.params = Object.assign({}, config.params, token)
|
||||
// 如果要求携带在请求头中
|
||||
// config.headers = Object.assign({}, config.headers, operate.uploadParameters())
|
||||
config.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||
// 设置请求头
|
||||
config.headers['token'] = token
|
||||
config.headers['Authorization'] = `Bearer ${token}`
|
||||
}
|
||||
return config
|
||||
},
|
||||
@ -98,14 +113,8 @@ export const createAxios = (config?: AxiosRequestConfig): AxiosInstance => {
|
||||
default:
|
||||
error.message = `连接错误${error.response.status}`
|
||||
}
|
||||
} else {
|
||||
// 超时处理
|
||||
if (JSON.stringify(error).includes('timeout')) {
|
||||
error.message = '服务器响应超时,请刷新当前页'
|
||||
} else {
|
||||
error.message = '连接服务器失败'
|
||||
}
|
||||
}
|
||||
if (isTest) return Promise.resolve(error.response)
|
||||
window.$message.error(error.message)
|
||||
/***** 处理结束 *****/
|
||||
return Promise.resolve(error.response)
|
||||
|
@ -3,30 +3,18 @@
|
||||
* 注意:请使用TSDoc规范进行注释,以便在使用时能够获得良好提示。
|
||||
* @see TSDoc规范https://tsdoc.org/
|
||||
**/
|
||||
import { MsgEnum, RCodeEnum, RoomTypeEnum } from '@/enums'
|
||||
import { MsgEnum, RoomTypeEnum } from '@/enums'
|
||||
|
||||
/**响应请求体*/
|
||||
export type Response = {
|
||||
code: RCodeEnum
|
||||
msg: string
|
||||
data: {
|
||||
records: any
|
||||
total: number
|
||||
}
|
||||
fail: boolean
|
||||
/** 成功标识true or false */
|
||||
success: boolean
|
||||
version: string
|
||||
}
|
||||
/**分页搜索*/
|
||||
export type parameter = {
|
||||
pageNum: number
|
||||
pageSize: number
|
||||
name: string
|
||||
}
|
||||
/**登录类型*/
|
||||
export type login = {
|
||||
username: string
|
||||
password: string
|
||||
/** 错误码 */
|
||||
errCode: number
|
||||
/** 错误消息 */
|
||||
errMsg: string
|
||||
/** 数据 */
|
||||
data: any
|
||||
}
|
||||
|
||||
/** ===================================================== */
|
||||
@ -151,6 +139,6 @@ export type MockItem = {
|
||||
key: number
|
||||
type: RoomTypeEnum
|
||||
avatar: string
|
||||
accountId: string
|
||||
accountId: number
|
||||
accountName: string
|
||||
}
|
||||
|
@ -5,7 +5,8 @@ const { PROD, VITE_SERVICE_URL } = import.meta.env
|
||||
const prefix = PROD ? VITE_SERVICE_URL : ''
|
||||
|
||||
export default {
|
||||
login: `${prefix + URLEnum.USER}/login`,
|
||||
logout: `${prefix + URLEnum.USER}/logout`,
|
||||
articlePage: `${prefix + URLEnum.ARTICLE}/page`
|
||||
/** 获取用户信息 */
|
||||
getUserInfo: `${prefix + URLEnum.USER}/userInfo`,
|
||||
/** 获取徽章列表 */
|
||||
getBadgeList: `${prefix + URLEnum.USER}/badges`
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ export const setting = defineStore(StoresEnum.SETTING, {
|
||||
password: '',
|
||||
name: '',
|
||||
avatar: '',
|
||||
uid: ''
|
||||
uid: 0,
|
||||
token: ''
|
||||
}
|
||||
},
|
||||
/** 聊天设置 */
|
||||
|
@ -61,6 +61,8 @@
|
||||
--bg-reply-img-count: #e3e3e3;
|
||||
// 主页面面板分割线样式
|
||||
--split-color: #f1f1f1;
|
||||
// 编辑资料背景颜色
|
||||
--bg-edit: #f0f0f0;
|
||||
}
|
||||
|
||||
html[data-theme='dark'] {
|
||||
@ -125,6 +127,8 @@ html[data-theme='dark'] {
|
||||
--bg-reply-img-count: #505050;
|
||||
// 主页面面板分割线样式
|
||||
--split-color: #3b3b3b;
|
||||
// 编辑资料背景颜色
|
||||
--bg-edit: #262626;
|
||||
}
|
||||
/**! end */
|
||||
// 线性动画
|
||||
|
1
src/typings/auto-imports.d.ts
vendored
1
src/typings/auto-imports.d.ts
vendored
@ -55,6 +55,7 @@ declare global {
|
||||
const useDialog: typeof import('naive-ui')['useDialog']
|
||||
const useLoadingBar: typeof import('naive-ui')['useLoadingBar']
|
||||
const useMessage: typeof import('naive-ui')['useMessage']
|
||||
const useModal: typeof import('naive-ui')['useModal']
|
||||
const useNotification: typeof import('naive-ui')['useNotification']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const watch: typeof import('vue')['watch']
|
||||
|
6
src/typings/components.d.ts
vendored
6
src/typings/components.d.ts
vendored
@ -26,11 +26,14 @@ declare module 'vue' {
|
||||
NBadge: typeof import('naive-ui')['NBadge']
|
||||
NButton: typeof import('naive-ui')['NButton']
|
||||
NButtonGroup: typeof import('naive-ui')['NButtonGroup']
|
||||
NC: typeof import('naive-ui')['NC']
|
||||
NCard: typeof import('naive-ui')['NCard']
|
||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||
NCollapse: typeof import('naive-ui')['NCollapse']
|
||||
NCollapseItem: typeof import('naive-ui')['NCollapseItem']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NDropdown: typeof import('naive-ui')['NDropdown']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NFlex: typeof import('naive-ui')['NFlex']
|
||||
@ -42,6 +45,7 @@ declare module 'vue' {
|
||||
NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider']
|
||||
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
|
||||
NModal: typeof import('naive-ui')['NModal']
|
||||
NModalProvider: typeof import('naive-ui')['NModalProvider']
|
||||
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
|
||||
NPopover: typeof import('naive-ui')['NPopover']
|
||||
NPopselect: typeof import('naive-ui')['NPopselect']
|
||||
@ -50,11 +54,11 @@ declare module 'vue' {
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSelect: typeof import('naive-ui')['NSelect']
|
||||
NSkeleton: typeof import('naive-ui')['NSkeleton']
|
||||
NSplit: typeof import('naive-ui')['NSplit']
|
||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||
NTabPane: typeof import('naive-ui')['NTabPane']
|
||||
NTabs: typeof import('naive-ui')['NTabs']
|
||||
NTooltip: typeof import('naive-ui')['NTooltip']
|
||||
NUpload: typeof import('naive-ui')['NUpload']
|
||||
NVirtualList: typeof import('naive-ui')['NVirtualList']
|
||||
RenderMessage: typeof import('./../components/rightBox/renderMessage/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
|
1
src/typings/env.d.ts
vendored
1
src/typings/env.d.ts
vendored
@ -71,4 +71,5 @@ declare interface Window {
|
||||
$notification: ReturnType<typeof useNotification>
|
||||
$loadingBar: ReturnType<typeof useLoadingBar>
|
||||
$dialog: ReturnType<typeof useDialog>
|
||||
$modal: ReturnType<typeof useModal>
|
||||
}
|
||||
|
3
src/typings/stores.d.ts
vendored
3
src/typings/stores.d.ts
vendored
@ -25,7 +25,8 @@ declare namespace STO {
|
||||
password?: string
|
||||
name: string
|
||||
avatar: string
|
||||
uid: string
|
||||
uid: number
|
||||
token: string
|
||||
}
|
||||
}
|
||||
/** 聊天设置 */
|
||||
|
@ -162,7 +162,8 @@ const info = ref({
|
||||
account: '',
|
||||
password: '',
|
||||
avatar: '',
|
||||
name: ''
|
||||
name: '',
|
||||
uid: 0
|
||||
})
|
||||
/** 是否中断登录 */
|
||||
const interruptLogin = ref(false)
|
||||
@ -180,28 +181,32 @@ const accountOption = ref<STO.Setting['login']['accountInfo'][]>([
|
||||
password: '123456',
|
||||
name: '超级GG帮',
|
||||
avatar: 'https://picsum.photos/140?1',
|
||||
uid: '123456'
|
||||
uid: 123456,
|
||||
token: 'test'
|
||||
},
|
||||
{
|
||||
account: 'hula1',
|
||||
password: '123456',
|
||||
name: '二狗子',
|
||||
avatar: 'https://picsum.photos/140?2',
|
||||
uid: '123456'
|
||||
uid: 123456,
|
||||
token: 'test'
|
||||
},
|
||||
{
|
||||
account: 'hula2',
|
||||
password: '123456',
|
||||
name: '李山离',
|
||||
avatar: 'https://picsum.photos/140?3',
|
||||
uid: '123456'
|
||||
uid: 123456,
|
||||
token: 'test'
|
||||
},
|
||||
{
|
||||
account: 'hula3',
|
||||
password: '123456',
|
||||
name: '牛什么呢',
|
||||
avatar: 'https://picsum.photos/140?4',
|
||||
uid: '123456'
|
||||
uid: 123456,
|
||||
token: 'test'
|
||||
}
|
||||
])
|
||||
const accountPH = ref('输入HuLa账号')
|
||||
@ -243,11 +248,12 @@ const delAccount = (index: number) => {
|
||||
* @param item 账户信息
|
||||
* */
|
||||
const giveAccount = (item: STO.Setting['login']['accountInfo']) => {
|
||||
const { account, password, avatar, name } = item
|
||||
const { account, password, avatar, name, uid } = item
|
||||
info.value.account = account || ''
|
||||
info.value.password = password || ''
|
||||
info.value.avatar = avatar
|
||||
info.value.name = name
|
||||
info.value.uid = uid
|
||||
arrowStatus.value = false
|
||||
}
|
||||
|
||||
@ -264,7 +270,8 @@ const loginWin = () => {
|
||||
password: info.value.password,
|
||||
avatar: info.value.avatar,
|
||||
name: info.value.name,
|
||||
uid: '123456'
|
||||
uid: info.value.uid,
|
||||
token: 'test'
|
||||
})
|
||||
await setLoginState()
|
||||
}
|
||||
|
@ -80,7 +80,8 @@ const handleLoginSuccess = async (e: any) => {
|
||||
settingStore.setAccountInfo({
|
||||
avatar: e.data.avatar,
|
||||
name: e.data.name,
|
||||
uid: e.data.uid
|
||||
uid: e.data.uid,
|
||||
token: e.data.token
|
||||
})
|
||||
await setLoginState()
|
||||
}, 1000)
|
||||
|
@ -25,7 +25,8 @@
|
||||
"paths": {
|
||||
"~/*": ["./*"],
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
|
@ -45,7 +45,7 @@ export default defineConfig(({ mode }: ConfigEnv) => {
|
||||
vueJsx(), // 开启jsx功能
|
||||
unocss(), // 开启unocss
|
||||
AutoImport({
|
||||
imports: ['vue', { 'naive-ui': ['useDialog', 'useMessage', 'useNotification', 'useLoadingBar'] }],
|
||||
imports: ['vue', { 'naive-ui': ['useDialog', 'useMessage', 'useNotification', 'useLoadingBar', 'useModal'] }],
|
||||
dts: 'src/typings/auto-imports.d.ts'
|
||||
}),
|
||||
/**自动导入组件,但是不会自动导入jsx和tsx*/
|
||||
@ -92,6 +92,17 @@ export default defineConfig(({ mode }: ConfigEnv) => {
|
||||
clearScreen: false,
|
||||
// 2. tauri expects a fixed port, fail if that port is not available
|
||||
server: {
|
||||
//配置跨域
|
||||
proxy: {
|
||||
'/api': {
|
||||
// “/api” 以及前置字符串会被替换为真正域名
|
||||
target: config.VITE_SERVICE_URL, // 请求域名
|
||||
changeOrigin: true, // 是否跨域
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
},
|
||||
hmr: true, // 热更新
|
||||
cors: true, // 配置 CORS
|
||||
host: '0.0.0.0',
|
||||
port: 6130,
|
||||
strictPort: true,
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user