Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaowei
dlink
Commits
b9dc419f
Unverified
Commit
b9dc419f
authored
Apr 22, 2022
by
aiwenmo
Committed by
GitHub
Apr 22, 2022
Browse files
Options
Browse Files
Download
Plain Diff
[Fix-387][web] metadata switching error
[Fix-387][web] metadata switching error
parents
c0e9de42
85c7dc24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
37 deletions
+20
-37
index.tsx
...components/Studio/StudioLeftTool/StudioMetaData/index.tsx
+20
-37
No files found.
dlink-web/src/components/Studio/StudioLeftTool/StudioMetaData/index.tsx
View file @
b9dc419f
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"
;
...
@@ -82,6 +69,11 @@ const StudioMetaData = (props: any) => {
...
@@ -82,6 +69,11 @@ const StudioMetaData = (props: any) => {
}
}
}
}
const
cancelHandle
=
()
=>
{
setRow
(
undefined
);
setModalVisit
(
false
);
}
return
(
return
(
<>
<>
<
Select
<
Select
...
@@ -103,29 +95,20 @@ const StudioMetaData = (props: any) => {
...
@@ -103,29 +95,20 @@ const StudioMetaData = (props: any) => {
}
}
}
}
/>):(<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>)
}
/>):(<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>)
}
</
Scrollbars
>
</
Scrollbars
>
<
Modal
Form
<
Modal
title=
{
row
?.
key
}
title=
{
row
?.
key
}
visible=
{
modalVisit
}
visible=
{
modalVisit
}
width=
{
1000
}
width=
{
1000
}
onFinish=
{
async
()
=>
{
onCancel=
{
()
=>
{
// setRow(undefined);
cancelHandle
();
// setModalVisit(false);
}
}
modalProps=
{
{
maskClosable
:
false
,
bodyStyle
:{
padding
:
'5px'
}
}
}
onVisibleChange=
{
setModalVisit
}
submitter=
{
{
submitButtonProps
:
{
style
:
{
display
:
'none'
,
},
},
}
}
}
}
footer=
{
[
<
Button
key=
"back"
onClick=
{
()
=>
{
cancelHandle
();
}
}
>
关闭
</
Button
>,
]
}
>
>
<
Tabs
defaultActiveKey=
"tableInfo"
size=
"small"
>
<
Tabs
defaultActiveKey=
"tableInfo"
size=
"small"
>
<
TabPane
<
TabPane
...
@@ -162,7 +145,7 @@ const StudioMetaData = (props: any) => {
...
@@ -162,7 +145,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
>
</
Modal
Form
>
</
Modal
>
</>
</>
);
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment