@@ -105,6 +105,7 @@ let TmpModalComp = (function () {
105
105
style : styleControl ( ModalStyle ) ,
106
106
maskClosable : withDefault ( BoolControl , true ) ,
107
107
showMask : withDefault ( BoolControl , true ) ,
108
+ toggleClose :withDefault ( BoolControl , true )
108
109
} ,
109
110
( props , dispatch ) => {
110
111
const userViewMode = useUserViewMode ( ) ;
@@ -147,6 +148,7 @@ let TmpModalComp = (function () {
147
148
< BackgroundColorContext . Provider value = { props . style . background } >
148
149
< ModalWrapper >
149
150
< StyledModal
151
+ closable = { props . toggleClose }
150
152
height = { height }
151
153
resizeHandles = { resizeHandles }
152
154
onResizeStop = { onResizeStop }
@@ -160,10 +162,10 @@ let TmpModalComp = (function () {
160
162
$titleAlign = { props . titleAlign }
161
163
width = { width }
162
164
onCancel = { ( e ) => {
163
- props . visible . onChange ( false ) ;
165
+ props . toggleClose && props . visible . onChange ( false ) ;
164
166
} }
165
167
afterClose = { ( ) => {
166
- props . onEvent ( "close" ) ;
168
+ props . toggleClose && props . onEvent ( "close" ) ;
167
169
} }
168
170
zIndex = { Layers . modal }
169
171
modalRender = { ( node ) => < ModalStyled $style = { props . style } > { node } </ ModalStyled > }
@@ -208,6 +210,9 @@ let TmpModalComp = (function () {
208
210
{ children . showMask . propertyView ( {
209
211
label : trans ( "prop.showMask" ) ,
210
212
} ) }
213
+ { children . toggleClose . propertyView ( {
214
+ label : trans ( "prop.toggleClose" ) ,
215
+ } ) }
211
216
</ Section >
212
217
< Section name = { sectionNames . interaction } > { children . onEvent . getPropertyView ( ) } </ Section >
213
218
< Section name = { sectionNames . style } > { children . style . getPropertyView ( ) } </ Section >
0 commit comments