数组拆分,多用于单个数组拆分多个数组,用处swiper里面
作者:互联网
group(array, subGroupLength) { let index = 0; let newArray = []; while(index < array.length) { newArray.push(array.slice(index, index += subGroupLength)); } return newArray; },
that.group(array,6)
标签:index,group,数组,subGroupLength,newArray,拆分,array,swiper 来源: https://www.cnblogs.com/baifubin/p/16309171.html