|
@@ -1,12 +1,4 @@
|
|
|
-<!--
|
|
|
- * @Author: wf
|
|
|
- * @Date: 2021-08-12 16:12:17
|
|
|
- * @LastEditors: wfmodal.customClass
|
|
|
- * @LastEditTime: 2021-08-13 09:15:25
|
|
|
- * @Description: element-ui Dialog弹窗封装
|
|
|
--->
|
|
|
<template>
|
|
|
- <!-- <transition name="el-zoom-in-center"> -->
|
|
|
<el-dialog
|
|
|
v-if="modal.show"
|
|
|
:visible.sync="modal.show"
|
|
@@ -23,27 +15,25 @@
|
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
|
>
|
|
|
- <div slot="title">
|
|
|
+ <template slot="title">
|
|
|
<div class="title_row">
|
|
|
<strong class="title">{{ modal.title }}</strong>
|
|
|
{{ modal.star }}
|
|
|
<span v-if="modal.hideStar"></span>
|
|
|
<span v-else-if="modal.title && !modal.notip"> (<span class="color-danger">*为必填项</span>) </span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
<div class="content">
|
|
|
<component :id="modal.id" :is="modal.component" :params="modal.props" :ref="modal.id" @close="close"></component>
|
|
|
</div>
|
|
|
- <!-- </div> -->
|
|
|
- <span slot="footer" class="dialog-footer" v-if="!modal.fullscreen || modal.showFooter">
|
|
|
+ <!-- <span slot="footer" class="dialog-footer" v-if="!modal.fullscreen || modal.showFooter">
|
|
|
<el-button @click="alertReset(modal.id)" class="reset" v-if="modal.showResetButton">重置</el-button>
|
|
|
<el-button @click="close" class="reset" v-if="!modal.showCancelButton">{{ modal.cancelButtonText || '取消' }}</el-button>
|
|
|
<el-button type="primary" v-if="!modal.showConfirmButton" @click="submit(modal.id)">{{
|
|
|
modal.confirmButtonText || '保存'
|
|
|
}}</el-button>
|
|
|
- </span>
|
|
|
+ </span> -->
|
|
|
</el-dialog>
|
|
|
- <!-- </transition> -->
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -70,7 +60,6 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
modal() {
|
|
|
- // const xx = this.$store.getters['getPopups'];
|
|
|
let obj = this.params;
|
|
|
if (obj && obj.height) {
|
|
|
this.$nextTick(() => {
|
|
@@ -107,7 +96,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- // debugger
|
|
|
// this.modal=this.params;
|
|
|
}
|
|
|
};
|
|
@@ -120,18 +108,31 @@ export default {
|
|
|
/deep/.el-dialog {
|
|
|
color: #424656;
|
|
|
.el-dialog__header {
|
|
|
- height: rem(50);
|
|
|
- border-radius: 6px 6px 0 0;
|
|
|
- background: rgba(248, 252, 255, 1);
|
|
|
- padding: 0 rem(25);
|
|
|
+ height: 40px;
|
|
|
+ border-radius: 9px 9px 0 0;
|
|
|
+ background: linear-gradient(270deg, rgba(0, 178, 255, 0) 0%, #00b2ff 100%);
|
|
|
+ padding: 0 10px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- font-size: rem(14);
|
|
|
+ font-size: 14px;
|
|
|
+ .el-dialog__headerbtn {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ top: 12px;
|
|
|
+ right: 7px;
|
|
|
+ .el-dialog__close {
|
|
|
+ color: white;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .title_row {
|
|
|
+ color: white;
|
|
|
+ }
|
|
|
}
|
|
|
.el-dialog__body {
|
|
|
- padding: rem(20) rem(25);
|
|
|
+ padding: 10px;
|
|
|
overflow: auto;
|
|
|
+ color: #ffffff;
|
|
|
.content {
|
|
|
height: 100%;
|
|
|
}
|
|
@@ -150,8 +151,8 @@ export default {
|
|
|
border-top: none;
|
|
|
position: relative;
|
|
|
bottom: rem(10);
|
|
|
- margin-top: rem(10);
|
|
|
- padding: rem(10) rem(20) rem(20);
|
|
|
+ margin-top: rem(20);
|
|
|
+ padding: 10px 20px 20px;
|
|
|
.dialog-footer .reset {
|
|
|
border: 1px solid #0eaeff;
|
|
|
color: #0eaeff;
|
|
@@ -177,25 +178,22 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.is-modal {
|
|
|
- .el-dialog {
|
|
|
- border-radius: rem(8);
|
|
|
+ /deep/ .el-dialog {
|
|
|
+ border-radius: 9px;
|
|
|
width: auto;
|
|
|
max-height: 80%;
|
|
|
- min-height: rem(210);
|
|
|
+ min-height: 210px;
|
|
|
position: absolute;
|
|
|
top: 50%;
|
|
|
left: 50%;
|
|
|
transform: translate(-50%, -50%);
|
|
|
- background: #fff;
|
|
|
+ background: #00000069;
|
|
|
.el-dialog__body {
|
|
|
/deep/ .content {
|
|
|
height: 100% !important;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // .el-dialog__body::-webkit-scrollbar {
|
|
|
- // display: none;
|
|
|
- // }
|
|
|
}
|
|
|
|
|
|
.newpop .el-dialog {
|