排列组合letformats=[[{id:1,name:'红色'},{id:2,name:'白色'}],[{id:1,name:'100*200'},{id:2,name:'50*200'}],[{id:1,name:'20厘米'},{id:2,name:'10厘米'}]]输出结果:letresult=[[{id:1,name:'红色'},{id:1,name:'100*200'},{id:1,name:'20厘米'}],[{id:1,name:'红色'},{id:2,name:'50*200'},{id:1,name:'20厘米'}],[{id:1,name:'红色'},{id:2,name:'50*200'},{id:2,name:'10厘米'}]]简化说明:[[1,2][3,4][5,6]]排列组合算法得到=》[[1,3,5],[1,3,6],[1,4,5],[1,4,6],[2,3,5],[2,3,6],[2,4,5],[2,4,6]]
精慕HU
相关分类