监听了上面三个方法,但是长按并滑动时有时不会触发。我在textarea外面加了一层加了Padding容器,然后长按住容器padding才能触发。。。求解决办法 。
wxml文件代码:
<view class=“pic-container” style=“background-image:url({{item.picPath}});”
>
<textarea class=“text” id=“input” type=“text” value="{{text}}" style=“margin-top:{{y}}px;margin-left:{{x}}px;width:{{textWidth}}px;height:40px;” bindinput=“onTextInput”
bindblur=“onBlur”
bindfocus=“onFocus”
bindtouchstart=“startp”
bindtouchmove=“movep”
bindtouchend=“endp”
focus="{{focus}}"
maxlength="{{maxlength}}"
auto-height
/>
</view>
wxss文件:
.pic-container{
width:750rpx;
height:750rpx;
padding: 10px;
border:1rpx solid;
box-sizing:border-box;
background-repeat:no-repeat;
background-size:cover;
}
textarea{
padding: 0;
text-align: center;
}
.text{
border:4rpx solid #45c01a;
text-align:center;
display:inline-block;
font-size:40px;
font-weight:normal;
}