优化keep-alive

This commit is contained in:
zouzhibing 2022-06-10 12:03:11 +08:00
parent 3096dccd05
commit 014e5f6804
4 changed files with 6 additions and 8 deletions

View File

@ -1,7 +1,5 @@
<template>
<router-view v-slot="{ Component }">
<component :is="Component"/>
</router-view>
<router-view/>
</template>
<style lang="scss">

View File

@ -1,10 +1,11 @@
<template>
<section class="app-main" >
<section class="app-main" v-if="isReload" >
<router-view v-slot="{ Component,route }">
<transition name="fade-slide" mode="out-in" appear>
<keep-alive :include="cachedViews">
<component :is="Component" :key="route.name" />
<keep-alive v-if="route.meta&&route.meta.keepAlive">
<component :is="Component" :key="route.path" />
</keep-alive>
<component :is="Component" :key="route.path" v-else/>
</transition>
</router-view>
<u-setting/>

View File

@ -13,6 +13,6 @@ import MigrationCharts from './components/migration/index.vue'
<style>
.echarts-map{
height: calc(100vh - 93px);
height: calc(100vh - 95px);
}
</style>

View File

@ -143,7 +143,6 @@
margin-top: 18px;
line-height: 30px;
text-align: left;
color: red;
}
}
.card-header {