关于vue.js:递归子项新增某个属性

11次阅读

共计 129 个字符,预计需要花费 1 分钟才能阅读完成。

const ass = (data) => {data.map((list, i) => {
    list.alwaysShow = true
    if (list.children && list.children != null) {ass(list.children)
    }
  })
  return data
}
正文完
 0