2024-04-17 16:17:07 +08:00
|
|
|
<!--
|
|
|
|
* @Author: zhp
|
|
|
|
* @Date: 2024-04-12 11:13:06
|
|
|
|
* @LastEditTime: 2024-04-15 13:52:16
|
|
|
|
* @LastEditors: zhp
|
|
|
|
* @Description:
|
|
|
|
-->
|
2024-04-07 15:30:59 +08:00
|
|
|
<template>
|
|
|
|
<section class="app-main">
|
|
|
|
<transition name="fade-transform" mode="out-in">
|
|
|
|
<keep-alive :include="cachedViews">
|
|
|
|
<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
|
|
|
|
},
|
|
|
|
key() {
|
|
|
|
return this.$route.path
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.app-main {
|
|
|
|
/* 48= navbar 48 */
|
|
|
|
min-height: calc(100vh - 56px);
|
|
|
|
min-width: calc(100vh - 280px);
|
|
|
|
position: relative;
|
|
|
|
overflow: visible;
|
|
|
|
margin: 8px 14px 0px 16px;
|
|
|
|
border-radius: 8px;
|
2024-04-17 16:17:07 +08:00
|
|
|
// background-color: #fff;
|
2024-04-07 15:30:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.fixed-header+.app-main {
|
|
|
|
padding-top: 56px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.hasTagsView {
|
|
|
|
.app-main {
|
|
|
|
/* 84 = navbar + tags-view = 50 + 34 */
|
|
|
|
min-height: calc(100vh - 120px - 8px);
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
|
|
|
.fixed-header+.app-main {
|
|
|
|
padding-top: 90px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
// fix css style bug in open el-dialog
|
|
|
|
.el-popup-parent--hidden {
|
|
|
|
.fixed-header {
|
|
|
|
padding-right: 17px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|