button disabled 设置为true后,但是还是响应点击事件

发布于 7 年前作者 li493839 次浏览最后编辑 7 年前来自 ask

button disabled 为true后,但是还是响应点击事件

代码如下

<button  type =“primary” disabled=‘{{isButtonDisabled}}’ catchtouchstart=“streamRecord” catchtouchend=“streamRecordEnd” class=‘button’>长按button>

isButtonDisabled 为true后,按钮界面上显示为不可用。但是我点击,catchtouchstart  catchtouchend

这两个事件依然生效。

wechatide://minicode/Mz9J4cmz7b4v

1 回复
xuwei
xuwei1 楼5 年前

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。