mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] DatetimePicker: value observable (#2427)
This commit is contained in:
parent
8d9d335c9a
commit
fad49ea1c7
@ -111,7 +111,14 @@ export default create({
|
|||||||
value(val) {
|
value(val) {
|
||||||
val = this.correctValue(val);
|
val = this.correctValue(val);
|
||||||
const isEqual = this.type === 'time' ? val === this.innerValue : val.valueOf() === this.innerValue.valueOf();
|
const isEqual = this.type === 'time' ? val === this.innerValue : val.valueOf() === this.innerValue.valueOf();
|
||||||
if (!isEqual) this.innerValue = val;
|
|
||||||
|
if (!isEqual) {
|
||||||
|
this.innerValue = val;
|
||||||
|
|
||||||
|
if (this.type === 'time') {
|
||||||
|
this.updateColumnValue(val);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
innerValue(val) {
|
innerValue(val) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user