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); }