/* 
把一维数组变成二维数组
参数 arr为原始数组，num为改变后的二维数组每一项多少个
*/
export const changeArray = (arr: Array<any>, num: number) => {
  let newArr = [];
  const total = Math.ceil(arr.length / num);
  for (let i = 0; i < total; i++) {
    let a = arr.slice(i * num, (i + 1) * num);
    newArr.push(a);
  }
  return newArr;
};
