fix(dev): 页面加载逻辑优化

This commit is contained in:
BTMuli
2023-03-08 15:36:31 +08:00
parent 50f93b16ff
commit 8b2e4134c0
3 changed files with 26 additions and 19 deletions

View File

@@ -8,21 +8,7 @@ const useDevStore = defineStore({
magicCount: 0,
};
},
actions: {
addMagic() {
if (!this.showDev) {
this.magicCount++;
if (this.magicCount >= 5) {
this.toggleDev();
}
}
},
toggleDev() {
this.showDev = !this.showDev;
this.magicCount = 0;
},
},
persist: false,
persist: true,
});
export default useDevStore;