初始值:
[ {label: '1', value: '11'},
{label: '2', value: '11'},
{label: '3', value: '11'},
{label: '4', value: '11'},
{label: '5', value: '11'},
{label: '6', value: '11'}
]
结果:
[ {label: '1', value: '13'},
{label: '3', value: '11'},
{label: '5', value: '13'},
{label: '6', value: '13'},
]
组装新数据:
[ {label: '1', value: '13'},
{label: '2', value: '11'},
{label: '3', value: '11'},
{label: '4', value: '11'},
{label: '5', value: '13'},
{label: '6', value: '13'}
]
其实不采用find也可以,直接改原数组,两个for循环即可解决
这应该是最简单的解决方法