From b22be879c13f5b3fb7d906cadf6f277cc7a63e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Mon, 18 Sep 2023 17:24:34 +0800 Subject: [PATCH] =?UTF-8?q?CN-1307=20fix:=20=E5=9C=A8=20Administration>=20?= =?UTF-8?q?Appearance=E9=A1=B5=E9=9D=A2=E5=B0=86Default=20language?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=88=90=E4=B8=AD=E6=96=87=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=AF=AD=E8=A8=80=E4=BB=8D=E4=B8=BA=E8=8B=B1?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/administration/Appearance.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/administration/Appearance.vue b/src/views/administration/Appearance.vue index 070d63d6..ac406c04 100644 --- a/src/views/administration/Appearance.vue +++ b/src/views/administration/Appearance.vue @@ -60,6 +60,7 @@ import { api } from '@/utils/api' import { storageKey } from '@/utils/constants' import axios from 'axios' +import dayjs from 'dayjs' export default { name: 'Appearance', @@ -173,6 +174,10 @@ export default { localStorage.setItem(storageKey.timezoneOffset, window.$dayJs.tz().utcOffset() / 60) localStorage.setItem(storageKey.timezoneLocalOffset, dayjs().utcOffset() / 60) } + if (this.appearanceObject.lang !== localStorage.getItem(storageKey.language)) { + localStorage.setItem(storageKey.language, this.appearanceObject.lang) + } + window.location.reload() } else { this.$message.error(response.message) }