From 8fb2b66fe5852682ee7d321552a398a4c79a7a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Tue, 29 Mar 2022 17:28:55 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8F=91=E5=B8=83=200.4.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/datePicker/index.vue | 41 ++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/src/component/datePicker/index.vue b/src/component/datePicker/index.vue index 7d10d840..c625518d 100644 --- a/src/component/datePicker/index.vue +++ b/src/component/datePicker/index.vue @@ -83,10 +83,13 @@ >选择时间 @@ -123,10 +126,13 @@ >2022 @@ -141,8 +147,11 @@ >
- - {{ currentYear }} 年 + {{ currentYear }} 年 {{ currentMonth + 1 }} 月 @@ -176,10 +185,13 @@ >2022-03
@@ -221,10 +233,13 @@ >返回日期 @@ -297,7 +312,7 @@ watch( // 计算结果日期 const dateValue = computed(() => { - if(currentDay.value === -1) { + if (currentDay.value === -1) { $emits("update:modelValue", ""); return ""; } @@ -429,9 +444,9 @@ const handleYearClick = (item: any) => { const handleMonthClick = (item: any) => { currentMonth.value = MONTH_NAME.indexOf(item); if (props.type === "month") { - currentDay.value = moment().month(MONTH_NAME.indexOf(item)).valueOf(); + currentDay.value = moment().month(MONTH_NAME.indexOf(item)).valueOf(); } else { - showPane.value = "date"; + showPane.value = "date"; } };