| | |
| | | import React, { useState, useRef, useEffect } from 'react'; |
| | | import { Drawer, Space, Button } from 'antd'; |
| | | import { Drawer, Space, Button, Card } from 'antd'; |
| | | import { FormattedMessage, useIntl, useModel } from '@umijs/max'; |
| | | import { createStyles } from 'antd-style'; |
| | | import * as Utils from '../utils' |
| | | import ShowJson from '../drawer/showJson'; |
| | | |
| | | const useStyles = createStyles(({ token, css }) => { |
| | | return { |
| | |
| | | </Space> |
| | | } |
| | | > |
| | | {batchSprites?.length} |
| | | <Card |
| | | className='drawer-card' |
| | | hoverable |
| | | bordered={false} |
| | | type='inner' |
| | | style={{ |
| | | height: '100%' |
| | | }} |
| | | > |
| | | <ShowJson |
| | | data={batchSprites?.length} |
| | | height='30%' |
| | | /> |
| | | </Card> |
| | | |
| | | </Drawer> |
| | | </> |
| | | ) |
| | |
| | | const contentList = { |
| | | json: ( |
| | | <ShowJson |
| | | curSprite={props.curSprite} |
| | | data={props.curSprite.data} |
| | | /> |
| | | ), |
| | | }; |
| | |
| | | const contentList = { |
| | | json: ( |
| | | <ShowJson |
| | | curSprite={props.curSprite} |
| | | data={props.curSprite.data} |
| | | /> |
| | | ), |
| | | }; |
| | |
| | | const contentList = { |
| | | json: ( |
| | | <ShowJson |
| | | curSprite={props.curSprite} |
| | | data={props.curSprite.data} |
| | | /> |
| | | ), |
| | | }; |
| | |
| | | |
| | | const ShowJSON = (props) => { |
| | | const { styles } = useStyles(); |
| | | const { curSprite } = props; |
| | | const { data } = props; |
| | | |
| | | const formattedJSON = JSON.stringify(curSprite.data, null, 2); |
| | | const formattedJSON = JSON.stringify(data, null, 2); |
| | | |
| | | return ( |
| | | <> |
| | | <div className={styles.jsonBox}> |
| | | <div className={styles.jsonBox} style={{height: props.height}}> |
| | | <textarea |
| | | readOnly |
| | | className={styles.jsonContent} |