How to use the heyui/src/plugins/dropdown 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 / date-range-picker / daterangepicker.vue View on Github external
this.$nextTick(() => {
      let el = this.el = this.$el.querySelector(`.${prefix}>.h-datetime-show`);
      let content = this.$el.querySelector(`.h-date-picker`);
      this.dropdown = new Dropdown(el, {
        trigger: 'click',
        content,
        placement: this.placement,
        disabled: this.disabled,
        events: {
          show() {
            that.isShow = true;
            that.$nextTick(() => {
              that.initNowView();
            });
          }
        }
      });
    });
  },
github heyui / heyui / src / components / auto-complete / autocomplete.vue View on Github external
this.$nextTick(() => {
      let el = (this.el = this.$el.querySelector('.h-autocomplete-show'));
      this.content = this.$el.querySelector('.h-autocomplete-group');
      let that = this;
      this.dropdown = new Dropdown(el, {
        trigger: '',
        triggerOnce: true,
        content: this.content,
        disabled: this.disabled,
        equalWidth: true,
        events: {
          show() {
            that.isShow = true;
          }
        }
      });
    });
  },
github heyui / heyui / src / components / category-picker / categorypicker.vue View on Github external
this.$nextTick(() => {
        let el = (this.el = this.$el.querySelector('.h-categorypicker-show'));
        this.content = this.$el.querySelector('.h-categorypicker-group');
        let that = this;
        this.dropdown = new Dropdown(el, {
          trigger: 'click',
          content: this.content,
          disabled: this.disabled,
          events: {
            show() {
              that.isShow = true;
            }
          }
        });
      });
    },
github heyui / heyui / src / components / date-picker / datepicker.vue View on Github external
this.$nextTick(() => {
      if (this.inline) return;
      let el = (this.el = this.$el.querySelector(`.${prefix}>.h-datetime-show`));
      let content = this.$el.querySelector(`.h-date-picker`);

      this.dropdown = new Dropdown(el, {
        trigger: 'click',
        triggerOnce: true,
        content,
        disabled: this.disabled,
        placement: this.placement,
        events: {
          show() {
            that.isShow = true;
            that.$nextTick(() => {
              that.parse(that.value);
              that.$refs.datebase.resetView();
              if (that.nowDate) {
                that.nowView = manba(that.nowDate);
              }
            });
          }
github heyui / heyui / src / components / date-full-range-picker / datefullrangepicker.vue View on Github external
this.$nextTick(() => {
      let el = this.el = this.$el.querySelector(`.${prefix}>.h-datetime-show`);
      let content = this.$el.querySelector(`.h-date-picker`);
      this.dropdown = new Dropdown(el, {
        trigger: 'click',
        content,
        placement: this.placement,
        events: {
          show() {
            that.isShow = true;
            that.$nextTick(() => {
              that.initNowView();
            });
          }
        }
      });
    });
  },
github heyui / heyui / src / components / color-picker / color-picker.vue View on Github external
this.$nextTick(() => {
        let el = this.el = this.$el.querySelector('.h-colorpicker-show');
        let content = this.content = this.$el.querySelector('.h-colorpicker-group');
        this.dropdown = new Dropdown(el, {
          content,
          disabled: this.disabled,
          trigger: 'click',
          events: {
            hide: () => {
              if (this.useConfirm) {
                this.reset();
              }
            }
          }
        });
      });
    },
github heyui / heyui / src / components / cascader / cascader.vue View on Github external
this.$nextTick(() => {
        let el = (this.el = this.$el.querySelector('.h-cascader-show'));
        this.content = this.$el.querySelector('.h-cascader-group');
        let that = this;
        this.dropdown = new Dropdown(el, {
          trigger: 'click',
          content: this.content,
          disabled: this.disabled,
          events: {
            show() {
              that.isShow = true;
            }
          }
        });
      });
    },
github heyui / heyui / src / components / select / select.vue View on Github external
this.$nextTick(() => {
      let el = this.el = this.$el.querySelector('.h-select-show');
      let content = this.content = this.$el.querySelector('.h-select-group');
      let that = this;
      this.dropdown = new Dropdown(el, {
        content,
        disabled: this.disabled,
        equalWidth: this.equalWidth,
        trigger: 'click foucs',
        triggerOnce: this.filterable,
        events: {
          show() {
            that.isShow = true;
          }
        }
      });
    });
  },