1.0.3 • Published 5 years ago

comp-table v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

comp-table image

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
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago