chore: update types
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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 };
|
||||
|
Reference in New Issue
Block a user