From 654b908f165770edd68b841c727b6fb7e2d97d2c Mon Sep 17 00:00:00 2001 From: "34701892@qq.com" <34701892@qq.com> Date: Mon, 22 Sep 2025 21:55:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=B5=84=E8=AE=AF=E5=A4=B4=E6=9D=A1):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E6=9C=9F=E9=80=89=E6=8B=A9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=B9=B6=E6=98=BE=E7=A4=BA=E5=BD=93=E5=89=8D=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在日历图标旁显示当前选中的日期 - 调整日期选择范围从10天增加到20天 - 修复日期选择后的格式问题,确保包含时间信息 - 移除日历组件的range模式限制 --- src/pages/realtimeInfo/index.vue | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/pages/realtimeInfo/index.vue b/src/pages/realtimeInfo/index.vue index a8cd2e8..1099262 100644 --- a/src/pages/realtimeInfo/index.vue +++ b/src/pages/realtimeInfo/index.vue @@ -67,7 +67,17 @@ - + + {{ chooseDate.startDate.split(' ')[0] }} + + + + @@ -103,7 +113,7 @@ - @@ -135,7 +145,7 @@ let month = d.getMonth() + 1; month = month < 10 ? `0${month}` : month; const date = d.getDate(); const maxDate = `${year}-${month}-${date + 1}`; -const minDate = `${year}-${month}-${date - 10}`; +const minDate = `${year}-${month}-${date - 20}`; const calendarShow = ref(false); const newsList = ref([]); @@ -166,15 +176,16 @@ async function getTopNum() { } const chooseDate = reactive({ - startDate: null, + startDate: `${year}-${month}-${date}`, endDate: null, }); const today = new Date(); function calendarConfirm(dateList) { + console.log("🚀 ~ calendarConfirm ~ dateList:", dateList) if (dateList && dateList.length > 0) { - chooseDate.startDate = dateList[0]; - chooseDate.endDate = dateList[dateList.length - 1]; + chooseDate.startDate = dateList[0] + ' 00:00:00'; + chooseDate.endDate = dateList[dateList.length - 1] + ' 23:59:59'; } getNewsList(); calendarShow.value = false;