优化个人中心数据加载逻辑

This commit is contained in:
2021-09-23 11:24:27 +08:00
parent 438e77db4f
commit 0ba2f8dbd6
5 changed files with 15 additions and 18 deletions

View File

@@ -5,13 +5,15 @@
</keep-alive>
</router-view>
<router-link :to="{name:'Home'}">Home</router-link>
|
<router-link :to="{name:'User'}">User</router-link>
|
<router-link :to="{name:'AuthLogin'}">Login</router-link>
|
<router-link :to="{name:'AuthRegister'}">Register</router-link>
<div>
<router-link :to="{name:'Home'}">Home</router-link>
|
<router-link :to="{name:'User'}">User</router-link>
|
<router-link :to="{name:'AuthLogin'}">Login</router-link>
|
<router-link :to="{name:'AuthRegister'}">Register</router-link>
</div>
</template>
<script lang="ts" setup>
@@ -30,8 +32,6 @@ if (search && search.indexOf('?') !== -1) {
invite && localStorage.setItem(INVITE_CODE, invite)
}
// console.log(
watch(route, (to: RouteLocationNormalizedLoaded) => {
if (to.meta?.keepAlive && includeList.value.indexOf(to.name as string) === -1) {
includeList.value.push(to.name as string)