57cae15e by liangyifan

11

1 parent f334ee31
......@@ -10,7 +10,7 @@
<svg-icon icon-class='close' class="closeStyle" @click="onCancel" />
</div>
<div class="ls-mask-content" ref='contentRef' :style="{'height': contentHeight + 'px'}">
<div class="ls-mask-content" ref='contentRef' :style="{'height': contentHeight}">
<component :is="editItem" ref='childRef' @loading='loadingFn' :key="key" :formData='formData' />
</div>
<div class="ls-mask-footer" v-if='btnShow'>
......@@ -56,8 +56,21 @@ export default {
mounted () {
// 计算滚动条高度
setTimeout(() => {
this.contentHeight = this.$refs.contentRef.offsetHeight
}, 1000)
if(this.btnShow){
if(this.height == 'auto'){
this.contentHeight = (this.$refs.contentRef.offsetHeight - 115) + 'px'
}else{
this.contentHeight =(parseInt(this.height)-parseInt('115px'))+'px';
}
}else{
if(this.height == 'auto'){
this.contentHeight = this.$refs.contentRef.offsetHeight + 'px'
}else{
this.contentHeight =this.height
}
}
}, 500)
},
methods: {
onCancel () {
......@@ -130,7 +143,6 @@ export default {
padding: 20px;
width: 100%;
overflow: scroll;
max-height: 500px;
}
.ls-mask-footer {
......@@ -140,6 +152,9 @@ export default {
width: 100%;
box-shadow: 0px 0px 2px 0px;
border-radius: 0 0 10px 10px;
position: absolute;
bottom: 0;
background: #ffffff;
}
......