-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
一个JSX元素中的不同事件绑定了同一方法时,后者的参数值会覆盖掉前者 #1299
Labels
enhancement
New feature or request
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
目前是存在这个问题,暂时不太好解决,会在文档中注明一下 |
恩,可以大致猜测到难处理的原因… |
@tiancheng2000 对,后续考虑换一种实现方式 |
CC @Chen-jj |
Duplicate of #432 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
一个JSX元素中的不同事件绑定了同一方法时,后者的参数值会覆盖掉前者
复现步骤
Taro代码,
onTouchStart
与onTouchEnd
绑定了同名方法,最后一个参数值不同:编译得到的weapp代码(WXML),按目前的编译方法,将只能取到后一次绑定所用的参数值(
false
)期望行为
能正确绑定两个不同的参数值,或许需编译成
data-e-bindtouchstart-a-b
(跟着事件名走),而非data-e-showTooltip-a-b
(跟着方法名走)报错信息
无
系统信息
Taro 1.1.3, NodeJs 10.9, weapp
The text was updated successfully, but these errors were encountered: