From 916cbe9d240b118872cf6c7716eea1de62e72478 Mon Sep 17 00:00:00 2001 From: Seven Date: Sat, 20 Dec 2025 02:23:55 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto-imports.d.ts | 5 +++ src/App.vue | 5 +++ src/composables/useLanguage.ts | 60 ++++++++++++++++++++++++++ src/locales/en-US.json | 17 ++++++++ src/locales/zh-CN.json | 17 ++++++++ src/main.ts | 2 + src/router/index.ts | 12 +++++- src/views/system-settings/index.vue | 33 +++++++------- src/views/system-settings/language.vue | 58 +++++++++++++++++++++++++ src/views/system-settings/outlet.vue | 17 ++++++++ 10 files changed, 210 insertions(+), 16 deletions(-) create mode 100644 src/composables/useLanguage.ts create mode 100644 src/views/system-settings/language.vue create mode 100644 src/views/system-settings/outlet.vue diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 530d8f8..ad9616b 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -213,6 +213,7 @@ declare global { const useInterval: typeof import('@vueuse/core').useInterval const useIntervalFn: typeof import('@vueuse/core').useIntervalFn const useKeyModifier: typeof import('@vueuse/core').useKeyModifier + const useLanguage: typeof import('./src/composables/useLanguage').useLanguage const useLastChanged: typeof import('@vueuse/core').useLastChanged const useLink: typeof import('vue-router').useLink const useLocalStorage: typeof import('@vueuse/core').useLocalStorage @@ -333,6 +334,9 @@ declare global { export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' import('vue') // @ts-ignore + export type { Language } from './src/composables/useLanguage' + import('./src/composables/useLanguage') + // @ts-ignore export type { QRScanResult } from './src/composables/useQRScanner' import('./src/composables/useQRScanner') // @ts-ignore @@ -557,6 +561,7 @@ declare module 'vue' { readonly useInterval: UnwrapRef readonly useIntervalFn: UnwrapRef readonly useKeyModifier: UnwrapRef + readonly useLanguage: UnwrapRef readonly useLastChanged: UnwrapRef readonly useLink: UnwrapRef readonly useLocalStorage: UnwrapRef diff --git a/src/App.vue b/src/App.vue index fd0ffa2..5253a68 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,15 @@