Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
知鸟1号
ant-design-pro
提交
13dc0de0
A
ant-design-pro
项目概览
知鸟1号
/
ant-design-pro
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
13dc0de0
编写于
8月 14, 2018
作者:
S
sorrycc
提交者:
陈帅
8月 17, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused files
上级
6e3f3cc6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
159 deletion
+0
-159
src/routes/List/BasicList.js
src/routes/List/BasicList.js
+0
-159
未找到文件。
src/routes/List/BasicList.js
已删除
100644 → 0
浏览文件 @
6e3f3cc6
import
React
,
{
PureComponent
}
from
'
react
'
;
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
{
List
,
Card
,
Row
,
Col
,
Radio
,
Input
,
Progress
,
Button
,
Icon
,
Dropdown
,
Menu
,
Avatar
,
}
from
'
antd
'
;
import
PageHeaderLayout
from
'
../../layouts/PageHeaderLayout
'
;
import
styles
from
'
./BasicList.less
'
;
const
RadioButton
=
Radio
.
Button
;
const
RadioGroup
=
Radio
.
Group
;
const
{
Search
}
=
Input
;
const
ListContent
=
({
data
:
{
owner
,
createdAt
,
percent
,
status
}
})
=>
(
<
div
className
=
{
styles
.
listContent
}
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
span
>
Owner
<
/span
>
<
p
>
{
owner
}
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
span
>
开始时间
<
/span
>
<
p
>
{
moment
(
createdAt
).
format
(
'
YYYY-MM-DD HH:mm
'
)}
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
Progress
percent
=
{
percent
}
status
=
{
status
}
strokeWidth
=
{
6
}
style
=
{{
width
:
180
}}
/
>
<
/div
>
<
/div
>
);
@
connect
(({
list
,
loading
})
=>
({
list
,
loading
:
loading
.
models
.
list
,
}))
export
default
class
BasicList
extends
PureComponent
{
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'
list/fetch
'
,
payload
:
{
count
:
5
,
},
});
}
render
()
{
const
{
list
:
{
list
},
loading
,
}
=
this
.
props
;
const
Info
=
({
title
,
value
,
bordered
})
=>
(
<
div
className
=
{
styles
.
headerInfo
}
>
<
span
>
{
title
}
<
/span
>
<
p
>
{
value
}
<
/p
>
{
bordered
&&
<
em
/>
}
<
/div
>
);
const
extraContent
=
(
<
div
className
=
{
styles
.
extraContent
}
>
<
RadioGroup
defaultValue
=
"
all
"
>
<
RadioButton
value
=
"
all
"
>
全部
<
/RadioButton
>
<
RadioButton
value
=
"
progress
"
>
进行中
<
/RadioButton
>
<
RadioButton
value
=
"
waiting
"
>
等待中
<
/RadioButton
>
<
/RadioGroup
>
<
Search
className
=
{
styles
.
extraContentSearch
}
placeholder
=
"
请输入
"
onSearch
=
{()
=>
({})}
/
>
<
/div
>
);
const
paginationProps
=
{
showSizeChanger
:
true
,
showQuickJumper
:
true
,
pageSize
:
5
,
total
:
50
,
};
const
menu
=
(
<
Menu
>
<
Menu
.
Item
>
<
a
>
编辑
<
/a
>
<
/Menu.Item
>
<
Menu
.
Item
>
<
a
>
删除
<
/a
>
<
/Menu.Item
>
<
/Menu
>
);
const
MoreBtn
=
()
=>
(
<
Dropdown
overlay
=
{
menu
}
>
<
a
>
更多
<
Icon
type
=
"
down
"
/>
<
/a
>
<
/Dropdown
>
);
return
(
<
PageHeaderLayout
>
<
div
className
=
{
styles
.
standardList
}
>
<
Card
bordered
=
{
false
}
>
<
Row
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
>
<
Info
title
=
"
我的待办
"
value
=
"
8个任务
"
bordered
/>
<
/Col
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
>
<
Info
title
=
"
本周任务平均处理时间
"
value
=
"
32分钟
"
bordered
/>
<
/Col
>
<
Col
sm
=
{
8
}
xs
=
{
24
}
>
<
Info
title
=
"
本周完成任务数
"
value
=
"
24个任务
"
/>
<
/Col
>
<
/Row
>
<
/Card
>
<
Card
className
=
{
styles
.
listCard
}
bordered
=
{
false
}
title
=
"
标准列表
"
style
=
{{
marginTop
:
24
}}
bodyStyle
=
{{
padding
:
'
0 32px 40px 32px
'
}}
extra
=
{
extraContent
}
>
<
Button
type
=
"
dashed
"
style
=
{{
width
:
'
100%
'
,
marginBottom
:
8
}}
icon
=
"
plus
"
>
添加
<
/Button
>
<
List
size
=
"
large
"
rowKey
=
"
id
"
loading
=
{
loading
}
pagination
=
{
paginationProps
}
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
>
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录