From eff90adaab2d1ca8b8447e6afb881e800d829a3e Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期一, 14 十月 2024 10:56:45 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/JsonShow.jsx | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/zy-acs-flow/src/map/JsonShow.jsx b/zy-acs-flow/src/map/JsonShow.jsx index 5723f64..f2df704 100644 --- a/zy-acs-flow/src/map/JsonShow.jsx +++ b/zy-acs-flow/src/map/JsonShow.jsx @@ -1,5 +1,5 @@ import React, { useState, useRef, useEffect } from 'react'; -import { Box, Typography, Paper } from '@mui/material'; +import { Box, Typography, Paper, useTheme } from '@mui/material'; const parseJson = (jsonStr) => { let json = ''; @@ -44,6 +44,9 @@ }; const JsonShow = ({ data, height = 500 }) => { + const theme = useTheme(); + const themeMode = theme.palette.mode; + let json = parseJson(data); return ( @@ -53,7 +56,7 @@ padding: 2, maxHeight: height, overflow: 'auto', - backgroundColor: '#f5f5f5', + backgroundColor: theme.palette.background.paper, borderRadius: 2, }} > -- Gitblit v1.9.1