<view hidden="{{currentTab!==0}}" bindtouchstart='chstart' bindtouchmove='chmove' bindtouchend='chend'>
</view>
chend事件有没有办法解除 chstart和chmove事件
框架类型 | 问题类型 | API/组件名称 | 终端类型 | 微信版本 | 基础库版本 |
---|---|---|---|---|---|
小程序 | 需求 | view | 工具 | 6.6.7 | 2.0.8 |
<view hidden="{{currentTab!==0}}" bindtouchstart='chstart' bindtouchmove='chmove' bindtouchend='chend'>
</view>
chend事件有没有办法解除 chstart和chmove事件
2 个回答
你可以在chend 的时候,加个布尔值标志A,然后chstart和chmove里判断,如果A==true,就直接return
在JS里面加个标识,然后更改这个标识的值, 类似这种写法