bee-complex-grid
Complex Grid for React, AdvancedDataGrid
Last updated 11 days ago by tinper-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bee-complex-grid 
SYNC missed versions from official npm registry.

bee-complex-grid

npm version Build Status Coverage Status devDependency Status NPM downloads Average time to resolve an issue Percentage of issues still open

高级表格

bee-complex-grid 是基于bee-table上封装,将多选、过滤、排序、分页、固定列等多功能基于一身。在使用bee-table实现复杂功能时,需要高级组件嵌套高级组件,使用起来经常有问题。有了bee-complex-grid ,用户仅需要引入Grid即可,大大减少代码量,提供代码质量。

依赖

  • react >= 15.3.0
  • react-dom >= 15.3.0
  • prop-types >= 15.6.0

使用方法

import Grid from "bee-complex-grid";
const columns = [
  { title: '用户名', dataIndex: 'a', key: 'a', width: 100 },
  { id: '123', title: '性别', dataIndex: 'b', key: 'b', width: 100 },
  { title: '年龄', dataIndex: 'c', key: 'c', width: 200 },
  {
    title: '操作', dataIndex: '', key: 'd', render() {
      return <a href="#">一些操作</a>;
    },
  },
];

const data = [
  { a: '令狐冲', b: '男', c: 41, key: '1' },
  { a: '杨过', b: '男', c: 67, key: '2' },
  { a: '郭靖', b: '男', c: 25, key: '3' },
];

class Demo extends Component {
    render () {
        return (
              <Grid
              columns={columns}
              data={data}
              />
        )
    }
}

API

table相关API参考这里,下面是Grid扩充的API

参数 说明 类型 默认值
paginationObj 表格分页,具体参考分页API Object {activePage: 1, total: 0,items:1}
showHeaderMenu 是否显示表头菜单(动态设置显示隐藏、锁定解锁) boolean true
multiSelect 是否显示多选功能或单选功能,multiSelect={{type:"radio"}}时为单选表格,multiSelect={{type:"checkbox"}}时为多选表格,传其他值时均为普通表格 Object {type:"checkbox"}
showFilterMenu 是否显示行过滤菜单 boolean false
columnFilterAble 是否显示列过滤功能 boolean true
sheetName【excel】 设置导出excel 的sheet的名称  string --
sheetIsRowFilter【excel】 是否要设置数据的行高 boolean false
sheetHeader【excel】 设置导出excel 的Head的高度 Object eg:{{height:30, //设置高度ifshow:false //是否显示}}
resetColumns 重置columns function this.refs.grid.resetColumns(columns)
exportData 要导出的数据源 array -

Column(新增)

参数 说明 类型 默认值
exportHidden 是否在导出中隐藏此列 boolean false
exportKey 单独设置当前列的key[eg:性别 返回字段中 table 使用 id ,而导出中使用 name ] string -

导出excel 使用

  exportExcel=()=>{
    this.refs.grid.exportExcel();
  }

  

开发调试

$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-complex-grid
$ cd bee-complex-grid
$ npm install
$ npm run dev

Current Tags

  • 2.0.28-alpha.0                                ...           alpha (a year ago)
  • 2.0.24-beta.1                                ...           beta (a year ago)
  • 2.2.3                                ...           latest (11 days ago)

144 Versions

  • 2.2.3                                ...           11 days ago
  • 2.2.2                                ...           a month ago
  • 2.2.1                                ...           3 months ago
  • 2.2.0                                ...           3 months ago
  • 2.1.23                                ...           3 months ago
  • 2.1.22                                ...           4 months ago
  • 2.1.21                                ...           4 months ago
  • 2.1.20                                ...           4 months ago
  • 2.1.19                                ...           4 months ago
  • 2.1.18                                ...           4 months ago
  • 2.1.17                                ...           4 months ago
  • 2.1.16                                ...           4 months ago
  • 2.1.15                                ...           4 months ago
  • 2.1.14                                ...           4 months ago
  • 2.1.13                                ...           5 months ago
  • 2.1.12                                ...           5 months ago
  • 2.1.11                                ...           5 months ago
  • 2.1.10                                ...           5 months ago
  • 2.1.9                                ...           5 months ago
  • 2.1.8                                ...           5 months ago
  • 2.1.7                                ...           5 months ago
  • 2.1.6                                ...           5 months ago
  • 2.1.5                                ...           6 months ago
  • 2.1.4                                ...           7 months ago
  • 2.1.3                                ...           10 months ago
  • 2.1.2                                ...           10 months ago
  • 2.1.1                                ...           10 months ago
  • 2.1.0                                ...           10 months ago
  • 2.0.30                                ...           10 months ago
  • 2.0.29                                ...           10 months ago
  • 2.0.28                                ...           a year ago
  • 2.0.28-alpha.0                                ...           a year ago
  • 2.0.27                                ...           a year ago
  • 2.0.26                                ...           a year ago
  • 2.0.26-alpha.0                                ...           a year ago
  • 2.0.25                                ...           a year ago
  • 2.0.24                                ...           a year ago
  • 2.0.24-beta.1                                ...           a year ago
  • 2.0.24-beta.0                                ...           a year ago
  • 2.0.23                                ...           a year ago
  • 2.0.22                                ...           a year ago
  • 2.0.22-beta.3                                ...           a year ago
  • 2.0.22-beta.2                                ...           a year ago
  • 2.0.22-beta.1                                ...           a year ago
  • 2.0.22-beta.0                                ...           a year ago
  • 2.0.21                                ...           a year ago
  • 2.0.21-beta.1                                ...           a year ago
  • 2.0.21-alpha.0                                ...           a year ago
  • 2.0.20                                ...           a year ago
  • 2.0.19-beta.0                                ...           a year ago
  • 2.0.19                                ...           a year ago
  • 2.0.18                                ...           a year ago
  • 2.0.18-beta.0                                ...           a year ago
  • 2.0.17                                ...           a year ago
  • 2.0.17-alpha.0                                ...           a year ago
  • 2.0.16                                ...           a year ago
  • 2.0.15                                ...           a year ago
  • 2.0.14                                ...           a year ago
  • 2.0.13                                ...           a year ago
  • 2.0.11                                ...           a year ago
  • 2.0.10                                ...           a year ago
  • 2.0.9                                ...           a year ago
  • 2.0.8-alpha.1                                ...           a year ago
  • 2.0.8-beta.1                                ...           2 years ago
  • 2.0.8-beta.0                                ...           2 years ago
  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5-alpha.1                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.5-beta.0                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.3-beta.1                                ...           2 years ago
  • 2.0.3-beta.0                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 2.0.0-alpha.0                                ...           2 years ago
  • 1.0.19                                ...           2 years ago
  • 1.0.18                                ...           2 years ago
  • 1.0.17                                ...           2 years ago
  • 1.0.16                                ...           2 years ago
  • 1.0.15                                ...           2 years ago
  • 1.0.14                                ...           2 years ago
  • 1.0.1-4.beta.1                                ...           2 years ago
  • 1.0.1-4.beta.0                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.11                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.2.46                                ...           2 years ago
  • 0.2.45                                ...           2 years ago
  • 0.2.44                                ...           2 years ago
  • 0.2.43                                ...           2 years ago
  • 0.2.42                                ...           2 years ago
  • 0.2.41                                ...           2 years ago
  • 0.2.40                                ...           2 years ago
  • 0.2.39                                ...           2 years ago
  • 0.2.38                                ...           2 years ago
  • 0.2.37                                ...           2 years ago
  • 0.2.36                                ...           2 years ago
  • 0.2.35                                ...           2 years ago
  • 0.2.34                                ...           2 years ago
  • 0.2.33                                ...           2 years ago
  • 0.2.32                                ...           2 years ago
  • 0.2.31                                ...           2 years ago
  • 0.2.30                                ...           2 years ago
  • 0.2.29                                ...           2 years ago
  • 0.0.28                                ...           2 years ago
  • 0.0.27                                ...           2 years ago
  • 0.0.26                                ...           2 years ago
  • 0.0.25                                ...           2 years ago
  • 0.0.24                                ...           2 years ago
  • 0.0.23                                ...           2 years ago
  • 0.0.22                                ...           2 years ago
  • 0.0.21                                ...           2 years ago
  • 0.0.20                                ...           2 years ago
  • 0.0.19                                ...           2 years ago
  • 0.0.18                                ...           2 years ago
  • 0.0.17                                ...           2 years ago
  • 0.0.16                                ...           2 years ago
  • 0.0.15                                ...           2 years ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago

Copyright 2014 - 2017 © taobao.org |