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

@@ -43,7 +43,7 @@
</template>
<v-list-item-title v-show="!rail"> 成就 </v-list-item-title>
</v-list-item>
<v-list-subheader v-show="!rail">
<v-list-subheader v-show="!rail" @click="getDev()">
<v-icon>mdi-rocket-outline</v-icon>
<span> 预期功能 </span>
</v-list-subheader>
@@ -51,7 +51,7 @@
<template v-slot:prepend>
<v-icon>mdi-cog-outline</v-icon>
</template>
<v-list-item-title v-show="!rail" @click="getDev"> 设置 </v-list-item-title>
<v-list-item-title v-show="!rail"> 设置 </v-list-item-title>
</v-list-item>
<v-list-item link href="/dev" v-show="showDev">
<template v-slot:prepend>
@@ -97,7 +97,11 @@ export default defineComponent({
},
getDev() {
const devStore = useDevStore();
devStore.addMagic();
devStore.magicCount++;
if (devStore.magicCount >= 10) {
devStore.showDev = true;
}
console.log(devStore.magicCount);
this.showDev = devStore.showDev;
},
},