From b9f41191ab115ae2550bcb61518f7fbfa67485df Mon Sep 17 00:00:00 2001 From: fengbh <1953356163@qq.com> Date: Fri, 22 May 2026 21:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E4=B8=8B=E6=9C=88?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8C=E4=BC=98=E5=8C=96=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=82=AC=E5=81=9C=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增"查下月"按钮(getCustomMonthRange(-1)) - 按钮按逻辑排列:查当下 → 查下月 → 查上月 → 查上上月 → 查上上上月 - 按钮 hover 时颜色变亮 + 底部淡白底线,增加 transition 过渡 - 增大 padding 到 14px,按钮间距更舒适 Co-Authored-By: Claude Opus 4.7 --- main.js | 17 ++++++++++++++++- main.template.js | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 33fa902..c443bde 100644 --- a/main.js +++ b/main.js @@ -22253,13 +22253,26 @@ const workDayData = { display: "block", lineHeight: "60px", height: "60px", - padding: "0px 10px", + padding: "0px 14px", textDecoration: "none", color: "#e5e5e5", cursor: "pointer", + border: "none", + borderBottom: "2px solid transparent", + transition: "color 0.15s, border-bottom-color 0.15s", + outline: "none", }; Object.assign(button.style, copiedStyles); + button.addEventListener('mouseenter', () => { + button.style.color = "#fff"; + button.style.borderBottomColor = "rgba(255,255,255,0.4)"; + }); + button.addEventListener('mouseleave', () => { + button.style.color = "#e5e5e5"; + button.style.borderBottomColor = "transparent"; + }); + // 处理点击事件回调 if (typeof options.onClick === 'function') { button.addEventListener('click', options.onClick); @@ -22336,6 +22349,7 @@ const workDayData = { }); const button4 = createQueryButton('查当周', getCurrentWeekRange); const button0 = createQueryButton('查当月', () => getCustomMonthRange(0)); + const buttonNext = createQueryButton('查下月', () => getCustomMonthRange(-1)); const button1 = createQueryButton('查上月', () => getCustomMonthRange(1)); const button2 = createQueryButton('查上上月', () => getCustomMonthRange(2)); const button3 = createQueryButton('查上上上月', () => getCustomMonthRange(3)); @@ -22348,6 +22362,7 @@ const workDayData = { container.appendChild(button); container.appendChild(button4); container.appendChild(button0); + container.appendChild(buttonNext); container.appendChild(button1); container.appendChild(button2); container.appendChild(button3); diff --git a/main.template.js b/main.template.js index aa46895..356d4f9 100644 --- a/main.template.js +++ b/main.template.js @@ -330,13 +330,26 @@ display: "block", lineHeight: "60px", height: "60px", - padding: "0px 10px", + padding: "0px 14px", textDecoration: "none", color: "#e5e5e5", cursor: "pointer", + border: "none", + borderBottom: "2px solid transparent", + transition: "color 0.15s, border-bottom-color 0.15s", + outline: "none", }; Object.assign(button.style, copiedStyles); + button.addEventListener('mouseenter', () => { + button.style.color = "#fff"; + button.style.borderBottomColor = "rgba(255,255,255,0.4)"; + }); + button.addEventListener('mouseleave', () => { + button.style.color = "#e5e5e5"; + button.style.borderBottomColor = "transparent"; + }); + // 处理点击事件回调 if (typeof options.onClick === 'function') { button.addEventListener('click', options.onClick); @@ -413,6 +426,7 @@ }); const button4 = createQueryButton('查当周', getCurrentWeekRange); const button0 = createQueryButton('查当月', () => getCustomMonthRange(0)); + const buttonNext = createQueryButton('查下月', () => getCustomMonthRange(-1)); const button1 = createQueryButton('查上月', () => getCustomMonthRange(1)); const button2 = createQueryButton('查上上月', () => getCustomMonthRange(2)); const button3 = createQueryButton('查上上上月', () => getCustomMonthRange(3)); @@ -425,6 +439,7 @@ container.appendChild(button); container.appendChild(button4); container.appendChild(button0); + container.appendChild(buttonNext); container.appendChild(button1); container.appendChild(button2); container.appendChild(button3);