From 75aeb26d048ce1a3246dc333de4c9051cdffc970 Mon Sep 17 00:00:00 2001 From: lijisanxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 18:39:26 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat=EF=BC=9A=E9=80=82=E9=85=8D=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=82=E6=95=B0disableHomeTabs=EF=BC=88=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E7=A6=81=E7=94=A8=E5=88=86=E9=A1=B5=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=EF=BC=89=E9=80=BB=E8=BE=91=EF=BC=8C=E8=AF=A5=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=B8=BAtrue=E6=97=B6=E9=A6=96=E9=A1=B5=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=88=86=E9=A1=B5=E5=AF=BC=E8=88=AA=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/panel-component/nav-pos-index/nav-pos-index.tsx | 2 +- src/panel-component/nav-tabs/nav-tabs.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panel-component/nav-pos-index/nav-pos-index.tsx b/src/panel-component/nav-pos-index/nav-pos-index.tsx index 05d9173f5..4bb296cab 100644 --- a/src/panel-component/nav-pos-index/nav-pos-index.tsx +++ b/src/panel-component/nav-pos-index/nav-pos-index.tsx @@ -83,7 +83,7 @@ export const NavPosIndex = defineComponent({ onCreated={this.onViewCreated} > {({ Component }: { Component: string }): VNode | null => { - if (this.c.noCache) { + if (this.c.noCache || ibiz.config.view.disableHomeTabs) { return Component ? : null; } return ( diff --git a/src/panel-component/nav-tabs/nav-tabs.tsx b/src/panel-component/nav-tabs/nav-tabs.tsx index 5387a17cb..cd0cc92ef 100644 --- a/src/panel-component/nav-tabs/nav-tabs.tsx +++ b/src/panel-component/nav-tabs/nav-tabs.tsx @@ -89,6 +89,7 @@ export const NavTabs = defineComponent({ }, render() { const { state } = this.controller; + if (ibiz.config.view.disableHomeTabs) return; return (
-- Gitee From e05e2f2366e39c0c49a5873b6d61ac7c4803bbbf Mon Sep 17 00:00:00 2001 From: lijisanxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 18:39:47 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat=EF=BC=9A=E9=80=82=E9=85=8D=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=A4=9A=E6=95=B0=E6=8D=AE=E9=83=A8=E4=BB=B6=E5=AF=B9?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E5=8F=82=E6=95=B0mdCtrlConfirmBeforeRemove?= =?UTF-8?q?=EF=BC=88=E5=A4=9A=E6=95=B0=E6=8D=AE=E9=83=A8=E4=BB=B6=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=89=8D=E6=98=AF=E5=90=A6=E9=9C=80=E8=A6=81=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=EF=BC=89=E7=9A=84=E6=94=AF=E6=8C=81=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=A4=9A=E6=95=B0=E6=8D=AE=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=A1=AE=E8=AE=A4=E5=BC=B9=E6=A1=86=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form-mdctrl-md/form-mdctrl-md.tsx | 67 +++++++++++++++---- 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/src/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.tsx b/src/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.tsx index 65af121e8..9fb9f30c4 100644 --- a/src/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.tsx +++ b/src/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.tsx @@ -13,6 +13,7 @@ import { } from '@ibiz-template/runtime'; import { useNamespace } from '@ibiz-template/vue3-util'; import './form-mdctrl-md.scss'; +import { showTitle } from '@ibiz-template/core'; export const FormMDCtrlMD = defineComponent({ name: 'IBizFormMDCtrlMD', @@ -40,7 +41,57 @@ export const FormMDCtrlMD = defineComponent({ isSelected.value = event.data.length > 0; }; - return { ns, showActions, isSelected, onCreated, onSelectionChange }; + /** 处理删除 */ + const handleRemove = (): void => { + isSelected.value = false; + props.controller.remove(); + }; + + /** 绘制删除按钮 */ + const renderRemoveBtn = () => { + if (!props.controller.enableDelete) return null; + if (ibiz.config.form.mdCtrlConfirmBeforeRemove) { + return ( + handleRemove()} + > + {{ + reference: () => { + return ( + + {ibiz.i18n.t('app.delete')} + + ); + }, + }} + + ); + } + return ( + handleRemove()} + > + {ibiz.i18n.t('app.delete')} + + ); + }; + + return { ns, showActions, onCreated, onSelectionChange, renderRemoveBtn }; }, render() { const { mdProvider, model } = this.controller; @@ -81,19 +132,7 @@ export const FormMDCtrlMD = defineComponent({ {ibiz.i18n.t('app.add')} )} - {this.controller.enableDelete && ( - this.controller.remove()} - > - {ibiz.i18n.t('app.delete')} - - )} + {this.renderRemoveBtn()}
)}
-- Gitee From 4b7ec33038038f4674e1a6af850e807c817e91d5 Mon Sep 17 00:00:00 2001 From: lijisanxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 18:40:01 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat=EF=BC=9A=E8=B0=83=E6=95=B4=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E9=A1=B9=E7=BB=84=E4=BB=B6=E4=B8=AD=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E9=A2=9D=E5=A4=96=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E5=B0=86=E5=85=B6=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=88=B0=E6=8E=A7=E5=88=B6=E5=99=A8=E4=B8=AD=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/form-detail/form-item/form-item.tsx | 30 ++----------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/src/control/form/form-detail/form-item/form-item.tsx b/src/control/form/form-detail/form-item/form-item.tsx index e18365b81..ef6922db4 100644 --- a/src/control/form/form-detail/form-item/form-item.tsx +++ b/src/control/form/form-detail/form-item/form-item.tsx @@ -1,4 +1,4 @@ -import { defineComponent, h, PropType, ref, resolveComponent } from 'vue'; +import { defineComponent, h, PropType, resolveComponent } from 'vue'; import { useNamespace } from '@ibiz-template/vue3-util'; import { IDEFormItem } from '@ibiz/model-core'; import { FormItemController } from '@ibiz-template/runtime'; @@ -32,31 +32,7 @@ export const FormItem = defineComponent({ props.controller.setDataValue(val, name, ignore); }; - // 额外参数 - const extraParams = ref({}); - - // 是否隐藏无值的单位 - let emptyHiddenUnit = ibiz.config.form.emptyHiddenUnit; - const emptyhiddenunit = - props.controller.form?.controlParams?.emptyhiddenunit; - - if (emptyhiddenunit) { - emptyHiddenUnit = Object.is(emptyhiddenunit, 'true'); - } - - // 编辑器参数优先级最高 - const editorParams = props.controller.editor?.model?.editorParams || {}; - const { EMPTYHIDDENUNIT } = editorParams; - - if (EMPTYHIDDENUNIT) { - emptyHiddenUnit = Object.is(EMPTYHIDDENUNIT, 'true'); - } - - Object.assign(extraParams.value, { - emptyHiddenUnit, - }); - - return { ns, c, extraParams, onValueChange }; + return { ns, c, onValueChange }; }, render() { if (!this.c.state.visible || this.c.model.editor?.editorType === 'HIDDEN') { @@ -93,7 +69,7 @@ export const FormItem = defineComponent({ disabled: this.c.state.disabled, readonly: this.c.state.readonly, onChange: this.onValueChange, - extraParams: this.extraParams, + extraParams: (this.c.editor as IData)?.extraParams || {}, controlParams: editMode ? { ...this.c.form.controlParams, editmode: editMode } : this.c.form.controlParams, -- Gitee From 781f69d1a6b2a446bd34032163f1a2263e00ee99 Mon Sep 17 00:00:00 2001 From: lijisanxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 18:40:45 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E5=8F=82=E6=95=B0=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor/span/span/span.tsx | 1 + src/editor/text-box/input/input.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/editor/span/span/span.tsx b/src/editor/span/span/span.tsx index 02140c6f4..8f53e6063 100644 --- a/src/editor/span/span/span.tsx +++ b/src/editor/span/span/span.tsx @@ -36,6 +36,7 @@ function isValidDateFormat(dateStr: string, format: string): boolean { * @editorparams {name:overflowmode,parameterType:'auto' | 'ellipsis',description:文本换行模式。当参数为 'auto' 时,若内容超出宽度则会换行显示;当参数为 'ellipsis' 时,若内容超出宽度则会显示省略号} * @editorparams {"name":"valuetype","parameterType":"string","description":"编辑器的值类型"} * @editorparams {"name":"objectnamefield","parameterType":"string","defaultvalue":"'srfmajortext'","description":"值类型为OBJECT、OBJECTS时显示的对象属性"} + * @editorparams {name:emptyhiddenunit,parameterType:boolean,defaultvalue:true,description:编辑器无值时,其对应的值单位(如'天'、'%'等)是否隐藏} * @ignoreprops autoFocus | overflowMode * @ignoreemits change | blur | focus | enter | infoTextChange */ diff --git a/src/editor/text-box/input/input.tsx b/src/editor/text-box/input/input.tsx index a04661008..390a3dc52 100644 --- a/src/editor/text-box/input/input.tsx +++ b/src/editor/text-box/input/input.tsx @@ -45,6 +45,7 @@ import './input.scss'; * @editorparams {name:minlength,parameterType:number,description:指定编辑器输入内容的最小字数} * @editorparams {name:maxlength,parameterType:number,description:指定编辑器输入内容的最大字数} * @editorparams {name:readonly,parameterType:boolean,defaultvalue:false,description:设置编辑器是否为只读态} + * @editorparams {name:emptyhiddenunit,parameterType:boolean,defaultvalue:true,description:编辑器无值时,其对应的值单位(如'天'、'%'等)是否隐藏} * @ignoreprops overflowMode * @ignoreemits infoTextChange */ -- Gitee From 8a72e9a415dd616501850fb77341a85bd55688a7 Mon Sep 17 00:00:00 2001 From: lijisanxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 18:41:03 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=96=B0CHANGELOG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a5f1d9ee..8c702b744 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ - 新增列表部件样式-扩展视图3:仅非分组列表和分组样式2列表支持,实现列表的从下往上的绘制,同时滚动加载也支持上滚加载 - 新增数据多项选择视图,数据多项选择视图(左右关系)视图参数checkstrictly(是否严格的遵循穿梭空左右互相关联) +### Changed + +- 适配全局参数disableHomeTabs(是否禁用分页导航栏)逻辑,该参数为true时首页不显示分页导航栏 +- 适配表单多数据部件对全局参数mdCtrlConfirmBeforeRemove(多数据部件删除前是否需要确认)的支持,并统一多数据部件删除确认弹框的显示样式 +- 调整表单项组件中处理编辑器额外参数逻辑,将其迁移到控制器中处理 + ### Fixed - 修复树选中异常 -- Gitee