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
ab4f2429
Commit
ab4f2429
authored
Dec 17, 2021
by
coderTomato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改前端import导出错误
parent
f69bb4a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
updateForm.tsx
dlink-web/src/pages/Task/components/updateForm.tsx
+9
-9
No files found.
dlink-web/src/pages/Task/components/updateForm.tsx
View file @
ab4f2429
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Form
,
Button
,
Input
,
Modal
}
from
'antd'
;
import
type
{
TableListItem
}
from
'../data.d'
;
import
{
TaskTableListItem
}
from
"@/pages/Task/data"
;
import
Switch
from
"antd/es/switch"
;
export
type
UpdateFormProps
=
{
onCancel
:
(
flag
?:
boolean
,
formVals
?:
Partial
<
TableListItem
>
)
=>
void
;
onSubmit
:
(
values
:
Partial
<
TableListItem
>
)
=>
void
;
onCancel
:
(
flag
?:
boolean
,
formVals
?:
Partial
<
Ta
skTa
bleListItem
>
)
=>
void
;
onSubmit
:
(
values
:
Partial
<
Ta
skTa
bleListItem
>
)
=>
void
;
updateModalVisible
:
boolean
;
values
:
Partial
<
TableListItem
>
;
values
:
Partial
<
Ta
skTa
bleListItem
>
;
};
const
FormItem
=
Form
.
Item
;
...
...
@@ -18,7 +18,7 @@ const formLayout = {
};
const
UpdateForm
:
React
.
FC
<
UpdateFormProps
>
=
(
props
)
=>
{
const
[
formVals
,
setFormVals
]
=
useState
<
Partial
<
TableListItem
>>
({
const
[
formVals
,
setFormVals
]
=
useState
<
Partial
<
Ta
skTa
bleListItem
>>
({
id
:
props
.
values
.
id
,
name
:
props
.
values
.
name
,
alias
:
props
.
values
.
alias
,
...
...
@@ -26,7 +26,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
checkPoint
:
props
.
values
.
checkPoint
,
savePointPath
:
props
.
values
.
savePointPath
,
parallelism
:
props
.
values
.
parallelism
,
frag
em
nt
:
props
.
values
.
fragment
,
frag
me
nt
:
props
.
values
.
fragment
,
clusterId
:
props
.
values
.
clusterId
,
note
:
props
.
values
.
note
,
enabled
:
props
.
values
.
enabled
,
...
...
@@ -47,7 +47,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
handleUpdate
({...
formVals
,
...
fieldsValue
});
};
const
renderContent
=
(
formVals
)
=>
{
const
renderContent
=
(
formVals
:
any
)
=>
{
return
(
<>
<
FormItem
...
...
@@ -148,7 +148,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
checkPoint
:
formVals
.
checkPoint
,
savePointPath
:
formVals
.
savePointPath
,
parallelism
:
formVals
.
parallelism
,
frag
emnt
:
formVals
.
fragem
nt
,
frag
ment
:
formVals
.
fragme
nt
,
clusterId
:
formVals
.
clusterId
,
enabled
:
formVals
.
enabled
,
}
}
...
...
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