From cf8a751fa16e30b13080bf0e7af2ff6c9df693a8 Mon Sep 17 00:00:00 2001 From: children117cl <278950112@qq.com> Date: 星期三, 14 四月 2021 11:28:05 +0800 Subject: [PATCH] banner设置跳转类型为不跳转时,清空其余跳转字段 --- src/layout/components/AppMain.vue | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index f6a3286..8165963 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -1,7 +1,12 @@ <template> <section class="app-main"> <transition name="fade-transform" mode="out-in"> - <router-view :key="key" /> + <div> + <keep-alive> + <router-view v-if="$route.meta.keepAlive" :key="key" /> + </keep-alive> + <router-view v-if="!$route.meta.keepAlive" :key="key" /> + </div> </transition> </section> </template> -- Gitblit v1.8.0