const index = this.arr.findIndex(item => item.id === val);
查找某个字段在数组中的位置
最新推荐文章于 2022-09-12 21:11:42 发布
const index = this.arr.findIndex(item => item.id === val);