1.3.2 • Published 8 years ago

el-table v1.3.2

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

#EL-TABLE form Ellie-Component (┐「ε:)

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import {Table, Col} from 'el-table';

const list = [{
    id: 1,
    name: 'Eleanor',
    sex: 'female'
}, {
    id: 2,
    name: 'Alexander',
    sex: 'male'
}];

ReactDOM.render(
<Table data={list} isKey="id">
    <Col dataField="id">id</Col>
    <Col dataField="name">name</Col>
    <Col dataField="sex">sex</Col>
</Table>, document.getElementById('#app'));

api

Table

Col

  • dataFieldString key of column
  • dataAlignString text align of column
  • dataFixedString this column will be fixed when table scroll, left, right or auto, default is auto
  • dataSortBoolean enable table sorting, default is false(only sort the first level of data when isTree)
  • dataFormatFunction(cell, row, index, colIndex, col) customize format function
  • renderFunction(rowIndex) render function to set colspan and rowspan attribute for tr, it's return an object {rowspan: value, colspan: value}. value = 0 means don't render this cell
  • colSpanNumber set attribute colspan to table head column
  • hiddenBoolean hide this column or not, default is false
  • widthNumber | String width of column

Pagination

SimplePagination

Dropdown

  • listArray list of dropdown menus ,like: [1, 2 ,3, 4], or [{href: '/', label: 'index'}]
  • childrenArray content of dropdown button
  • onClickFunction(node) invoke when click menu items
1.3.2

8 years ago

1.3.1

9 years ago

1.3.0-beta

9 years ago

1.3.0

9 years ago

1.2.9

9 years ago

1.2.8

9 years ago

1.2.7

9 years ago

1.2.6

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago