chore: improve multiple watch source (#8253)

This commit is contained in:
neverland
2021-03-03 16:32:38 +08:00
committed by GitHub
parent 7f4651bbbf
commit 202edb24c7
6 changed files with 22 additions and 20 deletions
+6 -3
View File
@@ -503,9 +503,12 @@ export default createComponent({
);
watch(() => props.show, init);
watch([() => props.type, () => props.minDate, () => props.maxDate], () => {
reset(getInitialDate(state.currentDate));
});
watch(
() => [props.type, props.minDate, props.maxDate],
() => {
reset(getInitialDate(state.currentDate));
}
);
watch(
() => props.defaultDate,
(value) => {