Code address: https://codepen.io/cssjidi/pe...
Now there is a new requirement, that is, there are too many columns, and they need to be grouped according to formatItems
The number of codes in the first column remains unchanged , the excess needs to be merged into one column
The length of formatItems is divided by 2, and the result is the number of columns that need to be arranged
The problem I'm encountering now is that I don't know how to put two elements together when dealing with loops, as shown in the picture above.
Lodash’s chunk function