mirror of
https://github.com/youzan/vant.git
synced 2025-10-16 08:00:34 +00:00
fix(Calendar): failed to watch defaultDate #7815
This commit is contained in:
@@ -503,14 +503,13 @@ export default createComponent({
|
||||
);
|
||||
|
||||
watch(() => props.show, init);
|
||||
watch([() => props.type, () => props.minDate, () => props.maxDate], reset);
|
||||
watch(
|
||||
[
|
||||
() => props.type,
|
||||
() => props.minDate,
|
||||
() => props.maxDate,
|
||||
() => props.defaultDate,
|
||||
],
|
||||
reset
|
||||
() => props.defaultDate,
|
||||
(value) => {
|
||||
state.currentDate = value;
|
||||
scrollIntoView();
|
||||
}
|
||||
);
|
||||
|
||||
useExpose({ reset });
|
||||
|
Reference in New Issue
Block a user