1 const index = this.addedlist.findIndex(item => item.name === row.name);
2 const obj = this.addedlist.find(item => item.name === row.name);
3 console.log("点击的是第",index)
4 console.log("点击的数据为",obj)
查询数组或者数组对象是否有对应的值
最新推荐文章于 2022-11-02 18:01:52 发布