Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8401a01

Browse files
committed
Version 3
1 parent b169add commit 8401a01

File tree

3 files changed

+18
-41
lines changed

3 files changed

+18
-41
lines changed

src/routes/List/assets/spa.png

-1.08 KB
Binary file not shown.

src/routes/List/components/ListView.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@ import React, {Component} from 'react'
22
import classes from './ListView.scss'
33
import TopTab from 'components/TopTab'
44

5-
import { Table, Icon } from 'antd'
5+
import { Table, Icon, DatePicker } from 'antd'
6+
const RangePicker = DatePicker.RangePicker
67

78
const columns = [{
89
title: '申请日期',
9-
dataIndex: 'date',
10-
width: 150
10+
dataIndex: 'date'
1111
}, {
1212
title: '申请金额',
13-
dataIndex: 'amount',
14-
width: 150
13+
dataIndex: 'amount'
1514
}, {
1615
title: '支付宝交易号',
1716
dataIndex: 'orderNo'
1817
}, {
19-
title: '支付宝账号',
18+
title: '支付账号',
2019
dataIndex: 'orderName'
2120
}, {
2221
title: '状态',
@@ -43,6 +42,12 @@ for (let i = 0; i < 100; i++) {
4342
export default class ListView extends Component {
4443

4544
render () {
45+
46+
const onChange= (value, dateString) => {
47+
console.log(value)
48+
console.log(dateString)
49+
}
50+
4651
return (
4752
<div>
4853
<TopTab></TopTab>
@@ -76,12 +81,7 @@ export default class ListView extends Component {
7681
<div className={classes.typeitem}>已完成</div>
7782
</div>
7883
<div className={classes.date}>
79-
<input className={classes.dateinput} placeholder="开始日期" />
80-
<span className={classes.spa}></span>
81-
<input className={classes.dateinput} placeholder="结束日期" />
82-
<div className={classes.calendar}>
83-
<Icon type="calendar" />
84-
</div>
84+
<RangePicker style={{ width: 246 }} onChange={onChange} />
8585
</div>
8686
<div className={classes.btn}>
8787
<button type="button" className="button mr12">申请提现</button>

src/routes/List/components/ListView.scss

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -52,39 +52,10 @@
5252
}
5353

5454
.date {
55-
border: 1px solid #dbdbdb;
5655
width: 246px;
57-
height: 32px;
5856
position: absolute;
5957
left: 50%;
6058
margin-left: -123px;
61-
62-
& .anticon-calendar {
63-
font-size: 16px;
64-
}
65-
}
66-
67-
.dateinput {
68-
border:none;
69-
float: left;
70-
width: 94px;
71-
height: 30px;
72-
padding: 0;
73-
padding-left: 17px;
74-
outline: none;
75-
}
76-
77-
.spa {
78-
background: url("../assets/spa.png") no-repeat;
79-
width: 12px;
80-
height: 5px;
81-
float: left;
82-
margin-top: 13px;
83-
}
84-
85-
.calendar {
86-
font-size: 16px;
87-
margin-top: 3px;
8859
}
8960

9061
.btn {
@@ -143,6 +114,12 @@
143114
right: 0;
144115
top: 30px;
145116
}
117+
118+
&:last-child {
119+
&:after {
120+
border-right: none;
121+
}
122+
}
146123
}
147124
}
148125

0 commit comments

Comments
 (0)