fixed #2852
This commit is contained in:
parent
feb21a0a16
commit
2eccfc9938
3 changed files with 74 additions and 29 deletions
|
@ -229,6 +229,7 @@
|
|||
}
|
||||
}
|
||||
this.broadcast('Table', 'on-visible-change', val);
|
||||
this.broadcast('Slider', 'on-visible-change', val); // #2852
|
||||
this.$emit('on-visible-change', val);
|
||||
},
|
||||
loading (val) {
|
||||
|
|
|
@ -272,8 +272,7 @@
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
sliderClick: function (event) {
|
||||
sliderClick (event) {
|
||||
if (this.disabled) return;
|
||||
const currentX = this.getPointerX(event);
|
||||
const sliderOffsetLeft = this.$refs.slider.getBoundingClientRect().left;
|
||||
|
@ -290,6 +289,23 @@
|
|||
this.$emit('on-change', exportValue);
|
||||
this.dispatch('FormItem', 'on-form-change', exportValue);
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
// #2852
|
||||
this.$on('on-visible-change', (val) => {
|
||||
if (val && this.showTip === 'always') {
|
||||
this.$refs.minTooltip.doDestroy();
|
||||
if (this.range) {
|
||||
this.$refs.maxTooltip.doDestroy();
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.minTooltip.updatePopper();
|
||||
if (this.range) {
|
||||
this.$refs.maxTooltip.updatePopper();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue