From d2bce3fcbe514d33eb930d33acf1f8db3fa22af9 Mon Sep 17 00:00:00 2001 From: LiuHao <liuhaoai545@gmail> Date: 星期二, 18 四月 2023 23:36:26 +0800 Subject: [PATCH] add i18n --- src/store/modules/app.ts | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index fd47c82..1fb8337 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -14,7 +14,7 @@ // 璇█ const language = ref(Cookies.get('language')); const locale = computed(() => { - if (language?.value == 'en') { + if (language.value == 'en') { return en; } else { return zhCn; @@ -53,6 +53,7 @@ const changeLanguage = (val: string): void => { language.value = val; + Cookies.set('language', val); }; return { -- Gitblit v1.9.3