如图list渲染多个这样的模块 在每个模块里监听“兑换”按钮点击事件,在刷新list数据源时,怎么清除Button的点击事件?还是不用清除点击事件?
private updateItem(cell: Laya.Box, index: number): void {
let btn: Laya.Button = cell.getChildByName("btn") as Laya.Button;
btn.on(Laya.Event.CLICK, this, this.on_test);
}
附件:
list.png