import React, { Component } from 'react'; import './index.less'; import Assets from '@src/components/Assets'; import CheckboxItem from '../CheckboxItem'; import Icon from '../Icon'; import UserPagination from '../UserPagination'; export default class UserTable extends Component { onSort(key, value) { const { sortMap = {}, onSort } = this.props; sortMap[key] = value; if (onSort) onSort(sortMap); } onSelect(checked, key) { const { selectList = [] } = this.props; if (checked) { selectList.push(key); } else { selectList.splice(selectList.indexOf(key), 1); } if (this.props.onSelect) this.props.onSelect(selectList); } render() { const { columns = [], rowKey = 'key', data = [], select, selectList = [], current, total, size = 'basic', even = 'even', theme = 'defalut', border = true, header = true, sortMap = {}, maxHeight, onChange, } = this.props; return (
{item.title}
{item.fixSort &&
(sortMap[item.key] ? (
|
);
})}
---|
{i === 0 && select && (
|
);
})}