💄 处理转义

This commit is contained in:
目棃
2024-12-27 14:20:34 +08:00
parent 00ebacac23
commit f6ae5b335a
11 changed files with 340 additions and 123 deletions

View File

@@ -5,10 +5,11 @@ extends:
- stylelint-config-standard-vue
- stylelint-config-idiomatic-order
plugins:
- stylelint-scss
- stylelint-prettier
- stylelint-order
rules:
prettier/prettier: true
property-no-vendor-prefix:
- true
- ignoreProperties: [backdrop-filter]
prettier/prettier: true

View File

@@ -14,7 +14,7 @@
"lint:fix": "concurrently \"pnpm:lint:*:fix\"",
"lint:code": "eslint .",
"lint:code:fix": "eslint . --fix",
"lint:style": "stylelint \"src/**/*.{vue,css}\"",
"lint:style": "stylelint \"src/**/*.{vue,css,scss}\" -f verbose",
"lint:style:fix": "pnpm lint:style --fix",
"lint:rust:fix": "cd src-tauri && cargo fmt",
"prettier": "prettier . --write",
@@ -88,6 +88,8 @@
"jsencrypt": "^3.3.2",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.1.3",
"sass": "^1.83.0",
"sass-loader": "^16.0.4",
"uuid": "^11.0.3",
"vue": "^3.5.13",
"vue-echarts": "^7.0.3",
@@ -127,6 +129,7 @@
"stylelint-high-performance-animation": "^1.10.0",
"stylelint-order": "^6.0.4",
"stylelint-prettier": "^5.0.2",
"stylelint-scss": "^6.10.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.0",
"vite": "^6.0.3",

292
pnpm-lock.yaml generated
View File

@@ -71,6 +71,12 @@ importers:
pinia-plugin-persistedstate:
specifier: ^4.1.3
version: 4.1.3(pinia@2.3.0(typescript@5.7.2)(vue@3.5.13(typescript@5.7.2)))(rollup@4.28.1)
sass:
specifier: ^1.83.0
version: 1.83.0
sass-loader:
specifier: ^16.0.4
version: 16.0.4(sass@1.83.0)
uuid:
specifier: ^11.0.3
version: 11.0.3
@@ -122,7 +128,7 @@ importers:
version: 8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)
'@vitejs/plugin-vue':
specifier: ^5.2.1
version: 5.2.1(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))
version: 5.2.1(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))
concurrently:
specifier: ^9.1.0
version: 9.1.0
@@ -183,6 +189,9 @@ importers:
stylelint-prettier:
specifier: ^5.0.2
version: 5.0.2(prettier@3.4.2)(stylelint@16.11.0(typescript@5.7.2))
stylelint-scss:
specifier: ^6.10.0
version: 6.10.0(stylelint@16.11.0(typescript@5.7.2))
typescript:
specifier: ^5.7.2
version: 5.7.2
@@ -191,13 +200,13 @@ importers:
version: 8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)
vite:
specifier: ^6.0.3
version: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)
version: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)
vite-plugin-vue-devtools:
specifier: ^7.6.8
version: 7.6.8(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))
version: 7.6.8(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))
vite-plugin-vuetify:
specifier: ^2.0.4
version: 2.0.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))(vuetify@3.7.5)
version: 2.0.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))(vuetify@3.7.5)
vue-eslint-parser:
specifier: ^9.4.3
version: 9.4.3(eslint@9.17.0(jiti@2.4.1))
@@ -663,6 +672,94 @@ packages:
cpu: [x64]
os: [win32]
'@parcel/watcher-android-arm64@2.5.0':
resolution: {integrity: sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [android]
'@parcel/watcher-darwin-arm64@2.5.0':
resolution: {integrity: sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [darwin]
'@parcel/watcher-darwin-x64@2.5.0':
resolution: {integrity: sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [darwin]
'@parcel/watcher-freebsd-x64@2.5.0':
resolution: {integrity: sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [freebsd]
'@parcel/watcher-linux-arm-glibc@2.5.0':
resolution: {integrity: sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA==}
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-arm-musl@2.5.0':
resolution: {integrity: sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA==}
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
libc: [musl]
'@parcel/watcher-linux-arm64-glibc@2.5.0':
resolution: {integrity: sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-arm64-musl@2.5.0':
resolution: {integrity: sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
libc: [musl]
'@parcel/watcher-linux-x64-glibc@2.5.0':
resolution: {integrity: sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-x64-musl@2.5.0':
resolution: {integrity: sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
libc: [musl]
'@parcel/watcher-win32-arm64@2.5.0':
resolution: {integrity: sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [win32]
'@parcel/watcher-win32-ia32@2.5.0':
resolution: {integrity: sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA==}
engines: {node: '>= 10.0.0'}
cpu: [ia32]
os: [win32]
'@parcel/watcher-win32-x64@2.5.0':
resolution: {integrity: sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [win32]
'@parcel/watcher@2.5.0':
resolution: {integrity: sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==}
engines: {node: '>= 10.0.0'}
'@pkgr/core@0.1.1':
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
@@ -1355,6 +1452,11 @@ packages:
destr@2.0.3:
resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==}
detect-libc@1.0.3:
resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==}
engines: {node: '>=0.10'}
hasBin: true
dir-glob@3.0.1:
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
engines: {node: '>=8'}
@@ -1853,6 +1955,9 @@ packages:
resolution: {integrity: sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==}
engines: {node: '>= 4'}
immutable@5.0.3:
resolution: {integrity: sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==}
import-fresh@3.3.0:
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
engines: {node: '>=6'}
@@ -2243,6 +2348,12 @@ packages:
natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
neo-async@2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
node-addon-api@7.1.1:
resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}
node-fetch-native@1.6.4:
resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==}
@@ -2416,6 +2527,9 @@ packages:
resolution: {integrity: sha512-OWgQ9/Pe23MnNJC0PL4uZp8k0EDaUvqpJFSiwFxOLClAhmD7UEisyhO3x5hVsD4xFrjReVTXydlrMes45dJ71w==}
engines: {node: ^12 || >=14}
postcss-media-query-parser@0.2.3:
resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==}
postcss-resolve-nested-selector@0.1.6:
resolution: {integrity: sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==}
@@ -2544,6 +2658,32 @@ packages:
resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==}
engines: {node: '>= 0.4'}
sass-loader@16.0.4:
resolution: {integrity: sha512-LavLbgbBGUt3wCiYzhuLLu65+fWXaXLmq7YxivLhEqmiupCFZ5sKUAipK3do6V80YSU0jvSxNhEdT13IXNr3rg==}
engines: {node: '>= 18.12.0'}
peerDependencies:
'@rspack/core': 0.x || 1.x
node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0
sass: ^1.3.0
sass-embedded: '*'
webpack: ^5.0.0
peerDependenciesMeta:
'@rspack/core':
optional: true
node-sass:
optional: true
sass:
optional: true
sass-embedded:
optional: true
webpack:
optional: true
sass@1.83.0:
resolution: {integrity: sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==}
engines: {node: '>=14.0.0'}
hasBin: true
sax@1.4.1:
resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
@@ -2750,6 +2890,12 @@ packages:
prettier: '>=3.0.0'
stylelint: '>=16.0.0'
stylelint-scss@6.10.0:
resolution: {integrity: sha512-y03if6Qw9xBMoVaf7tzp5BbnYhYvudIKzURkhSHzcHG0bW0fAYvQpTUVJOe7DyhHaxeThBil4ObEMvGbV7+M+w==}
engines: {node: '>=18.12.0'}
peerDependencies:
stylelint: ^16.0.2
stylelint@16.11.0:
resolution: {integrity: sha512-zrl4IrKmjJQ+h9FoMp69UMCq5SxeHk0URhxUBj4d3ISzo/DplOFBJZc7t7Dr6otB+1bfbbKNLOmCDpzKSlW+Nw==}
engines: {node: '>=18.12.0'}
@@ -3612,6 +3758,67 @@ snapshots:
'@oxlint/win32-x64@0.15.2':
optional: true
'@parcel/watcher-android-arm64@2.5.0':
optional: true
'@parcel/watcher-darwin-arm64@2.5.0':
optional: true
'@parcel/watcher-darwin-x64@2.5.0':
optional: true
'@parcel/watcher-freebsd-x64@2.5.0':
optional: true
'@parcel/watcher-linux-arm-glibc@2.5.0':
optional: true
'@parcel/watcher-linux-arm-musl@2.5.0':
optional: true
'@parcel/watcher-linux-arm64-glibc@2.5.0':
optional: true
'@parcel/watcher-linux-arm64-musl@2.5.0':
optional: true
'@parcel/watcher-linux-x64-glibc@2.5.0':
optional: true
'@parcel/watcher-linux-x64-musl@2.5.0':
optional: true
'@parcel/watcher-win32-arm64@2.5.0':
optional: true
'@parcel/watcher-win32-ia32@2.5.0':
optional: true
'@parcel/watcher-win32-x64@2.5.0':
optional: true
'@parcel/watcher@2.5.0':
dependencies:
detect-libc: 1.0.3
is-glob: 4.0.3
micromatch: 4.0.8
node-addon-api: 7.1.1
optionalDependencies:
'@parcel/watcher-android-arm64': 2.5.0
'@parcel/watcher-darwin-arm64': 2.5.0
'@parcel/watcher-darwin-x64': 2.5.0
'@parcel/watcher-freebsd-x64': 2.5.0
'@parcel/watcher-linux-arm-glibc': 2.5.0
'@parcel/watcher-linux-arm-musl': 2.5.0
'@parcel/watcher-linux-arm64-glibc': 2.5.0
'@parcel/watcher-linux-arm64-musl': 2.5.0
'@parcel/watcher-linux-x64-glibc': 2.5.0
'@parcel/watcher-linux-x64-musl': 2.5.0
'@parcel/watcher-win32-arm64': 2.5.0
'@parcel/watcher-win32-ia32': 2.5.0
'@parcel/watcher-win32-x64': 2.5.0
optional: true
'@pkgr/core@0.1.1': {}
'@polka/url@1.0.0-next.28': {}
@@ -3873,9 +4080,9 @@ snapshots:
'@typescript-eslint/types': 8.18.0
eslint-visitor-keys: 4.2.0
'@vitejs/plugin-vue@5.2.1(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))':
'@vitejs/plugin-vue@5.2.1(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))':
dependencies:
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)
vue: 3.5.13(typescript@5.7.2)
'@vue/babel-helper-vue-transform-on@1.2.5': {}
@@ -3940,14 +4147,14 @@ snapshots:
'@vue/devtools-api@6.6.4': {}
'@vue/devtools-core@7.6.8(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))':
'@vue/devtools-core@7.6.8(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))':
dependencies:
'@vue/devtools-kit': 7.6.8
'@vue/devtools-shared': 7.6.8
mitt: 3.0.1
nanoid: 5.0.9
pathe: 1.1.2
vite-hot-client: 0.2.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))
vite-hot-client: 0.2.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))
vue: 3.5.13(typescript@5.7.2)
transitivePeerDependencies:
- vite
@@ -4323,6 +4530,9 @@ snapshots:
destr@2.0.3: {}
detect-libc@1.0.3:
optional: true
dir-glob@3.0.1:
dependencies:
path-type: 4.0.0
@@ -4953,6 +5163,8 @@ snapshots:
ignore@6.0.2: {}
immutable@5.0.3: {}
import-fresh@3.3.0:
dependencies:
parent-module: 1.0.1
@@ -5293,6 +5505,11 @@ snapshots:
natural-compare@1.4.0: {}
neo-async@2.6.2: {}
node-addon-api@7.1.1:
optional: true
node-fetch-native@1.6.4: {}
node-releases@2.0.19: {}
@@ -5475,6 +5692,8 @@ snapshots:
postcss: 8.4.49
postcss-safe-parser: 6.0.0(postcss@8.4.49)
postcss-media-query-parser@0.2.3: {}
postcss-resolve-nested-selector@0.1.6: {}
postcss-safe-parser@6.0.0(postcss@8.4.49):
@@ -5620,6 +5839,20 @@ snapshots:
es-errors: 1.3.0
is-regex: 1.2.1
sass-loader@16.0.4(sass@1.83.0):
dependencies:
neo-async: 2.6.2
optionalDependencies:
sass: 1.83.0
sass@1.83.0:
dependencies:
chokidar: 4.0.1
immutable: 5.0.3
source-map-js: 1.2.1
optionalDependencies:
'@parcel/watcher': 2.5.0
sax@1.4.1: {}
scule@1.3.0: {}
@@ -5829,6 +6062,18 @@ snapshots:
prettier-linter-helpers: 1.0.0
stylelint: 16.11.0(typescript@5.7.2)
stylelint-scss@6.10.0(stylelint@16.11.0(typescript@5.7.2)):
dependencies:
css-tree: 3.1.0
is-plain-object: 5.0.0
known-css-properties: 0.35.0
mdn-data: 2.12.2
postcss-media-query-parser: 0.2.3
postcss-resolve-nested-selector: 0.1.6
postcss-selector-parser: 7.0.0
postcss-value-parser: 4.2.0
stylelint: 16.11.0(typescript@5.7.2)
stylelint@16.11.0(typescript@5.7.2):
dependencies:
'@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3)
@@ -6087,11 +6332,11 @@ snapshots:
uuid@11.0.3: {}
vite-hot-client@0.2.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)):
vite-hot-client@0.2.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)):
dependencies:
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)
vite-plugin-inspect@0.8.9(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)):
vite-plugin-inspect@0.8.9(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)):
dependencies:
'@antfu/utils': 0.7.10
'@rollup/pluginutils': 5.1.3(rollup@4.28.1)
@@ -6102,28 +6347,28 @@ snapshots:
perfect-debounce: 1.0.0
picocolors: 1.1.1
sirv: 3.0.0
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)
transitivePeerDependencies:
- rollup
- supports-color
vite-plugin-vue-devtools@7.6.8(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2)):
vite-plugin-vue-devtools@7.6.8(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2)):
dependencies:
'@vue/devtools-core': 7.6.8(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))
'@vue/devtools-core': 7.6.8(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))
'@vue/devtools-kit': 7.6.8
'@vue/devtools-shared': 7.6.8
execa: 9.5.2
sirv: 3.0.0
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)
vite-plugin-inspect: 0.8.9(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))
vite-plugin-vue-inspector: 5.3.1(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)
vite-plugin-inspect: 0.8.9(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))
vite-plugin-vue-inspector: 5.3.1(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))
transitivePeerDependencies:
- '@nuxt/kit'
- rollup
- supports-color
- vue
vite-plugin-vue-inspector@5.3.1(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)):
vite-plugin-vue-inspector@5.3.1(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)):
dependencies:
'@babel/core': 7.26.0
'@babel/plugin-proposal-decorators': 7.25.9(@babel/core@7.26.0)
@@ -6134,22 +6379,22 @@ snapshots:
'@vue/compiler-dom': 3.5.13
kolorist: 1.8.0
magic-string: 0.30.15
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)
transitivePeerDependencies:
- supports-color
vite-plugin-vuetify@2.0.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))(vuetify@3.7.5):
vite-plugin-vuetify@2.0.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))(vuetify@3.7.5):
dependencies:
'@vuetify/loader-shared': 2.0.3(vue@3.5.13(typescript@5.7.2))(vuetify@3.7.5)
debug: 4.4.0
upath: 2.0.1
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1)
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1)
vue: 3.5.13(typescript@5.7.2)
vuetify: 3.7.5(typescript@5.7.2)(vite-plugin-vuetify@2.0.4)(vue@3.5.13(typescript@5.7.2))
transitivePeerDependencies:
- supports-color
vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1):
vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1):
dependencies:
esbuild: 0.24.0
postcss: 8.4.49
@@ -6158,6 +6403,7 @@ snapshots:
'@types/node': 22.10.2
fsevents: 2.3.3
jiti: 2.4.1
sass: 1.83.0
yaml: 2.6.1
vue-demi@0.13.11(vue@3.5.13(typescript@5.7.2)):
@@ -6216,7 +6462,7 @@ snapshots:
vue: 3.5.13(typescript@5.7.2)
optionalDependencies:
typescript: 5.7.2
vite-plugin-vuetify: 2.0.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))(vuetify@3.7.5)
vite-plugin-vuetify: 2.0.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(sass@1.83.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2))(vuetify@3.7.5)
wcag-color@1.1.1: {}

View File

@@ -6,7 +6,7 @@
:title="props.data.attributes?.link"
:style="getTextStyle()"
>
{{ props.data.insert }}
{{ decodeRegExp(props.data.insert) }}
</span>
<span v-else-if="mode == 'emoji'" class="tp-text-emoji">
<img :src="getEmojiUrl()" :alt="getEmojiName()" :title="getEmojiName()" />
@@ -17,7 +17,7 @@
:data="emoji"
:key="indexE"
/>
<span v-else :style="getTextStyle()">{{ props.data.insert }}</span>
<span v-else :style="getTextStyle()">{{ decodeRegExp(props.data.insert) }}</span>
</template>
<script lang="ts" setup>
import showSnackbar from "@comp/func/snackbar.js";
@@ -25,7 +25,7 @@ import { getEmojis } from "@Mys/request/getEmojis.js";
import { onMounted, ref, shallowRef, StyleValue, toRaw } from "vue";
import { parseLink, parsePost } from "@/utils/linkParser.js";
import { isColorSimilar } from "@/utils/toolFunc.js";
import { isColorSimilar, decodeRegExp } from "@/utils/toolFunc.js";
export type TpText = {
insert: string;

View File

@@ -1,8 +1,8 @@
<template>
<div
:style="getLineStyle()"
class="tp-texts"
:class="{
'tp-inline': props.data.attributes === undefined || props.data.attributes.align === undefined,
'tp-texts-header1': props.data.attributes && props.data.attributes.header === 1,
'tp-texts-header2': props.data.attributes && props.data.attributes.header === 2,
'tp-texts-header3': props.data.attributes && props.data.attributes.header === 3,
@@ -11,6 +11,7 @@
'tp-texts-header6': props.data.attributes && props.data.attributes.header === 6,
}"
:title="getTitle()"
:style="{ textAlign: props.data.attributes?.align }"
>
<component
:is="getComp(text)"
@@ -21,7 +22,7 @@
</div>
</template>
<script lang="ts" setup>
import type { Component, StyleValue } from "vue";
import type { Component } from "vue";
import TpImage from "./tp-image.vue";
import TpMention, { type TpMention as TpMentionType } from "./tp-mention.vue";
@@ -44,51 +45,22 @@ function getTitle(): string {
if (props.data.attributes.header) return `H${props.data.attributes.header}`;
return "";
}
function getLineStyle(): StyleValue {
const ruleInline: StyleValue = "display: inline";
if (props.data.attributes === undefined) return ruleInline;
if (props.data.attributes.align === undefined) return ruleInline;
return `text-align: ${props.data.attributes.align};`;
}
</script>
<style lang="css" scoped>
<style lang="scss" scoped>
.tp-texts {
line-break: anywhere;
white-space: pre-wrap;
word-break: break-all;
&.tp-inline {
display: inline;
}
}
.tp-texts-header1,
.tp-texts-header2,
.tp-texts-header3,
.tp-texts-header4,
.tp-texts-header5,
.tp-texts-header6 {
font-family: var(--font-title);
}
.tp-texts-header1 {
font-size: 24px;
}
.tp-texts-header2 {
font-size: 20px;
}
.tp-texts-header3 {
font-size: 18px;
}
.tp-texts-header4 {
font-size: 16px;
}
.tp-texts-header5 {
font-size: 14px;
}
.tp-texts-header6 {
font-size: 12px;
@for $i from 1 through 6 {
.tp-texts-header#{$i} {
font-family: var(--font-title);
font-size: calc(26px - $i * 2px);
}
}
</style>

View File

@@ -75,7 +75,7 @@
<TSubLine>统计周期 {{ item.startTime }} ~ {{ item.endTime }}</TSubLine>
<TucOverview :data="item.stat" :fights="item.detail.fight_statisic" />
<TSubLine>使用角色({{ item.detail.backup_avatars.length }})</TSubLine>
<TucAvatars :model-value="item.detail.backup_avatars" />
<TucAvatars :model-value="item.detail.backup_avatars" :detail="false" />
<TSubLine>详情</TSubLine>
<div class="ucw-rounds">
<TucRound
@@ -139,6 +139,7 @@ onMounted(async () => {
} else uidCur.value = "";
await loadCombat();
await showLoading.end();
console.log("UserCombat", localCombat.value);
});
watch(() => uidCur.value, loadCombat);

View File

@@ -60,13 +60,13 @@ import { useRouter } from "vue-router";
import { useAppStore } from "@/store/modules/app.js";
import TGLogger from "@/utils/TGLogger.js";
import { decodeRegExp } from "@/utils/toolFunc.js";
import Hk4eApi, { type AnnoLang, AnnoServer } from "@/web/request/hk4eReq.js";
import { getAnnoCard } from "@/web/utils/getAnnoCard.js";
import { decodeRegExp } from "@/web/utils/tools.js";
type AnnoSelect = { text: string; value: string };
type AnnoKey = keyof typeof AnnoType;
type AnnoCard = { [key in AnnoKey]: TGApp.App.Announcement.ListCard[] };
type AnnoCard = { [key in AnnoKey]: Array<TGApp.App.Announcement.ListCard> };
const annoServerList: Array<AnnoSelect> = [
{ text: "国服-官方服", value: AnnoServer.CN_ISLAND },

View File

@@ -1,7 +1,7 @@
/**
* @file src/utils/linkParser.ts
* @description 处理链接
* @since Beta v0.6.5
* @since Beta v0.6.7
*/
import showDialog from "@comp/func/dialog.js";
@@ -11,7 +11,7 @@ import { emit } from "@tauri-apps/api/event";
import TGClient from "./TGClient.js";
import { createPost } from "./TGWindow.js";
import { getGameId } from "@/web/utils/tools.js";
import { getGameId } from "@/utils/toolFunc.js";
/**
* @function parsePost

View File

@@ -11,6 +11,8 @@ import type { KEYWORD } from "color-convert/conversions.js";
import { v4 } from "uuid";
import { score } from "wcag-color";
import TGConstant from "@/web/constant/TGConstant.js";
/**
* @description 时间戳转换为时间字符串
* @returns {string} 时间字符串 d天 hh:mm:ss
@@ -250,3 +252,42 @@ export function getVideoDuration(durationMill: number): string {
result += `${seconds.toString().padStart(2, "0")}`;
return result;
}
/**
* @description 转义正则表达式
* @since Beta v0.3.3
* @param {string} data 内容
* @returns {string} 转义后的内容
*/
export function decodeRegExp(data: string): string {
let res = data;
if (res.length === 0) return res;
res = res.replace(/&lt;/g, "<");
res = res.replace(/&gt;/g, ">");
res = res.replace(/&nbsp;/g, " ");
res = res.replace(/&#39;/g, "'");
res = res.replace(/&quot;/g, `"`);
res = res.replace(/&apos;/g, "'");
res = res.replace(/&amp;/g, "&");
return res;
}
/**
* @description 根据 gid 获取游戏名称
* @param {number} gid
* @returns {string}
*/
export function getGameName(gid: number): string {
const game = TGConstant.BBS.CHANNELS.find((item) => item.gid === gid.toString());
return game ? game.title : "未知游戏";
}
/**
* @description 获取游戏id
* @param {string} mini
* @returns {string}
*/
export function getGameId(mini: string): string {
const game = TGConstant.BBS.CHANNELS.find((item) => item.mini === mini);
return game ? game.gid : "0";
}

View File

@@ -1,13 +1,13 @@
/**
* @file web/utils/annoParser.ts
* @description 解析游戏内公告数据
* @since Beta v0.6.0
* @since Beta v0.6.7
*/
import TpText from "@comp/viewPost/tp-text.vue";
import { h, render } from "vue";
import { decodeRegExp } from "./tools.js";
import { decodeRegExp } from "@/utils/toolFunc.js";
/**
* @description 预处理p

View File

@@ -1,47 +0,0 @@
/**
* @file web/utils/tools.ts
* @description 应用用到的工具函数
* @since Beta v0.6.3
*/
import TGConstant from "@/web/constant/TGConstant.js";
/**
* @description 转义正则表达式
* @since Beta v0.3.3
* @param {string} data 内容
* @returns {string} 转义后的内容
*/
export function decodeRegExp(data: string): string {
let res = data;
if (res.length === 0) return res;
res = res.replace(/&lt;/g, "<");
res = res.replace(/&gt;/g, ">");
res = res.replace(/&nbsp;/g, " ");
res = res.replace(/&#39;/g, "'");
res = res.replace(/&quot;/g, `"`);
res = res.replace(/&apos;/g, "'");
res = res.replace(/&amp;/g, "&");
return res;
}
/**
* @description 根据 gid 获取游戏名称
* @param {number} gid
* @returns {string}
*/
export function getGameName(gid: number): string {
const game = TGConstant.BBS.CHANNELS.find((item) => item.gid === gid.toString());
return game ? game.title : "未知游戏";
}
/**
* @description 获取游戏id
* @param {string} mini
* @returns {string}
*/
export function getGameId(mini: string): string {
const game = TGConstant.BBS.CHANNELS.find((item) => item.mini === mini);
return game ? game.gid : "0";
}