element-ui 怎么解决el-checkbox label绑定的值为对象时,实现默认勾选

that.currentValue.map((item) => {
  const idx = that.selectArr.findIndex(sla => sla[that.valueName] === item[that.valueName])
  that.selectArr[idx] = item
})

  

that.selectArr为全部数组
that.currentValue 为选中的数组数据
posted @ 2020-08-21 11:48  精灵铭心  阅读(4647)  评论(0编辑  收藏  举报