Add table demos

This commit is contained in:
afc163 2015-07-09 11:41:36 +08:00
parent 1faaad66ea
commit 82c110ac5d
13 changed files with 48 additions and 0 deletions

View File

View File

@ -0,0 +1,31 @@
# 基本用法
- order: 0
标准的表格。
---
````jsx
var Table = antd.Table;
var columns = [{
title: '姓名',
dataIndex: 'name'
}, {
title: '年龄',
dataIndex: 'age'
}];
var data = [{
name: '胡彦斌',
age: 32
}, {
name: '胡彦祖',
age: 42
}, {
name: '李大嘴',
age: 32
}];
React.render(<Table columns={columns} data={data} />
, document.getElementById('components-table-demo-basic'));
````

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -0,0 +1,15 @@
import React from 'react';
import Table from 'rc-table';
let AntTable = React.createClass({
getDefaultProps() {
return {
prefixCls: 'ant-table'
};
},
render() {
return <Table {...this.props} />;
}
});
export default AntTable;

View File

@ -15,6 +15,7 @@ var antd = {
confirm: require('./components/modal/confirm'),
Steps: require('./components/steps'),
InputNumber: require('./components/input-number'),
Table: require('./components/table'),
Switch: require('./components/switch')
};

View File

@ -24,6 +24,7 @@
"rc-select": "~4.2.1",
"rc-steps": "~1.1.3",
"rc-switch": "~1.1.0",
"rc-table": "~2.2.0",
"rc-tabs": "~5.2.0",
"rc-tooltip": "~2.4.0"
},