Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
}
tbody.addEventListener('mouseout', (event) => {
for (let el of this.$el.querySelectorAll('.h-table-tr-hovered') || []) {
utils.removeClass(el, 'h-table-tr-hovered');
}
}, false);
}
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');
}
};
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);
setTimeout(() => {
utils.removeClass(this.inner, 'loading');
utils.removeClass(this.inner, 'error');
this.inner.style.width = '0';
this.width = 0;
}, 200);
});
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);
}
}
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) {
setTimeout(() => {
utils.removeClass(this.inner, 'loading');
utils.removeClass(this.inner, 'error');
this.inner.style.width = '0';
this.width = 0;
}, 200);
});