diff --git a/src/components/slider/slider.vue b/src/components/slider/slider.vue index c4140d7..d8e29e4 100644 --- a/src/components/slider/slider.vue +++ b/src/components/slider/slider.vue @@ -240,6 +240,7 @@ if (this.dragging) { this.dragging = false; this.$refs[`${this.pointerDown}Tooltip`].visible = false; + this.emitChange(); } this.pointerDown = ''; @@ -261,14 +262,18 @@ if (!this.dragging) { if (this.currentValue[index] !== this.oldValue[index]) { - const exportValue = this.range ? this.currentValue : this.currentValue[0]; - this.$emit('on-change', exportValue); - this.dispatch('FormItem', 'on-form-change', exportValue); + this.emitChange(); this.oldValue[index] = this.currentValue[index]; } } }, + emitChange(){ + const exportValue = this.range ? this.currentValue : this.currentValue[0]; + this.$emit('on-change', exportValue); + this.dispatch('FormItem', 'on-form-change', exportValue); + }, + sliderClick (event) { if (this.disabled) return; const currentX = this.getPointerX(event); -- libgit2 0.21.4