walkNode()

in src/plugin/plugin-variable-bind-dialog/index.tsx [203:217]


  walkNode(dataSourceMap, deepNum, treeList) {
    deepNum++;
    let index = 0;
    for (const key in dataSourceMap) {
      const treeData = {};
      treeData.label = key;
      // treeData.key = deepNum+'_'+index;
      if (typeof dataSourceMap[key] === 'object' && !(dataSourceMap[key] instanceof Array)) {
        treeData.children = [];
        this.walkNode(dataSourceMap[key], deepNum, treeData.children);
      }
      index++;
      treeList.push(treeData);
    }
  }