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,7 +1,7 @@
import type { LocaleSupportType } from './types';
import type { SupportedLanguagesType } from './types';
interface Language {
key: LocaleSupportType;
key: SupportedLanguagesType;
text: string;
}

View File

@@ -96,7 +96,7 @@ class PreferenceManager {
* 加载偏好设置
* @returns {Preferences} 加载的偏好设置
*/
private loadPreferences(): Preferences | null {
private loadPreferences(): Preferences {
return this.loadCachedPreferences() || { ...defaultPreferences };
}

View File

@@ -2,7 +2,7 @@ import type {
ContentCompactType,
LayoutHeaderModeType,
LayoutType,
LocaleSupportType,
SupportedLanguagesType,
ThemeModeType,
} from '@vben-core/typings';
@@ -36,7 +36,7 @@ interface AppPreferences {
/** 布局方式 */
layout: LayoutType;
/** 支持的语言 */
locale: LocaleSupportType;
locale: SupportedLanguagesType;
/** 应用名 */
name: string;
/** 是否开启半深色菜单只在theme='light'时生效) */
@@ -174,7 +174,6 @@ export type {
HeaderPreferences,
LayoutHeaderModeType,
LayoutType,
LocaleSupportType,
LogoPreferences,
NavigationPreferences,
PageTransitionType,
@@ -182,6 +181,7 @@ export type {
PreferencesKeys,
ShortcutKeyPreferences,
SidebarPreferences,
SupportedLanguagesType,
TabbarPreferences,
ThemeModeType,
ThemePreferences,