From 7d1ce84fcd85ee8588dbc097b9ecda0b89a6558b Mon Sep 17 00:00:00 2001 From: fangxiang Date: Sat, 28 May 2022 17:51:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=97=A5=E6=9C=9F=E3=80=81?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/boot/i18n.ts | 2 ++ src/components/ClockSignalSourceDialog.vue | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/boot/i18n.ts b/src/boot/i18n.ts index ad13200..666d532 100644 --- a/src/boot/i18n.ts +++ b/src/boot/i18n.ts @@ -26,6 +26,8 @@ Cookies.set("language", language, { expires: 365, }); +(window).currnet_use_language = language; + const i18n = createI18n({ locale: language, messages, diff --git a/src/components/ClockSignalSourceDialog.vue b/src/components/ClockSignalSourceDialog.vue index e897561..5ae5ff5 100644 --- a/src/components/ClockSignalSourceDialog.vue +++ b/src/components/ClockSignalSourceDialog.vue @@ -462,10 +462,6 @@ export default defineComponent({ const now = Date.now(); const date_format_options = ref([ - { - label: DateHelper.formatDate(now, "YYYY年MM月DD日"), - value: "yyyy年MM月dd日", - }, { label: DateHelper.formatDate(now, "YYYY/MM/DD"), value: "yyyy/MM/dd", @@ -474,17 +470,21 @@ export default defineComponent({ label: DateHelper.formatDate(now, "YYYY-MM-DD"), value: "yyyy-MM-dd", }, + { + label: DateHelper.formatDate(now, "YYYY年MM月DD日"), + value: "yyyy年MM月dd日", + }, ]); const time_format_options = ref([ - { - label: DateHelper.formatDate(now, "HH时mm分ss秒"), - value: "hh时mm分ss秒", - }, { label: DateHelper.formatDate(now, "HH:mm:ss"), value: "hh:mm:ss", }, + { + label: DateHelper.formatDate(now, "HH时mm分ss秒"), + value: "hh时mm分ss秒", + }, ]); let show_dialog = ref(false);