update css
This commit is contained in:
@@ -12,7 +12,9 @@ export default function Drawer({ open, title, onClose, children, width = 540 }:
|
||||
}, [open, onClose]);
|
||||
|
||||
return createPortal(
|
||||
<>
|
||||
// 模块根容器包裹层:为 portal 内容提供 .bomx-app 作用域下的 CSS 变量;
|
||||
// overlay/panel 均 position:fixed,且平台 body 为 overflow:hidden,包裹层不影响布局
|
||||
<div className="bomx-app">
|
||||
{/* 遮罩:覆盖全屏(含导航条),点击任意非抽屉区域关闭 */}
|
||||
{open && <div className="drawer-overlay" onClick={onClose} />}
|
||||
|
||||
@@ -29,7 +31,7 @@ export default function Drawer({ open, title, onClose, children, width = 540 }:
|
||||
</div>
|
||||
<div className="drawer-content">{children}</div>
|
||||
</div>
|
||||
</>,
|
||||
</div>,
|
||||
document.body
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user