11
Showing
1 changed file
with
19 additions
and
4 deletions
... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
10 | <svg-icon icon-class='close' class="closeStyle" @click="onCancel" /> | 10 | <svg-icon icon-class='close' class="closeStyle" @click="onCancel" /> |
11 | </div> | 11 | </div> |
12 | 12 | ||
13 | <div class="ls-mask-content" ref='contentRef' :style="{'height': contentHeight + 'px'}"> | 13 | <div class="ls-mask-content" ref='contentRef' :style="{'height': contentHeight}"> |
14 | <component :is="editItem" ref='childRef' @loading='loadingFn' :key="key" :formData='formData' /> | 14 | <component :is="editItem" ref='childRef' @loading='loadingFn' :key="key" :formData='formData' /> |
15 | </div> | 15 | </div> |
16 | <div class="ls-mask-footer" v-if='btnShow'> | 16 | <div class="ls-mask-footer" v-if='btnShow'> |
... | @@ -56,8 +56,21 @@ export default { | ... | @@ -56,8 +56,21 @@ export default { |
56 | mounted () { | 56 | mounted () { |
57 | // 计算滚动条高度 | 57 | // 计算滚动条高度 |
58 | setTimeout(() => { | 58 | setTimeout(() => { |
59 | this.contentHeight = this.$refs.contentRef.offsetHeight | 59 | if(this.btnShow){ |
60 | }, 1000) | 60 | if(this.height == 'auto'){ |
61 | this.contentHeight = (this.$refs.contentRef.offsetHeight - 115) + 'px' | ||
62 | }else{ | ||
63 | this.contentHeight =(parseInt(this.height)-parseInt('115px'))+'px'; | ||
64 | } | ||
65 | }else{ | ||
66 | if(this.height == 'auto'){ | ||
67 | this.contentHeight = this.$refs.contentRef.offsetHeight + 'px' | ||
68 | }else{ | ||
69 | this.contentHeight =this.height | ||
70 | } | ||
71 | } | ||
72 | |||
73 | }, 500) | ||
61 | }, | 74 | }, |
62 | methods: { | 75 | methods: { |
63 | onCancel () { | 76 | onCancel () { |
... | @@ -130,7 +143,6 @@ export default { | ... | @@ -130,7 +143,6 @@ export default { |
130 | padding: 20px; | 143 | padding: 20px; |
131 | width: 100%; | 144 | width: 100%; |
132 | overflow: scroll; | 145 | overflow: scroll; |
133 | max-height: 500px; | ||
134 | } | 146 | } |
135 | 147 | ||
136 | .ls-mask-footer { | 148 | .ls-mask-footer { |
... | @@ -140,6 +152,9 @@ export default { | ... | @@ -140,6 +152,9 @@ export default { |
140 | width: 100%; | 152 | width: 100%; |
141 | box-shadow: 0px 0px 2px 0px; | 153 | box-shadow: 0px 0px 2px 0px; |
142 | border-radius: 0 0 10px 10px; | 154 | border-radius: 0 0 10px 10px; |
155 | position: absolute; | ||
156 | bottom: 0; | ||
157 | background: #ffffff; | ||
143 | } | 158 | } |
144 | 159 | ||
145 | 160 | ... | ... |
-
Please register or sign in to post a comment