diff --git a/CHANGELOG.md b/CHANGELOG.md index f67b53ff54174b5f756b2fe6010eeb0c43ccf85c..a667f324201e8d2fe65541b555af399638c122c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Change +- 表单新增部件参数mobhideclear以及项编辑器参数MOBHIDECLEAR,配置该参数后表单项无清除按钮,默认为false - 更新多数据部件列表样式 - 更新全局抽屉在关闭页面时同时也关闭自身 - 更新时间选择器使用的rolldate插件包为ibiz-mob-rolldate插件包 @@ -20,6 +21,7 @@ ### Fixed +- 修复下拉列表编辑器显示异常问题 - 修复MD编辑器在钉钉内显示异常问题 - 修复ios中时间选择器弹出文本输入框 - 修复ios富文本弹出框层级问题 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 f2cb1eeb4ebec867c28624f470cb044c5482ef04..b2ec604ee4afe2a79eb6aad060459b7b8ce9bc58 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); }); diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx index 75d630b4442804177084f72bc18f4b6db81d4de3..aef2a187229fd405a61d299aee9e97997709393a 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()} ); };