import React, { useState, useRef, useEffect } from 'react';
|
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 ShelfDrawer = (props) => {
|
const intl = useIntl();
|
const { styles } = useStyles();
|
const [activeTabKey, setActiveTabKey] = useState('json');
|
|
const { curSprite } = props;
|
|
const contentList = {
|
json: (
|
<ShowJson
|
curSprite={props.curSprite}
|
/>
|
),
|
};
|
|
return (
|
<>
|
<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: {
|
}
|
}}
|
>
|
{contentList[activeTabKey]}
|
</Card>
|
</>
|
)
|
}
|
|
export default ShelfDrawer;
|