在 glimmer 组件中,我认为您不需要辅助函数。您可以直接执行此操作:
{{on "click" this.showLogin}}
如果您需要传递参数:
{{on "click" (fn this.showLogin <argument>)}}
它会查找动作:
@action
showLogin(<argument>, event) {}
在 glimmer 组件中,我认为您不需要辅助函数。您可以直接执行此操作:
{{on "click" this.showLogin}}
如果您需要传递参数:
{{on "click" (fn this.showLogin <argument>)}}
它会查找动作:
@action
showLogin(<argument>, event) {}