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

从小程序编译到h5 ,onTap不支持? #2198

Closed
uxiew opened this issue Feb 18, 2019 · 4 comments
Closed

从小程序编译到h5 ,onTap不支持? #2198

uxiew opened this issue Feb 18, 2019 · 4 comments

Comments

@uxiew
Copy link

uxiew commented Feb 18, 2019

问题描述
编译为h5时,onTap={this.handleItemTap}无法响应。

复现步骤
就是简单的事件绑定:onTap={this.handleItemTap}

onTap={this.handleItemTap}

期望行为
在编译为h5时,可以转换为click

报错信息

点击没有任何消息

系统信息
λ taro info
� Taro v1.2.13

Taro CLI 1.2.13 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.14.0 - D:\Applications\Scoop\apps\nvm\current\nodejs\nodejs\node.EXE
Yarn: 1.13.0 - D:\Applications\Scoop\apps\yarn\current\Yarn\bin\yarn.CMD
npm: 6.4.1 - D:\Applications\Scoop\apps\nvm\current\nodejs\nodejs\npm.CMD

补充信息
onTap={this.handleItemTap},换成 onClick就行了
编译到h5时,没有考虑到onTap?

@taro-bot
Copy link

taro-bot bot commented Feb 18, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@yuche
Copy link
Contributor

yuche commented Feb 18, 2019

onClick

@uxiew
Copy link
Author

uxiew commented Feb 18, 2019

@yuche ,好快啊,但是如果文件过多,我批量替换吗?cli方面不能直接转换吗?

@yuche
Copy link
Contributor

yuche commented Feb 18, 2019

不能,这个我们在文档就有说明 tap 就是 click,你可以自己写一个简单的正则批量替换

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

2 participants