let one = []; let two = []; let AllMes = []; this.pileInformation.forEach( (item, index) => { if(index%2){ two.push(item) } else { one.push(item) } }) one.forEach( (item, index) => { AllMes.push([item,two[index]]) }) this.$set(this,'AllDate',AllMes)
将两个数组合并成一个数组,对应项相同
最新推荐文章于 2023-11-09 15:29:44 发布