hy-event-store icon indicating copy to clipboard operation
hy-event-store copied to clipboard

事件总线event三个方法分别用于什么场景?

Open qq229338869 opened this issue 1 year ago • 0 comments

事件总线event三个方法:on,once,off分别用于什么场景? 我在微信小程序中使用,想在切换组件是发送事件,切换可以不生效。 但是: 使用on时,在切换组件会触发多次,会有错误数据; 使用once时,在切换不生效的情况下,无法发送第二次; 使用off时,报错 Cannot read property 'length' of undefined;

qq229338869 avatar Dec 30 '23 10:12 qq229338869