2019-12-21 18:37:33 +08:00
|
|
|
/* eslint-disable no-console,func-names */
|
2019-01-12 11:33:27 +08:00
|
|
|
import Table from '../index';
|
|
|
|
import '../assets/index.less';
|
2018-03-27 22:41:41 +08:00
|
|
|
|
|
|
|
const columns = [
|
|
|
|
{ title: 'title1', dataIndex: 'a', key: 'a', width: 100 },
|
|
|
|
{ title: 'title2', dataIndex: 'b', key: 'b', width: 100 },
|
|
|
|
{ title: 'title3', dataIndex: 'c', key: 'c', width: 100 },
|
|
|
|
{ title: 'title4', dataIndex: 'b', key: 'd', width: 100 },
|
|
|
|
{ title: 'title5', dataIndex: 'b', key: 'e', width: 100 },
|
|
|
|
{ title: 'title6', dataIndex: 'b', key: 'f', width: 100 },
|
|
|
|
{ title: 'title7', dataIndex: 'b', key: 'g', width: 100 },
|
|
|
|
{ title: 'title8', dataIndex: 'b', key: 'h', width: 100 },
|
|
|
|
{ title: 'title9', dataIndex: 'b', key: 'i', width: 100 },
|
|
|
|
{ title: 'title10', dataIndex: 'b', key: 'j', width: 100 },
|
|
|
|
{ title: 'title11', dataIndex: 'b', key: 'k', width: 100 },
|
|
|
|
{ title: 'title12', dataIndex: 'b', key: 'l', width: 100 },
|
2019-01-12 11:33:27 +08:00
|
|
|
];
|
2018-03-27 22:41:41 +08:00
|
|
|
|
|
|
|
const data = [
|
|
|
|
{ a: '123', b: 'xxxxxxxx xxxxxxxx', d: 3, key: '1' },
|
|
|
|
{ a: 'cdd', b: 'edd12221 edd12221', d: 3, key: '2' },
|
|
|
|
{ a: '133', c: 'edd12221 edd12221', d: 2, key: '3' },
|
|
|
|
{ a: '133', c: 'edd12221 edd12221', d: 2, key: '4' },
|
2019-01-12 11:33:27 +08:00
|
|
|
];
|
2018-03-27 22:41:41 +08:00
|
|
|
|
|
|
|
export default {
|
2019-01-12 11:33:27 +08:00
|
|
|
render() {
|
2018-03-27 22:41:41 +08:00
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<h2>Scroll X</h2>
|
|
|
|
<Table style={{ width: '800px' }} scroll={{ x: true }} columns={columns} data={data} />
|
|
|
|
</div>
|
2019-01-12 11:33:27 +08:00
|
|
|
);
|
2018-03-27 22:41:41 +08:00
|
|
|
},
|
2019-01-12 11:33:27 +08:00
|
|
|
};
|