Commit f0be51d5 authored by zhu-mingye's avatar zhu-mingye

Fix metadata switching error

parent c0e9de42
import { import {Button, Empty, Modal, Select, Tabs, Tag, Tree} from "antd";
Tabs, Button,Tree, Empty, Select,Tag,
Tooltip
} from "antd";
import {StateType} from "@/pages/DataStudio/model"; import {StateType} from "@/pages/DataStudio/model";
import {connect} from "umi"; import {connect} from "umi";
import {useState} from "react"; import React, {useState} from "react";
import styles from "./index.less"; import {CodepenOutlined, DatabaseOutlined, DownOutlined, OrderedListOutlined, TableOutlined} from '@ant-design/icons';
import {
TableOutlined,
DatabaseOutlined,
DownOutlined,
OrderedListOutlined, CodepenOutlined
} from '@ant-design/icons';
import React from "react";
import {showMetaDataTable} from "@/components/Studio/StudioEvent/DDL"; import {showMetaDataTable} from "@/components/Studio/StudioEvent/DDL";
import { Scrollbars } from 'react-custom-scrollbars'; import {Scrollbars} from 'react-custom-scrollbars';
import {
ModalForm,
} from '@ant-design/pro-form';
import Columns from "@/pages/DataBase/Columns"; import Columns from "@/pages/DataBase/Columns";
import Tables from "@/pages/DataBase/Tables"; import Tables from "@/pages/DataBase/Tables";
import {TreeDataNode} from "@/components/Studio/StudioTree/Function"; import {TreeDataNode} from "@/components/Studio/StudioTree/Function";
...@@ -103,29 +90,18 @@ const StudioMetaData = (props: any) => { ...@@ -103,29 +90,18 @@ const StudioMetaData = (props: any) => {
}} }}
/>):(<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />)} />):(<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />)}
</Scrollbars> </Scrollbars>
<ModalForm <Modal
title={row?.key} title={row?.key}
visible={modalVisit} visible={modalVisit}
width={1000} width={1000}
onFinish={async () => { footer={[
// setRow(undefined); <Button key="back" onClick={() => {
// setModalVisit(false); setRow(undefined);
}} setModalVisit(false);
modalProps={{ }}>
maskClosable:false, 关闭
bodyStyle:{ </Button>,
padding: '5px' ]}
}
}}
onVisibleChange={setModalVisit}
submitter={{
submitButtonProps: {
style: {
display: 'none',
},
},
}}
> >
<Tabs defaultActiveKey="tableInfo" size="small"> <Tabs defaultActiveKey="tableInfo" size="small">
<TabPane <TabPane
...@@ -162,7 +138,7 @@ const StudioMetaData = (props: any) => { ...@@ -162,7 +138,7 @@ const StudioMetaData = (props: any) => {
{row? <Generation dbId={databaseId} schema={row.schema} table={row.table}/> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />} {row? <Generation dbId={databaseId} schema={row.schema} table={row.table}/> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />}
</TabPane> </TabPane>
</Tabs> </Tabs>
</ModalForm> </Modal>
</> </>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment