From 8f3c2888233e1bbd3ab3a33e1c1680f716a09d21 Mon Sep 17 00:00:00 2001 From: Huarch Date: Thu, 30 Apr 2026 13:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=B3=E9=97=AD=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E9=80=BB=E8=BE=91=EF=BC=8C=E7=AE=80=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../olmap/core/Controls/HistoryDataPanel.tsx | 25 +++++++++---------- .../olmap/core/Controls/PropertyPanel.tsx | 25 +++++++++---------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/components/olmap/core/Controls/HistoryDataPanel.tsx b/src/components/olmap/core/Controls/HistoryDataPanel.tsx index 04deb10..bec278a 100644 --- a/src/components/olmap/core/Controls/HistoryDataPanel.tsx +++ b/src/components/olmap/core/Controls/HistoryDataPanel.tsx @@ -432,6 +432,7 @@ const SCADADataPanel: React.FC = ({ end_time, onClose, }) => { + const handleClose = onClose ?? (() => {}); // 从 featureInfos 中提取设备 ID 列表 const deviceIds = useMemo( () => featureInfos.map(([id]) => id), @@ -931,19 +932,17 @@ const SCADADataPanel: React.FC = ({ }} /> - {onClose && ( - - - - - - )} + + + + + diff --git a/src/components/olmap/core/Controls/PropertyPanel.tsx b/src/components/olmap/core/Controls/PropertyPanel.tsx index 2f6343f..67cff8e 100644 --- a/src/components/olmap/core/Controls/PropertyPanel.tsx +++ b/src/components/olmap/core/Controls/PropertyPanel.tsx @@ -36,6 +36,7 @@ const PropertyPanel: React.FC = ({ onClose, }) => { const draggableRef = useRef(null); + const handleClose = onClose ?? (() => {}); const headerActionSx = { color: "common.white", backgroundColor: "rgba(255,255,255,0.08)", @@ -93,19 +94,17 @@ const PropertyPanel: React.FC = ({

属性面板

- {onClose && ( - - - - - - )} + + + + + {/* 内容区域 */}