DatePicker, TimePicker support value null
This commit is contained in:
parent
6ebd9456f0
commit
0ddc59a168
1 changed files with 6 additions and 5 deletions
|
@ -805,11 +805,12 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
const initialValue = this.value;
|
// 下面的判断可能是没必要的,反而会破坏初始的 null 值
|
||||||
const parsedValue = this.publicVModelValue;
|
// const initialValue = this.value;
|
||||||
if (typeof initialValue !== typeof parsedValue || JSON.stringify(initialValue) !== JSON.stringify(parsedValue)){
|
// const parsedValue = this.publicVModelValue;
|
||||||
this.$emit('input', this.publicVModelValue); // to update v-model
|
// if (typeof initialValue !== typeof parsedValue || JSON.stringify(initialValue) !== JSON.stringify(parsedValue)){
|
||||||
}
|
// this.$emit('input', this.publicVModelValue); // to update v-model
|
||||||
|
// }
|
||||||
if (this.open !== null) this.visible = this.open;
|
if (this.open !== null) this.visible = this.open;
|
||||||
|
|
||||||
// to handle focus from confirm buttons
|
// to handle focus from confirm buttons
|
||||||
|
|
Loading…
Add table
Reference in a new issue