From 491c77d1fe2549dddf77a38c37a6e105840a7155 Mon Sep 17 00:00:00 2001 From: iCheng <138745141+iCheng@users.noreply.github.com> Date: Sat, 2 Sep 2023 16:01:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(calendar):=20=E4=BF=AE=E5=A4=8D=E5=91=A8?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=97=B6=20weekDate=20=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20(#2538)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/__VUE/calendar/demo.vue | 4 ++-- src/packages/__VUE/calendaritem/index.vue | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/packages/__VUE/calendar/demo.vue b/src/packages/__VUE/calendar/demo.vue index db4e6e0e44..5307a6b55d 100644 --- a/src/packages/__VUE/calendar/demo.vue +++ b/src/packages/__VUE/calendar/demo.vue @@ -64,7 +64,7 @@ @@ -296,7 +296,7 @@ export default defineComponent({ date6: [] as string[], date7: [] as string[], date8: '', - date9: ['2020-01-23', '2020-01-26'], + date9: [] as string[], isVisible1: false, isVisible2: false, isVisible3: false, diff --git a/src/packages/__VUE/calendaritem/index.vue b/src/packages/__VUE/calendaritem/index.vue index 2378535728..955c9ff862 100644 --- a/src/packages/__VUE/calendaritem/index.vue +++ b/src/packages/__VUE/calendaritem/index.vue @@ -278,6 +278,9 @@ export default create({ if ((type == 'range' && state.chooseData.length == 2) || type != 'range') { let selectData: any = state.chooseData.slice(0); if (type == 'week') { + if (state.chooseData.length !== 2) { + return; + } selectData = { weekDate: [handleWeekDate(state.chooseData[0] as string[]), handleWeekDate(state.chooseData[1] as string[])] };