Recursive subitem adds a property

Time:2021-12-5
const ass = (data) => {
  data.map((list, i) => {
    list.alwaysShow = true
    if (list.children && list.children != null) {
      ass(list.children)
    }
  })
  return data
}

Recommended Today

The real problem of Alibaba IOS algorithm can’t hang up this time

More and more IOS developers continue to enter the peak of job hopping in 2020 Three main trends of interview in 2020: IOS bottom layer, algorithm, data structure and audio and video development Occupied the main battlefield. Data structure and algorithm interview, especially figure, has become the main reason for the failure of most first-line […]