Skip to content

Commit 296110f

Browse files
author
pixel
committed
修复了子路由模式下两个keepalive相互切换 keepalive失效的问题
1 parent 6ad13c5 commit 296110f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

web/src/view/systemTools/index.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<template>
2-
<router-view></router-view>
2+
<div>
3+
<keep-alive>
4+
<router-view v-if="$route.meta.keepAlive"></router-view>
5+
</keep-alive>
6+
<router-view v-if="!$route.meta.keepAlive"></router-view>
7+
</div>
38
</template>
49

510
<script>
611
export default {
7-
name:"System",
8-
}
12+
name: "System",
13+
};
914
</script>
10-
<style lang="scss">
11-
12-
</style>
15+
<style lang="scss"></style>

0 commit comments

Comments
 (0)