How to use the heyui/src/utils/utils.generateTree function in heyui

To help you get started, we’ve selected a few heyui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heyui / heyui / src / components / cascader / cascader.vue View on Github external
initDatas(datas) {
      let list = utils.copy(datas);
      if (this.param.dataMode == 'list' && datas.length > 0) {
        list = utils.generateTree(list, this.param);
      }
      let isWait = utils.isFunction(this.param.getDatas);
      return this.initTreeModeData(list, null, isWait);
    },
    initTreeModeData(list, parentKey, isWait) {
github heyui / heyui / src / components / tree / tree.vue View on Github external
initDatas(datas) {
      let list = (datas = utils.copy(datas));
      if (this.param.dataMode == 'list' && datas.length > 0) {
        list = utils.generateTree(datas, this.param);
      }
      let isWait = utils.isFunction(this.param.getDatas);
      return this.initTreeModeData(list, isWait);
    },
    initTreeModeData(list, isWait, parentKey) {
github heyui / heyui / src / components / category / category.vue View on Github external
initDatas(datas) {
      let list = utils.copy(datas);
      if (this.param.dataMode == 'list' && datas.length > 0) {
        list = utils.generateTree(list, this.param);
      }
      let isWait = utils.isFunction(this.param.getDatas);
      return this.initTreeModeData(list, null, isWait);
    },
    initTreeModeData(list, parentKey, isWait) {
github heyui / heyui / src / components / category-picker / categorypicker.vue View on Github external
initDatas(datas) {
      let list = utils.copy(datas);
      if (this.param.dataMode == 'list' && datas.length > 0) {
        list = utils.generateTree(list, this.param);
      }
      let isWait = utils.isFunction(this.param.getDatas);
      this.categoryDatas = this.initTreeModeData(list, null, isWait, 0);
      this.list = this.categoryDatas;
      this.parse();
    },
    initTreeModeData(list, parentKey, isWait, level) {