fix bordered Table

This commit is contained in:
afc163 2016-05-05 16:21:51 +08:00
parent ecfcd7bcc5
commit a1058db8df
2 changed files with 9 additions and 6 deletions

View File

@ -1,9 +1,9 @@
--- ---
order: 10 order: 10
title: 边框 title: 边框和页脚
--- ---
添加表格边框线`bordered` 添加表格边框线和页脚
````jsx ````jsx
import { Table } from 'antd'; import { Table } from 'antd';
@ -40,7 +40,7 @@ const data = [{
address: '西湖区湖底公园1号', address: '西湖区湖底公园1号',
}]; }];
ReactDOM.render(<Table columns={columns} dataSource={data} bordered /> ReactDOM.render(<Table columns={columns} dataSource={data} bordered footer={() => '页脚'} />
, mountNode); , mountNode);
```` ````

View File

@ -7,7 +7,6 @@
.@{table-prefix-cls} { .@{table-prefix-cls} {
font-size: @font-size-base; font-size: @font-size-base;
color: @text-color; color: @text-color;
border-radius: @border-radius-base @border-radius-base 0 0;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
border-radius: @border-radius-base @border-radius-base 0 0; border-radius: @border-radius-base @border-radius-base 0 0;
@ -20,8 +19,9 @@
table { table {
width: 100%; width: 100%;
border-collapse: separate; border-collapse: separate;
border-spacing: 0;
text-align: left; text-align: left;
border-radius: @border-radius-base; border-radius: @border-radius-base @border-radius-base 0 0;
overflow: hidden; overflow: hidden;
} }
@ -65,13 +65,16 @@
&-footer { &-footer {
padding: 16px 8px; padding: 16px 8px;
margin: 0 3px;
background: @table-head-background-color; background: @table-head-background-color;
position: relative; position: relative;
top: -1px; top: -1px;
border-radius: 0 0 @border-radius-base @border-radius-base; border-radius: 0 0 @border-radius-base @border-radius-base;
} }
&.@{table-prefix-cls}-bordered &-footer {
border: 1px solid @border-color-split;
}
tr.@{table-prefix-cls}-row-selected { tr.@{table-prefix-cls}-row-selected {
background: #fafafa; background: #fafafa;
} }