From 28e2148b721f5a1da7ebc56c477921655e3fb513 Mon Sep 17 00:00:00 2001 From: lijisanxiong <1518062161@qq.com> Date: Fri, 11 Jul 2025 16:05:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat=EF=BC=9A=E5=88=97=E8=A1=A8=E9=83=A8?= =?UTF-8?q?=E4=BB=B6=E6=94=AF=E6=8C=81=E5=88=86=E7=BB=84=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?2=E7=BB=98=E5=88=B6=EF=BC=8C=E8=AF=A5=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E6=97=B6=E9=97=B4=E5=80=BC=E7=9A=84=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E9=BB=98=E8=AE=A4=E4=BB=A5=E5=A4=A9=E4=B8=BA?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E8=BF=9B=E8=A1=8C=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=E5=B9=B6=E6=9B=BF=E6=8D=A2=E5=8E=9F=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/control/list/list.scss | 31 +++++++++++++++++++++++++++++++ src/control/list/list.tsx | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 933f48f3..64702404 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - 重复器表单拖拽支持表单自动保存配置 - 支持codeEditorTheme代码编辑器主题配置参数 +- 列表部件支持分组样式2绘制,该样式下时间值的分组标题默认以天为单位进行格式化并替换原值 ## [0.7.41-alpha.10] - 2025-07-08 diff --git a/src/control/list/list.scss b/src/control/list/list.scss index 0f6269f2..3c2940a3 100644 --- a/src/control/list/list.scss +++ b/src/control/list/list.scss @@ -8,6 +8,10 @@ $control-list: ( item-bg-color: unset, ); +$control-list-group-style2: ( + color: getCssVar(color, disabled, text), +); + @include b(control-list-item) { flex-grow: 1; min-height: getCssVar(control-list, item-height); @@ -130,4 +134,31 @@ $control-list: ( @include when(active) { background-color: getCssVar(control-list, active-bg-color); } +} + +@include b('control-list-group-style2') { + @include set-component-css-var(control-list-group-style2, $control-list-group-style2); + + @include e('header') { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + @include m('title') { + padding: 0 getCssVar('spacing', 'tight'); + font-size: getCssVar('font-size', 'regular'); + color: getCssVar(control-list-group-style2, color); + } + + &::before, + &::after { + display: block; + flex: 1; + height: 1px; + margin-top: 1px; + content: ''; + border-top: 1px getCssVar(color, border) solid; + transform: translateY(-50%); + } + } } \ No newline at end of file diff --git a/src/control/list/list.tsx b/src/control/list/list.tsx index a9f39927..0407baa7 100644 --- a/src/control/list/list.tsx +++ b/src/control/list/list.tsx @@ -367,9 +367,44 @@ export const ListControl = defineComponent({ ); }; + /** + * 绘制分组样式2项 + * @return {*} {VNode[]} + */ + const renderGroupStyle2 = (): VNode[] => { + return c.state.groups?.map(group => { + return ( +
+
+
+ {showTitle(group.caption)} +
+
+
+ {group.children.length > 0 ? ( + renderListItems(group.children) + ) : ( +
+ {ibiz.i18n.t('app.noData')} +
+ )} +
+
+ ); + }); + }; + // 绘制列表内容 const renderListContent = (): VNode => { if (c.state.enableGroup && !c.state.isSimple) { + if (c.model.groupStyle === 'STYLE2') { + return ( +
+ {renderGroupStyle2()} +
+ ); + } + return ( Date: Fri, 11 Jul 2025 16:07:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E3=80=90?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=86=85=E5=AE=B9=E9=9D=A2=E6=9D=BF=E9=A1=B9?= =?UTF-8?q?=E3=80=91=E7=BB=98=E5=88=B6=E6=A8=A1=E6=9D=BF=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=86=85=E5=AE=B9=E9=97=AA=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/common/rawitem/rawitem.tsx | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64702404..4d654382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Fixed - 修复分割容器重复执行hiddenPanel方法导致showPanel方法执行后不能恢复上一次的分割比例 +- 修复【直接内容面板项】绘制模板模式出现内容闪烁 ### Added diff --git a/src/common/rawitem/rawitem.tsx b/src/common/rawitem/rawitem.tsx index e868bcc6..705adc13 100644 --- a/src/common/rawitem/rawitem.tsx +++ b/src/common/rawitem/rawitem.tsx @@ -198,7 +198,10 @@ export const IBizRawItem = defineComponent({ } }; - convertValue(); + // 模板模式下默认不绘制模板代码 + if (!props.rawItem?.rawItem?.templateMode) { + convertValue(); + } watch( () => props.content, -- Gitee