From 40f09f5df7c47f05b0256f8367f6afaaaf928fe6 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Wed, 5 Nov 2025 09:18:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=97=A5=E7=A8=8B-=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=80=89=E6=8B=A9=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=89=93=E4=B8=8D=E5=BC=80=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/add-event/index.vue | 87 ++++++++++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 10 deletions(-) diff --git a/pages/add-event/index.vue b/pages/add-event/index.vue index b6c6292..719b5cf 100644 --- a/pages/add-event/index.vue +++ b/pages/add-event/index.vue @@ -87,11 +87,21 @@ 日期 - + + + {{ startDateText || '选择日期' }} + 📅 + + + + + @@ -123,11 +133,21 @@ - + + + {{ endDateText || '选择日期' }} + 📅 + + + + + @@ -426,6 +446,20 @@ const initDates = (dateStr = '') => { } }; +// 打开开始日期日历 +const openStartDateCalendar = () => { + if (startDateCalendar.value) { + startDateCalendar.value.open(); + } +}; + +// 打开结束日期日历 +const openEndDateCalendar = () => { + if (endDateCalendar.value) { + endDateCalendar.value.open(); + } +}; + // 处理开始日期确认 const handleStartDateConfirm = (e) => { const formattedDate = formatDateToYYYYMMDD(e); @@ -882,6 +916,39 @@ onLoad((options) => { margin-bottom: 8px; } +.date-picker-wrapper { + position: relative; +} + +.date-display { + display: flex; + align-items: center; + justify-content: space-between; + padding: 12px; + border: 1px solid #e5e5e5; + border-radius: 8px; + background: #fff; + cursor: pointer; + transition: all 0.3s; +} + +.date-display:active { + background: #f5f5f5; + border-color: #2885ff; +} + +.date-display text { + font-size: 16px; + color: #333; +} + +.date-icon { + font-size: 18px; + margin-left: 8px; +} + + + .time-section-picker { margin-top: 20px; }