chore: update types

This commit is contained in:
vben
2024-06-02 20:47:50 +08:00
parent b200ae9997
commit ce0c3834ed
31 changed files with 485 additions and 124 deletions

View File

@@ -1,4 +1,4 @@
import type { LocaleSupportType } from '@vben-core/typings';
import type { SupportedLanguagesType } from '@vben-core/typings';
import type { Locale } from 'vue-i18n';
@@ -44,7 +44,7 @@ function setI18nLanguage(locale: Locale) {
* Load locale messages
* @param lang
*/
async function loadLocaleMessages(lang: LocaleSupportType) {
async function loadLocaleMessages(lang: SupportedLanguagesType) {
if (unref(i18n.global.locale) === lang) {
return setI18nLanguage(lang);
}

View File

@@ -1,4 +1,4 @@
import type { LocaleSupportType } from '@vben-core/typings';
import type { SupportedLanguagesType } from '@vben-core/typings';
type ImportLocaleFn = () => Promise<{ default: Record<string, string> }>;
@@ -7,7 +7,7 @@ interface LocaleSetupOptions {
* Default language
* @default zh-CN
*/
defaultLocale?: LocaleSupportType;
defaultLocale?: SupportedLanguagesType;
}
export type { ImportLocaleFn, LocaleSetupOptions, LocaleSupportType };
export type { ImportLocaleFn, LocaleSetupOptions, SupportedLanguagesType };