feat(dev): 新建开发者页面,用于数据处理

This commit is contained in:
BTMuli
2023-03-08 15:24:58 +08:00
parent edf89b5aa0
commit 50f93b16ff
4 changed files with 66 additions and 1 deletions

28
src/store/modules/dev.ts Normal file
View File

@@ -0,0 +1,28 @@
import { defineStore } from "pinia";
const useDevStore = defineStore({
id: "dev",
state() {
return {
showDev: false,
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,
});
export default useDevStore;