mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-22 22:49:15 +08:00
[bugfix] DatetimePicker: change event trigger timing (#1370)
This commit is contained in:
parent
0afbd92d32
commit
e820e072e3
@ -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);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user