feat: And surface switching loading optimization

This commit is contained in:
vben
2024-06-23 19:39:44 +08:00
parent 6afed34437
commit 24aab5b4bb
24 changed files with 596 additions and 1696 deletions

View File

@@ -76,6 +76,7 @@ const defaultPreferences: Preferences = {
},
transition: {
enable: true,
loading: true,
name: 'fade-slide',
progress: true,
},

View File

@@ -341,9 +341,9 @@ class PreferenceManager {
// 保存重置后的偏好设置
this.savePreferences(this.state);
// 从存储中移除偏好设置项
this.cache?.removeItem(STORAGE_KEY);
this.cache?.removeItem(STORAGE_KEY_THEME);
this.cache?.removeItem(STORAGE_KEY_LOCALE);
[STORAGE_KEY, STORAGE_KEY_THEME, STORAGE_KEY_LOCALE].forEach((key) => {
this.cache?.removeItem(key);
});
}
/**

View File

@@ -150,6 +150,8 @@ interface ThemePreferences {
interface TransitionPreferences {
/** 页面切换动画是否启用 */
enable: boolean;
// /** 是否开启页面加载loading */
loading: boolean;
/** 页面切换动画 */
name: PageTransitionType | string;
/** 是否开启页面加载进度动画 */