Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
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
web_component
submodule
Commits
420d1a4a
Commit
420d1a4a
authored
Jul 21, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除按钮跟确定按钮分开控制
parent
8fb5d5cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
21 deletions
+15
-21
index.less
components/apolloTable/editFormV3/index.less
+1
-2
index.tsx
components/apolloTable/editFormV3/index.tsx
+14
-19
No files found.
components/apolloTable/editFormV3/index.less
View file @
420d1a4a
...
@@ -55,12 +55,11 @@
...
@@ -55,12 +55,11 @@
.buttonWrap {
.buttonWrap {
position: absolute;
position: absolute;
bottom: 16px;
bottom: 16px;
left: 26px;
right: 45px;
right: 45px;
.delBtnCls {
.delBtnCls {
color: @errorColor;
color: @errorColor;
position: relative;
left: -303px;
}
}
}
}
}
}
components/apolloTable/editFormV3/index.tsx
View file @
420d1a4a
...
@@ -32,9 +32,7 @@ class FormWrap extends Component {
...
@@ -32,9 +32,7 @@ class FormWrap extends Component {
handleSubmit
=
(
e
)
=>
{
handleSubmit
=
(
e
)
=>
{
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
const
{
const
{
rowId
,
form
,
handleSubmit
,
data
,
rowData
,
detailType
}
=
this
.
props
;
rowId
,
form
,
handleSubmit
,
data
,
rowData
,
detailType
,
}
=
this
.
props
;
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
!
err
)
{
const
newValues
:
any
[]
=
[];
const
newValues
:
any
[]
=
[];
...
@@ -183,9 +181,7 @@ class FormWrap extends Component {
...
@@ -183,9 +181,7 @@ class FormWrap extends Component {
};
};
render
()
{
render
()
{
const
{
const
{
loading
,
isShowDelBtn
,
data
,
btnWrapStyle
,
name
,
colsNum
,
delLabel
,
hideOperateBtn
}
=
this
.
props
;
loading
,
isShowDelBtn
,
data
,
btnWrapStyle
,
name
,
colsNum
,
delLabel
,
hideOperateBtn
,
}
=
this
.
props
;
return
(
return
(
<
Provider
value=
{
{
locale
:
this
.
getContext
()
}
}
>
<
Provider
value=
{
{
locale
:
this
.
getContext
()
}
}
>
...
@@ -216,15 +212,15 @@ class FormWrap extends Component {
...
@@ -216,15 +212,15 @@ class FormWrap extends Component {
})
}
})
}
</
Form
>
</
Form
>
</
div
>
</
div
>
{
<
div
className=
{
styles
.
buttonWrap
}
style=
{
btnWrapStyle
}
>
hideOperateBtn
?
null
:
(
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
div
className=
{
styles
.
buttonWrap
}
style=
{
btnWrapStyle
}
>
{
isShowDelBtn
&&
(
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'center'
}
}
>
<
Button
onClick=
{
this
.
handleDelete
}
type=
"link"
className=
{
styles
.
delBtnCls
}
>
{
isShowDelBtn
?
(
{
delLabel
||
'删除'
}
<
Button
onClick=
{
this
.
handleDelete
}
type=
"link"
className=
{
styles
.
delBtnCls
}
>
</
Button
>
{
delLabel
||
'删除'
}
)
}
</
Button
>
{
!
hideOperateBtn
&&
(
)
:
null
}
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
}
}
>
<
Button
onClick=
{
this
.
handleCancel
}
className=
{
styles
.
btnCls
}
>
<
Button
onClick=
{
this
.
handleCancel
}
className=
{
styles
.
btnCls
}
>
取消
取消
</
Button
>
</
Button
>
...
@@ -238,10 +234,9 @@ class FormWrap extends Component {
...
@@ -238,10 +234,9 @@ class FormWrap extends Component {
确定
确定
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
)
}
)
</
div
>
}
</
div
>
</
div
>
</
div
>
</
Provider
>
</
Provider
>
);
);
...
...
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