opti: view style

This commit is contained in:
suxiaoxin 2017-09-23 12:13:16 +08:00
parent db7957afe0
commit 33a2bbd6c3
3 changed files with 37 additions and 27 deletions

View File

@ -86,9 +86,9 @@
border-radius: 8px; border-radius: 8px;
.logMesHeade{ .logMesHeade{
color: white; padding: 8px 8px 8px 8px;
padding: 16px 8px 8px 8px; line-height: 24px;
background-color: rgb(91, 104, 117); background-color: #eceef1;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
} }

View File

@ -39,11 +39,13 @@ class View extends Component {
const columns = [{ const columns = [{
title: '参数名称', title: '参数名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name' key: 'name',
width: 140
}, { }, {
title: '参数类型', title: '参数类型',
dataIndex: 'type', dataIndex: 'type',
key: 'type', key: 'type',
width: 100,
render: (text) => { render: (text) => {
text = text || ""; text = text || "";
return text.toLowerCase() === "text" ? <span><i className="query-icon text">T</i></span> : <span><Icon type="file" className="query-icon" /></span> return text.toLowerCase() === "text" ? <span><i className="query-icon text">T</i></span> : <span><Icon type="file" className="query-icon" /></span>
@ -51,22 +53,21 @@ class View extends Component {
}, { }, {
title: '是否必须', title: '是否必须',
dataIndex: 'required', dataIndex: 'required',
key: 'required' key: 'required',
width: 100
}, { }, {
title: '示例', title: '示例',
dataIndex: 'example', dataIndex: 'example',
key: 'example', key: 'example',
width: 4,
render(_, item) { render(_, item) {
return <pre>{item.example}</pre>; return <p style={{whiteSpace: 'pre-wrap'}}>{item.example}</p>;
} }
}, { }, {
title: '备注', title: '备注',
dataIndex: 'value', dataIndex: 'value',
key: 'value', key: 'value',
width: 4,
render(_, item) { render(_, item) {
return <pre>{item.value}</pre>; return <p style={{whiteSpace: 'pre-wrap'}}>{item.value}</p>;
} }
}]; }];
@ -121,28 +122,26 @@ class View extends Component {
const columns = [{ const columns = [{
title: '参数名称', title: '参数名称',
dataIndex: 'name', dataIndex: 'name',
width: 4, width: 140,
key: 'name' key: 'name'
}, { }, {
title: '是否必须', title: '是否必须',
width: 4, width: 100,
dataIndex: 'required', dataIndex: 'required',
key: 'required' key: 'required'
}, { }, {
title: '示例', title: '示例',
dataIndex: 'example', dataIndex: 'example',
key: 'example', key: 'example',
width: 4,
render(_, item) { render(_, item) {
return <pre>{item.example}</pre>; return <p style={{whiteSpace: 'pre-wrap'}}>{item.example}</p>;
} }
}, { }, {
title: '备注', title: '备注',
dataIndex: 'value', dataIndex: 'value',
key: 'value', key: 'value',
width: 4,
render(_, item) { render(_, item) {
return <pre>{item.value}</pre>; return <p style={{whiteSpace: 'pre-wrap'}}>{item.value}</p>;
} }
}]; }];
@ -229,50 +228,60 @@ class View extends Component {
req_dataSource.push({ req_dataSource.push({
key: i, key: i,
name: item.name, name: item.name,
value: item.desc desc: item.desc,
example: item.example
}) })
}) })
} }
const req_params_columns = [{ const req_params_columns = [{
title: '参数名称', title: '参数名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name' key: 'name',
width: 140
}, {
title: '示例',
dataIndex: 'example',
key: 'example',
render(_, item) {
return <p style={{whiteSpace: 'pre-wrap'}}>{item.example}</p>;
}
}, { }, {
title: '备注', title: '备注',
dataIndex: 'value', dataIndex: 'desc',
key: 'value' key: 'desc',
render(_, item) {
return <p style={{whiteSpace: 'pre-wrap'}}>{item.desc}</p>;
}
}]; }];
const columns = [{ const columns = [{
title: '参数名称', title: '参数名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 2 width: '100px'
}, { }, {
title: '参数值', title: '参数值',
dataIndex: 'value', dataIndex: 'value',
key: 'value', key: 'value',
width: 2 width: '100px'
}, { }, {
title: '是否必须', title: '是否必须',
dataIndex: 'required', dataIndex: 'required',
key: 'required', key: 'required',
width: 1 width: '100px'
}, { }, {
title: '示例', title: '示例',
dataIndex: 'example', dataIndex: 'example',
key: 'example', key: 'example',
width: 4,
render(_, item) { render(_, item) {
return <pre>{item.example}</pre>; return <p style={{whiteSpace: 'pre-wrap'}}>{item.example}</p>;
} }
}, { }, {
title: '备注', title: '备注',
dataIndex: 'desc', dataIndex: 'desc',
key: 'desc', key: 'desc',
width: 4,
render(_, item) { render(_, item) {
return <pre>{item.desc}</pre>; return <p style={{whiteSpace: 'pre-wrap'}}>{item.desc}</p>;
} }
}]; }];
let status = { let status = {

View File

@ -17,6 +17,7 @@
padding-left: 10px; padding-left: 10px;
} }
} }
.col-title{margin-bottom: 5px}
.colValue.href { .colValue.href {
color: #2395f1; color: #2395f1;
cursor: pointer; cursor: pointer;