感觉是 off 关闭事件bug

使用 off 关闭 事件时 失效
使用这样的方式 取消注册不会成功
this.node.on(“testEvent”,this.refresh.bind(this)); 注册
this.node.off(“testEvent”,this.refresh.bind(this)); 取消注册

使用这样的方式才能成功
this.node.on(“testEvent”,this.refresh,this); 注册
this.node.off(“testEvent”,this.refresh.this); 取消注册

bind是不行的

的确不能使用bind

这是js的知识 和off没关系

this.node.on(“testEvent”,this.refresh.bind(this));
这里的回调函数
this.node.off(“testEvent”,this.refresh.bind(this));
和这里的回调函数

和你真正的this.refresh,其实已经是3个函数了,就因为你用了bind,产生了拷贝

bind是不行的,我已经踩过坑了。改了好半天