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);