<view>
<view>{{count}}view>
<button type="primary" bindtouchstart="startRecord" bindtouchend="endRecord">按住说话button>
view>
const app = getApp()
Page({
data: {
count:1
},
onLoad: function () {
},
startRecord(){
console.log("开始",this.data.count);
this.setData({count:this.data.count+1})
},
endRecord(){
this.setData({count:this.data.count-1})
console.log("结束");
}
})
你好,问题未复现。可以正常的触发事件。麻烦提供出现问题的机型,微信版本号,系统版本号。
弄一个 [ 能复现问题的简单的 ] 代码片段,我帮你看看
https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
请学会如何「提问」(👈戳我)、【个体工商户】微信认证问题(👈戳我)