From 83c548d3dba59aaed9b52b5d413c6912a87d2efc Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 16 六月 2024 15:50:14 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx | 44 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx b/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
index 96493fb..faef89f 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
@@ -1,9 +1,10 @@
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 }) => {
@@ -12,17 +13,46 @@
const ShelfDrawer = (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>sad</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>
</>
)
}
--
Gitblit v1.9.1