fix: portalWrapper add autoLock prop (#6687), close #6649

pull/6660/head
Cherry7 2023-06-25 06:51:25 +08:00 committed by GitHub
parent 7fd0e4a225
commit e9d26f2a7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -61,12 +61,15 @@ export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> =
userSelect: 'none', userSelect: 'none',
}, },
[`${componentCls}${token.antCls}-zoom-leave ${componentCls}-content`]: {
pointerEvents: 'none',
},
[`${componentCls}-mask`]: { [`${componentCls}-mask`]: {
...box('fixed'), ...box('fixed'),
zIndex: token.zIndexPopupBase, zIndex: token.zIndexPopupBase,
height: '100%', height: '100%',
backgroundColor: token.colorBgMask, backgroundColor: token.colorBgMask,
[`${componentCls}-hidden`]: { [`${componentCls}-hidden`]: {
display: 'none', display: 'none',
}, },

View File

@ -50,6 +50,7 @@ const DialogWrap = defineComponent({
} }
return ( return (
<Portal <Portal
autoLock
visible={visible} visible={visible}
forceRender={forceRender} forceRender={forceRender}
getContainer={getContainer} getContainer={getContainer}

View File

@ -66,6 +66,7 @@ const DrawerWrapper = defineComponent({
if ($forceRender || props.open || dom.value) { if ($forceRender || props.open || dom.value) {
portal = ( portal = (
<PortalWrapper <PortalWrapper
autoLock
visible={props.open} visible={props.open}
forceRender={$forceRender} forceRender={$forceRender}
getContainer={getContainer} getContainer={getContainer}