mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Calendar): failed to watch defaultDate #7815
This commit is contained in:
parent
b3b03e20be
commit
89ecc5f20e
@ -503,14 +503,13 @@ export default createComponent({
|
|||||||
);
|
);
|
||||||
|
|
||||||
watch(() => props.show, init);
|
watch(() => props.show, init);
|
||||||
|
watch([() => props.type, () => props.minDate, () => props.maxDate], reset);
|
||||||
watch(
|
watch(
|
||||||
[
|
() => props.defaultDate,
|
||||||
() => props.type,
|
(value) => {
|
||||||
() => props.minDate,
|
state.currentDate = value;
|
||||||
() => props.maxDate,
|
scrollIntoView();
|
||||||
() => props.defaultDate,
|
}
|
||||||
],
|
|
||||||
reset
|
|
||||||
);
|
);
|
||||||
|
|
||||||
useExpose({ reset });
|
useExpose({ reset });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user