const customer = [
{id: 1, count: 2},
{id: 2, count: 89},
{id: 3, count: 1}
];
转换成:
{type:'id',value:[1,2,3]},
{type:'count',value:[2,89,1]},
//customer是动态数据,id和count并不是固定的
解决方案可参考sxlwar回答内他的评论。
呼啦一阵风
相关分类