优化keep-alive
This commit is contained in:
parent
3096dccd05
commit
014e5f6804
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<router-view v-slot="{ Component }">
|
||||
<component :is="Component"/>
|
||||
</router-view>
|
||||
<router-view/>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
|||
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ import MigrationCharts from './components/migration/index.vue'
|
|||
|
||||
<style>
|
||||
.echarts-map{
|
||||
height: calc(100vh - 93px);
|
||||
height: calc(100vh - 95px);
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@
|
|||
margin-top: 18px;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.card-header {
|
||||
|
|
|
|||
Loading…
Reference in New Issue