const customer = [
{id: 1, count: 2},
{id: 2, count: 89},
{id: 3, count: 1}
];
转换成:
const customer = [
{type:'id',value:[1,2,3]},
{type:'count',value:[2,89,1]},
];
//customer是动态数据,id和count并不是固定的
解决方案可参考sxlwar回答内他的评论。
人到中年有点甜
呼啦一阵风
随时随地看视频慕课网APP
相关分类