Skip to content

Commit

Permalink
fix(DateTimePicker): fix modelValue invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao committed Jun 27, 2023
1 parent 474f9f0 commit b31015a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/date-time-picker/date-time-picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ export default defineComponent({
setup(props: any, context) {
const emitEvent = useEmitEvent(props, context.emit);
const className = computed(() => [`${name}`]);
const { value, modelValue } = toRefs(props);
const [innerValue, setDateTimePickerValue] = useVModel(value, modelValue, props.defaultValue, props.onChange);
const { value } = toRefs(props);
const [innerValue, setDateTimePickerValue] = useVModel(
value,
ref(props.modelValue),
props.defaultValue,
props.onChange,
);
const title = computed(() => {
return props.title || '选择时间';
});
Expand Down

0 comments on commit b31015a

Please sign in to comment.