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回答内他的评论。
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回答内他的评论。
13 回答12.9k 阅读
7 回答2.1k 阅读
3 回答1.3k 阅读✓ 已解决
2 回答1.3k 阅读✓ 已解决
6 回答1.2k 阅读✓ 已解决
6 回答1.1k 阅读
2 回答1.3k 阅读✓ 已解决