From 5cdf99a18eb4fdc8513be56f0564fa99abf7ec84 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 18 Jan 2022 14:37:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=80=82=E9=85=8D=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/common.scss | 48 ++++++------ src/js/store/index.js | 2 + src/views/main-content.vue | 2 +- src/views/main.vue | 143 ++++++++++++++++++------------------ 4 files changed, 96 insertions(+), 99 deletions(-) diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index 235b0b2b..ab036f15 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -4,8 +4,8 @@ box-sizing: border-box; } body { - font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', - 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; + font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, + sans-serif; font-size: $--font-size-base; line-height: $base--line-height; color: $--color-text-primary; @@ -35,7 +35,7 @@ img { } .clearfix:before, .clearfix:after { - content: ' '; + content: " "; display: table; } .clearfix:after { @@ -144,8 +144,8 @@ img { background-color: transparent; } &-add { - > span > *[class*='el-icon-'], - > span > *[class*='icon'] { + > span > *[class*="el-icon-"], + > span > *[class*="icon"] { vertical-align: middle; font-size: 18px; margin-right: 5px; @@ -201,6 +201,12 @@ img { .aui-wrapper { position: relative; padding-top: $navbar--height; + &.z-iframe { + padding-top: 0; + .aui-content--tabs { + padding-top: 10px; + } + } } /* Sidebar fold @@ -383,7 +389,7 @@ img { &::after { position: absolute; - content: ''; + content: ""; right: 0; top: 0; bottom: 0; @@ -448,8 +454,8 @@ img { } } &__search { - > *[class*='el-icon-'], - > *[class*='icon'] { + > *[class*="el-icon-"], + > *[class*="icon"] { display: inline-block; vertical-align: middle; } @@ -572,9 +578,7 @@ img { min-height: calc(#{$content--fill-height} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - #{$content--fill-height} - #{$content--card-header-height} - 2px - ); + min-height: calc(#{$content--fill-height} - #{$content--card-header-height} - 2px); } &--tabs { padding: $content--tabs-header-height 0 0; @@ -646,7 +650,7 @@ img { position: absolute; bottom: 0; left: 0; - content: ''; + content: ""; width: 100%; height: 2px; background-color: $--color-primary; @@ -679,15 +683,10 @@ img { min-height: calc(#{$content--fill-height-tabs} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - #{$content--fill-height-tabs} - #{$content--card-header-height} - - 2px - ); + min-height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); } &.is-iframe { - height: calc( - #{$content--fill-height-tabs} + #{$content--padding * 2} - ); + height: calc(#{$content--fill-height-tabs} + #{$content--padding * 2}); margin: -$content--padding; min-height: auto; > .aui-card--fill { @@ -706,10 +705,7 @@ img { background-color: #fff; } > .aui-card--fill > .el-card__header + .el-card__body { - height: calc( - #{$content--fill-height-tabs} - #{$content--card-header-height} - - 2px - ); + height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); } } } @@ -739,7 +735,7 @@ img { /* Page ------------------------------ */ -*[class*='aui-page__'] { +*[class*="aui-page__"] { padding-top: 0; .aui-content { min-height: auto; @@ -751,9 +747,7 @@ img { min-height: calc(100vh - #{$content--padding * 2} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - 100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px - ); + min-height: calc(100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px); } } } diff --git a/src/js/store/index.js b/src/js/store/index.js index 335b5689..d3aca2ad 100644 --- a/src/js/store/index.js +++ b/src/js/store/index.js @@ -37,6 +37,8 @@ export default new Vuex.Store({ menuList: [], activeName: "", }, + + inIframe: window.self !== window.top, }, modules: { user, diff --git a/src/views/main-content.vue b/src/views/main-content.vue index d774f2a2..067cef1f 100644 --- a/src/views/main-content.vue +++ b/src/views/main-content.vue @@ -1,7 +1,7 @@