Browse Source

add responsive-table (#3472)

pull/3477/head
陈帅 8 years ago
committed by 陈小聪
parent
commit
b095b0bc1d
  1. 19
      src/global.less
  2. 3
      src/pages/List/TableList.js

19
src/global.less

@ -1,3 +1,5 @@
@import '~antd/lib/style/themes/default.less';
html,
body,
#root {
@ -31,3 +33,20 @@ ul,
ol {
list-style: none;
}
@media (max-width: @screen-xs) {
.ant-table {
width: 100%;
overflow-x: auto;
&-thead > tr,
&-tbody > tr {
> th,
> td {
white-space: pre;
> span {
display: block;
}
}
}
}
}

3
src/pages/List/TableList.js

@ -301,7 +301,6 @@ class TableList extends PureComponent {
title: '服务调用次数',
dataIndex: 'callNo',
sorter: true,
align: 'right',
render: val => `${val} 万`,
// mark to display a total number
needTotal: true,
@ -598,7 +597,7 @@ class TableList extends PureComponent {
</Col>
</Row>
<div style={{ overflow: 'hidden' }}>
<div style={{ float: 'right', marginBottom: 24 }}>
<div style={{ marginBottom: 24 }}>
<Button type="primary" htmlType="submit">
查询
</Button>

Loading…
Cancel
Save