一、for循环的使用
①for(let i = 0 ; i < length ; ++i){ }
示例:
for(let i=0;i<length;++i){
console.log(temp[i])
}
②for(var x in temp){ }
示例:
for (var x in temp) {//x = index
that.data.imgs.push({ path: temp[tm],label:'添加标签'});
}
二、array数组属性及方法 参照链接:http://www.w3school.com.cn/jsref/jsref_obj_array.asp
数组修改;
this.data.imgs[0].path=”//a/b”
版权声明:本文为yingtian648原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。