From fd1ea811e60e8b9f2a0924425f065248f5388fd1 Mon Sep 17 00:00:00 2001 From: "wenbo.dong" Date: Fri, 8 Sep 2017 15:01:26 +0800 Subject: [PATCH] =?UTF-8?q?opti:=20=E6=8E=A5=E5=8F=A3=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Project/Interface/InterfaceList/Edit.scss | 16 ++++------------ .../Interface/InterfaceList/InterfaceList.js | 11 ++++++----- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/client/containers/Project/Interface/InterfaceList/Edit.scss b/client/containers/Project/Interface/InterfaceList/Edit.scss index d5773350..50c94c5c 100644 --- a/client/containers/Project/Interface/InterfaceList/Edit.scss +++ b/client/containers/Project/Interface/InterfaceList/Edit.scss @@ -19,8 +19,11 @@ .table-interfacelist { margin-top: .2rem; white-space: nowrap; + table { + table-layout: fixed; + } .path { - width: 400px; + width: 100%; overflow: hidden; text-overflow:ellipsis; white-space: nowrap; @@ -45,14 +48,3 @@ white-space: normal; word-break: break-all; } - -@media (max-width: 1100px) { - .table-interfacelist .path { - width: 360px; - } -} -@media (max-width: 980px) { - .table-interfacelist .path { - width: 280px; - } -} diff --git a/client/containers/Project/Interface/InterfaceList/InterfaceList.js b/client/containers/Project/Interface/InterfaceList/InterfaceList.js index 0b41f16f..129ac5f0 100644 --- a/client/containers/Project/Interface/InterfaceList/InterfaceList.js +++ b/client/containers/Project/Interface/InterfaceList/InterfaceList.js @@ -104,6 +104,7 @@ class InterfaceList extends Component { title: '接口名称', dataIndex: 'title', key: 'title', + width: 30, sorter: (a, b) => { return a.title.localeCompare(b.title) === 1 }, @@ -115,7 +116,7 @@ class InterfaceList extends Component { title: '接口路径', dataIndex: 'path', key: 'path', - width: 400, + width: 50, render: (item) => { const path = this.props.curProject.basepath + item; return {path} @@ -124,7 +125,7 @@ class InterfaceList extends Component { title: '请求方法', dataIndex: 'method', key: 'method', - width: 100, + width: 12, render: (item) => { let methodColor = variable.METHOD_COLOR[item ? item.toLowerCase() : 'get']; return {item} @@ -133,7 +134,7 @@ class InterfaceList extends Component { title: '状态', dataIndex: 'status', key: 'status', - width: 100, + width: 12, render: (item) => { return
{item === 'done' ? 完成 @@ -157,9 +158,9 @@ class InterfaceList extends Component { }); return ( -
+

接口列表

- +