From 0322256698a05dbaa6704bd4c957c6d2e0e59231 Mon Sep 17 00:00:00 2001 From: lijisanxiong <1518062161@qq.com> Date: Tue, 7 Jan 2025 20:38:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E6=97=A5?= =?UTF-8?q?=E5=8E=86=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=9C=AA=E6=98=BE=E7=A4=BA=E5=8F=8A=E9=80=82=E9=85=8D=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B9=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4=E6=88=96?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4=E6=B2=A1=E6=9C=89=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ src/control/calendar/calendar-util.ts | 6 ++++-- src/control/calendar/calendar.scss | 7 +++++++ src/control/calendar/calendar.tsx | 7 ++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 220194d5d..7981836ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Fixed + +- 修复日历时间范围标题未显示及适配列表项开始时间或结束时间没有时的样式 + ## [0.7.38-alpha.46] - 2025-01-06 ### Added diff --git a/src/control/calendar/calendar-util.ts b/src/control/calendar/calendar-util.ts index ead59a767..e8a73d5d0 100644 --- a/src/control/calendar/calendar-util.ts +++ b/src/control/calendar/calendar-util.ts @@ -42,10 +42,12 @@ export const isTimeBetween = (_argrs: { unit?: dayjs.OpUnitType | undefined; }): boolean => { const { date, beginTime, endTime, unit = 'day' } = _argrs; - return ( + return !!( dayjs(date).isSame(beginTime, unit) || dayjs(date).isSame(endTime, unit) || - (dayjs(date).isAfter(beginTime, unit) && + (beginTime && + endTime && + dayjs(date).isAfter(beginTime, unit) && dayjs(date).isBefore(endTime, unit)) ); }; diff --git a/src/control/calendar/calendar.scss b/src/control/calendar/calendar.scss index dba085f0f..bfe154452 100644 --- a/src/control/calendar/calendar.scss +++ b/src/control/calendar/calendar.scss @@ -123,6 +123,13 @@ $control-calendar: ( z-index: -1; opacity: 0; } + + &.is-no-end-time, + &.is-no-begin-time { + width: calc(100% - getCssVar(spacing, super-tight) * 2); + margin-left: getCssVar(spacing, super-tight); + border-radius: getCssVar(spacing, extra-tight); + } } } } diff --git a/src/control/calendar/calendar.tsx b/src/control/calendar/calendar.tsx index 8736ac550..6ac2d5d1c 100644 --- a/src/control/calendar/calendar.tsx +++ b/src/control/calendar/calendar.tsx @@ -208,6 +208,8 @@ export const CalendarControl = defineComponent({ date, }), ), + this.ns.is('no-begin-time', this.showDateRange && !item.beginTime), + this.ns.is('no-end-time', this.showDateRange && !item.endTime), this.ns.is('end-time', date && dayjs(date).isSame(item.endTime, 'day')), ]; const style = this.calcItemStyle(item); @@ -259,6 +261,8 @@ export const CalendarControl = defineComponent({ date, }), ), + this.ns.is('no-begin-time', this.showDateRange && !item.beginTime), + this.ns.is('no-end-time', this.showDateRange && !item.endTime), this.ns.is('end-time', date && dayjs(date).isSame(item.endTime, 'day')), ]; const style = this.calcItemStyle(item); @@ -274,7 +278,8 @@ export const CalendarControl = defineComponent({ {this.showDateRange ? date && (dayjs(date).isSame(item.beginTime, 'day') || - dayjs(date).day() === 0) + dayjs(date).day() === 0 || + (!item.beginTime && dayjs(date).isSame(item.endTime, 'day'))) ? item.text : '' : item.text} -- Gitee From f95eb4673310cbbd414a288609914b0fb0b7b937 Mon Sep 17 00:00:00 2001 From: lijisanxiong <1518062161@qq.com> Date: Tue, 7 Jan 2025 20:43:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E5=AF=BC=E5=87=BA=E8=A1=8C=E4=B8=BA=E6=9C=AA?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=AF=BC=E5=87=BA=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/control/toolbar/toolbar.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7981836ef..0feefd03d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Fixed - 修复日历时间范围标题未显示及适配列表项开始时间或结束时间没有时的样式 +- 修复工具栏导出行为未打开导出弹框 ## [0.7.38-alpha.46] - 2025-01-06 diff --git a/src/control/toolbar/toolbar.tsx b/src/control/toolbar/toolbar.tsx index 77774b242..8b143be20 100644 --- a/src/control/toolbar/toolbar.tsx +++ b/src/control/toolbar/toolbar.tsx @@ -220,7 +220,10 @@ export const ToolbarControl = defineComponent({ const buttonType = ( item2 as IDETBUIActionItem ).buttonStyle?.toLowerCase(); - if (actionId === 'exportexcel') { + if ( + actionId === 'exportexcel' || + actionId === 'gridview_exportaction' + ) { return (