diff --git a/client/packages/lowcoder/src/comps/hooks/modalComp.tsx b/client/packages/lowcoder/src/comps/hooks/modalComp.tsx index 834fe4842..a7e64409a 100644 --- a/client/packages/lowcoder/src/comps/hooks/modalComp.tsx +++ b/client/packages/lowcoder/src/comps/hooks/modalComp.tsx @@ -105,6 +105,7 @@ let TmpModalComp = (function () { style: styleControl(ModalStyle), maskClosable: withDefault(BoolControl, true), showMask: withDefault(BoolControl, true), + toggleClose:withDefault(BoolControl,true) }, (props, dispatch) => { const userViewMode = useUserViewMode(); @@ -147,6 +148,7 @@ let TmpModalComp = (function () { { - props.visible.onChange(false); + props.toggleClose&&props.visible.onChange(false); }} afterClose={() => { - props.onEvent("close"); + props.toggleClose&&props.onEvent("close"); }} zIndex={Layers.modal} modalRender={(node) => {node}} @@ -208,6 +210,9 @@ let TmpModalComp = (function () { {children.showMask.propertyView({ label: trans("prop.showMask"), })} + {children.toggleClose.propertyView({ + label: trans("prop.toggleClose"), + })}
{children.onEvent.getPropertyView()}
{children.style.getPropertyView()}
diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts index 15bed4897..ffccf2aca 100644 --- a/client/packages/lowcoder/src/i18n/locales/en.ts +++ b/client/packages/lowcoder/src/i18n/locales/en.ts @@ -195,6 +195,7 @@ export const en = { "innerSider" : "Inner Sider", "showFooter": "Show Footer", "maskClosable": "Click Outside to Close", + "toggleClose": "Enable Close Button", "showMask": "Show Mask", "textOverflow": "Text Overflow", "scrollbar" : "Show Scrollbars",