fix: 修改user页 样式

This commit is contained in:
qitmac000249 2017-07-26 11:17:07 +08:00
parent ef55513a6e
commit 2459386719
3 changed files with 39 additions and 18 deletions

View File

@ -10,7 +10,7 @@ const Option = AutoComplete.Option;
state => {
console.log(state);
return {
curUid: state.user.curUid
curUid: state.login.uid + ''
}
}
)

View File

@ -4,7 +4,6 @@ import { Link } from 'react-router-dom'
//import PropTypes from 'prop-types'
import {
Table,
Button,
Popconfirm,
message
} from 'antd'
@ -79,11 +78,13 @@ class List extends Component {
let columns = [{
title: 'UID',
dataIndex: '_id',
key: '_id'
key: '_id',
width: 70
}, {
title: '用户名',
dataIndex: 'username',
key: 'username'
key: 'username',
width: 150
}, {
title: 'Email',
dataIndex: 'email',
@ -91,20 +92,24 @@ class List extends Component {
}, {
title: '用户角色',
dataIndex: 'role',
key: 'role'
key: 'role',
width:110
}, {
title: '更新日期',
dataIndex: 'up_time',
key: 'up_time'
key: 'up_time',
width: 180
}, {
title: '功能',
key: 'action',
width:80,
render: (item) => {
return (
<span>
<Button type="primary"><Link to={"/user/profile/" + item._id} > 查看 </Link></Button>
<Link to={"/user/profile/" + item._id} >查看</Link>
<span className="ant-divider" />
<Popconfirm placement="leftTop" title="确认删除此用户?" onConfirm={() => {this.confirm(item._id)}} okText="Yes" cancelText="No">
<Button type="danger">删除</Button>
<a href="#">删除</a>
</Popconfirm>
</span>
)
@ -128,7 +133,7 @@ class List extends Component {
return (
<section className="user-table">
<Table columns={columns} pagination={pageConfig} dataSource={data} />
<Table bordered={true} columns={columns} pagination={pageConfig} dataSource={data} />
</section>
)

View File

@ -4,10 +4,11 @@
display: -webkit-box;
-webkit-box-flex: 1;
margin: .88rem auto 0 auto;
font-size: 0.14rem;
// font-size: 0.14rem;
min-height:500px;
margin-top: 84px;
min-height:433px;
margin-top: 40px;
margin-bottom: 55px;
@ -16,6 +17,7 @@
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
background: #FFF;
border-radius:5px;
margin-top: 15px;
.search{
margin: 5px;
}
@ -29,20 +31,22 @@
border-radius:5px;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
background: #FFF;
margin-top: 15px;
.ant-table-wrapper table {
font-size: .14rem;
// font-size: .14rem;
button {
margin: 0 10px 0 0;
a {
// font-size: 12px;
}
}
}
.user-profile {
-webkit-box-flex: 1;
margin-top: 15px;
margin-left: 15px;
padding: 10px;
padding: 10px 30px;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
background: #FFF;
border-radius:5px;
@ -51,9 +55,21 @@
line-height:35px;
margin: 5px;
margin-bottom:10px;
border-bottom: 1px solid #f1f3f6;
padding-bottom: 10px;
.ant-col-4{
color: black;
padding: 0px 10px;
text-indent: .7em;
// background-color: #f1f3f6;
border-left: 5px solid #f1f3f6;
margin-right: 30px;
}
.text{
padding-right: 15px;
}
.text-button{
font-size: 12px;
// font-size: 12px;
color: #657289;
cursor: pointer
}