mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 20:19:44 +08:00
Add table demos
This commit is contained in:
parent
1faaad66ea
commit
82c110ac5d
0
components/table/demo/ajax.md
Normal file
0
components/table/demo/ajax.md
Normal file
31
components/table/demo/basic.md
Normal file
31
components/table/demo/basic.md
Normal 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'));
|
||||
````
|
0
components/table/demo/checkbox.md
Normal file
0
components/table/demo/checkbox.md
Normal file
0
components/table/demo/expand.md
Normal file
0
components/table/demo/expand.md
Normal file
0
components/table/demo/filter.md
Normal file
0
components/table/demo/filter.md
Normal file
0
components/table/demo/mini.md
Normal file
0
components/table/demo/mini.md
Normal file
0
components/table/demo/opeartion.md
Normal file
0
components/table/demo/opeartion.md
Normal file
0
components/table/demo/paging.md
Normal file
0
components/table/demo/paging.md
Normal file
0
components/table/demo/sort.md
Normal file
0
components/table/demo/sort.md
Normal file
0
components/table/demo/tree.md
Normal file
0
components/table/demo/tree.md
Normal 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;
|
1
index.js
1
index.js
@ -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')
|
||||
};
|
||||
|
||||
|
@ -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"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user