提交 137e40ac 编写于 作者: A afc163

bordered table

上级 3be09f62
# 边框
- order: 11
添加表格边框线,`bordered={true}`
---
````jsx
var Table = antd.Table;
var columns = [{
title: '姓名',
dataIndex: 'name',
render: function(text) {
return <a href="javascript:;">{text}</a>;
}
}, {
title: '年龄',
dataIndex: 'age'
}, {
title: '住址',
dataIndex: 'address'
}];
var data = [{
name: '胡彦斌',
age: 32,
address: '西湖区湖底公园1号'
}, {
name: '胡彦祖',
age: 42,
address: '西湖区湖底公园1号'
}, {
name: '李大嘴',
age: 32,
address: '西湖区湖底公园1号'
}];
React.render(<Table columns={columns} dataSource={data} bordered={true} />
, document.getElementById('components-table-demo-bordered'));
````
......@@ -64,7 +64,8 @@ var AntTable = React.createClass({
prefixCls: 'ant-table',
useFixedHeader: false,
rowSelection: null,
size: 'normal'
size: 'normal',
bordered: false
};
},
......@@ -464,6 +465,9 @@ var AntTable = React.createClass({
if (this.props.size === 'small') {
classString += ' ant-table-small';
}
if (this.props.bordered) {
classString += ' ant-table-bordered';
}
columns = this.renderColumnsDropdown(columns);
return <div className="clearfix">
<Table
......
......@@ -12,7 +12,7 @@
table {
width: 100%;
max-width: 100%;
border-collapse: separate;
border-collapse: collapse;
text-align: left;
}
......@@ -180,6 +180,23 @@
}
}
}
&.@{tablePrefixClass}-bordered {
border: 1px solid #E9E9E9;
border-bottom: 0;
overflow: hidden;
th {
border-bottom: 1px solid #E9E9E9;
}
th, td {
border-right: 1px solid #E9E9E9;
&:last-child {
border-right: 0;
}
}
}
}
.@{tablePrefixClass}-pagination {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册