From d835d1b51f832889929cdf69010034a30ef44d02 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期四, 17 十月 2024 13:57:29 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/drawer/index.jsx |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/drawer/index.jsx b/zy-asrs-flow/src/pages/map/drawer/index.jsx
index 0c70c5b..ba06a3b 100644
--- a/zy-asrs-flow/src/pages/map/drawer/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -20,9 +20,11 @@
     const { curSprite, curFloor } = props;
 
     const [drawerTitle, setDrawerTitle] = useState('');
+    const [drawerWidth, setDrawerWidth] = useState(() => {
+        return window.innerWidth * 0.35;
+    })
 
     useEffect(() => {
-        console.log(props.curSprite?.data);
     }, [props.curSprite]);
 
     const handleCancel = () => {
@@ -38,7 +40,7 @@
                 getContainer={props.refCurr}
                 rootStyle={{ position: "absolute" }}
                 mask={false}
-                width={window.innerWidth * 0.35}
+                width={drawerWidth}
                 style={{
                     opacity: 1
                 }}
@@ -56,6 +58,7 @@
                             curSprite={curSprite}
                             curFloor={curFloor}
                             setDrawerTitle={setDrawerTitle}
+                            setDrawerWidth={setDrawerWidth}
                         />
                     </>
                 )}
@@ -65,6 +68,7 @@
                             curSprite={curSprite}
                             curFloor={curFloor}
                             setDrawerTitle={setDrawerTitle}
+                            setDrawerWidth={setDrawerWidth}
                         />
                     </>
                 )}
@@ -74,6 +78,7 @@
                             curSprite={curSprite}
                             curFloor={curFloor}
                             setDrawerTitle={setDrawerTitle}
+                            setDrawerWidth={setDrawerWidth}
                         />
                     </>
                 )}
@@ -83,6 +88,8 @@
                             curSprite={curSprite}
                             curFloor={curFloor}
                             setDrawerTitle={setDrawerTitle}
+                            setDrawerWidth={setDrawerWidth}
+                            refCurr={props.refCurr}
                         />
                     </>
                 )}

--
Gitblit v1.9.1