// 根据一个id去匹配一个数组里和这个id相同的数据
findById(array, id) {
return array.find(item => item.id === id);
},
// 使用函数查找
this.webBoardId根据这个去查找
const result = this.findById(this.webListall, this.webBoardId);
console.log(result.webAddress);
this.webAddress=result.webAddress
12-29
1000
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-30
972
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-22
07-22