mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🐛 fix(init): 修复初始化未重新加载的问题
This commit is contained in:
@@ -297,6 +297,7 @@ async function delUserData () {
|
|||||||
|
|
||||||
// 恢复默认配置
|
// 恢复默认配置
|
||||||
function initAppData () {
|
function initAppData () {
|
||||||
|
appStore.init();
|
||||||
homeStore.init();
|
homeStore.init();
|
||||||
achievementsStore.init();
|
achievementsStore.init();
|
||||||
snackbarText.value = "已恢复默认配置!";
|
snackbarText.value = "已恢复默认配置!";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @file store modules app.ts
|
* @file store modules app.ts
|
||||||
* @description App store module
|
* @description App store module
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
* @since Alpha v0.1.2
|
* @since Alpha v0.1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// vue
|
// vue
|
||||||
@@ -56,6 +56,12 @@ export const useAppStore = defineStore(
|
|||||||
achievements: `${dataPath.userDataDir}/achievements.json`,
|
achievements: `${dataPath.userDataDir}/achievements.json`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 初始化
|
||||||
|
function init (): void {
|
||||||
|
loading.value = false;
|
||||||
|
devMode.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
function getSubmenu (): string[] {
|
function getSubmenu (): string[] {
|
||||||
const open = [];
|
const open = [];
|
||||||
if (sidebar.submenu.database) open.push("database");
|
if (sidebar.submenu.database) open.push("database");
|
||||||
@@ -70,6 +76,7 @@ export const useAppStore = defineStore(
|
|||||||
dataPath,
|
dataPath,
|
||||||
appPath,
|
appPath,
|
||||||
userPath,
|
userPath,
|
||||||
|
init,
|
||||||
getSubmenu,
|
getSubmenu,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user