调整聊天框为临时模式,优化滚动和过渡效果,避免出现页面横向拉伸
This commit is contained in:
@@ -6,4 +6,5 @@ body {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,19 +155,21 @@ export const GlobalChatbox: React.FC<Props> = ({ open, onClose }) => {
|
|||||||
return (
|
return (
|
||||||
<Drawer
|
<Drawer
|
||||||
anchor="right"
|
anchor="right"
|
||||||
variant="persistent"
|
variant="temporary"
|
||||||
open={open}
|
open={open}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
hideBackdrop
|
hideBackdrop
|
||||||
|
disableScrollLock
|
||||||
|
disableEnforceFocus
|
||||||
sx={{ zIndex: (muiTheme) => muiTheme.zIndex.modal + 100 }}
|
sx={{ zIndex: (muiTheme) => muiTheme.zIndex.modal + 100 }}
|
||||||
PaperProps={{
|
PaperProps={{
|
||||||
sx: {
|
sx: {
|
||||||
width: { xs: "100%", sm: width },
|
width: { xs: "100%", sm: width },
|
||||||
background: "transparent",
|
background: "transparent",
|
||||||
boxShadow: "none",
|
boxShadow: "none",
|
||||||
overflow: "visible",
|
overflow: open ? "visible" : "hidden",
|
||||||
zIndex: (muiTheme) => muiTheme.zIndex.modal + 100,
|
zIndex: (muiTheme) => muiTheme.zIndex.modal + 100,
|
||||||
transition: isResizing ? "none" : "width 0.2s cubic-bezier(0, 0, 0.2, 1)",
|
transition: isResizing ? "none" : undefined,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user