You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
问题描述
同一个事件处理函数在同一个组件上不能多次
bind
,只能生成同一个函数。复现步骤
期望行为
生成两个不同的函数,每个的参数都不同。
报错信息
无报错,但是与期望行为不一致,最终只会生成同一个参数一样的函数,后面的
bind
会把前面的覆盖掉, 最终生成的函数为最后一次bind
的结果。即对于上述代码:无论触发
onAddToCart
事件还是onPurchase
事件,showSku
函数接收到的参数始终是purchase
。系统信息
补充信息
The text was updated successfully, but these errors were encountered: