mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
[bugfix] DatetimePicker: value observable (#2427)
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user