Skip to content

Commit

Permalink
[bugfix] DatetimePicker: change event trigger timing (#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Jun 30, 2018
1 parent 0afbd92 commit e820e07
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/datetime-picker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,11 @@ export default create({
}
value = this.correctValue(value);
this.innerValue = value;
this.$nextTick(() => {
this.$emit('change', picker);
this.$nextTick(() => {
this.$emit('change', picker);
});
});
},
Expand Down Expand Up @@ -290,15 +293,8 @@ export default create({
}
this.$nextTick(() => {
this.setColumnByValues(values);
this.$refs.picker.setValues(values);
});
},
setColumnByValues(values) {
if (!this.$refs.picker) {
return;
}
this.$refs.picker.setValues(values);
}
},
Expand Down

0 comments on commit e820e07

Please sign in to comment.