- 用keyboard-accessory组件在软键盘上方添加上传图片事件失效
<textarea placeholder="点击这里记录你的心情吧 ~" bindinput="shouqi" style="text-align: {{textStyle}};" auto-height="{{true}}" maxlength="-1"> <keyboard-accessory class="containe" style="height: 50rpx;"> <cover-view class="containe_item"> <cover-image src="../../img/tupian.png" bindtap="updata" class="contatiner_tupian"></cover-image> <cover-image src="../../img/luyin.png" bindtap="luyin" class="contatiner_luyin"></cover-image> </cover-view> </keyboard-accessory> </textarea> //js updata() { console.log('上传'); let that = this wx.chooseImage({ count: 1, sizeType: ['compressed'], sourceType: ['album', 'camera'], success(res) { // tempFilePath可以作为img标签的src属性显示图片 const tempFilePaths = res.tempFilePaths[0]; console.log(tempFilePaths); } }) },
2022-05-19 - keyboard-accessory组件有兼容问题?
用keyboard-accessory组件在软键盘上方显示上传图片图片和点击事件,但是上传成功之后再次打开,上面的点击事件失效,只有安卓有这个问题
2022-05-18