| | |
| | | return ( |
| | | <> |
| | | <Card |
| | | className='drawer-card' |
| | | hoverable |
| | | bordered={false} |
| | | type='inner' |
| | |
| | | } |
| | | }} |
| | | style={{ |
| | | height: '100%', |
| | | height: '100%' |
| | | }} |
| | | > |
| | | {contentList[activeTabKey]} |
| | |
| | | import Http from '@/utils/http'; |
| | | |
| | | const useStyles = createStyles(({ token, css }) => { |
| | | |
| | | let dark = token.colorBgBase === '#000'; |
| | | return { |
| | | jsonBox: { |
| | | height: '100%', |
| | | border: dark ? '3px solid #747d8c' : '3px solid #535c68', |
| | | borderRadius: '5px', |
| | | padding: '5px', |
| | | cursor: 'text' |
| | | }, |
| | | jsonContent: { |
| | | maxHeight: '100%' |
| | | } |
| | | } |
| | | }) |
| | | |
| | | const ShowJSON = (props) => { |
| | | |
| | | const { styles } = useStyles(); |
| | | const { curSprite } = props; |
| | | |
| | | // 格式化 JSON 字符串 |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Card style={{ height: '100%' }}> |
| | | <pre>{formattedJSON}</pre> |
| | | </Card> |
| | | |
| | | <div className={styles.jsonBox}> |
| | | <pre className={styles.jsonContent}> |
| | | {formattedJSON} |
| | | </pre> |
| | | </div> |
| | | </> |
| | | ) |
| | | |
| | |
| | | |
| | | .map-header-select .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input { |
| | | font-weight: bolder !important; |
| | | } |
| | | |
| | | .drawer-card .ant-card-body { |
| | | height: 95%; |
| | | padding: 20px; |
| | | } |