opti: 接口集页面样式

This commit is contained in:
suxiaoxin 2017-09-22 13:52:27 +08:00
parent 2a7c63a10d
commit 57956e5218
2 changed files with 47 additions and 3 deletions

View File

@ -318,7 +318,12 @@ class InterfaceColContent extends Component {
property: 'casename',
header: {
label: '用例名称'
},
},
props: {
style:{
width: '250px'
}
},
cell: {
formatters: [
(text, { rowData }) => {
@ -335,6 +340,11 @@ class InterfaceColContent extends Component {
Key</Tooltip>
}]
},
props: {
style:{
width: '100px'
}
},
cell: {
formatters: [
(value, { rowData }) => {
@ -346,6 +356,11 @@ class InterfaceColContent extends Component {
header: {
label: '状态'
},
props: {
style:{
width: '100px'
}
},
cell: {
formatters: [(value, { rowData }) => {
switch (rowData.test_status) {
@ -384,8 +399,16 @@ class InterfaceColContent extends Component {
label: '测试报告'
},
props: {
style:{
width: '100px'
}
},
cell: {
formatters: [(text, { rowData }) => {
if(!this.reports[rowData.id]){
return null;
}
return <Button onClick={() => this.openReport(rowData.id)}>报告</Button>
}]
}
@ -416,14 +439,15 @@ class InterfaceColContent extends Component {
<Table.Provider
components={components}
columns={resolvedColumns}
style={{ width: '100%', lineHeight: '36px' }}
style={{ width: '100%',borderCollapse: 'collapse' }}
>
<Table.Header
style={{ textAlign: 'left' }}
className="interface-col-table-header"
headerRows={resolve.headerRows({ columns })}
/>
<Table.Body
className="interface-col-table-body"
rows={resolvedRows}
rowKey="id"
onRow={this.onRow}

View File

@ -90,4 +90,24 @@
.interface-col{
padding: 16px;
.interface-col-table-header{
background-color: rgb(238, 238, 238);
height: 50px;
line-height: 50px;
font-size:14px;
text-align: left;
}
.interface-col-table-body{
height: 50px;
line-height: 50px;
}
.interface-col-table-header th{
padding-left:5px;
}
.interface-col-table-body td{
padding-left:5px;
}
}