/** * * @title 按条件、值过滤 * @parent 列操作-过滤 Filter * @description 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。 * demo0701 */ import React, { Component } from 'react'; import Table from '../../src'; const columns = [ { title: "姓名", width: 180, dataIndex: "name", key: "name", filterType: "text", filterDropdown: "show" }, { title: "年龄", width: 150, dataIndex: "age", key: "age", filterType: "dropdown", filterDropdown: "show" }, { title: "日期", width: 200, dataIndex: "date", key: "date", filterType: "date", filterDropdown: "show", format: "YYYY-MM-DD" }, { title: "居住地址", width: 150, dataIndex: "address", key: "address", filterType: "dropdown", filterDropdown: "show" }, { title: "备注", dataIndex: "mark", key: "mark" } ]; const data = [ { 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: "无" } ]; class Demo23 extends Component { handlerFilterChange = (key, val, condition) => { console.log('参数:key=', key, ' value=', val, 'condition=', condition); } handlerFilterClear = (key) => { console.log('清除条件', key); } render() { return