Showing
4 changed files
with
19 additions
and
12 deletions
| @@ -2,18 +2,18 @@ import util from '../../utils/util'; | @@ -2,18 +2,18 @@ import util from '../../utils/util'; | ||
| 2 | import App from '../../utils/api'; | 2 | import App from '../../utils/api'; |
| 3 | Page({ | 3 | Page({ |
| 4 | data:{ | 4 | data:{ |
| 5 | - remark:'' | 5 | + remark:'', |
| 6 | + buttonbottom:60 | ||
| 6 | }, | 7 | }, |
| 7 | onLoad(opt){ | 8 | onLoad(opt){ |
| 8 | this.setData({ | 9 | this.setData({ |
| 9 | - remark:opt.remark | 10 | + remark:opt.remark, |
| 10 | }) | 11 | }) |
| 11 | this.remark=opt.remark; | 12 | this.remark=opt.remark; |
| 12 | this.getlabellist(); | 13 | this.getlabellist(); |
| 13 | }, | 14 | }, |
| 14 | inputremark(e){ | 15 | inputremark(e){ |
| 15 | this.remark=util.trim(e.detail.value) | 16 | this.remark=util.trim(e.detail.value) |
| 16 | - console.log(e) | ||
| 17 | }, | 17 | }, |
| 18 | selectlabel(e){ | 18 | selectlabel(e){ |
| 19 | let name=e.currentTarget.dataset.name; | 19 | let name=e.currentTarget.dataset.name; |
| @@ -37,9 +37,10 @@ Page({ | @@ -37,9 +37,10 @@ Page({ | ||
| 37 | console.log(this.remark,this.remark.length) | 37 | console.log(this.remark,this.remark.length) |
| 38 | }, | 38 | }, |
| 39 | inputblur(e){ | 39 | inputblur(e){ |
| 40 | - console.log(e) | 40 | + console.log(e,'blur') |
| 41 | this.setData({ | 41 | this.setData({ |
| 42 | - remark:this.remark | 42 | + remark:this.remark, |
| 43 | + buttonbottom:60 | ||
| 43 | }) | 44 | }) |
| 44 | }, | 45 | }, |
| 45 | getlabellist(){ | 46 | getlabellist(){ |
| @@ -52,9 +53,14 @@ Page({ | @@ -52,9 +53,14 @@ Page({ | ||
| 52 | } | 53 | } |
| 53 | }) | 54 | }) |
| 54 | }, | 55 | }, |
| 56 | + focusinput(e){ | ||
| 57 | + this.setData({ | ||
| 58 | + inputfocus:true, | ||
| 59 | + buttonbottom:560 | ||
| 60 | + }) | ||
| 61 | + }, | ||
| 55 | save(){ | 62 | save(){ |
| 56 | wx.setStorageSync('remark',this.remark); | 63 | wx.setStorageSync('remark',this.remark); |
| 57 | wx.navigateBack(); | 64 | wx.navigateBack(); |
| 58 | }, | 65 | }, |
| 59 | - | ||
| 60 | }) | 66 | }) |
| 1 | <layout> | 1 | <layout> |
| 2 | <nav>备注</nav> | 2 | <nav>备注</nav> |
| 3 | - <view class="contain"> | 3 | + <view class="contain" style="height: minheight+'px';overflow-y: scroll;"> |
| 4 | <view class="bg-gray textarea-cover"> | 4 | <view class="bg-gray textarea-cover"> |
| 5 | - <textarea placeholder="请输入您的特殊要求,我们会尽量安排" placeholder-class="gray-font font28r" class="black-font font28r" value="{{remark}}" maxlength="25" auto-focus bindinput="inputremark" bindblur="inputblur"></textarea> | 5 | + <textarea placeholder="请输入您的特殊要求,我们会尽量安排" placeholder-class="gray-font font28r" class="black-font font28r" value="{{remark}}" maxlength="25" show-confirm-bar="{{false}}" auto-focus bindinput="inputremark" bindblur="inputblur" adjust-position cursor-spacing="130" bindfocus="focusinput"></textarea> |
| 6 | <view class="gray-font font24r flex-rr" style="padding-top: 20rpx;">最多输入25个字</view> | 6 | <view class="gray-font font24r flex-rr" style="padding-top: 20rpx;">最多输入25个字</view> |
| 7 | </view> | 7 | </view> |
| 8 | <view class="label"> | 8 | <view class="label"> |
| @@ -14,5 +14,5 @@ | @@ -14,5 +14,5 @@ | ||
| 14 | </view> | 14 | </view> |
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| 17 | - <view class="save-button white-font flex-cc font32r" bindtap="save">保存</view> | 17 | + <view class="save-button white-font flex-cc font32r" bindtap="save" style="bottom:{{buttonbottom}}rpx;">保存</view> |
| 18 | </layout> | 18 | </layout> |
| @@ -5,14 +5,13 @@ | @@ -5,14 +5,13 @@ | ||
| 5 | "es6": true, | 5 | "es6": true, |
| 6 | "enhance": true, | 6 | "enhance": true, |
| 7 | "postcss": true, | 7 | "postcss": true, |
| 8 | - "preloadBackgroundData": false, | ||
| 9 | "minified": true, | 8 | "minified": true, |
| 10 | "newFeature": true, | 9 | "newFeature": true, |
| 11 | "coverView": true, | 10 | "coverView": true, |
| 12 | "nodeModules": true, | 11 | "nodeModules": true, |
| 13 | "autoAudits": false, | 12 | "autoAudits": false, |
| 14 | "showShadowRootInWxmlPanel": true, | 13 | "showShadowRootInWxmlPanel": true, |
| 15 | - "scopeDataCheck": false, | 14 | + "scopeDataCheck": true, |
| 16 | "uglifyFileName": false, | 15 | "uglifyFileName": false, |
| 17 | "checkInvalidKey": true, | 16 | "checkInvalidKey": true, |
| 18 | "checkSiteMap": true, | 17 | "checkSiteMap": true, |
| @@ -21,7 +20,8 @@ | @@ -21,7 +20,8 @@ | ||
| 21 | "ignore": [], | 20 | "ignore": [], |
| 22 | "disablePlugins": [], | 21 | "disablePlugins": [], |
| 23 | "outputPath": "" | 22 | "outputPath": "" |
| 24 | - } | 23 | + }, |
| 24 | + "preloadBackgroundData": false | ||
| 25 | }, | 25 | }, |
| 26 | "compileType": "miniprogram", | 26 | "compileType": "miniprogram", |
| 27 | "libVersion": "2.8.2", | 27 | "libVersion": "2.8.2", |
-
Please register or login to post a comment