Forráskód Böngészése

update 前端依赖小版本升级

JSEncrypt导包方式更换
Axios增加更明确的超时错误配置
lau 5 hónapja
szülő
commit
8048d80baa
3 módosított fájl, 34 hozzáadás és 30 törlés
  1. 28 28
      package.json
  2. 1 1
      src/utils/jsencrypt.ts
  3. 5 1
      src/utils/request.ts

+ 28 - 28
package.json

@@ -20,63 +20,63 @@
     "url": "https://gitee.com/JavaLionLi/plus-ui.git"
   },
   "dependencies": {
-    "@element-plus/icons-vue": "2.3.1",
+    "@element-plus/icons-vue": "2.3.2",
     "@highlightjs/vue-plugin": "2.1.0",
     "@vueup/vue-quill": "1.2.0",
     "@vueuse/core": "13.1.0",
     "animate.css": "4.1.1",
     "await-to-js": "3.0.0",
-    "axios": "1.8.4",
+    "axios": "1.13.1",
     "crypto-js": "4.2.0",
     "echarts": "5.6.0",
-    "element-plus": "2.9.8",
+    "element-plus": "2.11.7",
     "file-saver": "2.0.5",
-    "highlight.js": "11.9.0",
+    "highlight.js": "11.11.1",
     "image-conversion": "2.1.1",
     "js-cookie": "3.0.5",
-    "jsencrypt": "3.3.2",
+    "jsencrypt": "3.5.4",
     "nprogress": "0.2.0",
-    "pinia": "3.0.2",
+    "pinia": "3.0.3",
     "screenfull": "6.0.2",
-    "vue": "3.5.13",
+    "vue": "3.5.22",
     "vue-cropper": "1.1.1",
-    "vue-i18n": "11.1.3",
-    "vue-json-pretty": "2.4.0",
-    "vue-router": "4.5.0",
+    "vue-i18n": "11.1.12",
+    "vue-json-pretty": "2.6.0",
+    "vue-router": "4.6.3",
     "vue-types": "6.0.0",
-    "vxe-table": "4.13.7"
+    "vxe-table": "4.17.7"
   },
   "devDependencies": {
-    "@iconify/json": "^2.2.276",
+    "@iconify/json": "^2.2.403",
     "@types/crypto-js": "4.2.2",
     "@types/file-saver": "2.0.7",
     "@types/js-cookie": "3.0.6",
     "@types/node": "^22.13.4",
     "@types/nprogress": "0.2.3",
-    "@unocss/preset-attributify": "66.5.2",
-    "@unocss/preset-icons": "66.5.2",
-    "@unocss/preset-uno": "66.5.2",
+    "@unocss/preset-attributify": "66.5.4",
+    "@unocss/preset-icons": "66.5.4",
+    "@unocss/preset-uno": "66.5.4",
     "@vitejs/plugin-vue": "5.2.3",
-    "@vue/compiler-sfc": "3.5.13",
+    "@vue/compiler-sfc": "3.5.22",
     "@vue/eslint-config-prettier": "10.2.0",
-    "@vue/eslint-config-typescript": "14.4.0",
-    "autoprefixer": "10.4.20",
-    "eslint": "9.21.0",
-    "eslint-plugin-prettier": "5.2.3",
+    "@vue/eslint-config-typescript": "14.6.0",
+    "autoprefixer": "10.4.21",
+    "eslint": "9.39.1",
+    "eslint-plugin-prettier": "5.5.4",
     "eslint-plugin-vue": "9.32.0",
-    "globals": "16.0.0",
-    "prettier": "3.5.2",
-    "sass": "1.87.0",
-    "typescript": "~5.8.3",
-    "unocss": "66.5.2",
+    "globals": "16.5.0",
+    "prettier": "3.6.2",
+    "sass": "1.93.3",
+    "typescript": "~5.9.3",
+    "unocss": "66.5.4",
     "unplugin-auto-import": "19.1.2",
-    "unplugin-icons": "22.1.0",
+    "unplugin-icons": "22.5.0",
     "unplugin-vue-components": "28.5.0",
     "unplugin-vue-setup-extend-plus": "1.0.1",
     "vite": "6.3.2",
     "vite-plugin-compression": "0.5.1",
-    "vite-plugin-svg-icons-ng": "^1.4.0",
-    "vite-plugin-vue-devtools": "7.7.5",
+    "vite-plugin-svg-icons-ng": "^1.5.2",
+    "vite-plugin-vue-devtools": "8.0.3",
     "vitest": "3.1.2",
     "vue-tsc": "^2.2.8"
   },

+ 1 - 1
src/utils/jsencrypt.ts

@@ -1,4 +1,4 @@
-import JSEncrypt from 'jsencrypt/bin/jsencrypt.min.js';
+import JSEncrypt from 'jsencrypt';
 // 密钥对生成 http://web.chacuo.net/netrsakeypair
 
 const publicKey = import.meta.env.VITE_APP_RSA_PUBLIC_KEY;

+ 5 - 1
src/utils/request.ts

@@ -28,7 +28,11 @@ axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
 // 创建 axios 实例
 const service = axios.create({
   baseURL: import.meta.env.VITE_APP_BASE_API,
-  timeout: 50000
+  timeout: 50000,
+  transitional: {
+    // 超时错误更明确
+    clarifyTimeoutError: true
+  }
 });
 
 // 请求拦截器