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

JS generate guid method

JS generate guid method https://blog.csdn.net/Alive_tree/article/details/87942348 Globally unique identification(GUID) is an algorithm generatedBinaryCount Reg128 bitsNumber ofidentifier , GUID is mainly used in networks or systems with multiple nodes and computers. Ideally, any computational geometry computer cluster will not generate two identical guids, and the total number of guids is2^128In theory, it is difficult to make two […]