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
5609cde5
Commit
5609cde5
authored
Oct 26, 2017
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new avatar pictures
parent
6a2fea1c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
34 deletions
+35
-34
mock/api.js
mock/api.js
+16
-12
src/routes/List/BasicList.js
src/routes/List/BasicList.js
+2
-2
src/routes/List/CardList.less
src/routes/List/CardList.less
+1
-0
src/routes/List/SearchList.js
src/routes/List/SearchList.js
+9
-3
src/routes/List/SearchList.less
src/routes/List/SearchList.less
+7
-17
No files found.
mock/api.js
View file @
5609cde5
...
@@ -2,20 +2,24 @@ import { imgMap, getUrlParams } from './utils';
...
@@ -2,20 +2,24 @@ import { imgMap, getUrlParams } from './utils';
export
function
fakeList
(
count
)
{
export
function
fakeList
(
count
)
{
const
titles
=
[
const
titles
=
[
'
Vue
'
,
'
Alipay
'
,
'
Ant Design Pro
'
,
'
Bootstrap
'
,
'
Angular
'
,
'
Angular
'
,
'
Ant Design Pro
'
,
'
Ant Design
'
,
'
Ant Design
'
,
'
Bootstrap
'
,
'
React
'
,
'
React
'
,
'
Alipay
'
,
'
Vue
'
,
'
Ant Design Mobile
'
,
'
Webpack
'
,
];
];
const
avatars
=
[
const
avatars
=
[
'
https://gw.alipayobjects.com/zos/rmsportal/hYjIZrUoBfNxOAYBVDfc.png
'
,
// 凤蝶
'
https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png
'
,
// Alipay
'
https://gw.alipayobjects.com/zos/rmsportal/HHWPIzPLCLYmVuPivyiA.png
'
,
// 云雀
'
https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png
'
,
// Angular
'
https://gw.alipayobjects.com/zos/rmsportal/irqByKtOdKfDojxIWTXF.png
'
,
// Basement
'
https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png
'
,
// Ant Design Pro
'
https://gw.alipayobjects.com/zos/rmsportal/VcmdbCBcwPTGYgbYeMzX.png
'
,
// DesignLab
'
https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png
'
,
// Ant Design
'
https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png
'
,
// Bootstrap
'
https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png
'
,
// React
'
https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png
'
,
// Vue
'
https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png
'
,
// Webpack
];
];
const
covers
=
[
const
covers
=
[
'
https://gw.alipayobjects.com/zos/rmsportal/HrxcVbrKnCJOZvtzSqjN.png
'
,
'
https://gw.alipayobjects.com/zos/rmsportal/HrxcVbrKnCJOZvtzSqjN.png
'
,
...
@@ -50,11 +54,11 @@ export function fakeList(count) {
...
@@ -50,11 +54,11 @@ export function fakeList(count) {
id
:
`fake-list-
${
i
}
`
,
id
:
`fake-list-
${
i
}
`
,
owner
:
user
[
i
%
10
],
owner
:
user
[
i
%
10
],
title
:
titles
[
i
%
8
],
title
:
titles
[
i
%
8
],
avatar
:
avatars
[
i
%
4
],
avatar
:
avatars
[
i
%
8
],
cover
:
(
i
/
4
)
%
2
===
0
?
covers
[
i
%
4
]
:
covers
[
3
-
(
i
%
4
)],
cover
:
parseInt
(
i
/
4
,
10
)
%
2
===
0
?
covers
[
i
%
4
]
:
covers
[
3
-
(
i
%
4
)],
status
:
[
'
active
'
,
'
exception
'
,
'
normal
'
][
i
%
3
],
status
:
[
'
active
'
,
'
exception
'
,
'
normal
'
][
i
%
3
],
percent
:
Math
.
ceil
(
Math
.
random
()
*
50
)
+
50
,
percent
:
Math
.
ceil
(
Math
.
random
()
*
50
)
+
50
,
logo
:
[
'
https://gw.alipayobjects.com/zos/rmsportal/KoJjkdbuTFxzJmmjuDVR.png
'
,
'
https://gw.alipayobjects.com/zos/rmsportal/UxGORCvEXJEsxOfEKZiA.png
'
][
i
%
2
],
logo
:
avatars
[
i
%
8
],
href
:
'
https://ant.design
'
,
href
:
'
https://ant.design
'
,
updatedAt
:
new
Date
(
new
Date
().
getTime
()
-
(
1000
*
60
*
60
*
2
*
i
)),
updatedAt
:
new
Date
(
new
Date
().
getTime
()
-
(
1000
*
60
*
60
*
2
*
i
)),
createdAt
:
new
Date
(
new
Date
().
getTime
()
-
(
1000
*
60
*
60
*
2
*
i
)),
createdAt
:
new
Date
(
new
Date
().
getTime
()
-
(
1000
*
60
*
60
*
2
*
i
)),
...
...
src/routes/List/BasicList.js
View file @
5609cde5
...
@@ -117,8 +117,8 @@ export default class BasicList extends PureComponent {
...
@@ -117,8 +117,8 @@ export default class BasicList extends PureComponent {
bodyStyle
=
{{
padding
:
'
0 32px 40px 32px
'
}}
bodyStyle
=
{{
padding
:
'
0 32px 40px 32px
'
}}
extra
=
{
extraContent
}
extra
=
{
extraContent
}
>
>
<
Button
type
=
"
dashed
"
style
=
{{
width
:
'
100%
'
,
marginBottom
:
12
}}
>
<
Button
type
=
"
dashed
"
style
=
{{
width
:
'
100%
'
,
marginBottom
:
12
}}
icon
=
"
plus
"
>
<
Icon
type
=
"
plus
"
/>
添加
添加
<
/Button
>
<
/Button
>
<
List
<
List
size
=
"
large
"
size
=
"
large
"
...
...
src/routes/List/CardList.less
View file @
5609cde5
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
.cardAvatar {
.cardAvatar {
width: 48px;
width: 48px;
height: 48px;
height: 48px;
border-radius: 48px;
}
}
.cardDescription {
.cardDescription {
...
...
src/routes/List/SearchList.js
View file @
5609cde5
...
@@ -137,8 +137,8 @@ export default class SearchList extends Component {
...
@@ -137,8 +137,8 @@ export default class SearchList extends Component {
const
ListContent
=
({
data
:
{
content
,
updatedAt
,
avatar
,
owner
,
href
}
})
=>
(
const
ListContent
=
({
data
:
{
content
,
updatedAt
,
avatar
,
owner
,
href
}
})
=>
(
<
div
className
=
{
styles
.
listContent
}
>
<
div
className
=
{
styles
.
listContent
}
>
<
p
>
{
content
}
<
/p
>
<
p
className
=
{
styles
.
description
}
>
{
content
}
<
/p
>
<
div
>
<
div
className
=
{
styles
.
extra
}
>
<
Avatar
src
=
{
avatar
}
size
=
"
small
"
/><
a
href
=
{
href
}
>
{
owner
}
<
/a> 发布在 <a href={href}>{href}</
a
>
<
Avatar
src
=
{
avatar
}
size
=
"
small
"
/><
a
href
=
{
href
}
>
{
owner
}
<
/a> 发布在 <a href={href}>{href}</
a
>
<
em
>
{
moment
(
updatedAt
).
format
(
'
YYYY-MM-DD hh:mm
'
)}
<
/em
>
<
em
>
{
moment
(
updatedAt
).
format
(
'
YYYY-MM-DD hh:mm
'
)}
<
/em
>
<
/div
>
<
/div
>
...
@@ -305,7 +305,13 @@ export default class SearchList extends Component {
...
@@ -305,7 +305,13 @@ export default class SearchList extends Component {
title
=
{(
title
=
{(
<
a
className
=
{
styles
.
listItemMetaTitle
}
href
=
{
item
.
href
}
>
{
item
.
title
}
<
/a
>
<
a
className
=
{
styles
.
listItemMetaTitle
}
href
=
{
item
.
href
}
>
{
item
.
title
}
<
/a
>
)}
)}
description
=
{
<
span
><
Tag
>
Ant
Design
<
/Tag><Tag>设计语言</
Tag
><
Tag
>
蚂蚁金服
<
/Tag></
span
>
}
description
=
{
<
span
>
<
Tag
>
Ant
Design
<
/Tag
>
<
Tag
>
设计语言
<
/Tag
>
<
Tag
>
蚂蚁金服
<
/Tag
>
<
/span
>
}
/
>
/
>
<
ListContent
data
=
{
item
}
/
>
<
ListContent
data
=
{
item
}
/
>
<
/List.Item
>
<
/List.Item
>
...
...
src/routes/List/SearchList.less
View file @
5609cde5
...
@@ -2,41 +2,31 @@
...
@@ -2,41 +2,31 @@
@import "../../utils/utils.less";
@import "../../utils/utils.less";
.listContent {
.listContent {
p
{
.description
{
line-height: 2
4
px;
line-height: 2
2
px;
max-width: 720px;
max-width: 720px;
}
}
& > div
{
.extra
{
color: @text-color-secondary;
color: @text-color-secondary;
margin-top: 16px;
margin-top: 16px;
height: 22px;
height: 22px;
line-height: 22px;
line-height: 22px;
& > img {
& > :global(.ant-avatar) {
margin-right: 16px;
}
& > span {
vertical-align: top;
vertical-align: top;
margin-right: 8px;
margin-right: 8px;
width: 20px;
width: 20px;
height: 20px;
height: 20px;
& > img {
position: relative;
vertical-align: top;
top: 1px;
}
}
}
& > em {
& > em {
color: @disabled-color;
color: @disabled-color;
font-style: normal;
font-style: normal;
margin-left: 16px;
margin-left: 16px;
}
}
a {
color: @text-color-secondary;
&:hover {
color: @primary-color;
}
}
}
}
}
}
.listItemMetaTitle {
a
.listItemMetaTitle {
color: @heading-color;
color: @heading-color;
}
}
.listItemExtra {
.listItemExtra {
...
...
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