Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
钟摆人-Puppet゜
ant-design-pro
提交
5609cde5
A
ant-design-pro
项目概览
钟摆人-Puppet゜
/
ant-design-pro
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design-pro
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5609cde5
编写于
10月 26, 2017
作者:
A
afc163
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add new avatar pictures
上级
6a2fea1c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
35 addition
and
34 deletion
+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
未找到文件。
mock/api.js
浏览文件 @
5609cde5
...
...
@@ -2,20 +2,24 @@ import { imgMap, getUrlParams } from './utils';
export
function
fakeList
(
count
)
{
const
titles
=
[
'
Vue
'
,
'
Ant Design Pro
'
,
'
Bootstrap
'
,
'
Alipay
'
,
'
Angular
'
,
'
Ant Design Pro
'
,
'
Ant Design
'
,
'
Bootstrap
'
,
'
React
'
,
'
Alipay
'
,
'
Ant Design Mobile
'
,
'
Vue
'
,
'
Webpack
'
,
];
const
avatars
=
[
'
https://gw.alipayobjects.com/zos/rmsportal/hYjIZrUoBfNxOAYBVDfc.png
'
,
// 凤蝶
'
https://gw.alipayobjects.com/zos/rmsportal/HHWPIzPLCLYmVuPivyiA.png
'
,
// 云雀
'
https://gw.alipayobjects.com/zos/rmsportal/irqByKtOdKfDojxIWTXF.png
'
,
// Basement
'
https://gw.alipayobjects.com/zos/rmsportal/VcmdbCBcwPTGYgbYeMzX.png
'
,
// DesignLab
'
https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png
'
,
// Alipay
'
https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png
'
,
// Angular
'
https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png
'
,
// Ant Design Pro
'
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
=
[
'
https://gw.alipayobjects.com/zos/rmsportal/HrxcVbrKnCJOZvtzSqjN.png
'
,
...
...
@@ -50,11 +54,11 @@ export function fakeList(count) {
id
:
`fake-list-
${
i
}
`
,
owner
:
user
[
i
%
10
],
title
:
titles
[
i
%
8
],
avatar
:
avatars
[
i
%
4
],
cover
:
(
i
/
4
)
%
2
===
0
?
covers
[
i
%
4
]
:
covers
[
3
-
(
i
%
4
)],
avatar
:
avatars
[
i
%
8
],
cover
:
parseInt
(
i
/
4
,
10
)
%
2
===
0
?
covers
[
i
%
4
]
:
covers
[
3
-
(
i
%
4
)],
status
:
[
'
active
'
,
'
exception
'
,
'
normal
'
][
i
%
3
],
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
'
,
updatedAt
:
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
浏览文件 @
5609cde5
...
...
@@ -117,8 +117,8 @@ export default class BasicList extends PureComponent {
bodyStyle
=
{{
padding
:
'
0 32px 40px 32px
'
}}
extra
=
{
extraContent
}
>
<
Button
type
=
"
dashed
"
style
=
{{
width
:
'
100%
'
,
marginBottom
:
12
}}
>
<
Icon
type
=
"
plus
"
/>
添加
<
Button
type
=
"
dashed
"
style
=
{{
width
:
'
100%
'
,
marginBottom
:
12
}}
icon
=
"
plus
"
>
添加
<
/Button
>
<
List
size
=
"
large
"
...
...
src/routes/List/CardList.less
浏览文件 @
5609cde5
...
...
@@ -30,6 +30,7 @@
.cardAvatar {
width: 48px;
height: 48px;
border-radius: 48px;
}
.cardDescription {
...
...
src/routes/List/SearchList.js
浏览文件 @
5609cde5
...
...
@@ -137,8 +137,8 @@ export default class SearchList extends Component {
const
ListContent
=
({
data
:
{
content
,
updatedAt
,
avatar
,
owner
,
href
}
})
=>
(
<
div
className
=
{
styles
.
listContent
}
>
<
p
>
{
content
}
<
/p
>
<
div
>
<
p
className
=
{
styles
.
description
}
>
{
content
}
<
/p
>
<
div
className
=
{
styles
.
extra
}
>
<
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
>
<
/div
>
...
...
@@ -305,7 +305,13 @@ export default class SearchList extends Component {
title
=
{(
<
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
}
/
>
<
/List.Item
>
...
...
src/routes/List/SearchList.less
浏览文件 @
5609cde5
...
...
@@ -2,41 +2,31 @@
@import "../../utils/utils.less";
.listContent {
p
{
line-height: 2
4
px;
.description
{
line-height: 2
2
px;
max-width: 720px;
}
& > div
{
.extra
{
color: @text-color-secondary;
margin-top: 16px;
height: 22px;
line-height: 22px;
& > img {
margin-right: 16px;
}
& > span {
& > :global(.ant-avatar) {
vertical-align: top;
margin-right: 8px;
width: 20px;
height: 20px;
& > img {
vertical-align: top;
}
position: relative;
top: 1px;
}
& > em {
color: @disabled-color;
font-style: normal;
margin-left: 16px;
}
a {
color: @text-color-secondary;
&:hover {
color: @primary-color;
}
}
}
}
.listItemMetaTitle {
a
.listItemMetaTitle {
color: @heading-color;
}
.listItemExtra {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录