黄金法则

_handleNewLabelsData(data) {
      let options = [];
      if (!(data && data.length)) {
        return null;
      }
      data.forEach(item => {
        options.push({
          value: item.layer,
          label: item.name,
          id: item.id,
          item: {
            value: item.layer,
            label: item.name
          },
          children: this._handleNewLabelsData(item.childrenList)
        });
      });
      return options;
    },
posted @ 2022-04-26 17:13  诡道也  阅读(49)  评论(0编辑  收藏  举报