| | |
| | | import React, { useState, useRef, useEffect } from 'react'; |
| | | import { Drawer, Space, Button } from 'antd'; |
| | | import { Card, Form, Button } from 'antd'; |
| | | import { FormattedMessage, useIntl, useModel } from '@umijs/max'; |
| | | import { createStyles } from 'antd-style'; |
| | | import * as Utils from '../../utils' |
| | | import Http from '@/utils/http'; |
| | | import ShowJson from '../showJson'; |
| | | |
| | | const useStyles = createStyles(({ token, css }) => { |
| | | |
| | |
| | | const AgvDrawer = (props) => { |
| | | const intl = useIntl(); |
| | | const { styles } = useStyles(); |
| | | const [activeTabKey, setActiveTabKey] = useState('json'); |
| | | |
| | | const handleCancel = () => { |
| | | props.onCancel(); |
| | | const contentList = { |
| | | json: ( |
| | | <ShowJson |
| | | curSprite={props.curSprite} |
| | | /> |
| | | ), |
| | | }; |
| | | |
| | | const handleOk = () => { |
| | | } |
| | | |
| | | return ( |
| | | <> |
| | | <h1>Agv</h1> |
| | | <Card |
| | | className='drawer-card' |
| | | hoverable |
| | | bordered={false} |
| | | type='inner' |
| | | tabList={[ |
| | | { |
| | | key: 'json', |
| | | tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }), |
| | | }, |
| | | ]} |
| | | activeTabKey={activeTabKey} |
| | | onTabChange={(key) => { |
| | | setActiveTabKey(key) |
| | | }} |
| | | tabProps={{ |
| | | centered: true, |
| | | size: 'large', |
| | | type: "card", |
| | | style: { |
| | | } |
| | | }} |
| | | style={{ |
| | | height: '100%' |
| | | }} |
| | | > |
| | | {contentList[activeTabKey]} |
| | | </Card> |
| | | </> |
| | | ) |
| | | } |