let types = [
      { id:1, name: '规格', list: ['x', 'l'] },
      { id:2, name: '颜色', list: ['红', '黄'] },
      { id:3, name: '品牌', list: ['小米', '华为', '苹果'] }]

  const typeList = types.map(e => e.list.map(el=>( {[e.name]: {name:el ,id:e.id} }  )) )
  
  let resArr = typeList[0]
  
  for (let i = 1; i < typeList.length; i++) {
      let itArr = typeList[i].map(e => [e]);
      let tempArr = resArr;
      let newArr = []
      tempArr.forEach(el => {
          itArr.forEach(e => {
              newArr.push(e.concat(el).reduce((a,b)=>({...a,...b}))  )
          })
      })
      resArr = newArr;
  }