From 5838e94badc762e41d66ab65a57b7ce1a8c0d6a5 Mon Sep 17 00:00:00 2001 From: PeopleSea Date: Sun, 27 Jul 2025 17:40:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Update(package):=20=E4=BF=AE=E6=AD=A3=20vue?= =?UTF-8?q?-i18n=20=E7=89=88=E6=9C=AC=E5=8F=B7=E5=89=8D=E7=9A=84=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=E4=B8=BA=20^=EF=BC=8C=E4=BB=A5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=9B=B4=E9=AB=98=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index 7e815a42a..ce4c68031 100644 --- a/web/package.json +++ b/web/package.json @@ -47,7 +47,7 @@ "sortablejs": "1.15.6", "vaul-vue": "^0.3.0", "vue": "^3.5.13", - "vue-i18n": "11.1.2", + "vue-i18n": "^11.1.2", "vue-m-message": "^4.0.2", "vue-router": "^4.5.0", "vue3-sfc-loader": "^0.9.5", From fb83ef4de597ebebfeeab1720152ee91e8816a0d Mon Sep 17 00:00:00 2001 From: PeopleSea Date: Thu, 31 Jul 2025 15:19:18 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix(useTrans):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=BC=83=E7=94=A8=E8=AD=A6=E5=91=8A=EF=BC=8C=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20useTrans('key')=20=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/hooks/auto-imports/useTrans.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/hooks/auto-imports/useTrans.ts b/web/src/hooks/auto-imports/useTrans.ts index 887515670..a07e63269 100644 --- a/web/src/hooks/auto-imports/useTrans.ts +++ b/web/src/hooks/auto-imports/useTrans.ts @@ -24,6 +24,11 @@ export function useTrans(key: any | null = null): TransType | string | any { }) if (key === null) { + /** + * @deprecated This usage is not recommended. Please use useTrans('key') instead. + * Returning both global and local translation functions is discouraged. + * This helps avoid duplicate useI18n() calls and improves performance. + */ return { localTrans: local.t, globalTrans: global.t,