调整聊天框为临时模式,优化滚动和过渡效果,避免出现页面横向拉伸

This commit is contained in:
2026-05-08 17:42:21 +08:00
parent cf43700459
commit 133f5d417f
2 changed files with 6 additions and 3 deletions
+1
View File
@@ -6,4 +6,5 @@ body {
height: 100%;
margin: 0;
padding: 0;
overflow-x: hidden;
}
+5 -3
View File
@@ -155,19 +155,21 @@ export const GlobalChatbox: React.FC<Props> = ({ open, onClose }) => {
return (
<Drawer
anchor="right"
variant="persistent"
variant="temporary"
open={open}
onClose={onClose}
hideBackdrop
disableScrollLock
disableEnforceFocus
sx={{ zIndex: (muiTheme) => muiTheme.zIndex.modal + 100 }}
PaperProps={{
sx: {
width: { xs: "100%", sm: width },
background: "transparent",
boxShadow: "none",
overflow: "visible",
overflow: open ? "visible" : "hidden",
zIndex: (muiTheme) => muiTheme.zIndex.modal + 100,
transition: isResizing ? "none" : "width 0.2s cubic-bezier(0, 0, 0.2, 1)",
transition: isResizing ? "none" : undefined,
},
}}
>