Skip to content

Commit 0db616d

Browse files
authored
fix(DateTimePicker): fix modelValue invalid (#903)
1 parent 86f1b4c commit 0db616d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/date-time-picker/date-time-picker.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ export default defineComponent({
4848
emits: ['change', 'cancel', 'confirm', 'pick', 'update:modelValue', 'update:value'],
4949
setup(props: any) {
5050
const className = computed(() => [`${name}`]);
51-
const { value, modelValue } = toRefs(props);
52-
const [innerValue, setDateTimePickerValue] = useVModel(value, modelValue, props.defaultValue, props.onChange);
51+
const { value } = toRefs(props);
52+
const [innerValue, setDateTimePickerValue] = useVModel(
53+
value,
54+
ref(props.modelValue),
55+
props.defaultValue,
56+
props.onChange,
57+
);
5358
const title = computed(() => {
5459
return props.title || '选择时间';
5560
});

0 commit comments

Comments
 (0)