| | |
| | | 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 = ''; |
| | |
| | | }; |
| | | |
| | | const JsonShow = ({ data, height = 500 }) => { |
| | | const theme = useTheme(); |
| | | const themeMode = theme.palette.mode; |
| | | |
| | | let json = parseJson(data); |
| | | |
| | | return ( |
| | |
| | | padding: 2, |
| | | maxHeight: height, |
| | | overflow: 'auto', |
| | | backgroundColor: '#f5f5f5', |
| | | backgroundColor: theme.palette.background.paper, |
| | | borderRadius: 2, |
| | | }} |
| | | > |
| | |
| | | <BatchSettings |
| | | data={ |
| | | batchSprites?.map(item => { |
| | | return item.data?.no; |
| | | return item.data?.type + '-' + item.data?.no; |
| | | }) |
| | | } |
| | | /> |
| | |
| | | <BatchSettings |
| | | data={ |
| | | batchSprites?.map(item => { |
| | | return item.data?.no; |
| | | return item.data?.type + '-' + item.data?.no; |
| | | }) |
| | | } |
| | | /> |