From dcb9cb3d135c5adc62931e2076bdabd2e9f22f70 Mon Sep 17 00:00:00 2001 From: 刘元博 <1553592282@qq.com> Date: 星期六, 11 三月 2023 14:42:02 +0800 Subject: [PATCH] 优化弹窗后导航栏偏移的问题 --- ruoyi-ui/src/layout/components/AppMain.vue | 113 ++++++++++++++++++++++++++------------------------------ 1 files changed, 52 insertions(+), 61 deletions(-) diff --git a/ruoyi-ui/src/layout/components/AppMain.vue b/ruoyi-ui/src/layout/components/AppMain.vue index 25d5a25..b7a87ae 100644 --- a/ruoyi-ui/src/layout/components/AppMain.vue +++ b/ruoyi-ui/src/layout/components/AppMain.vue @@ -1,61 +1,52 @@ -<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 { - /* 50= navbar 50 */ - min-height: calc(100vh - 50px); - width: 100%; - position: relative; - overflow: hidden; -} - -.fixed-header + .app-main { - padding-top: 50px; -} - -.hasTagsView { - .app-main { - /* 84 = navbar + tags-view = 50 + 34 */ - min-height: calc(100vh - 84px); - } - - .fixed-header + .app-main { - padding-top: 84px; - } -} -</style> - -<style lang="scss"> -// fix css style bug in open el-dialog -.el-popup-parent--hidden { - .fixed-header { - padding-right: 17px; - } -} -</style> +<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 { + /* 50= navbar 50 */ + min-height: calc(100vh - 50px); + width: 100%; + position: relative; + overflow: hidden; +} + +.fixed-header + .app-main { + padding-top: 50px; +} + +.hasTagsView { + .app-main { + /* 84 = navbar + tags-view = 50 + 34 */ + min-height: calc(100vh - 84px); + } + + .fixed-header + .app-main { + padding-top: 84px; + } +} +</style> -- Gitblit v1.9.2