mirror of
https://github.com/youzan/vant.git
synced 2025-10-16 08:00:34 +00:00
[bugfix] Slider: fix slider drag and value
props change at the same time can not drag success (#3206)
This commit is contained in:
@@ -48,12 +48,13 @@ export default sfc({
|
||||
const total = this.vertical ? rect.height : rect.width;
|
||||
const diff = (delta / total) * 100;
|
||||
|
||||
this.updateValue(this.startValue + diff);
|
||||
this.newValue = this.startValue + diff;
|
||||
this.updateValue(this.newValue);
|
||||
},
|
||||
|
||||
onTouchEnd() {
|
||||
if (this.disabled) return;
|
||||
this.updateValue(this.value, true);
|
||||
this.updateValue(this.newValue, true);
|
||||
},
|
||||
|
||||
onClick(event) {
|
||||
|
Reference in New Issue
Block a user