使用filter 进行过滤 。遍历this.bankInfoList 将和valueYH 相等的 bankName 给this.bankname。省去for循环的写法

this.bankname = this.bankInfoList.filter(
        item => item.bankName == this.valueYH
      )[0].bankName;

 

相关文章:

  • 2022-12-23
  • 2021-12-28
  • 2021-09-28
  • 2021-11-19
  • 2021-09-29
  • 2021-12-19
  • 2022-12-23
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2021-06-11
  • 2021-11-30
  • 2021-09-09
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
相关资源
相似解决方案