comp-table
v1.0.3
Published
basic react component
Downloads
6
Readme
comp-table
API
参见 antd table
Example
import React from 'react';
import { render } from 'react-dom';
import CompTable from 'comp-table';
const dataSource = [
{
id: 1,
login: 'Frend'
},
{
id: 2,
login: 'Wong'
}
];
const columns = [{
title: 'id',
dataIndex: 'id',
key: 'id',
}, {
title: 'login',
dataIndex: 'login',
key: 'login',
}];
const onShowSizeChange = () => {
console.log('page change');
};
render(
<CompTable
dataSource={dataSource}
columns={columns}
pagination={{
showQuickJumper: true,
showSizeChanger: true,
onShowSizeChange: onShowSizeChange,
defaultCurrent: 1,
total: 100
}}
/>,
document.getElementById('app')
);
Develop
$ npm run start
Publish
$ cd ../.. // 返回项目根目录,通过 `lerna` 来构建与发布
$ npm run build
$ npm publish