From 0bb707bba0d10d691624248fd36735b8fffdeca1 Mon Sep 17 00:00:00 2001
From: XiaoDaiGua-Ray <443547225@qq.com>
Date: Wed, 15 Jan 2025 16:32:36 +0800
Subject: [PATCH] version: v5.0.10
---
CHANGELOG.md | 14 +
index.html | 39 +-
package.json | 7 +-
pnpm-lock.yaml | 376 ++++++++++--------
.../components/LockScreen/index.tsx | 7 +
.../components/UnlockScreen/index.tsx | 55 ++-
.../provider/AppVersionProvider/index.tsx | 2 +-
src/app-config/app-config.ts | 2 +
src/axios/instance.ts | 44 +-
src/axios/utils/interceptor.ts | 58 ++-
.../base/RDraggableCard/DraggableCard.tsx | 6 -
src/components/base/RModal/src/Modal.tsx | 48 ---
.../base/RModal/src/hooks/useModal.ts | 16 +-
src/components/base/RModal/src/index.scss | 5 +
src/components/base/RModal/src/props.ts | 23 --
src/components/base/RModal/src/types.ts | 17 -
src/components/base/RModal/src/utils.ts | 101 -----
src/components/base/RSegment/src/Segment.tsx | 1 -
.../components/Search/GlobalSearch/index.tsx | 39 +-
src/layout/components/SiderBar/index.tsx | 18 +-
src/router/utils/order-routes.ts | 4 -
src/utils/c/constant.ts | 6 +
src/utils/c/decrypt.ts | 32 ++
src/utils/c/encrypt.ts | 24 ++
src/utils/c/index.ts | 5 +
src/utils/c/types.ts | 4 +
src/utils/index.ts | 1 +
src/views/demo/modal-demo/index.tsx | 13 +-
28 files changed, 477 insertions(+), 490 deletions(-)
delete mode 100644 src/components/base/RModal/src/utils.ts
create mode 100644 src/utils/c/constant.ts
create mode 100644 src/utils/c/decrypt.ts
create mode 100644 src/utils/c/encrypt.ts
create mode 100644 src/utils/c/index.ts
create mode 100644 src/utils/c/types.ts
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 62d541d7..9d6a3e86 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,17 @@
+## 5.0.10
+
+## Feats
+
+- `RDraggableCard` 组件现在不会在抛出获取 `dom` 失败的异常,因为可能存在异步组件加载的可能
+- `RModal`, `useModal` 方法,移除 `dad` 相关所有配置,使用 `draggable` 配置项替代
+- 刷新的样式现在会跟随主题变化
+- 锁屏密码现在会进行加密存储,并且会进行校验处理了
+- 新增 `decrypt`, `decrypt` 方法,放置于 `utils/c` 包中
+
+## Fixes
+
+- 修复因为错误的注册全局事件,导致事件污染的问题,但是默认的 `ctrl + k`, `cmd + k` 快捷键依旧保留为全局按键
+
## 5.0.9
## Feats
diff --git a/index.html b/index.html
index 5f0bc9e5..65635961 100644
--- a/index.html
+++ b/index.html
@@ -15,6 +15,27 @@
--preloading-title-color: <%= preloadingConfig.titleColor %>;
--ray-theme-primary-fade-color: <%= appPrimaryColor.primaryFadeColor %>;
--ray-theme-primary-color: <%= appPrimaryColor.primaryColor %>;
+ --global-loading-bg-color: #ffffff;
+ }
+
+ @media (prefers-color-scheme: dark) {
+ #pre-loading-animation {
+ background-color: var(--global-loading-bg-color);
+ }
+ }
+
+ @media (prefers-color-scheme: light) {
+ #pre-loading-animation {
+ background-color: var(--global-loading-bg-color);
+ }
+ }
+
+ html.dark #pre-loading-animation {
+ background-color: var(--global-loading-bg-color);
+ }
+
+ html.light #pre-loading-animation {
+ background-color: var(--global-loading-bg-color);
}
#pre-loading-animation {
@@ -23,13 +44,9 @@
right: 0;
top: 0;
bottom: 0;
- background-color: #ffffff;
color: var(--preloading-title-color);
text-align: center;
- }
-
- .ray-template--dark #pre-loading-animation {
- background-color: #2a3146;
+ background-color: var(--global-loading-bg-color);
}
#pre-loading-animation .pre-loading-animation__wrapper {
@@ -95,6 +112,18 @@
}
}
+
diff --git a/package.json b/package.json
index 5e7ec02f..0b360155 100755
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "ray-template",
"private": false,
- "version": "5.0.9",
+ "version": "5.0.10",
"type": "module",
"engines": {
"node": "^18.0.0 || ^20.0.0 || >=22.0.0",
@@ -38,6 +38,7 @@
"@vueuse/core": "^12.0.0",
"axios": "^1.7.9",
"clipboard": "^2.0.11",
+ "crypto-js": "4.2.0",
"currency.js": "^2.0.4",
"dayjs": "^1.11.13",
"echarts": "^5.5.1",
@@ -46,7 +47,7 @@
"jsbarcode": "3.11.6",
"lodash-es": "^4.17.21",
"mockjs": "1.1.0",
- "naive-ui": "^2.40.4",
+ "naive-ui": "^2.41.0",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.1.3",
"print-js": "^1.6.0",
@@ -106,7 +107,7 @@
"vite-plugin-svg-icons": "2.0.1",
"vite-svg-loader": "5.1.0",
"vitest": "2.0.5",
- "vue-tsc": "2.1.10"
+ "vue-tsc": "2.2.0"
},
"description": "",
"main": "index.ts",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5b9713b1..ecc0f22d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -23,6 +23,9 @@ importers:
clipboard:
specifier: ^2.0.11
version: 2.0.11
+ crypto-js:
+ specifier: 4.2.0
+ version: 4.2.0
currency.js:
specifier: ^2.0.4
version: 2.0.4
@@ -48,14 +51,14 @@ importers:
specifier: 1.1.0
version: 1.1.0
naive-ui:
- specifier: ^2.40.4
- version: 2.40.4(vue@3.5.13(typescript@5.6.3))
+ specifier: ^2.41.0
+ version: 2.41.0(vue@3.5.13(typescript@5.6.3))
pinia:
specifier: ^2.3.0
version: 2.3.0(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3))
pinia-plugin-persistedstate:
specifier: ^4.1.3
- version: 4.1.3(pinia@2.3.0(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.29.1)(webpack-sources@3.2.3)
+ version: 4.1.3(pinia@2.3.0(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.30.0)(webpack-sources@3.2.3)
print-js:
specifier: ^1.6.0
version: 1.6.0
@@ -95,7 +98,7 @@ importers:
version: 1.10.27
'@intlify/unplugin-vue-i18n':
specifier: 4.0.0
- version: 4.0.0(rollup@4.29.1)(vue-i18n@9.13.1(vue@3.5.13(typescript@5.6.3)))(webpack-sources@3.2.3)
+ version: 4.0.0(rollup@4.30.0)(vue-i18n@9.13.1(vue@3.5.13(typescript@5.6.3)))(webpack-sources@3.2.3)
'@types/crypto-js':
specifier: 4.2.2
version: 4.2.2
@@ -176,7 +179,7 @@ importers:
version: 3.3.2
rollup-plugin-gzip:
specifier: 4.0.1
- version: 4.0.1(rollup@4.29.1)
+ version: 4.0.1(rollup@4.30.0)
sass:
specifier: 1.83.0
version: 1.83.0
@@ -188,10 +191,10 @@ importers:
version: 5.6.3
unplugin-auto-import:
specifier: 0.19.0
- version: 0.19.0(@nuxt/kit@3.13.2(rollup@4.29.1)(webpack-sources@3.2.3))(@vueuse/core@12.0.0(typescript@5.6.3))(rollup@4.29.1)
+ version: 0.19.0(@nuxt/kit@3.13.2(rollup@4.30.0)(webpack-sources@3.2.3))(@vueuse/core@12.0.0(typescript@5.6.3))(rollup@4.30.0)
unplugin-vue-components:
specifier: 0.28.0
- version: 0.28.0(@babel/parser@7.26.2)(@nuxt/kit@3.13.2(rollup@4.29.1)(webpack-sources@3.2.3))(rollup@4.29.1)(vue@3.5.13(typescript@5.6.3))
+ version: 0.28.0(@babel/parser@7.26.3)(@nuxt/kit@3.13.2(rollup@4.30.0)(webpack-sources@3.2.3))(rollup@4.30.0)(vue@3.5.13(typescript@5.6.3))
vite:
specifier: 6.0.7
version: 6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0)
@@ -200,7 +203,7 @@ importers:
version: 0.15.2
vite-plugin-cdn2:
specifier: 1.1.0
- version: 1.1.0(rollup@4.29.1)
+ version: 1.1.0(rollup@4.30.0)
vite-plugin-ejs:
specifier: 1.7.0
version: 1.7.0(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0))
@@ -209,10 +212,10 @@ importers:
version: 1.8.1(eslint@9.11.0(jiti@1.21.6))(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0))
vite-plugin-inspect:
specifier: 0.8.4
- version: 0.8.4(@nuxt/kit@3.13.2(rollup@4.29.1)(webpack-sources@3.2.3))(rollup@4.29.1)(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0))
+ version: 0.8.4(@nuxt/kit@3.13.2(rollup@4.30.0)(webpack-sources@3.2.3))(rollup@4.30.0)(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0))
vite-plugin-mock-dev-server:
specifier: 1.8.3
- version: 1.8.3(esbuild@0.24.2)(rollup@4.29.1)(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0))
+ version: 1.8.3(esbuild@0.24.2)(rollup@4.30.0)(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0))
vite-plugin-svg-icons:
specifier: 2.0.1
version: 2.0.1(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0))
@@ -223,8 +226,8 @@ importers:
specifier: 2.0.5
version: 2.0.5(@types/node@22.5.5)(@vitest/ui@1.5.2)(happy-dom@14.12.3)(sass@1.83.0)
vue-tsc:
- specifier: 2.1.10
- version: 2.1.10(typescript@5.6.3)
+ specifier: 2.2.0
+ version: 2.2.0(typescript@5.6.3)
packages:
@@ -405,6 +408,11 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
+ '@babel/parser@7.26.3':
+ resolution: {integrity: sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
+
'@babel/plugin-syntax-jsx@7.25.9':
resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==}
engines: {node: '>=6.9.0'}
@@ -451,6 +459,10 @@ packages:
resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==}
engines: {node: '>=6.9.0'}
+ '@babel/types@7.26.3':
+ resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==}
+ engines: {node: '>=6.9.0'}
+
'@commitlint/cli@19.3.0':
resolution: {integrity: sha512-LgYWOwuDR7BSTQ9OLZ12m7F/qhNY+NpAyPBgo4YNMkACE7lGuUnuQq1yi9hz1KA4+3VqpOYl8H1rY/LYK43v7g==}
engines: {node: '>=v18'}
@@ -1105,98 +1117,98 @@ packages:
rollup:
optional: true
- '@rollup/rollup-android-arm-eabi@4.29.1':
- resolution: {integrity: sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==}
+ '@rollup/rollup-android-arm-eabi@4.30.0':
+ resolution: {integrity: sha512-qFcFto9figFLz2g25DxJ1WWL9+c91fTxnGuwhToCl8BaqDsDYMl/kOnBXAyAqkkzAWimYMSWNPWEjt+ADAHuoQ==}
cpu: [arm]
os: [android]
- '@rollup/rollup-android-arm64@4.29.1':
- resolution: {integrity: sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==}
+ '@rollup/rollup-android-arm64@4.30.0':
+ resolution: {integrity: sha512-vqrQdusvVl7dthqNjWCL043qelBK+gv9v3ZiqdxgaJvmZyIAAXMjeGVSqZynKq69T7062T5VrVTuikKSAAVP6A==}
cpu: [arm64]
os: [android]
- '@rollup/rollup-darwin-arm64@4.29.1':
- resolution: {integrity: sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==}
+ '@rollup/rollup-darwin-arm64@4.30.0':
+ resolution: {integrity: sha512-617pd92LhdA9+wpixnzsyhVft3szYiN16aNUMzVkf2N+yAk8UXY226Bfp36LvxYTUt7MO/ycqGFjQgJ0wlMaWQ==}
cpu: [arm64]
os: [darwin]
- '@rollup/rollup-darwin-x64@4.29.1':
- resolution: {integrity: sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==}
+ '@rollup/rollup-darwin-x64@4.30.0':
+ resolution: {integrity: sha512-Y3b4oDoaEhCypg8ajPqigKDcpi5ZZovemQl9Edpem0uNv6UUjXv7iySBpGIUTSs2ovWOzYpfw9EbFJXF/fJHWw==}
cpu: [x64]
os: [darwin]
- '@rollup/rollup-freebsd-arm64@4.29.1':
- resolution: {integrity: sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==}
+ '@rollup/rollup-freebsd-arm64@4.30.0':
+ resolution: {integrity: sha512-3REQJ4f90sFIBfa0BUokiCdrV/E4uIjhkWe1bMgCkhFXbf4D8YN6C4zwJL881GM818qVYE9BO3dGwjKhpo2ABA==}
cpu: [arm64]
os: [freebsd]
- '@rollup/rollup-freebsd-x64@4.29.1':
- resolution: {integrity: sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==}
+ '@rollup/rollup-freebsd-x64@4.30.0':
+ resolution: {integrity: sha512-ZtY3Y8icbe3Cc+uQicsXG5L+CRGUfLZjW6j2gn5ikpltt3Whqjfo5mkyZ86UiuHF9Q3ZsaQeW7YswlHnN+lAcg==}
cpu: [x64]
os: [freebsd]
- '@rollup/rollup-linux-arm-gnueabihf@4.29.1':
- resolution: {integrity: sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==}
+ '@rollup/rollup-linux-arm-gnueabihf@4.30.0':
+ resolution: {integrity: sha512-bsPGGzfiHXMhQGuFGpmo2PyTwcrh2otL6ycSZAFTESviUoBOuxF7iBbAL5IJXc/69peXl5rAtbewBFeASZ9O0g==}
cpu: [arm]
os: [linux]
- '@rollup/rollup-linux-arm-musleabihf@4.29.1':
- resolution: {integrity: sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==}
+ '@rollup/rollup-linux-arm-musleabihf@4.30.0':
+ resolution: {integrity: sha512-kvyIECEhs2DrrdfQf++maCWJIQ974EI4txlz1nNSBaCdtf7i5Xf1AQCEJWOC5rEBisdaMFFnOWNLYt7KpFqy5A==}
cpu: [arm]
os: [linux]
- '@rollup/rollup-linux-arm64-gnu@4.29.1':
- resolution: {integrity: sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==}
+ '@rollup/rollup-linux-arm64-gnu@4.30.0':
+ resolution: {integrity: sha512-CFE7zDNrokaotXu+shwIrmWrFxllg79vciH4E/zeK7NitVuWEaXRzS0mFfFvyhZfn8WfVOG/1E9u8/DFEgK7WQ==}
cpu: [arm64]
os: [linux]
- '@rollup/rollup-linux-arm64-musl@4.29.1':
- resolution: {integrity: sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==}
+ '@rollup/rollup-linux-arm64-musl@4.30.0':
+ resolution: {integrity: sha512-MctNTBlvMcIBP0t8lV/NXiUwFg9oK5F79CxLU+a3xgrdJjfBLVIEHSAjQ9+ipofN2GKaMLnFFXLltg1HEEPaGQ==}
cpu: [arm64]
os: [linux]
- '@rollup/rollup-linux-loongarch64-gnu@4.29.1':
- resolution: {integrity: sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==}
+ '@rollup/rollup-linux-loongarch64-gnu@4.30.0':
+ resolution: {integrity: sha512-fBpoYwLEPivL3q368+gwn4qnYnr7GVwM6NnMo8rJ4wb0p/Y5lg88vQRRP077gf+tc25akuqd+1Sxbn9meODhwA==}
cpu: [loong64]
os: [linux]
- '@rollup/rollup-linux-powerpc64le-gnu@4.29.1':
- resolution: {integrity: sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==}
+ '@rollup/rollup-linux-powerpc64le-gnu@4.30.0':
+ resolution: {integrity: sha512-1hiHPV6dUaqIMXrIjN+vgJqtfkLpqHS1Xsg0oUfUVD98xGp1wX89PIXgDF2DWra1nxAd8dfE0Dk59MyeKaBVAw==}
cpu: [ppc64]
os: [linux]
- '@rollup/rollup-linux-riscv64-gnu@4.29.1':
- resolution: {integrity: sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==}
+ '@rollup/rollup-linux-riscv64-gnu@4.30.0':
+ resolution: {integrity: sha512-U0xcC80SMpEbvvLw92emHrNjlS3OXjAM0aVzlWfar6PR0ODWCTQtKeeB+tlAPGfZQXicv1SpWwRz9Hyzq3Jx3g==}
cpu: [riscv64]
os: [linux]
- '@rollup/rollup-linux-s390x-gnu@4.29.1':
- resolution: {integrity: sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==}
+ '@rollup/rollup-linux-s390x-gnu@4.30.0':
+ resolution: {integrity: sha512-VU/P/IODrNPasgZDLIFJmMiLGez+BN11DQWfTVlViJVabyF3JaeaJkP6teI8760f18BMGCQOW9gOmuzFaI1pUw==}
cpu: [s390x]
os: [linux]
- '@rollup/rollup-linux-x64-gnu@4.29.1':
- resolution: {integrity: sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==}
+ '@rollup/rollup-linux-x64-gnu@4.30.0':
+ resolution: {integrity: sha512-laQVRvdbKmjXuFA3ZiZj7+U24FcmoPlXEi2OyLfbpY2MW1oxLt9Au8q9eHd0x6Pw/Kw4oe9gwVXWwIf2PVqblg==}
cpu: [x64]
os: [linux]
- '@rollup/rollup-linux-x64-musl@4.29.1':
- resolution: {integrity: sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==}
+ '@rollup/rollup-linux-x64-musl@4.30.0':
+ resolution: {integrity: sha512-3wzKzduS7jzxqcOvy/ocU/gMR3/QrHEFLge5CD7Si9fyHuoXcidyYZ6jyx8OPYmCcGm3uKTUl+9jUSAY74Ln5A==}
cpu: [x64]
os: [linux]
- '@rollup/rollup-win32-arm64-msvc@4.29.1':
- resolution: {integrity: sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==}
+ '@rollup/rollup-win32-arm64-msvc@4.30.0':
+ resolution: {integrity: sha512-jROwnI1+wPyuv696rAFHp5+6RFhXGGwgmgSfzE8e4xfit6oLRg7GyMArVUoM3ChS045OwWr9aTnU+2c1UdBMyw==}
cpu: [arm64]
os: [win32]
- '@rollup/rollup-win32-ia32-msvc@4.29.1':
- resolution: {integrity: sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==}
+ '@rollup/rollup-win32-ia32-msvc@4.30.0':
+ resolution: {integrity: sha512-duzweyup5WELhcXx5H1jokpr13i3BV9b48FMiikYAwk/MT1LrMYYk2TzenBd0jj4ivQIt58JWSxc19y4SvLP4g==}
cpu: [ia32]
os: [win32]
- '@rollup/rollup-win32-x64-msvc@4.29.1':
- resolution: {integrity: sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==}
+ '@rollup/rollup-win32-x64-msvc@4.30.0':
+ resolution: {integrity: sha512-DYvxS0M07PvgvavMIybCOBYheyrqlui6ZQBHJs6GqduVzHSZ06TPPvlfvnYstjODHQ8UUXFwt5YE+h0jFI8kwg==}
cpu: [x64]
os: [win32]
@@ -1247,6 +1259,9 @@ packages:
'@types/lodash-es@4.17.12':
resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==}
+ '@types/lodash@4.17.13':
+ resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==}
+
'@types/lodash@4.17.6':
resolution: {integrity: sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==}
@@ -1367,14 +1382,14 @@ packages:
'@vitest/utils@2.0.5':
resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==}
- '@volar/language-core@2.4.9':
- resolution: {integrity: sha512-t++GIrUeQnKCieZdY9e+Uar2VmTqOE4Z9KcEcdSHKmKZPuqpbbWow1YKe1i3HpU2s1JqLRVM8y/n87WKXyxJAg==}
+ '@volar/language-core@2.4.11':
+ resolution: {integrity: sha512-lN2C1+ByfW9/JRPpqScuZt/4OrUUse57GLI6TbLgTIqBVemdl1wNcZ1qYGEo2+Gw8coYLgCy7SuKqn6IrQcQgg==}
- '@volar/source-map@2.4.9':
- resolution: {integrity: sha512-UGE+WgJwk64OcfBwBOBKIzmF+uNx4dC5GzOvaVsHbTBp/IVqeTVsGiO5CwBAt6l3vVXYbMuddG2DU8FEnBRxTg==}
+ '@volar/source-map@2.4.11':
+ resolution: {integrity: sha512-ZQpmafIGvaZMn/8iuvCFGrW3smeqkq/IIh9F1SdSx9aUl0J4Iurzd6/FhmjNO5g2ejF3rT45dKskgXWiofqlZQ==}
- '@volar/typescript@2.4.9':
- resolution: {integrity: sha512-Zmh3Bq8CFD6OANKYsi4vs/l7togwfjFH0kgrT12uAsDff2AJQjbEUKTVUnxmHbnbH2B9ja7Lb6Mu/Wj9wBuJlg==}
+ '@volar/typescript@2.4.11':
+ resolution: {integrity: sha512-2DT+Tdh88Spp5PyPbqhyoYavYCPDsqbHLFwcUI9K1NlY1YgUJvujGdrqUp0zWxnW7KWNTr3xSpMuv2WnaTKDAw==}
'@vue/babel-helper-vue-transform-on@1.2.5':
resolution: {integrity: sha512-lOz4t39ZdmU4DJAa2hwPYmKc8EsuGa2U0L9KaZaOJUt0UwQNjNA3AZTq6uEivhOKhhG1Wvy96SvYBoFmCg3uuw==}
@@ -1433,8 +1448,8 @@ packages:
typescript:
optional: true
- '@vue/language-core@2.1.10':
- resolution: {integrity: sha512-DAI289d0K3AB5TUG3xDp9OuQ71CnrujQwJrQnfuZDwo6eGNf0UoRlPuaVNO+Zrn65PC3j0oB2i7mNmVPggeGeQ==}
+ '@vue/language-core@2.2.0':
+ resolution: {integrity: sha512-O1ZZFaaBGkKbsRfnVH1ifOK1/1BUkyK+3SQsfnh6PmMmD4qJcTU8godCeA96jjDRTL6zgnK7YzCHfaUlH2r0Mw==}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
@@ -1559,8 +1574,8 @@ packages:
ajv@8.17.1:
resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
- alien-signals@0.2.0:
- resolution: {integrity: sha512-StlonZhBBrsPPwrDjiPAiVTf/rolxffLxVPT60Qv/t88BZ81BvUVzHgGqEFvJ1ii8HXtm1+zU2Icr59tfWEcag==}
+ alien-signals@0.4.12:
+ resolution: {integrity: sha512-Og0PgAihxlp1R22bsoBsyhhMG4+qhU+fkkLPoGBQkYVc3qt9rYnrwYTf+M6kqUqUZpf3rXDnpL90iKa0QcSVVg==}
ansi-escapes@6.2.1:
resolution: {integrity: sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==}
@@ -1949,6 +1964,9 @@ packages:
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
engines: {node: '>= 8'}
+ crypto-js@4.2.0:
+ resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==}
+
css-render@0.15.14:
resolution: {integrity: sha512-9nF4PdUle+5ta4W5SyZdLCCmFd37uVimSjg1evcTqKJCyvCEEj12WKzOSBNak6r4im4J4iYXKH1OWpUV5LBYFg==}
@@ -2001,10 +2019,10 @@ packages:
resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==}
engines: {node: '>=12'}
- date-fns-tz@3.1.3:
- resolution: {integrity: sha512-ZfbMu+nbzW0mEzC8VZrLiSWvUIaI3aRHeq33mTe7Y38UctKukgqPR4nTDwcwS4d64Gf8GghnVsroBuMY3eiTeA==}
+ date-fns-tz@3.2.0:
+ resolution: {integrity: sha512-sg8HqoTEulcbbbVXeg84u5UnlsQa8GS5QXMqjjYIhS4abEVVKIUwe0/l/UhrZdKaL/W5eWZNlbTeEIiOXTcsBQ==}
peerDependencies:
- date-fns: ^3.0.0
+ date-fns: ^3.0.0 || ^4.0.0
date-fns@3.6.0:
resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==}
@@ -2667,8 +2685,8 @@ packages:
resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==}
engines: {node: '>=8'}
- highlight.js@11.9.0:
- resolution: {integrity: sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==}
+ highlight.js@11.11.1:
+ resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==}
engines: {node: '>=12.0.0'}
hoist-non-react-statics@2.5.5:
@@ -3266,8 +3284,8 @@ packages:
resolution: {integrity: sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==}
engines: {node: '>=10'}
- naive-ui@2.40.4:
- resolution: {integrity: sha512-SDFbW9/VEZix/gmzj54jH6c0YDBVM6o0mG1520RAWKtPSqVrAp5r8qLi8dYvvDmcs/qoRbzM3QGuA4GxQJ/iEg==}
+ naive-ui@2.41.0:
+ resolution: {integrity: sha512-KnmLg+xPLwXV8QVR7ZZ69eCjvel7R5vru8+eFe4VoAJHEgqAJgVph6Zno9K2IVQRpSF3GBGea3tjavslOR4FAA==}
peerDependencies:
vue: ^3.0.0
@@ -3678,8 +3696,8 @@ packages:
engines: {node: '>=10.0.0'}
hasBin: true
- rollup@4.29.1:
- resolution: {integrity: sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==}
+ rollup@4.30.0:
+ resolution: {integrity: sha512-sDnr1pcjTgUT69qBksNF1N1anwfbyYG6TBQ22b03bII8EdiUQ7J0TlozVaTMjT/eEJAO49e1ndV7t+UZfL1+vA==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
@@ -3715,8 +3733,8 @@ packages:
scule@1.3.0:
resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==}
- seemly@0.3.8:
- resolution: {integrity: sha512-MW8Qs6vbzo0pHmDpFSYPna+lwpZ6Zk1ancbajw/7E8TKtHdV+1DfZZD+kKJEhG/cAoB/i+LiT+5msZOqj0DwRA==}
+ seemly@0.3.9:
+ resolution: {integrity: sha512-bMLcaEqhIViiPbaumjLN8t1y+JpD/N8SiyYOyp0i0W6RgdyLWboIsUWAbZojF//JyerxPZR5Tgda+x3Pdne75A==}
select@1.1.2:
resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==}
@@ -4381,8 +4399,8 @@ packages:
peerDependencies:
vue: ^3.2.0
- vue-tsc@2.1.10:
- resolution: {integrity: sha512-RBNSfaaRHcN5uqVqJSZh++Gy/YUzryuv9u1aFWhsammDJXNtUiJMNoJ747lZcQ68wUQFx6E73y4FY3D8E7FGMA==}
+ vue-tsc@2.2.0:
+ resolution: {integrity: sha512-gtmM1sUuJ8aSb0KoAFmK9yMxb8TxjewmxqTJ1aKphD5Cbu0rULFY6+UQT51zW7SpUcenfPUuflKyVwyx9Qdnxg==}
hasBin: true
peerDependencies:
typescript: '>=5.0.0'
@@ -4769,6 +4787,10 @@ snapshots:
dependencies:
'@babel/types': 7.26.0
+ '@babel/parser@7.26.3':
+ dependencies:
+ '@babel/types': 7.26.3
+
'@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)':
dependencies:
'@babel/core': 7.26.0
@@ -4842,6 +4864,11 @@ snapshots:
'@babel/helper-string-parser': 7.25.9
'@babel/helper-validator-identifier': 7.25.9
+ '@babel/types@7.26.3':
+ dependencies:
+ '@babel/helper-string-parser': 7.25.9
+ '@babel/helper-validator-identifier': 7.25.9
+
'@commitlint/cli@19.3.0(@types/node@22.5.5)(typescript@5.6.3)':
dependencies:
'@commitlint/format': 19.3.0
@@ -5187,11 +5214,11 @@ snapshots:
'@intlify/shared@9.13.1': {}
- '@intlify/unplugin-vue-i18n@4.0.0(rollup@4.29.1)(vue-i18n@9.13.1(vue@3.5.13(typescript@5.6.3)))(webpack-sources@3.2.3)':
+ '@intlify/unplugin-vue-i18n@4.0.0(rollup@4.30.0)(vue-i18n@9.13.1(vue@3.5.13(typescript@5.6.3)))(webpack-sources@3.2.3)':
dependencies:
'@intlify/bundle-utils': 8.0.0(vue-i18n@9.13.1(vue@3.5.13(typescript@5.6.3)))
'@intlify/shared': 9.13.1
- '@rollup/pluginutils': 5.1.2(rollup@4.29.1)
+ '@rollup/pluginutils': 5.1.2(rollup@4.30.0)
'@vue/compiler-sfc': 3.5.13
debug: 4.3.7
fast-glob: 3.3.2
@@ -5275,9 +5302,9 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.17.1
- '@nuxt/kit@3.13.2(rollup@4.29.1)(webpack-sources@3.2.3)':
+ '@nuxt/kit@3.13.2(rollup@4.30.0)(webpack-sources@3.2.3)':
dependencies:
- '@nuxt/schema': 3.13.2(rollup@4.29.1)(webpack-sources@3.2.3)
+ '@nuxt/schema': 3.13.2(rollup@4.30.0)(webpack-sources@3.2.3)
c12: 1.11.2
consola: 3.2.3
defu: 6.1.4
@@ -5295,7 +5322,7 @@ snapshots:
semver: 7.6.3
ufo: 1.5.4
unctx: 2.3.1(webpack-sources@3.2.3)
- unimport: 3.13.1(rollup@4.29.1)(webpack-sources@3.2.3)
+ unimport: 3.13.1(rollup@4.30.0)(webpack-sources@3.2.3)
untyped: 1.4.2
transitivePeerDependencies:
- magicast
@@ -5303,7 +5330,7 @@ snapshots:
- supports-color
- webpack-sources
- '@nuxt/schema@3.13.2(rollup@4.29.1)(webpack-sources@3.2.3)':
+ '@nuxt/schema@3.13.2(rollup@4.30.0)(webpack-sources@3.2.3)':
dependencies:
compatx: 0.1.8
consola: 3.2.3
@@ -5315,7 +5342,7 @@ snapshots:
std-env: 3.7.0
ufo: 1.5.4
uncrypto: 0.1.3
- unimport: 3.13.1(rollup@4.29.1)(webpack-sources@3.2.3)
+ unimport: 3.13.1(rollup@4.30.0)(webpack-sources@3.2.3)
untyped: 1.4.2
transitivePeerDependencies:
- rollup
@@ -5399,85 +5426,85 @@ snapshots:
estree-walker: 2.0.2
picomatch: 2.3.1
- '@rollup/pluginutils@5.1.0(rollup@4.29.1)':
+ '@rollup/pluginutils@5.1.0(rollup@4.30.0)':
dependencies:
'@types/estree': 1.0.5
estree-walker: 2.0.2
picomatch: 2.3.1
optionalDependencies:
- rollup: 4.29.1
+ rollup: 4.30.0
- '@rollup/pluginutils@5.1.2(rollup@4.29.1)':
+ '@rollup/pluginutils@5.1.2(rollup@4.30.0)':
dependencies:
'@types/estree': 1.0.6
estree-walker: 2.0.2
picomatch: 2.3.1
optionalDependencies:
- rollup: 4.29.1
+ rollup: 4.30.0
- '@rollup/pluginutils@5.1.4(rollup@4.29.1)':
+ '@rollup/pluginutils@5.1.4(rollup@4.30.0)':
dependencies:
'@types/estree': 1.0.6
estree-walker: 2.0.2
picomatch: 4.0.2
optionalDependencies:
- rollup: 4.29.1
+ rollup: 4.30.0
- '@rollup/rollup-android-arm-eabi@4.29.1':
+ '@rollup/rollup-android-arm-eabi@4.30.0':
optional: true
- '@rollup/rollup-android-arm64@4.29.1':
+ '@rollup/rollup-android-arm64@4.30.0':
optional: true
- '@rollup/rollup-darwin-arm64@4.29.1':
+ '@rollup/rollup-darwin-arm64@4.30.0':
optional: true
- '@rollup/rollup-darwin-x64@4.29.1':
+ '@rollup/rollup-darwin-x64@4.30.0':
optional: true
- '@rollup/rollup-freebsd-arm64@4.29.1':
+ '@rollup/rollup-freebsd-arm64@4.30.0':
optional: true
- '@rollup/rollup-freebsd-x64@4.29.1':
+ '@rollup/rollup-freebsd-x64@4.30.0':
optional: true
- '@rollup/rollup-linux-arm-gnueabihf@4.29.1':
+ '@rollup/rollup-linux-arm-gnueabihf@4.30.0':
optional: true
- '@rollup/rollup-linux-arm-musleabihf@4.29.1':
+ '@rollup/rollup-linux-arm-musleabihf@4.30.0':
optional: true
- '@rollup/rollup-linux-arm64-gnu@4.29.1':
+ '@rollup/rollup-linux-arm64-gnu@4.30.0':
optional: true
- '@rollup/rollup-linux-arm64-musl@4.29.1':
+ '@rollup/rollup-linux-arm64-musl@4.30.0':
optional: true
- '@rollup/rollup-linux-loongarch64-gnu@4.29.1':
+ '@rollup/rollup-linux-loongarch64-gnu@4.30.0':
optional: true
- '@rollup/rollup-linux-powerpc64le-gnu@4.29.1':
+ '@rollup/rollup-linux-powerpc64le-gnu@4.30.0':
optional: true
- '@rollup/rollup-linux-riscv64-gnu@4.29.1':
+ '@rollup/rollup-linux-riscv64-gnu@4.30.0':
optional: true
- '@rollup/rollup-linux-s390x-gnu@4.29.1':
+ '@rollup/rollup-linux-s390x-gnu@4.30.0':
optional: true
- '@rollup/rollup-linux-x64-gnu@4.29.1':
+ '@rollup/rollup-linux-x64-gnu@4.30.0':
optional: true
- '@rollup/rollup-linux-x64-musl@4.29.1':
+ '@rollup/rollup-linux-x64-musl@4.30.0':
optional: true
- '@rollup/rollup-win32-arm64-msvc@4.29.1':
+ '@rollup/rollup-win32-arm64-msvc@4.30.0':
optional: true
- '@rollup/rollup-win32-ia32-msvc@4.29.1':
+ '@rollup/rollup-win32-ia32-msvc@4.30.0':
optional: true
- '@rollup/rollup-win32-x64-msvc@4.29.1':
+ '@rollup/rollup-win32-x64-msvc@4.30.0':
optional: true
'@sinclair/typebox@0.27.8': {}
@@ -5519,6 +5546,8 @@ snapshots:
dependencies:
'@types/lodash': 4.17.6
+ '@types/lodash@4.17.13': {}
+
'@types/lodash@4.17.6': {}
'@types/minimatch@3.0.5': {}
@@ -5697,15 +5726,15 @@ snapshots:
loupe: 3.1.1
tinyrainbow: 1.2.0
- '@volar/language-core@2.4.9':
+ '@volar/language-core@2.4.11':
dependencies:
- '@volar/source-map': 2.4.9
+ '@volar/source-map': 2.4.11
- '@volar/source-map@2.4.9': {}
+ '@volar/source-map@2.4.11': {}
- '@volar/typescript@2.4.9':
+ '@volar/typescript@2.4.11':
dependencies:
- '@volar/language-core': 2.4.9
+ '@volar/language-core': 2.4.11
path-browserify: 1.0.1
vscode-uri: 3.0.8
@@ -5741,7 +5770,7 @@ snapshots:
'@vue/compiler-core@3.5.13':
dependencies:
- '@babel/parser': 7.26.2
+ '@babel/parser': 7.26.3
'@vue/shared': 3.5.13
entities: 4.5.0
estree-walker: 2.0.2
@@ -5801,13 +5830,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@vue/language-core@2.1.10(typescript@5.6.3)':
+ '@vue/language-core@2.2.0(typescript@5.6.3)':
dependencies:
- '@volar/language-core': 2.4.9
+ '@volar/language-core': 2.4.11
'@vue/compiler-dom': 3.5.13
'@vue/compiler-vue2': 2.7.16
'@vue/shared': 3.5.13
- alien-signals: 0.2.0
+ alien-signals: 0.4.12
minimatch: 9.0.5
muggle-string: 0.4.1
path-browserify: 1.0.1
@@ -5924,7 +5953,7 @@ snapshots:
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
- alien-signals@0.2.0: {}
+ alien-signals@0.4.12: {}
ansi-escapes@6.2.1: {}
@@ -6328,6 +6357,8 @@ snapshots:
shebang-command: 2.0.0
which: 2.0.2
+ crypto-js@4.2.0: {}
+
css-render@0.15.14:
dependencies:
'@emotion/hash': 0.8.0
@@ -6384,7 +6415,7 @@ snapshots:
dargs@8.1.0: {}
- date-fns-tz@3.1.3(date-fns@3.6.0):
+ date-fns-tz@3.2.0(date-fns@3.6.0):
dependencies:
date-fns: 3.6.0
@@ -7126,7 +7157,7 @@ snapshots:
hexoid@1.0.0: {}
- highlight.js@11.9.0: {}
+ highlight.js@11.11.1: {}
hoist-non-react-statics@2.5.5: {}
@@ -7667,23 +7698,23 @@ snapshots:
arrify: 2.0.1
minimatch: 3.1.2
- naive-ui@2.40.4(vue@3.5.13(typescript@5.6.3)):
+ naive-ui@2.41.0(vue@3.5.13(typescript@5.6.3)):
dependencies:
'@css-render/plugin-bem': 0.15.14(css-render@0.15.14)
'@css-render/vue3-ssr': 0.15.14(vue@3.5.13(typescript@5.6.3))
'@types/katex': 0.16.7
- '@types/lodash': 4.17.6
+ '@types/lodash': 4.17.13
'@types/lodash-es': 4.17.12
async-validator: 4.2.5
css-render: 0.15.14
csstype: 3.1.3
date-fns: 3.6.0
- date-fns-tz: 3.1.3(date-fns@3.6.0)
+ date-fns-tz: 3.2.0(date-fns@3.6.0)
evtd: 0.2.4
- highlight.js: 11.9.0
+ highlight.js: 11.11.1
lodash: 4.17.21
lodash-es: 4.17.21
- seemly: 0.3.8
+ seemly: 0.3.9
treemate: 0.3.11
vdirs: 0.1.8(vue@3.5.13(typescript@5.6.3))
vooks: 0.2.12(vue@3.5.13(typescript@5.6.3))
@@ -7862,9 +7893,9 @@ snapshots:
pidtree@0.6.0: {}
- pinia-plugin-persistedstate@4.1.3(pinia@2.3.0(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.29.1)(webpack-sources@3.2.3):
+ pinia-plugin-persistedstate@4.1.3(pinia@2.3.0(typescript@5.6.3)(vue@3.5.13(typescript@5.6.3)))(rollup@4.30.0)(webpack-sources@3.2.3):
dependencies:
- '@nuxt/kit': 3.13.2(rollup@4.29.1)(webpack-sources@3.2.3)
+ '@nuxt/kit': 3.13.2(rollup@4.30.0)(webpack-sources@3.2.3)
deep-pick-omit: 1.2.1
defu: 6.1.4
destr: 2.0.3
@@ -8072,37 +8103,37 @@ snapshots:
rfdc@1.3.1: {}
- rollup-plugin-gzip@4.0.1(rollup@4.29.1):
+ rollup-plugin-gzip@4.0.1(rollup@4.30.0):
dependencies:
- rollup: 4.29.1
+ rollup: 4.30.0
rollup@2.79.1:
optionalDependencies:
fsevents: 2.3.3
- rollup@4.29.1:
+ rollup@4.30.0:
dependencies:
'@types/estree': 1.0.6
optionalDependencies:
- '@rollup/rollup-android-arm-eabi': 4.29.1
- '@rollup/rollup-android-arm64': 4.29.1
- '@rollup/rollup-darwin-arm64': 4.29.1
- '@rollup/rollup-darwin-x64': 4.29.1
- '@rollup/rollup-freebsd-arm64': 4.29.1
- '@rollup/rollup-freebsd-x64': 4.29.1
- '@rollup/rollup-linux-arm-gnueabihf': 4.29.1
- '@rollup/rollup-linux-arm-musleabihf': 4.29.1
- '@rollup/rollup-linux-arm64-gnu': 4.29.1
- '@rollup/rollup-linux-arm64-musl': 4.29.1
- '@rollup/rollup-linux-loongarch64-gnu': 4.29.1
- '@rollup/rollup-linux-powerpc64le-gnu': 4.29.1
- '@rollup/rollup-linux-riscv64-gnu': 4.29.1
- '@rollup/rollup-linux-s390x-gnu': 4.29.1
- '@rollup/rollup-linux-x64-gnu': 4.29.1
- '@rollup/rollup-linux-x64-musl': 4.29.1
- '@rollup/rollup-win32-arm64-msvc': 4.29.1
- '@rollup/rollup-win32-ia32-msvc': 4.29.1
- '@rollup/rollup-win32-x64-msvc': 4.29.1
+ '@rollup/rollup-android-arm-eabi': 4.30.0
+ '@rollup/rollup-android-arm64': 4.30.0
+ '@rollup/rollup-darwin-arm64': 4.30.0
+ '@rollup/rollup-darwin-x64': 4.30.0
+ '@rollup/rollup-freebsd-arm64': 4.30.0
+ '@rollup/rollup-freebsd-x64': 4.30.0
+ '@rollup/rollup-linux-arm-gnueabihf': 4.30.0
+ '@rollup/rollup-linux-arm-musleabihf': 4.30.0
+ '@rollup/rollup-linux-arm64-gnu': 4.30.0
+ '@rollup/rollup-linux-arm64-musl': 4.30.0
+ '@rollup/rollup-linux-loongarch64-gnu': 4.30.0
+ '@rollup/rollup-linux-powerpc64le-gnu': 4.30.0
+ '@rollup/rollup-linux-riscv64-gnu': 4.30.0
+ '@rollup/rollup-linux-s390x-gnu': 4.30.0
+ '@rollup/rollup-linux-x64-gnu': 4.30.0
+ '@rollup/rollup-linux-x64-musl': 4.30.0
+ '@rollup/rollup-win32-arm64-msvc': 4.30.0
+ '@rollup/rollup-win32-ia32-msvc': 4.30.0
+ '@rollup/rollup-win32-x64-msvc': 4.30.0
fsevents: 2.3.3
rs-module-lexer@2.3.0:
@@ -8143,7 +8174,7 @@ snapshots:
scule@1.3.0: {}
- seemly@0.3.8: {}
+ seemly@0.3.9: {}
select@1.1.2: {}
@@ -8515,9 +8546,9 @@ snapshots:
unidecode@0.1.8: {}
- unimport@3.13.1(rollup@4.29.1)(webpack-sources@3.2.3):
+ unimport@3.13.1(rollup@4.30.0)(webpack-sources@3.2.3):
dependencies:
- '@rollup/pluginutils': 5.1.2(rollup@4.29.1)
+ '@rollup/pluginutils': 5.1.2(rollup@4.30.0)
acorn: 8.12.1
escape-string-regexp: 5.0.0
estree-walker: 3.0.3
@@ -8534,9 +8565,9 @@ snapshots:
- rollup
- webpack-sources
- unimport@3.14.5(rollup@4.29.1):
+ unimport@3.14.5(rollup@4.30.0):
dependencies:
- '@rollup/pluginutils': 5.1.4(rollup@4.29.1)
+ '@rollup/pluginutils': 5.1.4(rollup@4.30.0)
acorn: 8.14.0
escape-string-regexp: 5.0.0
estree-walker: 3.0.3
@@ -8564,25 +8595,25 @@ snapshots:
unpipe@1.0.0: {}
- unplugin-auto-import@0.19.0(@nuxt/kit@3.13.2(rollup@4.29.1)(webpack-sources@3.2.3))(@vueuse/core@12.0.0(typescript@5.6.3))(rollup@4.29.1):
+ unplugin-auto-import@0.19.0(@nuxt/kit@3.13.2(rollup@4.30.0)(webpack-sources@3.2.3))(@vueuse/core@12.0.0(typescript@5.6.3))(rollup@4.30.0):
dependencies:
'@antfu/utils': 0.7.10
- '@rollup/pluginutils': 5.1.4(rollup@4.29.1)
+ '@rollup/pluginutils': 5.1.4(rollup@4.30.0)
local-pkg: 0.5.1
magic-string: 0.30.17
picomatch: 4.0.2
- unimport: 3.14.5(rollup@4.29.1)
+ unimport: 3.14.5(rollup@4.30.0)
unplugin: 2.1.0
optionalDependencies:
- '@nuxt/kit': 3.13.2(rollup@4.29.1)(webpack-sources@3.2.3)
+ '@nuxt/kit': 3.13.2(rollup@4.30.0)(webpack-sources@3.2.3)
'@vueuse/core': 12.0.0(typescript@5.6.3)
transitivePeerDependencies:
- rollup
- unplugin-vue-components@0.28.0(@babel/parser@7.26.2)(@nuxt/kit@3.13.2(rollup@4.29.1)(webpack-sources@3.2.3))(rollup@4.29.1)(vue@3.5.13(typescript@5.6.3)):
+ unplugin-vue-components@0.28.0(@babel/parser@7.26.3)(@nuxt/kit@3.13.2(rollup@4.30.0)(webpack-sources@3.2.3))(rollup@4.30.0)(vue@3.5.13(typescript@5.6.3)):
dependencies:
'@antfu/utils': 0.7.10
- '@rollup/pluginutils': 5.1.4(rollup@4.29.1)
+ '@rollup/pluginutils': 5.1.4(rollup@4.30.0)
chokidar: 3.6.0
debug: 4.4.0
fast-glob: 3.3.2
@@ -8593,8 +8624,8 @@ snapshots:
unplugin: 2.1.0
vue: 3.5.13(typescript@5.6.3)
optionalDependencies:
- '@babel/parser': 7.26.2
- '@nuxt/kit': 3.13.2(rollup@4.29.1)(webpack-sources@3.2.3)
+ '@babel/parser': 7.26.3
+ '@nuxt/kit': 3.13.2(rollup@4.30.0)(webpack-sources@3.2.3)
transitivePeerDependencies:
- rollup
- supports-color
@@ -8686,10 +8717,10 @@ snapshots:
- supports-color
- terser
- vite-plugin-cdn2@1.1.0(rollup@4.29.1):
+ vite-plugin-cdn2@1.1.0(rollup@4.30.0):
dependencies:
'@babel/core': 7.24.1
- '@rollup/pluginutils': 5.1.0(rollup@4.29.1)
+ '@rollup/pluginutils': 5.1.0(rollup@4.30.0)
'@xn-sakina/rml-wasm': 2.3.0
debug: 4.3.4
magic-string: 0.30.8
@@ -8711,10 +8742,10 @@ snapshots:
rollup: 2.79.1
vite: 6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0)
- vite-plugin-inspect@0.8.4(@nuxt/kit@3.13.2(rollup@4.29.1)(webpack-sources@3.2.3))(rollup@4.29.1)(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0)):
+ vite-plugin-inspect@0.8.4(@nuxt/kit@3.13.2(rollup@4.30.0)(webpack-sources@3.2.3))(rollup@4.30.0)(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0)):
dependencies:
'@antfu/utils': 0.7.10
- '@rollup/pluginutils': 5.1.2(rollup@4.29.1)
+ '@rollup/pluginutils': 5.1.2(rollup@4.30.0)
debug: 4.3.7
error-stack-parser-es: 0.1.1
fs-extra: 11.2.0
@@ -8724,15 +8755,15 @@ snapshots:
sirv: 2.0.4
vite: 6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0)
optionalDependencies:
- '@nuxt/kit': 3.13.2(rollup@4.29.1)(webpack-sources@3.2.3)
+ '@nuxt/kit': 3.13.2(rollup@4.30.0)(webpack-sources@3.2.3)
transitivePeerDependencies:
- rollup
- supports-color
- vite-plugin-mock-dev-server@1.8.3(esbuild@0.24.2)(rollup@4.29.1)(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0)):
+ vite-plugin-mock-dev-server@1.8.3(esbuild@0.24.2)(rollup@4.30.0)(vite@6.0.7(@types/node@22.5.5)(jiti@1.21.6)(sass@1.83.0)):
dependencies:
'@pengzhanbo/utils': 1.2.0
- '@rollup/pluginutils': 5.1.4(rollup@4.29.1)
+ '@rollup/pluginutils': 5.1.4(rollup@4.30.0)
chokidar: 3.6.0
co-body: 6.2.0
cookies: 0.9.1
@@ -8779,7 +8810,7 @@ snapshots:
dependencies:
esbuild: 0.21.5
postcss: 8.4.49
- rollup: 4.29.1
+ rollup: 4.30.0
optionalDependencies:
'@types/node': 22.5.5
fsevents: 2.3.3
@@ -8789,7 +8820,7 @@ snapshots:
dependencies:
esbuild: 0.24.2
postcss: 8.4.49
- rollup: 4.29.1
+ rollup: 4.30.0
optionalDependencies:
'@types/node': 22.5.5
fsevents: 2.3.3
@@ -8880,11 +8911,10 @@ snapshots:
'@vue/devtools-api': 6.6.4
vue: 3.5.13(typescript@5.6.3)
- vue-tsc@2.1.10(typescript@5.6.3):
+ vue-tsc@2.2.0(typescript@5.6.3):
dependencies:
- '@volar/typescript': 2.4.9
- '@vue/language-core': 2.1.10(typescript@5.6.3)
- semver: 7.6.3
+ '@volar/typescript': 2.4.11
+ '@vue/language-core': 2.2.0(typescript@5.6.3)
typescript: 5.6.3
vue3-next-qrcode@2.0.10(typescript@5.6.3):
@@ -8910,7 +8940,7 @@ snapshots:
'@juggle/resize-observer': 3.4.0
css-render: 0.15.14
evtd: 0.2.4
- seemly: 0.3.8
+ seemly: 0.3.9
vdirs: 0.1.8(vue@3.5.13(typescript@5.6.3))
vooks: 0.2.12(vue@3.5.13(typescript@5.6.3))
vue: 3.5.13(typescript@5.6.3)
diff --git a/src/app-components/app/AppLockScreen/components/LockScreen/index.tsx b/src/app-components/app/AppLockScreen/components/LockScreen/index.tsx
index 6073d62e..5308ef7b 100644
--- a/src/app-components/app/AppLockScreen/components/LockScreen/index.tsx
+++ b/src/app-components/app/AppLockScreen/components/LockScreen/index.tsx
@@ -7,6 +7,8 @@ import { rules, useCondition } from '@/app-components/app/AppLockScreen/shared'
import { useSettingActions } from '@/store'
import { useTemplateRef } from 'vue'
import { useForm } from '@/components'
+import { APP_CATCH_KEY } from '@/app-config'
+import { setStorage, encrypt } from '@/utils'
import type { InputInst } from 'naive-ui'
@@ -27,6 +29,11 @@ const LockScreen = defineComponent({
validate().then(() => {
setLockAppScreen(true)
updateSettingState('lockScreenSwitch', false)
+ setStorage(
+ APP_CATCH_KEY.appLockScreenPasswordKey,
+ encrypt(state.lockCondition.lockPassword),
+ 'localStorage',
+ )
state.lockCondition = useCondition()
})
diff --git a/src/app-components/app/AppLockScreen/components/UnlockScreen/index.tsx b/src/app-components/app/AppLockScreen/components/UnlockScreen/index.tsx
index 9a413af7..467ce37c 100644
--- a/src/app-components/app/AppLockScreen/components/UnlockScreen/index.tsx
+++ b/src/app-components/app/AppLockScreen/components/UnlockScreen/index.tsx
@@ -10,6 +10,8 @@ import { rules, useCondition } from '@/app-components/app/AppLockScreen/shared'
import useAppLockScreen from '@/app-components/app/AppLockScreen/appLockVar'
import { useDevice } from '@/hooks'
import { useForm } from '@/components'
+import { APP_CATCH_KEY } from '@/app-config'
+import { removeStorage, decrypt, getStorage } from '@/utils'
export default defineComponent({
name: 'UnlockScreen',
@@ -42,27 +44,56 @@ export default defineComponent({
state.DDD = dayjs().format(DDD_FORMAT)
}, 86_400_000)
+ const toSigningFn = () => {
+ removeStorage(APP_CATCH_KEY.appLockScreenPasswordKey, 'localStorage')
+ updateSettingState('lockScreenSwitch', false)
+ setTimeout(() => {
+ logout()
+ }, 100)
+ }
+
const backToSigning = () => {
window.$dialog.warning({
title: '警告',
- content: '是否返回到登陆页?',
+ content: '是否返回到登陆页并且重新登录',
positiveText: '确定',
- negativeText: '取消',
- onPositiveClick: () => {
- updateSettingState('lockScreenSwitch', false)
- setTimeout(() => {
- logout()
- }, 100)
- },
+ negativeText: '重新登录',
+ onPositiveClick: toSigningFn,
})
}
const unlockScreen = () => {
- validate().then(() => {
- setLockAppScreen(false)
- updateSettingState('lockScreenSwitch', false)
+ const catchPassword = getStorage
(
+ APP_CATCH_KEY.appLockScreenPasswordKey,
+ 'localStorage',
+ )
- state.lockCondition = useCondition()
+ if (!catchPassword) {
+ window.$dialog.warning({
+ title: '警告',
+ content: () => '检测到锁屏密码被修改,请重新登录',
+ closable: false,
+ maskClosable: false,
+ closeOnEsc: false,
+ positiveText: '重新登录',
+ onPositiveClick: toSigningFn,
+ })
+
+ return
+ }
+
+ const dCatchPassword = decrypt(catchPassword)
+
+ validate().then(() => {
+ if (dCatchPassword === state.lockCondition.lockPassword) {
+ setLockAppScreen(false)
+ updateSettingState('lockScreenSwitch', false)
+ removeStorage(APP_CATCH_KEY.appLockScreenPasswordKey, 'localStorage')
+
+ state.lockCondition = useCondition()
+ } else {
+ window.$message.warning('密码错误,请重新输入')
+ }
})
}
diff --git a/src/app-components/provider/AppVersionProvider/index.tsx b/src/app-components/provider/AppVersionProvider/index.tsx
index e843477d..9adf88c1 100644
--- a/src/app-components/provider/AppVersionProvider/index.tsx
+++ b/src/app-components/provider/AppVersionProvider/index.tsx
@@ -53,7 +53,7 @@ export default defineComponent({
title="发现新版本"
content="当前版本已更新,点击确认加载新版本~"
zIndex={999999999}
- dad
+ draggable
positiveText="确认"
negativeText="取消"
onPositiveClick={logout}
diff --git a/src/app-config/app-config.ts b/src/app-config/app-config.ts
index 2ac7ab73..ef5ad4ed 100644
--- a/src/app-config/app-config.ts
+++ b/src/app-config/app-config.ts
@@ -94,6 +94,7 @@ export const APP_CATCH_KEY_PREFIX = ''
* - appPiniaSigningStore: pinia signing store key
* - appVersionProvider: 版本信息缓存 key
* - appMenuTagOptions: 标签页菜单列表
+ * - appLockScreenPasswordKey: 锁屏密码缓存 key
*/
export const APP_CATCH_KEY = {
signing: 'signing',
@@ -108,6 +109,7 @@ export const APP_CATCH_KEY = {
isAppLockScreen: 'isAppLockScreen',
appGlobalSearchOptions: 'appGlobalSearchOptions',
appMenuTagOptions: 'appMenuTagOptions',
+ appLockScreenPasswordKey: 'appLockScreenPasswordKey',
} as const
/**
diff --git a/src/axios/instance.ts b/src/axios/instance.ts
index 680712f5..5fa56457 100644
--- a/src/axios/instance.ts
+++ b/src/axios/instance.ts
@@ -1,10 +1,3 @@
-/**
- *
- * 请求拦截器与响应拦截器
- * 如果有需要拓展拦截器, 请在 inject 目录下参照示例方法继续拓展
- * 该页面不应该做过多的改动与配置
- */
-
import axios from 'axios'
import { AXIOS_CONFIG } from '@/app-config'
import { useAxiosInterceptor } from '@/axios/utils/interceptor'
@@ -17,23 +10,33 @@ import {
setupRequestErrorInterceptor,
} from '@/axios/axios-interceptor/request'
-import type { AxiosInstanceExpand } from './types'
+import type { AxiosInstanceExpand, RequestInterceptorConfig } from './types'
+// 创建 axios 实例
const server: AxiosInstanceExpand = axios.create(AXIOS_CONFIG)
+// 获取拦截器实例
const { createAxiosInstance, beforeFetch, fetchError } = useAxiosInterceptor()
// 请求拦截器
server.interceptors.request.use(
(request) => {
- createAxiosInstance(request, 'requestInstance') // 生成 request instance
- setupRequestInterceptor() // 初始化拦截器所有已注入方法
- beforeFetch('requestInstance', 'implementRequestInterceptorArray', 'ok') // 执行拦截器所有已注入方法
+ // 生成 request instance
+ createAxiosInstance(
+ request as RequestInterceptorConfig,
+ 'requestInstance',
+ )
+ // 初始化拦截器所有已注入方法
+ setupRequestInterceptor()
+ // 执行拦截器所有已注入方法
+ beforeFetch('requestInstance', 'implementRequestInterceptorArray', 'ok')
return request
},
(error) => {
- setupRequestErrorInterceptor() // 初始化拦截器所有已注入方法(错误状态)
- fetchError('requestError', error, 'implementRequestInterceptorErrorArray') // 执行所有已注入方法
+ // 初始化拦截器所有已注入方法(错误状态)
+ setupRequestErrorInterceptor()
+ // 执行所有已注入方法
+ fetchError('requestError', error, 'implementRequestInterceptorErrorArray')
return Promise.reject(error)
},
@@ -42,17 +45,22 @@ server.interceptors.request.use(
// 响应拦截器
server.interceptors.response.use(
(response) => {
- createAxiosInstance(response, 'responseInstance') // 创建响应实例
- setupResponseInterceptor() // 注入响应成功待执行队列
- beforeFetch('responseInstance', 'implementResponseInterceptorArray', 'ok') // 执行响应成功拦截器
+ // 创建响应实例
+ createAxiosInstance(response, 'responseInstance')
+ // 注入响应成功待执行队列
+ setupResponseInterceptor()
+ // 执行响应成功拦截器
+ beforeFetch('responseInstance', 'implementResponseInterceptorArray', 'ok')
const { data } = response
return Promise.resolve(data)
},
(error) => {
- setupResponseErrorInterceptor() // 注入响应失败待执行队列
- fetchError('responseError', error, 'implementResponseInterceptorErrorArray') // 执行响应失败后拦截器
+ // 注入响应失败待执行队列
+ setupResponseErrorInterceptor()
+ // 执行响应失败后拦截器
+ fetchError('responseError', error, 'implementResponseInterceptorErrorArray')
return Promise.reject(error)
},
diff --git a/src/axios/utils/interceptor.ts b/src/axios/utils/interceptor.ts
index 617a580c..00444c0f 100644
--- a/src/axios/utils/interceptor.ts
+++ b/src/axios/utils/interceptor.ts
@@ -1,14 +1,3 @@
-/**
- *
- * axios 拦截器注入
- *
- * 请求拦截器、响应拦截器
- * 暴露启动方法调用所有已注册方法
- *
- * 该拦截器仅适合放置公共的 axios 拦截器操作, 并且采用队列形式管理请求拦截器的注入
- * 所以在使用的时候, 需要按照约定格式进行参数传递
- */
-
import RequestCanceler from '@/axios/utils/RequestCanceler'
import { getAppEnvironment } from '@/utils'
@@ -24,31 +13,36 @@ import type {
import type { AnyFC } from '@/types'
import type { AxiosError } from 'axios'
-/** 当前请求的实例 */
+// 当前请求的实例
const axiosFetchInstance: AxiosFetchInstance = {
requestInstance: null,
responseInstance: null,
}
-/** 请求失败返回值 */
+// 请求失败返回值
const axiosFetchError: AxiosFetchError> = {
requestError: null,
responseError: null,
}
-/** 请求队列(区分 resolve 与 reject 状态) */
+// 请求队列(区分 resolve 与 reject 状态)
const implement: ImplementQueue = {
implementRequestInterceptorArray: [],
implementResponseInterceptorArray: [],
}
+// 请求失败队列
const errorImplement: ErrorImplementQueue = {
implementRequestInterceptorErrorArray: [],
implementResponseInterceptorErrorArray: [],
}
-/** 取消器实例 */
+type ImplementKeys = keyof ImplementQueue
+
+type ErrorImplementKeys = keyof ErrorImplementQueue
+
+// 取消器实例
export const axiosCanceler = new RequestCanceler()
export const useAxiosInterceptor = () => {
- /** 创建拦截器实例 */
+ // 创建拦截器实例
const createAxiosInstance = (
instance: RequestInterceptorConfig | ResponseInterceptorConfig,
instanceKey: keyof AxiosFetchInstance,
@@ -60,33 +54,33 @@ export const useAxiosInterceptor = () => {
instance as ResponseInterceptorConfig)
}
- /** 获取当前实例 */
+ // 获取当前实例
const getAxiosInstance = (instanceKey: keyof AxiosFetchInstance) => {
return axiosFetchInstance[instanceKey]
}
- /** 设置注入方法队列 */
+ // 设置注入方法队列
const setImplement = (
- key: keyof ImplementQueue | keyof ErrorImplementQueue,
+ key: ImplementKeys | ErrorImplementKeys,
func: AnyFC[],
fetchType: FetchType,
) => {
fetchType === 'ok'
- ? (implement[key as keyof ImplementQueue] = func)
- : (errorImplement[key as keyof ErrorImplementQueue] = func)
+ ? (implement[key as ImplementKeys] = func)
+ : (errorImplement[key as ErrorImplementKeys] = func)
}
- /** 获取队列中所有的所有拦截器方法 */
+ // 获取队列中所有的所有拦截器方法
const getImplement = (
- key: keyof ImplementQueue | keyof ErrorImplementQueue,
+ key: ImplementKeys | ErrorImplementKeys,
fetchType: FetchType,
): AnyFC[] => {
return fetchType === 'ok'
- ? implement[key as keyof ImplementQueue]
- : errorImplement[key as keyof ErrorImplementQueue]
+ ? implement[key as ImplementKeys]
+ : errorImplement[key as ErrorImplementKeys]
}
- /** 队列执行器 */
+ // 队列执行器
const implementer = (funcs: AnyFC[], ...args: any[]) => {
if (Array.isArray(funcs)) {
funcs.forEach((curr) => {
@@ -97,16 +91,16 @@ export const useAxiosInterceptor = () => {
}
}
- /** 请求、响应前执行拦截器队列中的所有方法 */
+ // 请求、响应前执行拦截器队列中的所有方法
const beforeFetch = (
key: keyof AxiosFetchInstance,
- implementKey: keyof ImplementQueue | keyof ErrorImplementQueue,
+ implementKey: ImplementKeys | ErrorImplementKeys,
fetchType: FetchType,
) => {
const funcArr =
fetchType === 'ok'
- ? implement[implementKey as keyof ImplementQueue]
- : errorImplement[implementKey as keyof ErrorImplementQueue]
+ ? implement[implementKey as ImplementKeys]
+ : errorImplement[implementKey as ErrorImplementKeys]
const instance = getAxiosInstance(key)
const { MODE } = getAppEnvironment()
@@ -115,11 +109,11 @@ export const useAxiosInterceptor = () => {
}
}
- /** 请求、响应错误时执行队列中所有方法 */
+ // 请求、响应错误时执行队列中所有方法
const fetchError = (
key: keyof AxiosFetchError,
error: AxiosError,
- errorImplementKey: keyof ErrorImplementQueue,
+ errorImplementKey: ErrorImplementKeys,
) => {
axiosFetchError[key] = error
diff --git a/src/components/base/RDraggableCard/DraggableCard.tsx b/src/components/base/RDraggableCard/DraggableCard.tsx
index e90888cf..f2aecad9 100644
--- a/src/components/base/RDraggableCard/DraggableCard.tsx
+++ b/src/components/base/RDraggableCard/DraggableCard.tsx
@@ -167,12 +167,6 @@ export default defineComponent({
restrictionElement = unrefElement(re as any) as HTMLElement
}
- if (!restrictionElement) {
- throw new Error(
- '[RDraggableCard]: if set restrictionElement, it must be a HTMLElement or a ref of HTMLElement.',
- )
- }
-
return {
card,
restrictionElement,
diff --git a/src/components/base/RModal/src/Modal.tsx b/src/components/base/RModal/src/Modal.tsx
index 642575ce..e171ffe2 100644
--- a/src/components/base/RModal/src/Modal.tsx
+++ b/src/components/base/RModal/src/Modal.tsx
@@ -4,14 +4,12 @@ import { NModal } from 'naive-ui'
import props from './props'
import { completeSize, uuid } from '@/utils'
-import { setupInteract } from './utils'
import {
FULLSCREEN_CARD_TYPE_CLASS,
R_MODAL_CLASS,
CSS_VARS_KEYS,
} from './constant'
-import type interact from 'interactjs'
import type { ModalProps } from 'naive-ui'
export default defineComponent({
@@ -24,57 +22,11 @@ export default defineComponent({
[CSS_VARS_KEYS['dialogWidth']]: completeSize(props.dialogWidth ?? 446),
}))
const uuidEl = uuid()
- let intractable: null | ReturnType
- // 记录拖拽的位置
- const position = {
- x: 0,
- y: 0,
- }
// 当前是否为预设 card 类型并且设置了 fullscreen
const isFullscreenCardType = computed(
() => props.preset === 'card' && props.fullscreen,
)
- watch(
- () => props.show,
- (ndata) => {
- if (
- ndata &&
- props.dad &&
- (props.preset === 'card' || props.preset === 'dialog')
- ) {
- nextTick(() => {
- const target = document.getElementById(uuidEl)
-
- if (target) {
- setupInteract(target, {
- preset: props.preset,
- x: position.x,
- y: position.y,
- dargCallback: (x, y) => {
- position.x = x
- position.y = y
- },
- }).then((res) => {
- intractable = res
- })
- }
-
- if (props.memo && target) {
- target.style.transform = `translate(${position.x}px, ${position.y}px)`
- }
- })
- } else {
- intractable?.unset()
-
- intractable = null
- }
- },
- {
- immediate: true,
- },
- )
-
return {
cssVars,
isFullscreenCardType,
diff --git a/src/components/base/RModal/src/hooks/useModal.ts b/src/components/base/RModal/src/hooks/useModal.ts
index 4b01e610..a9f64fa7 100644
--- a/src/components/base/RModal/src/hooks/useModal.ts
+++ b/src/components/base/RModal/src/hooks/useModal.ts
@@ -1,5 +1,4 @@
import { useModal as useNaiveModal, NScrollbar } from 'naive-ui'
-import { setupInteract } from '../utils'
import { queryElements, setStyle, completeSize, setClass } from '@/utils'
import { R_MODAL_CLASS, CSS_VARS_KEYS } from '../constant'
@@ -21,10 +20,10 @@ const useModal = () => {
color: 'rgba(0, 0, 0, 0)',
colorHover: 'rgba(0, 0, 0, 0)',
},
- trigger: 'none',
+ trigger: 'hover',
style: {
width: 'auto',
- height:
+ maxHeight:
'calc(var(--html-height) - 29px - var(--n-padding-bottom) - var(--n-padding-bottom) - var(--n-padding-top))',
},
},
@@ -35,7 +34,7 @@ const useModal = () => {
)
}
- const { preset, dad, fullscreen, width, cardWidth, dialogWidth } = options
+ const { preset, fullscreen, width, cardWidth, dialogWidth } = options
const modalReactive = naiveCreate({
...rest,
content: contentNode,
@@ -55,15 +54,6 @@ const useModal = () => {
return
}
- // 是否启用拖拽
- if (dad) {
- setupInteract(modalElement, {
- preset,
- x: 0,
- y: 0,
- })
- }
-
// preset 为 card,fullscreen 为 true 时,最大化 modal
if (fullscreen && preset === 'card') {
setStyle(modalElement, {
diff --git a/src/components/base/RModal/src/index.scss b/src/components/base/RModal/src/index.scss
index 3f2143ff..86ab6556 100644
--- a/src/components/base/RModal/src/index.scss
+++ b/src/components/base/RModal/src/index.scss
@@ -4,6 +4,11 @@
// 当设置全屏时,启用滚动
& .n-card__content {
overflow: scroll;
+ max-height: calc(
+ var(--html-height) - var(--n-padding-bottom) - var(--n-padding-bottom) - var(
+ --n-padding-top
+ )
+ );
}
}
diff --git a/src/components/base/RModal/src/props.ts b/src/components/base/RModal/src/props.ts
index baf0217b..b60ee17c 100644
--- a/src/components/base/RModal/src/props.ts
+++ b/src/components/base/RModal/src/props.ts
@@ -3,17 +3,6 @@ import type { PropType } from 'vue'
const props = {
...modalProps,
- /**
- *
- * @description
- * 是否记住上一次的位置。
- *
- * @default true
- */
- memo: {
- type: Boolean,
- default: true,
- },
/**
*
* @description
@@ -58,18 +47,6 @@ const props = {
type: [String, Number] as PropType,
default: 446,
},
- /**
- *
- * @description
- * 是否启用拖拽。
- * 当启用拖拽时,可以通过拖拽 header 部分控制模态框。
- *
- * @default false
- */
- dad: {
- type: Boolean,
- default: false,
- },
}
export default props
diff --git a/src/components/base/RModal/src/types.ts b/src/components/base/RModal/src/types.ts
index 9b668968..87ef0bc7 100644
--- a/src/components/base/RModal/src/types.ts
+++ b/src/components/base/RModal/src/types.ts
@@ -1,14 +1,6 @@
import type { ModalOptions as NaiveModalOptions } from 'naive-ui'
export interface RModalProps extends NaiveModalOptions {
- /**
- *
- * @description
- * 是否记住上一次的位置。
- *
- * @default true
- */
- memo?: boolean
/**
*
* @description
@@ -41,13 +33,4 @@ export interface RModalProps extends NaiveModalOptions {
* @default 446
*/
dialogWidth?: number | string
- /**
- *
- * @description
- * 是否启用拖拽。
- * 当启用拖拽时,可以通过拖拽 header 部分控制模态框。
- *
- * @default false
- */
- dad?: boolean
}
diff --git a/src/components/base/RModal/src/utils.ts b/src/components/base/RModal/src/utils.ts
deleted file mode 100644
index b40fc05f..00000000
--- a/src/components/base/RModal/src/utils.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-import interact from 'interactjs'
-
-import type { ModalProps } from 'naive-ui'
-import type { RModalProps } from './types'
-
-interface SetupDraggableOptions {
- scheduler?: (event: Interact.DragEvent) => void
-}
-
-interface SetupInteractOptions {
- preset: ModalProps['preset']
- memo?: RModalProps['memo']
- x: number
- y: number
- dargCallback?: (x: number, y: number, event: Interact.DragEvent) => void
-}
-
-/**
- *
- * @param bindModal modal 预设元素
- * @param preset 预设类型
- *
- * @description
- * 根据预设模态框设置拖拽效果
- * 但是该效果有且仅有 card, dialog 有效
- *
- * 默认添加 30ms 延迟,避免诡异问题
- */
-export const setupDraggable = (
- bindModal: HTMLElement,
- preset: ModalProps['preset'],
- options?: SetupDraggableOptions,
-): Promise> => {
- const { scheduler } = options ?? {}
-
- return new Promise((resolve) => {
- setTimeout(() => {
- const allowFromStr =
- preset === 'card' ? '.n-card-header__main' : '.n-dialog__title'
-
- if (bindModal) {
- const dad = interact(bindModal)
- .draggable({
- inertia: true,
- autoScroll: true,
- allowFrom: allowFromStr,
- modifiers: [
- interact.modifiers.restrictRect({
- restriction: 'parent',
- endOnly: true,
- }),
- ],
- listeners: {
- move: (event) => {
- scheduler?.(event)
- },
- },
- })
- .resizable(false)
-
- resolve(dad)
- }
- }, 30)
- })
-}
-
-export const setupInteract = (
- target: HTMLElement | string,
- options: SetupInteractOptions,
-): Promise> => {
- const _target =
- typeof target === 'string'
- ? (document.querySelector(target) as HTMLElement)
- : target
-
- return new Promise((resolve, reject) => {
- if (_target) {
- _target.setAttribute('can-drag', 'true')
-
- const { preset, dargCallback } = options
- let { x, y } = options
-
- setupDraggable(_target, preset, {
- scheduler: (event) => {
- const target = event.target
-
- x += event.dx
- y += event.dy
-
- target.style.transform = `translate(${x}px, ${y}px)`
-
- dargCallback?.(x, y, event)
- },
- }).then((res) => {
- resolve(res)
- })
- } else {
- reject()
- }
- })
-}
diff --git a/src/components/base/RSegment/src/Segment.tsx b/src/components/base/RSegment/src/Segment.tsx
index 5cf76f4a..c8da9bac 100644
--- a/src/components/base/RSegment/src/Segment.tsx
+++ b/src/components/base/RSegment/src/Segment.tsx
@@ -94,7 +94,6 @@ export default defineComponent({
return (
{
+ // 当处于小尺寸状态时,自动关闭搜索框
+ if (val) {
+ modelShow.value = false
+ }
+ },
+ })
const loading = ref(false)
// 激活样式 class name
const ACTIVE_CLASS = 'content-item--active'
@@ -309,22 +316,7 @@ export default defineComponent({
)
- watchEffect(() => {
- // 当处于小尺寸状态时,自动关闭搜索框
- if (isTabletOrSmaller.value) {
- modelShow.value = false
- }
- })
-
- useEventListener(
- window,
- 'keydown',
- (e: KeyboardEvent) => {
- registerArouseKeyboard(e)
- registerChangeSearchElementIndex(e)
- },
- true,
- )
+ useEventListener(window, 'keydown', registerArouseKeyboard)
return {
...toRefs(state),
@@ -336,11 +328,16 @@ export default defineComponent({
isTabletOrSmaller,
SearchItem,
loading,
+ registerChangeSearchElementIndex,
}
},
render() {
const { isTabletOrSmaller, searchOptions, loading } = this
- const { SearchItem, fuzzySearchMenuOptions } = this
+ const {
+ SearchItem,
+ fuzzySearchMenuOptions,
+ registerChangeSearchElementIndex,
+ } = this
return isTabletOrSmaller ? (
@@ -350,7 +347,11 @@ export default defineComponent({
transformOrigin="center"
displayDirective="if"
>
-
+
createLeftIconOptions({
@@ -61,7 +68,8 @@ export default defineComponent({
)
/**
*
- * 顶部右边提示框操作栏
+ * @description
+ * 顶部右边提示框操作栏。
*/
const rightTooltipIconOptions = computed(() =>
createRightIconOptions({
diff --git a/src/router/utils/order-routes.ts b/src/router/utils/order-routes.ts
index d843b4b9..f21a9e7e 100644
--- a/src/router/utils/order-routes.ts
+++ b/src/router/utils/order-routes.ts
@@ -16,10 +16,6 @@ export const orderRoutes = (routes: AppRouteRecordRaw[]) => {
const currOrder = curr.meta?.order ?? 1
const nextOrder = next.meta?.order ?? 0
- if (typeof currOrder !== 'number' || typeof nextOrder !== 'number') {
- throw new TypeError('orderRoutes error: order must be a number!')
- }
-
if (currOrder === nextOrder) {
// 如果两个路由的 order 值相同,则按照路由名进行排序
return curr.name
diff --git a/src/utils/c/constant.ts b/src/utils/c/constant.ts
new file mode 100644
index 00000000..65cea0fd
--- /dev/null
+++ b/src/utils/c/constant.ts
@@ -0,0 +1,6 @@
+/**
+ *
+ * @description
+ * 约定加密 key。
+ */
+export const CRYPTO_KEY = '4cP+dX5FI2EVYzln'
diff --git a/src/utils/c/decrypt.ts b/src/utils/c/decrypt.ts
new file mode 100644
index 00000000..bddd8c71
--- /dev/null
+++ b/src/utils/c/decrypt.ts
@@ -0,0 +1,32 @@
+import { AES, enc } from 'crypto-js'
+import { CRYPTO_KEY } from './constant'
+
+import type { CipherParams, WordArray } from './types'
+
+/**
+ *
+ * @param data AES 加密后的数据
+ * @param key 解密 key
+ *
+ * @description
+ * 使用 AES 解密数据。
+ *
+ * @example
+ * const data = 'U2FsdGVkX1+3Q
+ * const key = CRYPTO_KEY
+ *
+ * const decrypted = decrypt(data, key) // { name: 'John Doe' }
+ */
+export const decrypt = (
+ data: string | CipherParams,
+ key?: string | WordArray,
+) => {
+ try {
+ const decrypted = AES.decrypt(data, key || CRYPTO_KEY)
+ const decryptedData = decrypted.toString(enc.Utf8)
+
+ return JSON.parse(decryptedData)
+ } catch (e) {
+ console.error(`Unknown error: ${e}`)
+ }
+}
diff --git a/src/utils/c/encrypt.ts b/src/utils/c/encrypt.ts
new file mode 100644
index 00000000..c890580d
--- /dev/null
+++ b/src/utils/c/encrypt.ts
@@ -0,0 +1,24 @@
+import { AES } from 'crypto-js'
+import { CRYPTO_KEY } from './constant'
+
+import type { WordArray } from './types'
+
+/**
+ *
+ * @param data 待加密数据
+ * @param key 加密 key
+ *
+ * @description
+ * 使用 AES 加密数据。
+ *
+ * @example
+ * const data = { name: 'John Doe' }
+ * const key = CRYPTO_KEY
+ *
+ * const encrypted = encrypt(data, key) // 'U2FsdGVkX1+3Q'
+ */
+export const encrypt = (data: unknown, key?: string | WordArray) => {
+ const encrypted = AES.encrypt(JSON.stringify(data), key || CRYPTO_KEY)
+
+ return encrypted.toString()
+}
diff --git a/src/utils/c/index.ts b/src/utils/c/index.ts
new file mode 100644
index 00000000..6b5aba16
--- /dev/null
+++ b/src/utils/c/index.ts
@@ -0,0 +1,5 @@
+import { CRYPTO_KEY } from './constant'
+import { decrypt } from './decrypt'
+import { encrypt } from './encrypt'
+
+export { CRYPTO_KEY, decrypt, encrypt }
diff --git a/src/utils/c/types.ts b/src/utils/c/types.ts
new file mode 100644
index 00000000..cf051fcb
--- /dev/null
+++ b/src/utils/c/types.ts
@@ -0,0 +1,4 @@
+import type CryptoJS from 'crypto-js'
+
+export type WordArray = CryptoJS.lib.WordArray
+export type CipherParams = CryptoJS.lib.CipherParams
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 0b98de6b..3f515f6d 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -7,6 +7,7 @@ export * from './element'
export * from './precision'
export * from './vue'
export * from './app'
+export * from './c'
export { positionSelectedMenuItem }
export { updateObjectValue } from './update-object-value'
export { removeDuplicateKeys } from './remove-duplicate-keys'
diff --git a/src/views/demo/modal-demo/index.tsx b/src/views/demo/modal-demo/index.tsx
index a40b290e..cf39e46e 100644
--- a/src/views/demo/modal-demo/index.tsx
+++ b/src/views/demo/modal-demo/index.tsx
@@ -16,7 +16,7 @@ export default defineComponent({
const createCardModal = () => {
create({
title: '卡片模态框',
- dad: true,
+ draggable: true,
preset: 'card',
content: () => (
我可以被拖拽的全屏card模态框
@@ -30,7 +30,7 @@ export default defineComponent({
title: '模态框',
content: '内容',
preset: 'dialog',
- dad: true,
+ draggable: true,
})
}
@@ -47,12 +47,7 @@ export default defineComponent({
-
- memoryPosition: 是否记住上一次被拖拽的位置,如果设置为
- true,那么下一次打开的时候会自动定位到上一次的位置。
-
fullscreen: 全屏模态框。
- dad: 启用拖拽,当配置为 false 时,会禁用拖拽效果。
我可以被拖拽
@@ -75,7 +70,7 @@ export default defineComponent({
v-model:show={this.modal3}
preset="dialog"
title="可拖拽卡片模态框"
- dad
+ draggable
>
我可以被拖拽