egret学习笔记addEventlistener

匿名 (未验证) 提交于 2019-12-03 00:22:01

addEventlistener为指定事件添加侦听.第一参数事件类型,第二个为回调函数,第三个为侦听函数绑定的对象


回调函数中的参数e表示事件对象event.

当用dispatchEventwith触发事件传递参数时.可以用e.data获取传递的参数对之操作.

private onUpdateItem(e:any):void{         console.log("e.data::::"+e.data.contest);         this.testarray.push(e.data);         console.log(this.testarray);           var itemArray : Array<any> =  this.testarray;           this.bqlist.dataProvider = new eui.ArrayCollection(itemArray);         console.log(this.testarray.length);              }

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!