mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
[bugfix] DatetimePicker: change event trigger timing (#1370)
This commit is contained in:
@@ -259,8 +259,11 @@ export default create({
|
|||||||
}
|
}
|
||||||
value = this.correctValue(value);
|
value = this.correctValue(value);
|
||||||
this.innerValue = value;
|
this.innerValue = value;
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$emit('change', picker);
|
this.$nextTick(() => {
|
||||||
|
this.$emit('change', picker);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -290,15 +293,8 @@ export default create({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.setColumnByValues(values);
|
this.$refs.picker.setValues(values);
|
||||||
});
|
});
|
||||||
},
|
|
||||||
|
|
||||||
setColumnByValues(values) {
|
|
||||||
if (!this.$refs.picker) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$refs.picker.setValues(values);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user