/** * * @title 组合过滤和其他功能使用 * @description 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等 * */ /** * @description */ import React, { Component } from 'react'; import Table from '../../src'; import multiSelect from '../../src/lib/MultiSelect'; import sort from '../../src/lib/sort'; import Checkbox from 'bee-checkbox'; import Icon from 'bee-icon'; import Menu from 'bee-menus'; import Dropdown from 'bee-dropdown'; const { Item } = Menu; const SubMenu = Menu.SubMenu; const MenuItemGroup = Menu.ItemGroup; const dataList = [ { "key": "1", value: "库存明细", id: "a" }, { "key": "2", value: "订单明细", id: "v" }, { "key": "3", value: "发货明细", id: "c" } ] const data27 = [ { key: "1", name: "John Brown", age: 32, date: "2018-09-19", address: "朝阳区", mark: "无" }, { key: "2", name: "Jim Green", age: 40, date: "2018-09-18", address: "朝阳区", mark: "无" }, { key: "3", name: "Jim Green", age: 40, date: "2018-09-18", address: "东城区", mark: "无" }, { key: "4", name: "Jim Green", age: 40, date: "2018-09-18", address: "东城区", mark: "无" }, { key: "5", name: "John Brown", age: 32, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "6", name: "Jim Green", age: 48, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "7", name: "Jim Green", age: 40, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "8", name: "Jim Green", age: 38, date: "2018-09-18", address: "海淀区", mark: "无" } ]; const MultiSelectTable = multiSelect(Table, Checkbox); const ComplexTable = sort(MultiSelectTable, Icon); class Demo27 extends Component { constructor(props) { super(props); this.state = { dropdownvalue: [] } } handlerFilterRowsChange = (key, val) => { console.log('准备构建AJAX请求,接收参数:key=', key, ' value=', val); } handlerFilterRowsDropChange = (key, val) => { console.log('过滤条件类型:', key, val); } getSelectedDataFunc = data => { console.log(data); } onClick = (item) => { console.log(item); } render() { const menu1 = (
) let multiObj = { type: "checkbox" }; let columns27 = [ { title: "", width: 40, dataIndex: "key", key: "key", render: (text, record, index) => { return