creator 触摸事件关不掉?

<img src="/uploads/default/original/3X/9/a/9a57c1b306d53d272bc2dff9de2c60cf0aa041cc.png" width=“690” height=“158”

function(event) 是匿名函数吧 解绑 和绑定其实是两个
换成this.xx
或者this.xx = this.node.on() 试试

呵呵,你的第二个参数是个匿名函数,off时又是一个新的匿名函数,当然关不掉。
给你两个种方法:

  1. 你可以用targetOff,但会把所有事件给关了
  2. 将事件函数变成成员函数或子函数
//定义一个事件函数
_eventFunc() {
...
}

//注册事件
this.node.on('xxx', this._eventFunc, this); 
...
//关闭事件
this.node.off('xxx', this._eventFunc, this); 
1赞