Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button组件的点击事件,在微信和支付宝上表现不一致 #2248

Closed
1391020381 opened this issue Feb 23, 2019 · 14 comments
Closed
Assignees

Comments

@1391020381
Copy link

1391020381 commented Feb 23, 2019

问题描述

在微信小程序或支付宝小程序中,连续快速点击两个Button。在微信小程序中,点击事件会执行两次,但是在支付宝小程序中,只会执行一次。

复现步骤
[复现问题的步骤]

<Button onClick={this.testClick}>1</Button>
<Button onClick={this.testClick}>2</Button>
// 这里可以贴代码
testClick(e){ console.log("e:",e)}

1.打开微信小程序和支付宝小程序的调试工具,并清空控制台
2. 连续快速点击两个Button,button-hover会起作用
3. . 查看调试工具的打印,只会看到一次打印。

期望行为
希望点击事件,在微信小程序和支付宝小程序都可以快速响应。

报错信息

暂无报错

系统信息
� Taro v1.2.13

Taro CLI 1.2.13 environment info:
System:
OS: Windows 7
Binaries:
Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.12.1 - C:\Users\zhoujin\AppData\Roaming\npm\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

补充信息
[可选]
在本机使用 taro info 只会打印上面 系统信息,项目依赖已安装为1.2.13。查看了支付宝小程序官方示例(扩展组件/表单类/金额输入)没有这种情况。

@taro-bot
Copy link

taro-bot bot commented Feb 23, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Feb 25, 2019

CC @Chen-jj

@1391020381
Copy link
Author

@Chen-jj 这个问题可以复现嘛?,还是我的写法有问题?

@Chen-jj
Copy link
Contributor

Chen-jj commented Feb 28, 2019

@1391020381 复现不了。
qq20190228-201629

@1391020381
Copy link
Author

@Chen-jj 是在真机上调试。

@Chen-jj
Copy link
Contributor

Chen-jj commented Feb 28, 2019

@1391020381 iphone 测过ok

@1391020381
Copy link
Author

1391020381 commented Feb 28, 2019

@Chen-jj 勉强可以看。。。。。到公司这个链接看不了啦,再换一个
3a78c5b65ea40b13b404352c4da402f9 1

@1391020381
Copy link
Author

1391020381 commented Feb 28, 2019

@Chen-jj 大概类似这种 https://raw.githubusercontent.com/1391020381/Web-Foundation/master/img/xxxxxxxxxxxxxxxxxxxx.png
你连续快速点击,会感觉自己点击上了,但是事件没有起效。

@Chen-jj
Copy link
Contributor

Chen-jj commented Mar 1, 2019

@1391020381 复现不了,你可以试试原生小程序写法看看有没问题。

@1391020381
Copy link
Author

1391020381 commented Mar 1, 2019

@Chen-jj 好的,这个问题有什么思路或方向来解决这个问题嘛?

@Chen-jj
Copy link
Contributor

Chen-jj commented Mar 1, 2019

@1391020381 你可以先试试原生写法,看看是支付宝还是 Taro 的问题

@1391020381
Copy link
Author

@Chen-jj 使用了原生写法,快速点击,多试几次也这样,也咨询支付宝社区,也说不能复现。。。。。。

@Chen-jj
Copy link
Contributor

Chen-jj commented Mar 1, 2019

@1391020381 嗯,那就是支付宝小程序的问题了,我把你的问题和他们说说吧

@1391020381
Copy link
Author

1391020381 commented Mar 1, 2019

@Chen-jj 嗯,那我把issues关了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants