opti: 修改接口详情页样式

This commit is contained in:
wenbo.dong 2017-07-26 15:38:34 +08:00
parent aa59f526d6
commit 9b88c378a5
4 changed files with 19 additions and 49 deletions

View File

@ -8,7 +8,7 @@ import InterfaceTable from './InterfaceTable/InterfaceTable.js'
import InterfaceMode from './InterfaceMode/InterfaceMode.js' import InterfaceMode from './InterfaceMode/InterfaceMode.js'
import moment from 'moment' import moment from 'moment'
import { import {
fetchInterfaceData, fetchInterfaceData,
projectMember, projectMember,
closeProjectMember closeProjectMember
} from '../../actions/interfaceAction.js' } from '../../actions/interfaceAction.js'

View File

@ -1,48 +1,19 @@
/* .interface-box.css */ /* .interface-box.css */
.interface-box { .interface-box {
max-width: 11rem; max-width: 11rem;
display: -webkit-box;
-webkit-box-flex: 1;
margin: 24px auto; margin: 24px auto;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20); box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
font-size: 0.14rem;
background: #FFF; background: #FFF;
overflow: hidden;
.interface-list { .interface-btngroup {
width: 216px; margin: .24rem .24rem 0;
line-height: 45px; }
background: #f9fafe; .interface-btn {
margin-right: .16rem;
li {
padding: 0 0 0 30px;
color: #344562;
cursor: pointer;
&:hover {
color: #29f;
}
a {
color: #344562;
&:hover {
color: #29f;
}
}
}
} }
.interface-table { .interface-table {
-webkit-box-flex: 1; margin: .24rem;
margin: 0 20px;
min-height: 740px;
.ant-table-wrapper table {
font-size: .14rem;
button {
margin: 0 10px 0 0;
}
}
} }
} }

View File

@ -1,6 +1,7 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { Button } from 'antd'
class InterfaceList extends Component { class InterfaceList extends Component {
static propTypes = { static propTypes = {
@ -23,10 +24,10 @@ class InterfaceList extends Component {
const getInterfaceId = this.getInterfaceId() const getInterfaceId = this.getInterfaceId()
console.log(`/AddInterface/${getInterfaceId}`) console.log(`/AddInterface/${getInterfaceId}`)
return ( return (
<ul className="interface-list"> <div className="interface-btngroup">
<li><Link to={`/AddInterface/${getInterfaceId}`}>添加接口</Link></li> <Link to={`/AddInterface/${getInterfaceId}`}><Button className="interface-btn" type="primary" icon="plus">添加接口</Button></Link>
<li onClick={projectMember}>管理项目成员</li> <Button className="interface-btn" type="primary" onClick={projectMember} icon="user">管理成员</Button>
</ul> </div>
) )
} }
} }

View File

@ -72,13 +72,11 @@ class InterfaceTable extends Component {
const deleteInterface = this.deleteInterface.bind(this, data._id) const deleteInterface = this.deleteInterface.bind(this, data._id)
return ( return (
<span> <span>
<Button type="primary"> <Link to={`/AddInterface/edit/${data._id}`}><span>编辑</span></Link>
<Link to={`/AddInterface/edit/${data._id}`}>编辑</Link> <span className="ant-divider" />
</Button> <Link to={`/AddInterface/edit/${data._id}`}><span>测试</span></Link>
<Button type="primary"> <span className="ant-divider" />
<Link to={`/AddInterface/edit/${data._id}`}>测试</Link> <a onClick={deleteInterface}>删除</a>
</Button>
<Button type="danger" onClick={deleteInterface}>删除</Button>
</span> </span>
) )
} }
@ -88,7 +86,7 @@ class InterfaceTable extends Component {
return ( return (
<section className="interface-table"> <section className="interface-table">
<Table columns={columns} dataSource={data} /> <Table bordered={true} columns={columns} dataSource={data} />
</section> </section>
) )
} }