修复面板收起时影响页面布局的bug
This commit is contained in:
@@ -572,6 +572,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
|
|||||||
<Box
|
<Box
|
||||||
className="absolute top-20 right-4 bg-white shadow-2xl rounded-lg cursor-pointer hover:shadow-xl transition-all duration-300 opacity-95 hover:opacity-100"
|
className="absolute top-20 right-4 bg-white shadow-2xl rounded-lg cursor-pointer hover:shadow-xl transition-all duration-300 opacity-95 hover:opacity-100"
|
||||||
onClick={() => setIsExpanded(true)}
|
onClick={() => setIsExpanded(true)}
|
||||||
|
sx={{ zIndex: 1300 }}
|
||||||
>
|
>
|
||||||
<Box className="flex flex-col items-center py-3 px-3 gap-1">
|
<Box className="flex flex-col items-center py-3 px-3 gap-1">
|
||||||
<ShowChart className="text-[#257DD4] w-5 h-5" />
|
<ShowChart className="text-[#257DD4] w-5 h-5" />
|
||||||
@@ -594,7 +595,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
|
|||||||
variant="persistent"
|
variant="persistent"
|
||||||
hideBackdrop
|
hideBackdrop
|
||||||
sx={{
|
sx={{
|
||||||
width: isExpanded ? drawerWidth : 0,
|
width: 0,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
"& .MuiDrawer-paper": {
|
"& .MuiDrawer-paper": {
|
||||||
width: "min(920px, calc(100vw - 2rem))",
|
width: "min(920px, calc(100vw - 2rem))",
|
||||||
@@ -608,7 +609,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
|
|||||||
"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
||||||
backdropFilter: "blur(8px)",
|
backdropFilter: "blur(8px)",
|
||||||
opacity: 0.95,
|
opacity: 0.95,
|
||||||
transition: "all 0.3s ease-in-out",
|
transition: "transform 0.3s ease-in-out, opacity 0.3s ease-in-out",
|
||||||
border: "none",
|
border: "none",
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user