[]List中如何动态加载多个image,并为每个image添加监听事件?

var Index=(function(_super){
function Index(){
Index.super(this);

this.data = ["1tong","2tong","3tong","4tong","5tong","6tong","7tong","8tong","9tong","1tiao","2tiao","3tiao","4tiao","5tiao"];
var _dataSource_=[];
for(var i = 0;i<this.data.length;++i)
{
var _data_={
skin:"Images/"+this.data[i]+".jpg"
};
_dataSource_.push(_data_);
}
this.selfHand.dataSource = _dataSource_;
this.selfHand.selectEnable = true;
}
Laya.class(Index,"Index",_super);


return Index;
})(IndexUI);

cuixueying

赞同来自:

为image添加点击事件参考这个:https://ask.layabox.com/question/4482
动态添加Image,,,你用list.setItem()

要回复问题请先

商务合作
商务合作