Browse Source

operation links

pull/42/head
afc163 10 years ago
parent
commit
5757d6cc78
  1. 35
      components/table/demo/opeartion.md
  2. 6
      style/components/divider.less
  3. 8
      style/components/dropdown.less
  4. 1
      style/components/index.less

35
components/table/demo/opeartion.md

@ -7,5 +7,38 @@
---
````jsx
````
var Table = antd.Table;
var columns = [{
title: '姓名',
dataIndex: 'name'
}, {
title: '年龄',
dataIndex: 'age'
}, {
title: '操作',
dataIndex: '',
render: function(text, record) {
return <span>
<a href="#">删除</a>
<span className="ant-divider">|</span>
<a href="#">操作</a>
<span className="ant-divider">|</span>
<a href="#" className="ant-dropdown-link">
更多 <i className="anticon anticon-down"></i>
</a>
</span>;
}
}];
var data = [{
name: '胡彦斌',
age: 32,
address: '西湖区湖底公园1号'
}, {
name: '胡彦祖',
age: 42,
address: '西湖区湖底公园1号'
}];
React.render(<Table columns={columns} data={data} />
, document.getElementById('components-table-demo-opeartion'));
````

6
style/components/divider.less

@ -0,0 +1,6 @@
.ant-divider {
margin: 0 4px;
color: #999;
display: inline-block;
.scale(0.8);
}

8
style/components/dropdown.less

@ -106,3 +106,11 @@
}
}
}
.@{dropdownPrefixCls}-link {
.anticon-down {
font-size: ~"60% \9"; // ie8-9
.scale(0.6);
font-weight: bold;
}
}

1
style/components/index.less

@ -19,3 +19,4 @@
@import "typography";
@import "collapse";
@import "message";
@import "divider";

Loading…
Cancel
Save