Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
e9d8e007
Commit
e9d8e007
authored
Mar 02, 2018
by
valleykid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix @luli reveiw
parent
6d619771
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
src/routes/List/BasicList.js
src/routes/List/BasicList.js
+19
-4
src/routes/List/BasicList.less
src/routes/List/BasicList.less
+19
-0
No files found.
src/routes/List/BasicList.js
View file @
e9d8e007
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
findDOMNode
}
from
'
react-dom
'
;
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
{
List
,
Card
,
Row
,
Col
,
Radio
,
Input
,
Progress
,
Button
,
Icon
,
Dropdown
,
Menu
,
Avatar
,
...
...
@@ -48,12 +49,14 @@ export default class BasicList extends PureComponent {
});
}
handleDone
=
()
=>
{
setTimeout
(()
=>
this
.
addBtn
.
blur
(),
0
);
this
.
setState
({
done
:
false
,
visible
:
false
,
});
}
handleCancel
=
()
=>
{
setTimeout
(()
=>
this
.
addBtn
.
blur
(),
0
);
this
.
setState
({
visible
:
false
,
});
...
...
@@ -63,6 +66,7 @@ export default class BasicList extends PureComponent {
const
{
dispatch
,
form
}
=
this
.
props
;
const
id
=
this
.
state
.
current
?
this
.
state
.
current
.
id
:
''
;
setTimeout
(()
=>
this
.
addBtn
.
blur
(),
0
);
form
.
validateFields
((
err
,
fieldsValue
)
=>
{
if
(
err
)
return
;
this
.
setState
({
...
...
@@ -171,7 +175,7 @@ export default class BasicList extends PureComponent {
title
=
"
ζδ½ζε
"
description
=
"
δΈη³»εηδΏ‘ζ―ζθΏ°οΌεΎηεζ ·δΉε―δ»₯εΈ¦ζ ηΉγ
"
actions
=
{
<
Button
type
=
"
primary
"
onClick
=
{
this
.
handleDone
}
>
η₯ιδΊ
<
/Button>
}
style
=
{{
width
:
'
100%
'
,
marginBottom
:
'
24px
'
}
}
className
=
{
styles
.
formResult
}
/
>
);
}
...
...
@@ -246,7 +250,17 @@ export default class BasicList extends PureComponent {
bodyStyle
=
{{
padding
:
'
0 32px 40px 32px
'
}}
extra
=
{
extraContent
}
>
<
Button
type
=
"
dashed
"
style
=
{{
width
:
'
100%
'
,
marginBottom
:
8
}}
icon
=
"
plus
"
onClick
=
{
this
.
showModal
}
>
<
Button
type
=
"
dashed
"
style
=
{{
width
:
'
100%
'
,
marginBottom
:
8
}}
icon
=
"
plus
"
onClick
=
{
this
.
showModal
}
ref
=
{(
component
)
=>
{
/* eslint-disable */
this
.
addBtn
=
findDOMNode
(
component
);
/* eslint-enable */
}}
>
ζ·»ε
<
/Button
>
<
List
...
...
@@ -274,9 +288,10 @@ export default class BasicList extends PureComponent {
<
/Card
>
<
/div
>
<
Modal
title
=
{
`δ»»ε‘
${
this
.
state
.
current
?
'
ηΌθΎ
'
:
'
ζ·»ε
'
}
`
}
title
=
{
done
?
null
:
`δ»»ε‘
${
this
.
state
.
current
?
'
ηΌθΎ
'
:
'
ζ·»ε
'
}
`
}
className
=
{
styles
.
standardListForm
}
width
=
{
640
}
bodyStyle
=
{
{
padding
:
'
32px 0 8px
'
}}
bodyStyle
=
{
done
?
{
padding
:
'
72px 0
'
}
:
{
padding
:
'
28px 0 0
'
}}
destroyOnClose
visible
=
{
visible
}
{...
modalFooter
}
...
...
src/routes/List/BasicList.less
View file @
e9d8e007
...
...
@@ -174,3 +174,22 @@
}
}
}
.standardListForm {
:global {
.ant-form-item {
margin-bottom: 12px;
&:last-child {
padding-top: 4px;
margin-bottom: 32px;
}
}
}
}
.formResult {
width: 100%;
[class^="title"] {
margin-bottom: 8px;
}
}
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