How to use the heyui/src/utils/utils.removeClass 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 / slider / slider.vue View on Github external
type = 'end';
      } else {
        nowValue = {};
        if (this.values.start > nowPosition && type == 'end') {
          type = 'start';
          nowValue = utils.extend(this.values, { start: nowPosition, end: this.values.start });
        } else if (this.values.end < nowPosition && type == 'start') {
          type = 'end';
          nowValue = utils.extend(this.values, { start: this.values.end, end: nowPosition });
        } else {
          nowValue = utils.extend(this.values, { [type]: nowPosition });
        }
      }

      if (this.eventControl.type != type) {
        utils.removeClass(this.$el.querySelector('.h-slider-node-dragging'), 'h-slider-node-dragging');
        utils.addClass(this.$el.querySelector(`.h-slider-${type}-node`), 'h-slider-node-dragging');
        if (this.tooltip[this.eventControl.type]) {
          this.tooltip[this.eventControl.type].hide();
        }
        this.eventControl.type = type;
      }

      this.$emit('input', nowValue);
      this.$emit('change', nowValue);
      let evt = document.createEvent('CustomEvent');
      evt.initCustomEvent('setvalue', true, true, nowValue);
      this.$el.dispatchEvent(evt);
      if (this.tooltip[type]) {
        this.tooltip[type].show();
        this.tooltip[type].update();
      }
github heyui / heyui / src / components / table / table.vue View on Github external
tbody.addEventListener('mouseout', (event) => {
          for (let el of this.$el.querySelectorAll('.h-table-tr-hovered') || []) {
            utils.removeClass(el, 'h-table-tr-hovered');
          }
        }, false);
      }
github heyui / heyui / src / directives / wordcount.js View on Github external
const wordcount = function (total, el, remainDom) {
  let v = el.value.length;
  let remain = total - v;
  if (remain >= 0) {
    remainDom.innerText = v;
    utils.removeClass(remainDom, 'red-color');
  } else {
    remainDom.innerText = locale.t('h.wordcount.warn', [Math.abs(remain)]);
    utils.addClass(remainDom, 'red-color');
  }
};
github heyui / heyui / src / plugins / pop / index.js View on Github external
this.hideTimeout = setTimeout(() => {
      utils.removeClass(this.reference, 'h-pop-trigger');
      if (this.options.events && utils.isFunction(this.options.events.hide)) {
        this.options.events.hide.call(null);
      }
      if (this.popNode) {
        this.popNode.setAttribute('aria-hidden', 'true');
      }
      this.isOpen = false;
      this.hideTimeout2 = setTimeout(() => {
        if (this.popNode) {
          this.popNode.style.display = 'none';
          if (this.popperInstance) {
            this.popperInstance.disableEventListeners();
          }
        }
      }, 300);
    }, this.options.delay);
github heyui / heyui / src / plugins / loading-bar / index.js View on Github external
setTimeout(() => {
        utils.removeClass(this.inner, 'loading');
        utils.removeClass(this.inner, 'error');
        this.inner.style.width = '0';
        this.width = 0;
      }, 200);
    });
github heyui / heyui / src / plugins / notify / index.js View on Github external
that.vm.$destroy();
    }

    if (this.drag) {
      this.drag.destroy();
    }

    let body = document.documentElement;
    body.style.overflow = '';
    body.style.paddingRight = '';

    this.trigger('$close');

    window.removeEventListener('popstate', this.popstateEvent);

    utils.removeClass($body, notifyShowCls);

    $body.addEventListener('transitionend', (event) => {
      if (event.target == this.$container) {
        utils.removeDom($body);
      }
    });
    setTimeout(() => {
      utils.removeDom($body);
    }, 400);
  }
}
github heyui / heyui / src / components / slider / slider.vue View on Github external
mouseup(event) {
      event.stopPropagation();
      if (this.readonly) return;
      document.body.removeEventListener('mousemove', this.mousemove);
      document.body.removeEventListener('mouseup', this.mouseup);
      setTimeout(() => {
        document.body.removeEventListener('click', this.click);
      }, 200);
      let draggingNode = this.$el.querySelector('.h-slider-node-dragging');
      if (draggingNode) {
        utils.removeClass(draggingNode, 'h-slider-node-dragging');
      }
      let type = this.eventControl.type;
      if (this.tooltip[type]) {
        this.tooltip[type].hide();
      }
    },
    click(event) {
github heyui / heyui / src / plugins / loading-bar / index.js View on Github external
setTimeout(() => {
        utils.removeClass(this.inner, 'loading');
        utils.removeClass(this.inner, 'error');
        this.inner.style.width = '0';
        this.width = 0;
      }, 200);
    });