From 685999ba8addf446a06c7086e4ab7f8e4b4b7ca5 Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 13 Aug 2026 17:24:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=82=B9=E5=87=BB=E4=BB=8A?= =?UTF-8?q?=E5=A4=A9=E5=AE=9A=E4=BD=8D=E5=A4=B1=E6=95=88=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E5=A2=9E=E9=87=8F=E6=96=B9=E5=90=91=E5=B9=B6=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=9C=88=E4=BB=BD=E5=88=86=E9=9A=94=E6=9D=A1=E5=81=8F?= =?UTF-8?q?=E7=A7=BB=EF=BC=9B=E7=89=88=E6=9C=AC=E5=8F=B7=E5=8D=87=E8=87=B3?= =?UTF-8?q?1.5.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/ops_vue_js/package.json | 2 +- .../src/views/calendar/CalendarStream.vue | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/ops_vue_js/package.json b/frontend/ops_vue_js/package.json index 3b1b8a6..cb74f9a 100644 --- a/frontend/ops_vue_js/package.json +++ b/frontend/ops_vue_js/package.json @@ -1,6 +1,6 @@ { "name": "ops_vue_js", - "version": "1.5.6", + "version": "1.5.7", "private": true, "type": "module", "engines": { diff --git a/frontend/ops_vue_js/src/views/calendar/CalendarStream.vue b/frontend/ops_vue_js/src/views/calendar/CalendarStream.vue index e45a648..66a54be 100644 --- a/frontend/ops_vue_js/src/views/calendar/CalendarStream.vue +++ b/frontend/ops_vue_js/src/views/calendar/CalendarStream.vue @@ -853,16 +853,21 @@ function applyTodayScroll() { if (!todayCell) return const idx = weeks.value.findIndex(w => weekKey(w) === dateToStr(getWeekStart(new Date()))) - const prevWeekHeight = idx > 0 + let desiredTop = idx > 0 ? (weekLayouts.get(weekKey(weeks.value[idx - 1]))?.weekHeight ?? 90) : 0 + const todayWeekEl = todayCell.closest('.week-row') + const prevSib = todayWeekEl?.previousElementSibling + if (prevSib?.classList.contains('month-separator')) { + desiredTop += prevSib.getBoundingClientRect().height + } + const contRect = container.getBoundingClientRect() const cellRect = todayCell.getBoundingClientRect() const currentTop = cellRect.top - contRect.top - const desiredTop = prevWeekHeight - container.scrollTop += (desiredTop - currentTop) + container.scrollTop += (currentTop - desiredTop) } function applyScrollToTitle(titleEl) { @@ -1240,7 +1245,7 @@ watch(locale, () => {
{{ getMonthLabel(week) }}