Commit 1045666232e69bb931f74ea356c523f312f85dd7
1 parent
26791df8
【一键订C端:在预定详情界面,点击备注后界面被键盘冲没了】https://www.tapd.cn/57419716/bugtrace/bugs/view?bug…
…_id=1157419716001002888
Showing
2 changed files
with
7 additions
and
1 deletions
| @@ -210,10 +210,15 @@ Page({ | @@ -210,10 +210,15 @@ Page({ | ||
| 210 | cardEvent(e){ | 210 | cardEvent(e){ |
| 211 | this.editorReserve() | 211 | this.editorReserve() |
| 212 | }, | 212 | }, |
| 213 | + keyboardheight:0, | ||
| 213 | keyboardheightchange(e){ | 214 | keyboardheightchange(e){ |
| 214 | console.log(e); | 215 | console.log(e); |
| 216 | + if(e.detail.height==0 || e.detail.height>this.keyboardheight){ | ||
| 217 | + this.keyboardheight=e.detail.height | ||
| 218 | + } | ||
| 215 | this.setData({ | 219 | this.setData({ |
| 216 | - paddingBottom:e.detail.height?(parseInt(e.detail.height)+100):0 | 220 | + //paddingBottom:e.detail.height?(parseInt(e.detail.height)+100):0 |
| 221 | + paddingBottom:this.keyboardheight>0?(parseInt(this.keyboardheight)+20):0 | ||
| 217 | }) | 222 | }) |
| 218 | setTimeout(()=>{ | 223 | setTimeout(()=>{ |
| 219 | this.pageScrollToBottom() | 224 | this.pageScrollToBottom() |
| @@ -76,6 +76,7 @@ | @@ -76,6 +76,7 @@ | ||
| 76 | bindkeyboardheightchange="keyboardheightchange" | 76 | bindkeyboardheightchange="keyboardheightchange" |
| 77 | bindblur="keyboardheightchange" | 77 | bindblur="keyboardheightchange" |
| 78 | bindconfirm="keyboardheightchange" | 78 | bindconfirm="keyboardheightchange" |
| 79 | + adjust-position="{{false}}" | ||
| 79 | data-key="remark" | 80 | data-key="remark" |
| 80 | value="{{user.remark}}" | 81 | value="{{user.remark}}" |
| 81 | placeholder-class="input-pl" maxlength="25"/> | 82 | placeholder-class="input-pl" maxlength="25"/> |
-
Please register or login to post a comment