Skip to content

Instantly share code, notes, and snippets.

@wynnzen
Last active August 26, 2016 04:00
Show Gist options
  • Save wynnzen/605576b93ed2bce6f76322dac569cdd7 to your computer and use it in GitHub Desktop.
Save wynnzen/605576b93ed2bce6f76322dac569cdd7 to your computer and use it in GitHub Desktop.
ant design react javascript table
class CompanyManager extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
render () {
const dataSource = [{
key: '1',
name: '胡彦斌',
age: 32,
address: '西湖区湖底公园1号'
}, {
key: '2',
name: '胡彦祖',
age: 42,
address: '西湖区湖底公园1号'
}];
const columns = [{
title: '姓名',
dataIndex: 'name',
key: 'name',
}, {
title: '年龄',
dataIndex: 'age',
key: 'age',
}, {
title: '住址',
dataIndex: 'address',
key: 'address',
}];
return (
<Table dataSource={dataSource} columns={columns} />
);
}
}
reactMixin(CompanyManager.prototype, ApiMixin);
export default CompanyManager;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment