diff --git a/src/pages/Config.vue b/src/pages/Config.vue index d5a57097..6a30e626 100644 --- a/src/pages/Config.vue +++ b/src/pages/Config.vue @@ -297,6 +297,7 @@ async function delUserData () { // 恢复默认配置 function initAppData () { + appStore.init(); homeStore.init(); achievementsStore.init(); snackbarText.value = "已恢复默认配置!"; diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index d8fe702a..e16f50cf 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -2,7 +2,7 @@ * @file store modules app.ts * @description App store module * @author BTMuli - * @since Alpha v0.1.2 + * @since Alpha v0.1.3 */ // vue @@ -56,6 +56,12 @@ export const useAppStore = defineStore( achievements: `${dataPath.userDataDir}/achievements.json`, }); + // 初始化 + function init (): void { + loading.value = false; + devMode.value = false; + } + function getSubmenu (): string[] { const open = []; if (sidebar.submenu.database) open.push("database"); @@ -70,6 +76,7 @@ export const useAppStore = defineStore( dataPath, appPath, userPath, + init, getSubmenu, }; },