按多个对象,分割数组

    splitArray(array, subGroupLength, type) {
      let index = 0
      const newArray = []
      while (index < array.length) {
        newArray.push(array.slice(index, index += subGroupLength))
      }
      return newArray
    },

猜你喜欢

转载自blog.csdn.net/Blue54/article/details/129407450