From 05544c109f1d2ed2b43ef4ed3764aad414ddc74d Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 28 Aug 2022 16:59:41 +0800 Subject: [PATCH] fix(DatePicker): failed to update model value (#10984) --- packages/vant/src/date-picker/DatePicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vant/src/date-picker/DatePicker.tsx b/packages/vant/src/date-picker/DatePicker.tsx index c19c14364..b50b94c49 100644 --- a/packages/vant/src/date-picker/DatePicker.tsx +++ b/packages/vant/src/date-picker/DatePicker.tsx @@ -130,7 +130,7 @@ export default defineComponent({ ); watch(currentValues, (newValues) => { - if (isSameValue(newValues, props.modelValue)) { + if (!isSameValue(newValues, props.modelValue)) { emit('update:modelValue', newValues); } });