From 547c91649da47f4dd8c6706e632797dbd9d79d87 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期六, 07 十二月 2024 16:26:49 +0800 Subject: [PATCH] 工艺路线工序节点保存更新 --- src/locales/useLocale.ts | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/locales/useLocale.ts b/src/locales/useLocale.ts index 64bd4a1..2f2b677 100644 --- a/src/locales/useLocale.ts +++ b/src/locales/useLocale.ts @@ -1,12 +1,13 @@ /** * Multi-language related operations */ -import type { LocaleType } from '/#/config'; +import type { LocaleType } from '#/config'; import { i18n } from './setupI18n'; -import { useLocaleStoreWithOut } from '/@/store/modules/locale'; +import { useLocaleStoreWithOut } from '@/store/modules/locale'; import { unref, computed } from 'vue'; import { loadLocalePool, setHtmlPageLang } from './helper'; +import { Locale } from 'ant-design-vue/es/locale'; interface LangModule { message: Recordable; @@ -32,7 +33,8 @@ const getShowLocalePicker = computed(() => localeStore.getShowPicker); const getAntdLocale = computed((): any => { - return i18n.global.getLocaleMessage(unref(getLocale))?.antdLocale ?? {}; + const localeMessage = i18n.global.getLocaleMessage<{ antdLocale: Locale }>(unref(getLocale)); + return localeMessage?.antdLocale ?? {}; }); // Switching the language will change the locale of useI18n -- Gitblit v1.9.3