From 24804a9af32baab9fed1c443d5b3803757b49847 Mon Sep 17 00:00:00 2001 From: "jlj05024111@163.com" Date: Mon, 11 Nov 2024 20:00:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f67b53ff5..5e7834063 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ### Fixed +- 修复下拉列表编辑器显示异常问题 - 修复MD编辑器在钉钉内显示异常问题 - 修复ios中时间选择器弹出文本输入框 - 修复ios富文本弹出框层级问题 diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx index 75d630b44..aef2a1872 100644 --- a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx +++ b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx @@ -178,7 +178,7 @@ export const IBizDropdown = defineComponent({ const renderSelectList = () => { return (
- {items.value.length === 0 && + {items.value.length !== 0 && items.value.map((item: IData) => { if (item.text?.indexOf(searchValue.value) < 0) return; return ( @@ -213,7 +213,7 @@ export const IBizDropdown = defineComponent({
); })} - {items.value.length !== 0 && renderNoData()} + {items.value.length === 0 && renderNoData()} ); }; -- Gitee From 148cf47d8610895057d38dac25fe3b7ceab63d48 Mon Sep 17 00:00:00 2001 From: "jlj05024111@163.com" Date: Mon, 11 Nov 2024 20:00:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E8=A1=A8=E5=8D=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=83=A8=E4=BB=B6=E5=8F=82=E6=95=B0mobrequiredhidecle?= =?UTF-8?q?ar,=E9=85=8D=E7=BD=AE=E8=AF=A5=E5=8F=82=E6=95=B0=E5=90=8E?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=A1=B9=E5=BF=85=E5=A1=AB=E9=A1=B9=E6=97=A0?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E6=8C=89=E9=92=AE=EF=BC=8C=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=BAfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../form-item-container.tsx | 22 ++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e7834063..a667f3242 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Change +- 表单新增部件参数mobhideclear以及项编辑器参数MOBHIDECLEAR,配置该参数后表单项无清除按钮,默认为false - 更新多数据部件列表样式 - 更新全局抽屉在关闭页面时同时也关闭自身 - 更新时间选择器使用的rolldate插件包为ibiz-mob-rolldate插件包 diff --git a/src/control/form/form-detail/form-item/form-item-container/form-item-container.tsx b/src/control/form/form-detail/form-item/form-item-container/form-item-container.tsx index f2cb1eeb4..b2ec604ee 100644 --- a/src/control/form/form-detail/form-item/form-item-container/form-item-container.tsx +++ b/src/control/form/form-detail/form-item/form-item-container/form-item-container.tsx @@ -36,12 +36,17 @@ export const IBizFormItemContainer = defineComponent({ const ns = useNamespace('form-item-container'); let labelAlign: 'right' | 'left' = 'left'; let editorAlign: 'right' | 'left' = 'right'; - const { mobformitemalignmode, mobshowunderline, mobshoweditorborder } = - props.controller.form.controlParams; + const { + mobformitemalignmode, + mobshowunderline, + mobshoweditorborder, + mobhideclear, + } = props.controller.form.controlParams; const editorContentAlign = mobformitemalignmode || ibiz.config.form.mobFormItemAlignMode; let showUnderLine = ibiz.config.form.mobShowUnderLine; let showEditorBorder = ibiz.config.form.mobShowEditorBorder; + let hideClear = false; // 部件参数优先级高于全局参数 if (mobshowunderline) { showUnderLine = Object.is(mobshowunderline, 'true'); @@ -49,15 +54,22 @@ export const IBizFormItemContainer = defineComponent({ if (mobshoweditorborder) { showEditorBorder = Object.is(mobshoweditorborder, 'true'); } + if (mobhideclear) { + hideClear = Object.is(mobhideclear, 'true'); + } // 编辑器参数优先级最高 const editorParams = props.controller.editor?.model?.editorParams || {}; - const { MOBSHOWEDITORBORDER, MOBSHOWUNDERLINE } = editorParams; + const { MOBSHOWEDITORBORDER, MOBSHOWUNDERLINE, MOBHIDECLEAR } = + editorParams; if (MOBSHOWUNDERLINE) { showUnderLine = Object.is(MOBSHOWUNDERLINE, 'true'); } if (MOBSHOWEDITORBORDER) { showEditorBorder = Object.is(MOBSHOWEDITORBORDER, 'true'); } + if (MOBHIDECLEAR) { + hideClear = Object.is(MOBHIDECLEAR, 'true'); + } const cssVars = computed(() => { switch (props.labelPos) { case 'LEFT': @@ -89,10 +101,10 @@ export const IBizFormItemContainer = defineComponent({ if (props.labelWidth !== 130) { Object.assign(result, { 'label-width': `${props.labelWidth}px` }); } - if (props.required) { + if (hideClear) { Object.assign(result, { 'required-style': 'none' }); } else { - Object.assign(result, { 'required-style': 'inherit' }); + Object.assign(result, { 'required-style': 'initial' }); } return ns.cssVarBlock(result); }); -- Gitee