feat:小bug版

This commit is contained in:
Fromsko 2024-09-21 00:49:51 +08:00
parent 338fab7bf5
commit ec287f0228
11 changed files with 630 additions and 91 deletions

View File

@ -1 +1,8 @@
/// <reference types="vite/client" />
declare module "*.vue" {
import type { DefineComponent } from "vue";
const vueComponent: DefineComponent<{}, {}, any>;
export default vueComponent;
}

View File

@ -11,6 +11,7 @@
"type-check": "vue-tsc --build --force"
},
"dependencies": {
"ant-design-vue": "^4.2.5",
"vue": "^3.4.29",
"vue-router": "^4.3.3"
},

View File

@ -8,6 +8,9 @@ importers:
.:
dependencies:
ant-design-vue:
specifier: ^4.2.5
version: 4.2.5(vue@3.5.6(typescript@5.4.5))
vue:
specifier: ^3.4.29
version: 3.5.6(typescript@5.4.5)
@ -42,6 +45,17 @@ importers:
packages:
'@ant-design/colors@6.0.0':
resolution: {integrity: sha512-qAZRvPzfdWHtfameEGP2Qvuf838NhergR35o+EuVyB5XvSA98xod5r4utvi4TJ3ywmevm290g9nsCG5MryrdWQ==}
'@ant-design/icons-svg@4.4.2':
resolution: {integrity: sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==}
'@ant-design/icons-vue@7.0.1':
resolution: {integrity: sha512-eCqY2unfZK6Fe02AwFlDHLfoyEFreP6rBwAZMIJ1LugmfMiVgwWDYlp1YsRugaPtICYOabV1iWxXdP12u9U43Q==}
peerDependencies:
vue: '>=3.0.3'
'@babel/helper-string-parser@7.24.8':
resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==}
engines: {node: '>=6.9.0'}
@ -55,10 +69,24 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
'@babel/runtime@7.25.6':
resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==}
engines: {node: '>=6.9.0'}
'@babel/types@7.25.6':
resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==}
engines: {node: '>=6.9.0'}
'@ctrl/tinycolor@3.6.1':
resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==}
engines: {node: '>=10'}
'@emotion/hash@0.9.2':
resolution: {integrity: sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==}
'@emotion/unitless@0.8.1':
resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==}
'@esbuild/aix-ppc64@0.21.5':
resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==}
engines: {node: '>=12'}
@ -200,11 +228,68 @@ packages:
'@jridgewell/sourcemap-codec@1.5.0':
resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
'@rollup/rollup-android-arm-eabi@4.22.1':
resolution: {integrity: sha512-GrXxNVBes13Q3wSBjdZlmu4VulFhfNs1eP2/pX5dmx6cE1XgfV2/BfqdGt4d2Z7Zqp+qnYSf7zvIB4buc+2DwA==}
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm64@4.22.1':
resolution: {integrity: sha512-Cr/dpKRc4tjK13SCZJrSDXSaKjL/fekn04BWMCJ+Pj4vPCp8rixvtArrnWUYycOdRNi7kx3MSClcvEP7C2nvCw==}
cpu: [arm64]
os: [android]
'@rollup/rollup-darwin-arm64@4.22.1':
resolution: {integrity: sha512-IwEyoeCZoO1lpY5Er5t3UK/Aq5q2W/ubLmu3pYW4as0htn4NbJagBaVNr1aVhRTXUxrYvcPhxQCqodShnocLdA==}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.22.1':
resolution: {integrity: sha512-LSbJhEOTz557VBcJOWspdGyiFbMTNgLxbWnup7bDj1elpNTK04E3M1qLlvGzPKPmk+uG6XlbT8xAUSKkyn0g8w==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-linux-arm-gnueabihf@4.22.1':
resolution: {integrity: sha512-F4DgRk//u604Np1eFoGUzE9TgGE6LMvjnX2tM24ePB34JlED9utc4T3iK5x8CWC/agH+zuN7q/hJF5AtWR+JOA==}
cpu: [arm]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-arm-musleabihf@4.22.1':
resolution: {integrity: sha512-Gl5pbijcb6QOJRvHkmU/O1G65ZnKxwSHhPQRuGdmcxmX/mBM+wNHoai7wvpCoPVsdhkc+KUqgu/MydP8wovGAA==}
cpu: [arm]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-arm64-gnu@4.22.1':
resolution: {integrity: sha512-GsvZqPloVOrh3G2nmZmwNSNGqWLf3L3a0nFDO1zecwucAYxEFgZkrvqQrVMT+zUjChaHPBp0eoTOQMWSKFcV8w==}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-arm64-musl@4.22.1':
resolution: {integrity: sha512-+vZ1jrJeEEYLbMqeKDfgcl8v7zjymdAGTr7xUdQL6c4nC+S+BZHo3Mrp/9ij2qpAveC0Iaz9DIiFplcO0joapQ==}
cpu: [arm64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-powerpc64le-gnu@4.22.1':
resolution: {integrity: sha512-6psD9nKw+wLj9bMhArTkzKt5etA6kb+cBJQws4MovI9gQSRkdX4nyYZofBfgTtaZtymQl7uRfe1I75guePal5A==}
cpu: [ppc64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-riscv64-gnu@4.22.1':
resolution: {integrity: sha512-xzbqImk1h5abj0bPU5XQVrqBhLHl2zTygG6+vES2TrgmNSiaPzn39aqI8QtdqmGYz507ZVI2qocTTfVwW23SmQ==}
cpu: [riscv64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-s390x-gnu@4.22.1':
resolution: {integrity: sha512-Hz5iwqYv08PpEC75z0GAgLlOY+cLAb0PVx578mLW0naugNfG0WQqoDzQoJWiivmtTdgmwoH5YXDnjZJb7MDlhA==}
cpu: [s390x]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-x64-gnu@4.22.1':
resolution: {integrity: sha512-ot1DPlQZGGiZYNyE/PF3jbT6juuG0W5oiguHQEvjoZZ3+FSxMfdJnBz1P71QeqICSOlSFG9Z31oA/uXyuxDEVw==}
cpu: [x64]
@ -217,11 +302,24 @@ packages:
os: [linux]
libc: [musl]
'@rollup/rollup-win32-arm64-msvc@4.22.1':
resolution: {integrity: sha512-jDS/ShZxlA3HKtgm25CcbApOVsr/0Zkdu/E+3xK4UO0PT912yqyh7jNpTmZZJAiPDQoSDI9FOqrjSbnlpW6IFg==}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.22.1':
resolution: {integrity: sha512-yNEeuvH2b+susSgUCfpRelIRjB1CmErHyqA7KsQ/NCjY401rpChVqw5df/H5AUPCKNDqgBMbtrtl9F6z7N9LTg==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.22.1':
resolution: {integrity: sha512-UgdylcqjcgJSNMhrjMJpJ4T3zriTmiUd2COh1mJHwDShrhhMkpZ/j4M5e4GsvBFviaxtrJtufr0FnKfm2UfOSw==}
cpu: [x64]
os: [win32]
'@simonwep/pickr@1.8.2':
resolution: {integrity: sha512-/l5w8BIkrpP6n1xsetx9MWPWlU6OblN5YgZZphxan0Tq4BByTCETL6lyIeY8lagalS2Nbt4F2W034KHLIiunKA==}
'@tsconfig/node20@20.1.4':
resolution: {integrity: sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==}
@ -297,15 +395,33 @@ packages:
resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
engines: {node: '>=12'}
ant-design-vue@4.2.5:
resolution: {integrity: sha512-dh5CBXSaxJZBFQBd156sOUuZPfxI7pZsNXDYpHNBt/JyKZoYlbetRp/nJmSragS2Oo0mVC23Ote+TQSGc0TX6g==}
engines: {node: '>=12.22.0'}
peerDependencies:
vue: '>=3.2.0'
array-tree-filter@2.1.0:
resolution: {integrity: sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==}
async-validator@4.2.5:
resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==}
balanced-match@1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
brace-expansion@2.0.1:
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
compute-scroll-into-view@1.0.20:
resolution: {integrity: sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==}
computeds@0.0.1:
resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==}
core-js@3.38.1:
resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==}
cross-spawn@7.0.3:
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
engines: {node: '>= 8'}
@ -313,9 +429,18 @@ packages:
csstype@3.1.3:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
dayjs@1.11.13:
resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
de-indent@1.0.2:
resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==}
dom-align@1.12.4:
resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==}
dom-scroll-into-view@2.0.1:
resolution: {integrity: sha512-bvVTQe1lfaUr1oFzZX80ce9KLDlZ3iU+XGNE/bz9HnGdklTieqsbmsLHe+rT2XWqopvL0PckkYqN7ksmm5pe3w==}
entities@4.5.0:
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
@ -337,13 +462,30 @@ packages:
resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
hasBin: true
is-plain-object@3.0.1:
resolution: {integrity: sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==}
engines: {node: '>=0.10.0'}
isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
json-parse-even-better-errors@3.0.2:
resolution: {integrity: sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
lodash-es@4.17.21:
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
lodash@4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
loose-envify@1.4.0:
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
hasBin: true
magic-string@0.30.11:
resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==}
@ -363,6 +505,9 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
nanopop@2.4.2:
resolution: {integrity: sha512-NzOgmMQ+elxxHeIha+OG/Pv3Oc3p4RU2aBhwWwAqDpXrdTbtRylbRLQztLy8dMMwfl6pclznBdfUhccEn9ZIzw==}
npm-normalize-package-bin@3.0.1:
resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
@ -395,16 +540,28 @@ packages:
resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
regenerator-runtime@0.14.1:
resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}
resize-observer-polyfill@1.5.1:
resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==}
rollup@4.22.1:
resolution: {integrity: sha512-rit4zY5uPX0jrzTidez3rFr0MD30Rpu3S8VxwXFDfBVAzkk9U28s5MF3/R6u5bIHN6CQnf7zbiwVQbqBkyrU/A==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
scroll-into-view-if-needed@2.2.31:
resolution: {integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==}
semver@7.6.3:
resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
engines: {node: '>=10'}
hasBin: true
shallow-equal@1.2.1:
resolution: {integrity: sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==}
shebang-command@2.0.0:
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
engines: {node: '>=8'}
@ -420,6 +577,13 @@ packages:
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
stylis@4.3.4:
resolution: {integrity: sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==}
throttle-debounce@5.0.2:
resolution: {integrity: sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==}
engines: {node: '>=12.22'}
to-fast-properties@2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'}
@ -477,6 +641,12 @@ packages:
peerDependencies:
typescript: '>=5.0.0'
vue-types@3.0.2:
resolution: {integrity: sha512-IwUC0Aq2zwaXqy74h4WCvFCUtoV0iSWr0snWnE9TnU18S66GAQyqQbRf2qfJtUuiFsBf6qp0MEwdonlwznlcrw==}
engines: {node: '>=10.15.0'}
peerDependencies:
vue: ^3.0.0
vue@3.5.6:
resolution: {integrity: sha512-zv+20E2VIYbcJOzJPUWp03NOGFhMmpCKOfSxVTmCYyYFFko48H9tmuQFzYj7tu4qX1AeXlp9DmhIP89/sSxxhw==}
peerDependencies:
@ -485,6 +655,9 @@ packages:
typescript:
optional: true
warning@4.0.3:
resolution: {integrity: sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==}
which@2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
@ -492,6 +665,18 @@ packages:
snapshots:
'@ant-design/colors@6.0.0':
dependencies:
'@ctrl/tinycolor': 3.6.1
'@ant-design/icons-svg@4.4.2': {}
'@ant-design/icons-vue@7.0.1(vue@3.5.6(typescript@5.4.5))':
dependencies:
'@ant-design/colors': 6.0.0
'@ant-design/icons-svg': 4.4.2
vue: 3.5.6(typescript@5.4.5)
'@babel/helper-string-parser@7.24.8': {}
'@babel/helper-validator-identifier@7.24.7': {}
@ -500,12 +685,22 @@ snapshots:
dependencies:
'@babel/types': 7.25.6
'@babel/runtime@7.25.6':
dependencies:
regenerator-runtime: 0.14.1
'@babel/types@7.25.6':
dependencies:
'@babel/helper-string-parser': 7.24.8
'@babel/helper-validator-identifier': 7.24.7
to-fast-properties: 2.0.0
'@ctrl/tinycolor@3.6.1': {}
'@emotion/hash@0.9.2': {}
'@emotion/unitless@0.8.1': {}
'@esbuild/aix-ppc64@0.21.5':
optional: true
@ -577,18 +772,59 @@ snapshots:
'@jridgewell/sourcemap-codec@1.5.0': {}
'@rollup/rollup-android-arm-eabi@4.22.1':
optional: true
'@rollup/rollup-android-arm64@4.22.1':
optional: true
'@rollup/rollup-darwin-arm64@4.22.1':
optional: true
'@rollup/rollup-darwin-x64@4.22.1':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.22.1':
optional: true
'@rollup/rollup-linux-arm-musleabihf@4.22.1':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.22.1':
optional: true
'@rollup/rollup-linux-arm64-musl@4.22.1':
optional: true
'@rollup/rollup-linux-powerpc64le-gnu@4.22.1':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.22.1':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.22.1':
optional: true
'@rollup/rollup-linux-x64-gnu@4.22.1':
optional: true
'@rollup/rollup-linux-x64-musl@4.22.1':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.22.1':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.22.1':
optional: true
'@rollup/rollup-win32-x64-msvc@4.22.1':
optional: true
'@simonwep/pickr@1.8.2':
dependencies:
core-js: 3.38.1
nanopop: 2.4.2
'@tsconfig/node20@20.1.4': {}
'@types/estree@1.0.5': {}
@ -692,14 +928,48 @@ snapshots:
ansi-styles@6.2.1: {}
ant-design-vue@4.2.5(vue@3.5.6(typescript@5.4.5)):
dependencies:
'@ant-design/colors': 6.0.0
'@ant-design/icons-vue': 7.0.1(vue@3.5.6(typescript@5.4.5))
'@babel/runtime': 7.25.6
'@ctrl/tinycolor': 3.6.1
'@emotion/hash': 0.9.2
'@emotion/unitless': 0.8.1
'@simonwep/pickr': 1.8.2
array-tree-filter: 2.1.0
async-validator: 4.2.5
csstype: 3.1.3
dayjs: 1.11.13
dom-align: 1.12.4
dom-scroll-into-view: 2.0.1
lodash: 4.17.21
lodash-es: 4.17.21
resize-observer-polyfill: 1.5.1
scroll-into-view-if-needed: 2.2.31
shallow-equal: 1.2.1
stylis: 4.3.4
throttle-debounce: 5.0.2
vue: 3.5.6(typescript@5.4.5)
vue-types: 3.0.2(vue@3.5.6(typescript@5.4.5))
warning: 4.0.3
array-tree-filter@2.1.0: {}
async-validator@4.2.5: {}
balanced-match@1.0.2: {}
brace-expansion@2.0.1:
dependencies:
balanced-match: 1.0.2
compute-scroll-into-view@1.0.20: {}
computeds@0.0.1: {}
core-js@3.38.1: {}
cross-spawn@7.0.3:
dependencies:
path-key: 3.1.1
@ -708,8 +978,14 @@ snapshots:
csstype@3.1.3: {}
dayjs@1.11.13: {}
de-indent@1.0.2: {}
dom-align@1.12.4: {}
dom-scroll-into-view@2.0.1: {}
entities@4.5.0: {}
esbuild@0.21.5:
@ -745,10 +1021,22 @@ snapshots:
he@1.2.0: {}
is-plain-object@3.0.1: {}
isexe@2.0.0: {}
js-tokens@4.0.0: {}
json-parse-even-better-errors@3.0.2: {}
lodash-es@4.17.21: {}
lodash@4.17.21: {}
loose-envify@1.4.0:
dependencies:
js-tokens: 4.0.0
magic-string@0.30.11:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
@ -763,6 +1051,8 @@ snapshots:
nanoid@3.3.7: {}
nanopop@2.4.2: {}
npm-normalize-package-bin@3.0.1: {}
npm-run-all2@6.2.3:
@ -794,18 +1084,40 @@ snapshots:
json-parse-even-better-errors: 3.0.2
npm-normalize-package-bin: 3.0.1
regenerator-runtime@0.14.1: {}
resize-observer-polyfill@1.5.1: {}
rollup@4.22.1:
dependencies:
'@types/estree': 1.0.5
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.22.1
'@rollup/rollup-android-arm64': 4.22.1
'@rollup/rollup-darwin-arm64': 4.22.1
'@rollup/rollup-darwin-x64': 4.22.1
'@rollup/rollup-linux-arm-gnueabihf': 4.22.1
'@rollup/rollup-linux-arm-musleabihf': 4.22.1
'@rollup/rollup-linux-arm64-gnu': 4.22.1
'@rollup/rollup-linux-arm64-musl': 4.22.1
'@rollup/rollup-linux-powerpc64le-gnu': 4.22.1
'@rollup/rollup-linux-riscv64-gnu': 4.22.1
'@rollup/rollup-linux-s390x-gnu': 4.22.1
'@rollup/rollup-linux-x64-gnu': 4.22.1
'@rollup/rollup-linux-x64-musl': 4.22.1
'@rollup/rollup-win32-arm64-msvc': 4.22.1
'@rollup/rollup-win32-ia32-msvc': 4.22.1
'@rollup/rollup-win32-x64-msvc': 4.22.1
fsevents: 2.3.3
scroll-into-view-if-needed@2.2.31:
dependencies:
compute-scroll-into-view: 1.0.20
semver@7.6.3: {}
shallow-equal@1.2.1: {}
shebang-command@2.0.0:
dependencies:
shebang-regex: 3.0.0
@ -816,6 +1128,10 @@ snapshots:
source-map-js@1.2.1: {}
stylis@4.3.4: {}
throttle-debounce@5.0.2: {}
to-fast-properties@2.0.0: {}
typescript@5.4.5: {}
@ -845,6 +1161,11 @@ snapshots:
semver: 7.6.3
typescript: 5.4.5
vue-types@3.0.2(vue@3.5.6(typescript@5.4.5)):
dependencies:
is-plain-object: 3.0.1
vue: 3.5.6(typescript@5.4.5)
vue@3.5.6(typescript@5.4.5):
dependencies:
'@vue/compiler-dom': 3.5.6
@ -855,6 +1176,10 @@ snapshots:
optionalDependencies:
typescript: 5.4.5
warning@4.0.3:
dependencies:
loose-envify: 1.4.0
which@2.0.2:
dependencies:
isexe: 2.0.0

View File

@ -1,85 +1,24 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
<template>
<div>
<FloatingChatButton />
<RouterView>
<HelloWorld></HelloWorld>
</RouterView>
</div>
</template>
<script setup>
import FloatingChatButton from '@/components/chat/FloatingChatButton.vue'
import { RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<HelloWorld msg="You did it!" />
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</div>
</header>
<RouterView />
</template>
<style scoped>
header {
line-height: 1.5;
max-height: 100vh;
}
.logo {
display: block;
margin: 0 auto 2rem;
}
nav {
width: 100%;
font-size: 12px;
text-align: center;
margin-top: 2rem;
}
nav a.router-link-exact-active {
color: var(--color-text);
}
nav a.router-link-exact-active:hover {
background-color: transparent;
}
nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
}
nav a:first-of-type {
border: 0;
}
@media (min-width: 1024px) {
header {
display: flex;
place-items: center;
padding-right: calc(var(--section-gap) / 2);
}
.logo {
margin: 0 2rem 0 0;
}
header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
}
nav {
text-align: left;
margin-left: -1rem;
font-size: 1rem;
padding: 1rem 0;
margin-top: 1rem;
}
<style>
#app {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #f0f0f0;
}
</style>

View File

@ -0,0 +1,182 @@
<template>
<div class="chat-window">
<div class="chat-header">
<Avatar class="avatar-ct" :size="64" />
<span class="chat-username">{{ chatName }}</span>
<Button class="close-button" @click="$emit('close')">×</Button>
</div>
<div
class="message-container"
ref="messageContainerRef"
@contextmenu.prevent="handleContextMenu"
>
<List :data-source="messages" :render-item="renderMessage"></List>
</div>
<div class="chat-input">
<TextArea
v-model="inputMessage"
@keydown="handleKeyDown"
:autosize="{ minRows: 1, maxRows: 6 }"
/>
<Button
type="primary"
@click="handleUserSendMsg"
:disabled="!inputMessage.trim()"
>发送</Button
>
<div
class="context-menu"
v-show="contextMenu.visible"
:style="{ top: contextMenu.y + 'px', left: contextMenu.x + 'px' }"
>
<div @click="changeAI">更换GPT</div>
<div @click="clearChat">清空聊天</div>
<div @click="exportChatAsImage">导出图片</div>
</div>
</div>
</div>
</template>
<script>
import { Avatar, Input, List } from 'ant-design-vue'
import { defineComponent, onBeforeUnmount, onMounted, ref } from 'vue'
const { TextArea } = Input
export default defineComponent({
components: {
Avatar,
List,
},
setup(props, { emit }) {
const messages = ref([])
const inputMessage = ref('')
const connected = ref(true)
const isModalVisible = ref(false)
const contextMenu = ref({ visible: false, x: 0, y: 0 })
const messageContainerRef = ref(null)
const chatName = 'Kbot'
const handleContextMenu = (event) => {
contextMenu.value = {
visible: true,
x: event.clientX,
y: event.clientY,
}
}
const closeContextMenu = () => {
contextMenu.value = { visible: false, x: 0, y: 0 }
}
const handleKeyDown = (e) => {
if (e.key === 'Enter' && e.ctrlKey) {
handleUserSendMsg()
}
}
const handleUserSendMsg = () => {
if (inputMessage.value.trim() !== '') {
messages.value.push({
text: inputMessage.value,
fromUser: true,
})
//
inputMessage.value = ''
}
}
const renderMessage = (message) => {}
onMounted(() => {
// WebSocket
})
onBeforeUnmount(() => {
// WebSocket
})
return {
messages,
inputMessage,
connected,
isModalVisible,
contextMenu,
messageContainerRef,
handleKeyDown,
handleUserSendMsg,
closeContextMenu,
changeAI: () => {},
clearChat: () => {
messages.value = []
},
exportChatAsImage: () => {},
}
},
})
</script>
<style scoped>
.chat-window {
width: 300px;
height: 400px;
border: 1px solid #ccc;
position: fixed;
bottom: 30px;
right: 40px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
}
.chat-header {
display: flex;
align-items: center;
padding: 10px;
background-color: #f0f0f0;
border-bottom: 1px solid #ccc;
}
.chat-username {
margin-left: 10px;
font-weight: bold;
}
.message-container {
flex: 1;
overflow-y: auto;
padding: 10px;
}
.chat-input {
display: flex;
align-items: center;
padding: 10px;
border-top: 1px solid #ccc;
}
.context-menu {
position: absolute;
background-color: white;
border: 1px solid #ccc;
z-index: 1000;
}
.context-menu div {
padding: 8px;
cursor: pointer;
}
.context-menu div:hover {
background-color: #f0f0f0;
}
.close-button {
margin-left: auto;
background: none;
border: none;
font-size: 16px;
cursor: pointer;
}
</style>

View File

@ -0,0 +1,53 @@
<template>
<div @click="handleButtonClick" class="floating-chat-button">
<Avatar class="avatar" :size="64" />
<div :style="dotStyle"></div>
<ChatWindow v-if="chatVisible" @close="chatVisible = false" @connect="connected = true" @disconnect="connected = false" />
</div>
</template>
<script>
import { ref, computed } from 'vue';
import { Avatar } from 'ant-design-vue';
import ChatWindow from './ChatWindow.vue';
export default {
components: {
Avatar,
ChatWindow,
},
setup() {
const chatVisible = ref(false);
const connected = ref(false);
const handleButtonClick = () => {
chatVisible.value = !chatVisible.value;
};
const dotStyle = computed(() => ({
bottom: '30px',
width: '15px',
height: '15px',
position: 'fixed',
borderRadius: '50%',
display: 'inline-block',
backgroundColor: connected.value ? 'red' : 'green',
}));
return {
chatVisible,
connected,
handleButtonClick,
dotStyle,
};
},
};
</script>
<style scoped>
.floating-chat-button {
right: 40px;
bottom: 30px;
position: fixed;
}
</style>

6
components_vue3/src/vue-shim.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference types="vite/client" />
declare module '*.vue' {
import { defineComponent } from 'vue';
const component: ReturnType<typeof defineComponent>;
export default component;
}

View File

@ -1,11 +1,11 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]

View File

@ -1,11 +1,28 @@
{
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true, // js/ts false
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"noImplicitThis": true, // js/ts false
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
{
"path": "./tsconfig.app.json"
}
]
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"src",
"src/typings/*.d.ts"
],
"exclude": ["node_modules"]
}

View File

@ -11,7 +11,6 @@
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]

View File

@ -0,0 +1,10 @@
{
"extends": "./tsconfig.app.json",
"exclude": [],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
"lib": [],
"types": ["node", "jsdom"]
}
}