< view wx:if = "{{keyShows}}" class = 'warpper-textCon' style = "bottom:{{keyHeights-2}}px" >
< textarea class = 'textCon' show-confirm-bar = '{{false}}' value = '{{value}}' auto-focus = "{{true}}" bindinput = 'messageInput' bindblur = 'noShow' bindfocus = 'bindfocusHeigth' adjust-position = '{{false}}' focus = '{{true}}' ></ textarea >
< form bindsubmit = "submit" report-submit = 'true' data-submit = '{{!isregister}}' >
< button data-type = '2' class = 'clear' open-type = "{{unionname?'':'getUserInfo'}}" bindgetuserinfo = 'bindgetuserinfo' form-type = "submit" >
< view class = 'textOk' >发表评论</ view >
</ button >
</ form >
</ view >
< view class = 'messInput' id = 'position' wx:if = "{{IsDiscuss==1}}" >
< image src = '{{head}}' mode = 'aspectFill' wx:if = '{{head}}' ></ image >
< image src = '/dist/cardimgs/photosy.png' mode = 'aspectFill' wx:else></ image >
< view type = 'text' catchtap = 'tirgger' >简单说说...</ view >
</ view >
js部分
tirgger(){
this.setData({
keyShows: true,
})
console.log('是实打实的')
},
//获取键盘高度
bindfocusHeigth(e){
this.setData({
keyHeights: Number(e.detail.height)
});
console.log(e.detail.height)
},
noShow(){
this.setData({
keyShows: false,
value: this.data.messageInput
})
console.log(this.data.keyShows)
},
//输入框事件
messageInput: function(e) {
if (e.detail.value == '') {
this.setData({
disabled: true
})
} else {
this.setData({
disabled: false
})
}
this.setData({
messageInput: e.detail.value
})
},
|