From c339a81fb4b2321fd7961f204f9b8ca1a961ea59 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期二, 21 一月 2025 16:08:57 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/map/JsonShow.jsx | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/zy-acs-flow/src/map/JsonShow.jsx b/zy-acs-flow/src/map/JsonShow.jsx
index 977fed5..fd70475 100644
--- a/zy-acs-flow/src/map/JsonShow.jsx
+++ b/zy-acs-flow/src/map/JsonShow.jsx
@@ -23,7 +23,13 @@
const theme = useTheme();
const themeMode = theme.palette.mode;
- let json = parseJson(data);
+ const [json, setJson] = useState(null);
+
+ useEffect(() => {
+ if (data) {
+ setJson(parseJson(data));
+ }
+ }, [data]);
return (
<Paper
--
Gitblit v1.9.1