解决菜单缓存的bug

This commit is contained in:
季圣华
2021-09-02 22:24:01 +08:00
parent 11040f6a83
commit 204bf7e330
6 changed files with 79 additions and 71 deletions

View File

@@ -1,19 +1,19 @@
<template>
<div class="main">
<keep-alive>
<router-view v-if="keepAlive" />
</keep-alive>
<router-view v-if="!keepAlive" />
</div>
</template>
<script>
export default {
name: "RouteView",
computed: {
keepAlive () {
return this.$route.meta.keepAlive
}
},
}
<template>
<div class="main">
<keep-alive>
<router-view v-if="keepAlive" />
</keep-alive>
<router-view v-if="!keepAlive" />
</div>
</template>
<script>
export default {
name: "RouteView",
computed: {
keepAlive () {
return this.$route.meta.keepAlive
}
}
}
</script>