How to use the heyui/src/utils/config.getDict 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 / tabs / tabs.vue View on Github external
arr() {
      if (!this.datas && !this.dict) {
        console.error('[HeyUI Error] Tabs Component: Datas or dict parameters need to be defined at least.');
        return [];
      }
      let datas = this.datas;
      if (this.dict) {
        datas = config.getDict(this.dict);
      }
      return config.initOptions(datas, this);
    }
  }
github heyui / heyui / src / components / dropdownmenu / dropdownmenu.vue View on Github external
options() {
      if (!this.datas && !this.dict) {
        console.error('[HeyUI Error] Dropdownmenu Component: Datas or dict parameters need to be defined at least.');
        return [];
      }
      let datas = this.datas;
      if (this.dict) {
        datas = config.getDict(this.dict);
      }
      datas = config.initOptions(datas, this);
      return datas;
    }
  },
github heyui / heyui / src / components / select / select.vue View on Github external
options() {
      if (!this.datas && !this.dict) {
        console.error('[HeyUI Error] Select Component: Datas or dict parameters need to be defined at least.');
        return [];
      }
      let datas = this.datas;
      if (this.dict) {
        datas = config.getDict(this.dict);
      }
      datas = config.initOptions(datas, this);
      if (!this.multiple && this.hasNullOption) {
        datas.unshift({
          [`${this.keyName}`]: null,
          [`${this.titleName}`]: this.showNullOptionText,
          [`${this.html}`]: this.showNullOptionText
        });
      }
      return datas;
    }
  }
github heyui / heyui / src / components / steps / steps.vue View on Github external
arr() {
      if (!this.datas && !this.dict) {
        console.error('[HeyUI Error] Steps Component: Datas or dict parameters need to be defined at least.');
        return [];
      }
      let datas = this.datas;
      if (this.dict) {
        datas = config.getDict(this.dict);
      }
      return config.initOptions(datas, this);
    }
  }
github heyui / heyui / src / components / switchlist / switchlist.vue View on Github external
arr() {
      if (!this.datas && !this.dict) {
        console.error('[HeyUI Error] Switchlist Component: Datas or dict parameters need to be defined at least.');
        return [];
      }
      let datas = this.datas;
      if (this.dict) {
        datas = config.getDict(this.dict);
      }

      return config.initOptions(datas, this);
    }
  }
github heyui / heyui / src / components / checkbox / checkbox.vue View on Github external
arr() {
      if (!this.datas && !this.dict) {
        return [];
      }
      let datas = this.datas;
      if (this.dict) {
        datas = config.getDict(this.dict);
      }

      return config.initOptions(datas, this);
    }
  }
github heyui / heyui / src / components / auto-complete / autocomplete.vue View on Github external
results() {
      let datas = this.datas;
      if (this.dict) {
        datas = config.getDict(this.dict);
      }
      if (utils.isNull(datas)) {
        datas = this.loadDatas;
      } else {
        datas = config.initOptions(datas, this);
        if (this.searchValue) {
          let searchValue = this.searchValue.toLowerCase();
          datas = datas.filter(item => {
            return ((item.html || item[this.param.titleName] || '').toLowerCase().indexOf(searchValue) != -1);
          });
        }
      }
      if (this.objects.length > 0) {
        let keyArray = utils
          .getArray(this.objects, 'key')
          .filter(item => !utils.isNull(item));