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
13dc0de0
Commit
13dc0de0
authored
Aug 14, 2018
by
sorrycc
Committed by
陈帅
Aug 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused files
parent
6e3f3cc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
159 deletions
+0
-159
src/routes/List/BasicList.js
src/routes/List/BasicList.js
+0
-159
No files found.
src/routes/List/BasicList.js
deleted
100644 → 0
View file @
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
>
);
}
}
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