[bugfix] DatetimePicker: value observable (#2427)

This commit is contained in:
neverland
2019-01-02 22:13:04 +08:00
committed by GitHub
parent 8d9d335c9a
commit fad49ea1c7

View File

@@ -111,7 +111,14 @@ export default create({
value(val) {
val = this.correctValue(val);
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) {