|
@@ -7,13 +7,11 @@
|
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
|
destroy-on-close
|
|
|
+ :class="{'el-dialog--hide-footer': hideFooter }"
|
|
|
v-bind="$attrs"
|
|
|
v-on="$listeners"
|
|
|
>
|
|
|
- <!-- 兼容ie自动撑开 -->
|
|
|
- <div class="el-dialog__body_content">
|
|
|
- <slot></slot>
|
|
|
- </div>
|
|
|
+ <slot></slot>
|
|
|
<span slot="footer" v-if="!hideFooter">
|
|
|
<m-button @click="show = false">{{ option?.textCancel ?? '取 消'}}</m-button>
|
|
|
<m-button :type="option?.colorSure ?? 'orange'" @click="sure">{{ option?.textSure ?? '确 定'}}</m-button>
|
|
@@ -118,25 +116,37 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.el-dialog--hide-footer {
|
|
|
+ ::v-deep .el-dialog {
|
|
|
+ &.is-fullscreen {
|
|
|
+ &>.el-dialog__body {
|
|
|
+ height: calc(100% - 55px);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
::v-deep .el-dialog {
|
|
|
&.is-fullscreen {
|
|
|
height: 100vh;
|
|
|
+ overflow: hidden;
|
|
|
border-spacing: 0; /* 避免单元格间距影响 */
|
|
|
- display: table;
|
|
|
- &>.el-dialog__header, &>.el-dialog__footer {
|
|
|
- display: table-cell; /* 固定高度的行 */
|
|
|
- height: 1px; /* 最小高度,内容撑开 */
|
|
|
- }
|
|
|
+ // display: table;
|
|
|
+ // &>.el-dialog__header, &>.el-dialog__footer {
|
|
|
+ // display: table-cell; /* 固定高度的行 */
|
|
|
+ // height: 1px; /* 最小高度,内容撑开 */
|
|
|
+ // }
|
|
|
&>.el-dialog__body {
|
|
|
- display: table-row; /* 自动填充剩余高度 */
|
|
|
- height: 100%; /* 关键:占满剩余空间 */
|
|
|
- padding: 0;
|
|
|
- position: relative;
|
|
|
- &>.el-dialog__body_content {
|
|
|
- position: absolute;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
+ height: calc(100% - 55px - 70px); /* 减去头部和底部的高度 */
|
|
|
+ box-sizing: border-box;
|
|
|
+ // display: table-row; /* 自动填充剩余高度 */
|
|
|
+ // height: 100%; /* 关键:占满剩余空间 */
|
|
|
+ // padding: 0;
|
|
|
+ // position: relative;
|
|
|
+ // &>.el-dialog__body_content {
|
|
|
+ // position: absolute;
|
|
|
+ // width: 100%;
|
|
|
+ // height: 100%;
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
}
|