| | |
| | | cursor: 'text' |
| | | }, |
| | | jsonContent: { |
| | | maxHeight: '100%' |
| | | height: '100%', |
| | | overflowY: 'auto', |
| | | width: '100%', |
| | | border: 'none', |
| | | backgroundColor: 'transparent', |
| | | resize: 'none', |
| | | '&:focus': { |
| | | outline: 'none' |
| | | } |
| | | } |
| | | } |
| | | }) |
| | |
| | | const { styles } = useStyles(); |
| | | const { curSprite } = props; |
| | | |
| | | // 格式化 JSON 字符串 |
| | | const formattedJSON = JSON.stringify([ |
| | | { |
| | | "links": [ |
| | |
| | | return ( |
| | | <> |
| | | <div className={styles.jsonBox}> |
| | | <pre className={styles.jsonContent}> |
| | | {formattedJSON} |
| | | </pre> |
| | | <textarea |
| | | readOnly |
| | | className={styles.jsonContent} |
| | | value={formattedJSON} |
| | | /> |
| | | </div> |
| | | </> |
| | | ) |
| | | |
| | | } |
| | | |
| | | |
| | | export default ShowJSON; |