v3.8.4:优化页面内嵌iframe切换tab不刷新数据

This commit is contained in:
YunaiV
2022-11-13 10:31:02 +08:00
parent 1999ac4ea9
commit 1a60d0ceb3
4 changed files with 62 additions and 26 deletions

View File

@@ -2,15 +2,19 @@
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view :key="key" />
<router-view v-if="!$route.meta.link" :key="key" />
</keep-alive>
</transition>
<iframe-toggle />
</section>
</template>
<script>
import iframeToggle from "./IframeToggle/index"
export default {
name: 'AppMain',
components: { iframeToggle },
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
@@ -31,7 +35,7 @@ export default {
overflow: hidden;
}
.fixed-header+.app-main {
.fixed-header + .app-main {
padding-top: 50px;
}
@@ -41,7 +45,7 @@ export default {
min-height: calc(100vh - 84px);
}
.fixed-header+.app-main {
.fixed-header + .app-main {
padding-top: 84px;
}
}
@@ -51,7 +55,7 @@ export default {
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
.fixed-header {
padding-right: 15px;
padding-right: 17px;
}
}
</style>