From 2c193684378e86f334fe46fba47158fa222b2937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= Date: Sun, 13 Sep 2026 05:06:03 +0800 Subject: [PATCH] =?UTF-8?q?style(components):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=AF=BC=E8=88=AA=E6=A0=8F=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=B8=8E=E7=83=AD=E5=9B=BE=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 给底部导航激活项添加水平内边距,调整TabbarItem默认内边距 2. 替换热图格子点击回调,改为展示格式化日期与发布篇数的提示 --- src/components/uh-heatmap/uh-heatmap.vue | 12 ++++++++---- src/tabbar/TabbarItem.vue | 2 +- src/tabbar/index.vue | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/uh-heatmap/uh-heatmap.vue b/src/components/uh-heatmap/uh-heatmap.vue index 500b7a0..b434e9e 100644 --- a/src/components/uh-heatmap/uh-heatmap.vue +++ b/src/components/uh-heatmap/uh-heatmap.vue @@ -119,10 +119,14 @@ function getDayColor(day: { count: number, isEmpty: boolean }): string { return intensityColors[4] } -function getDayTip(day: { date: string, count: number, isEmpty: boolean }): string { +/** 点击格子:toast 展示该日日期与发布篇数 */ +function handleDayClick(day: IHeatmapCell) { if (day.isEmpty) - return '' - return `${day.date}:${day.count} 篇` + return + uni.showToast({ + title: `${dayjs(day.date).format('YYYY年MM月DD日')} 发布 ${day.count} 篇`, + icon: 'none', + }) } /** 累计总数 */ @@ -172,7 +176,7 @@ function changeYear(value: number) { {{ columnMonths[ci] }} + :style="{ backgroundColor: getDayColor(day) }" @click="handleDayClick(day)" /> diff --git a/src/tabbar/TabbarItem.vue b/src/tabbar/TabbarItem.vue index 0aa5a27..1d095cc 100644 --- a/src/tabbar/TabbarItem.vue +++ b/src/tabbar/TabbarItem.vue @@ -23,7 +23,7 @@ function isActive(index: number) {