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
dcb5f767
Commit
dcb5f767
authored
Sep 28, 2017
by
nikogu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update antd3.0
parent
e6d23aed
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
127 additions
and
121 deletions
+127
-121
src/index.less
src/index.less
+2
-0
src/routes/List/BasicList.js
src/routes/List/BasicList.js
+15
-17
src/routes/List/CardList.js
src/routes/List/CardList.js
+26
-25
src/routes/List/CoverCardList.js
src/routes/List/CoverCardList.js
+30
-31
src/routes/List/FilterCardList.js
src/routes/List/FilterCardList.js
+25
-26
src/routes/List/SearchList.js
src/routes/List/SearchList.js
+29
-22
No files found.
src/index.less
View file @
dcb5f767
@import '~antd/lib/style/v2-compatible-reset.less';
html, body, :global(#root) {
height: 100%;
}
...
...
src/routes/List/BasicList.js
View file @
dcb5f767
...
...
@@ -119,25 +119,23 @@ export default class BasicList extends PureComponent {
<
Icon
type
=
"
plus
"
/>
ๆทปๅ
<
/Button
>
<
List
rowKey
=
"
id
"
loading
=
{
loading
}
pagination
=
{
paginationProps
}
>
{
list
&&
list
.
map
(
item
=>
(
<
List
.
Item
key
=
{
item
.
id
}
actions
=
{[
<
a
>
็ผ่พ
<
/a>, <MoreBtn /
>
]}
>
<
List
.
Item
.
Meta
avatar
=
{
<
Avatar
src
=
{
item
.
logo
}
shape
=
"
square
"
size
=
"
large
"
/>
}
title
=
{
<
a
href
=
{
item
.
href
}
>
{
item
.
title
}
<
/a>
}
description
=
{
item
.
subDescription
}
/
>
<
ListContent
data
=
{
item
}
/
>
<
/List.Item
>
))
}
<
/List
>
dataSource
=
{
list
}
renderItem
=
{
item
=>
(
<
List
.
Item
actions
=
{[
<
a
>
็ผ่พ
<
/a>, <MoreBtn /
>
]}
>
<
List
.
Item
.
Meta
avatar
=
{
<
Avatar
src
=
{
item
.
logo
}
shape
=
"
square
"
size
=
"
large
"
/>
}
title
=
{
<
a
href
=
{
item
.
href
}
>
{
item
.
title
}
<
/a>
}
description
=
{
item
.
subDescription
}
/
>
<
ListContent
data
=
{
item
}
/
>
<
/List.Item
>
)}
/
>
<
/Card
>
<
/div
>
<
/PageHeaderLayout
>
...
...
src/routes/List/CardList.js
View file @
dcb5f767
...
...
@@ -55,34 +55,35 @@ export default class CardList extends PureComponent {
>
<
div
className
=
{
styles
.
cardList
}
>
<
List
rowKey
=
"
id
"
loading
=
{
loading
}
grid
=
{{
gutter
:
16
,
lg
:
3
,
md
:
2
,
sm
:
1
,
xs
:
1
}}
>
<
List
.
Item
>
<
Button
type
=
"
dashed
"
className
=
{
styles
.
newButton
}
>
<
Icon
type
=
"
plus
"
/>
ๆฐๅขไบงๅ
<
/Button
>
<
/List.Item
>
{
list
&&
list
.
map
(
item
=>
(
<
List
.
Item
key
=
{
item
.
id
}
>
<
Link
to
=
"
/list/card-list
"
>
<
Card
actions
=
{[
<
a
>
ๆไฝไธ
<
/a>, <a>ๆไฝไบ</
a
>
]}
>
<
Card
.
Meta
avatar
=
{
<
Avatar
size
=
"
large
"
src
=
{
item
.
avatar
}
/>
}
title
=
{
item
.
title
}
description
=
{(
<
p
className
=
{
styles
.
cardDescription
}
>
<
span
>
{
item
.
description
}
<
/span
>
<
/p
>
)}
/
>
<
/Card
>
<
/
Link
>
dataSource
=
{[
''
,
...
list
]}
renderItem
=
{
item
=>
(
item
?
(
<
List
.
Item
key
=
{
item
.
id
}
>
<
Link
to
=
"
/list/card-list
"
>
<
Card
actions
=
{[
<
a
>
ๆไฝไธ
<
/a>, <a>ๆไฝไบ</
a
>
]}
>
<
Card
.
Meta
avatar
=
{
<
Avatar
size
=
"
large
"
src
=
{
item
.
avatar
}
/>
}
title
=
{
item
.
title
}
description
=
{(
<
p
className
=
{
styles
.
cardDescription
}
>
<
span
>
{
item
.
description
}
<
/span
>
<
/p
>
)
}
/
>
<
/Card
>
<
/Link
>
<
/List.Item
>
)
:
(
<
List
.
Item
>
<
Button
type
=
"
dashed
"
className
=
{
styles
.
newButton
}
>
<
Icon
type
=
"
plus
"
/>
ๆฐๅขไบงๅ
<
/
Button
>
<
/List.Item
>
)
)
}
<
/List
>
)
)
}
/
>
<
/div
>
<
/PageHeaderLayout
>
);
...
...
src/routes/List/CoverCardList.js
View file @
dcb5f767
...
...
@@ -73,40 +73,39 @@ export default class CoverCardList extends PureComponent {
const
cardList
=
list
?
(
<
List
rowKey
=
"
id
"
loading
=
{
loading
}
grid
=
{{
gutter
:
16
,
lg
:
4
,
md
:
3
,
sm
:
2
,
xs
:
1
}}
>
{
list
.
map
(
item
=>
(
<
List
.
Item
key
=
{
item
.
id
}
>
<
Card
cover
=
{
<
img
alt
=
{
item
.
title
}
src
=
{
item
.
cover
}
/>
}
>
<
Card
.
Meta
title
=
{
item
.
title
}
description
=
{
item
.
subDescription
}
/
>
<
div
className
=
{
styles
.
cardItemContent
}
>
<
span
>
{
moment
(
item
.
updatedAt
).
fromNow
()}
<
/span
>
<
div
className
=
{
styles
.
avatarList
}
>
<
AvatarList
size
=
"
small
"
>
{
item
.
members
.
map
((
member
,
i
)
=>
(
<
AvatarList
.
Item
key
=
{
`
${
item
.
id
}
-avatar-
${
i
}
`
}
src
=
{
member
.
avatar
}
tips
=
{
member
.
name
}
/
>
))
}
<
/AvatarList
>
<
/div
>
dataSource
=
{
list
}
renderItem
=
{
item
=>
(
<
List
.
Item
>
<
Card
cover
=
{
<
img
alt
=
{
item
.
title
}
src
=
{
item
.
cover
}
/>
}
>
<
Card
.
Meta
title
=
{
item
.
title
}
description
=
{
item
.
subDescription
}
/
>
<
div
className
=
{
styles
.
cardItemContent
}
>
<
span
>
{
moment
(
item
.
updatedAt
).
fromNow
()}
<
/span
>
<
div
className
=
{
styles
.
avatarList
}
>
<
AvatarList
size
=
"
small
"
>
{
item
.
members
.
map
((
member
,
i
)
=>
(
<
AvatarList
.
Item
key
=
{
`
${
item
.
id
}
-avatar-
${
i
}
`
}
src
=
{
member
.
avatar
}
tips
=
{
member
.
name
}
/
>
))
}
<
/AvatarList
>
<
/div
>
<
/
Card
>
<
/
List.Item
>
))
}
<
/List
>
<
/
div
>
<
/
Card
>
<
/List.Item
>
)
}
/
>
)
:
null
;
const
tabList
=
[
...
...
src/routes/List/FilterCardList.js
View file @
dcb5f767
...
...
@@ -195,36 +195,35 @@ export default class FilterCardList extends PureComponent {
<
/Form
>
<
/Card
>
<
List
rowKey
=
"
id
"
style
=
{{
marginTop
:
16
}}
grid
=
{{
gutter
:
16
,
xl
:
4
,
lg
:
3
,
md
:
3
,
sm
:
2
,
xs
:
1
}}
loading
=
{
loading
}
>
{
list
&&
list
.
map
(
item
=>
(
<
List
.
Item
key
=
{
item
.
id
}
>
<
Card
actions
=
{[
<
Tooltip
title
=
"
ๅคๅถ
"
><
Icon
type
=
"
copy
"
/><
/Tooltip>
,
<
Tooltip
title
=
"
็จๆท
"
><
Icon
type
=
"
solution
"
/><
/Tooltip>
,
<
Tooltip
title
=
"
่ฎพ็ฝฎ
"
><
Icon
type
=
"
setting
"
/><
/Tooltip>
,
<
Tooltip
title
=
"
ๅ ้ค
"
><
Icon
type
=
"
delete
"
/><
/Tooltip>
,
]}
>
<
Card
.
Meta
avatar
=
{
<
Avatar
size
=
"
large
"
src
=
{
item
.
avatar
}
/>
}
title
=
{
item
.
title
}
dataSource
=
{
list
}
renderItem
=
{
item
=>
(
<
List
.
Item
key
=
{
item
.
id
}
>
<
Card
actions
=
{[
<
Tooltip
title
=
"
ๅคๅถ
"
><
Icon
type
=
"
copy
"
/><
/Tooltip>
,
<
Tooltip
title
=
"
็จๆท
"
><
Icon
type
=
"
solution
"
/><
/Tooltip>
,
<
Tooltip
title
=
"
่ฎพ็ฝฎ
"
><
Icon
type
=
"
setting
"
/><
/Tooltip>
,
<
Tooltip
title
=
"
ๅ ้ค
"
><
Icon
type
=
"
delete
"
/><
/Tooltip>
,
]}
>
<
Card
.
Meta
avatar
=
{
<
Avatar
size
=
"
large
"
src
=
{
item
.
avatar
}
/>
}
title
=
{
item
.
title
}
/
>
<
div
className
=
{
styles
.
cardItemContent
}
>
<
CardInfo
activeUser
=
{
formatWan
(
item
.
activeUser
)}
newUser
=
{
numeral
(
item
.
newUser
).
format
(
'
0,0
'
)}
/
>
<
div
className
=
{
styles
.
cardItemContent
}
>
<
CardInfo
activeUser
=
{
formatWan
(
item
.
activeUser
)}
newUser
=
{
numeral
(
item
.
newUser
).
format
(
'
0,0
'
)}
/
>
<
/div
>
<
/Card
>
<
/List.Item
>
))
}
<
/List
>
<
/div
>
<
/Card
>
<
/List.Item
>
)}
/
>
<
/div
>
<
/PageHeaderLayout
>
);
...
...
src/routes/List/SearchList.js
View file @
dcb5f767
...
...
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
{
routerRedux
}
from
'
dva/router
'
;
import
{
Form
,
Card
,
Select
,
List
,
Tag
,
Icon
,
Avatar
,
Row
,
Col
}
from
'
antd
'
;
import
{
Form
,
Card
,
Select
,
List
,
Tag
,
Icon
,
Avatar
,
Row
,
Col
,
Button
}
from
'
antd
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
StandardFormRow
from
'
../../components/StandardFormRow
'
;
...
...
@@ -90,7 +90,7 @@ export default class SearchList extends Component {
render
()
{
const
{
showLoadMore
,
loadingMore
}
=
this
.
state
;
const
{
form
,
list
:
{
list
}
}
=
this
.
props
;
const
{
form
,
list
:
{
list
,
loading
}
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
form
;
const
owners
=
[
...
...
@@ -161,6 +161,15 @@ export default class SearchList extends Component {
},
};
const
loadMore
=
showLoadMore
?
(
<
div
style
=
{{
textAlign
:
'
center
'
,
marginTop
:
8
}}
>
<
Button
onClick
=
{
this
.
handleLoadMore
}
>
{
loadingMore
&&
(
<
span
><
Icon
type
=
"
loading
"
/>
ๅ ่ฝฝไธญ
...
<
/span>
)
}
{
!
loadingMore
&&
(
<
span
>
ๅ ่ฝฝๆดๅค
<
/span>
)
}
<
/Button
>
<
/div
>
)
:
null
;
return
(
<
PageHeaderLayout
title
=
"
ๆ็ดขๅ่กจ
"
...
...
@@ -264,27 +273,25 @@ export default class SearchList extends Component {
<
/Card
>
<
Card
style
=
{{
marginTop
:
16
}}
bordered
=
{
false
}
>
<
List
loadingMore
=
{
loadingMore
}
showLoadMore
=
{(
list
.
length
>
0
)
&&
showLoadMore
}
onLoadMore
=
{
this
.
handleLoadMore
}
loading
=
{
loading
}
rowKey
=
"
id
"
itemLayout
=
"
vertical
"
>
{
list
&&
list
.
map
(
item
=>
(
<
List
.
Item
key
=
{
item
.
id
}
actions
=
{[
<
IconText
type
=
"
star-o
"
text
=
{
item
.
star
}
/>, <IconText type="like-o" text={item.like} /
>
,
<
IconText
type
=
"
message
"
text
=
{
item
.
message
}
/>]
}
extra
=
{
<
div
className
=
{
styles
.
listItemExtra
}
/>
}
>
<
List
.
Item
.
Meta
title
=
{
<
a
href
=
{
item
.
href
}
>
{
item
.
title
}
<
/a>
}
description
=
{
<
span
><
Tag
>
Ant
Design
<
/Tag><Tag>่ฎพ่ฎก่ฏญ่จ</
Tag
><
Tag
>
่่้ๆ
<
/Tag></
span
>
}
/
>
<
ListContent
data
=
{
item
}
/
>
<
/List.Item
>
))
}
<
/List
>
loadMore
=
{
loadMore
}
dataSource
=
{
list
}
renderItem
=
{
item
=>
(
<
List
.
Item
key
=
{
item
.
id
}
actions
=
{[
<
IconText
type
=
"
star-o
"
text
=
{
item
.
star
}
/>, <IconText type="like-o" text={item.like} /
>
,
<
IconText
type
=
"
message
"
text
=
{
item
.
message
}
/>]
}
extra
=
{
<
div
className
=
{
styles
.
listItemExtra
}
/>
}
>
<
List
.
Item
.
Meta
title
=
{
<
a
href
=
{
item
.
href
}
>
{
item
.
title
}
<
/a>
}
description
=
{
<
span
><
Tag
>
Ant
Design
<
/Tag><Tag>่ฎพ่ฎก่ฏญ่จ</
Tag
><
Tag
>
่่้ๆ
<
/Tag></
span
>
}
/
>
<
ListContent
data
=
{
item
}
/
>
<
/List.Item
>
)}
/
>
<
/Card
>
<
/div
>
<
/PageHeaderLayout
>
...
...
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