import React from 'react';
import { Switch, Table, Dropdown, Icon } from '@douyinfe/semi-ui';
import { IconCaretdown } from '@douyinfe/semi-icons';
const CREATOR_MAP = {
ALL: {
value: 0,
desc: '创建者',
},
MINE: {
value: 1,
desc: '只看我的',
},
};
export default class JSXColumnsComplex extends React.Component {
constructor(props) {
super(props);
this.state = {
showName: true,
showAge: true,
showAddress: true,
showCreator: true,
currentCreator: {},
};
this.data = [];
for (let i = 0; i < 46; i++) {
this.data.push({
key: `${i}`,
name: `Edward King ${i}`,
age: (i * 1000) % 149 ,
address: `London, Park Lane no. ${i}`,
});
}
this.columns = [
{
width: 150,
onFilter: (value, record) => record.name.includes(value),
filters: [
{
text: 'Code 45',
value: '45',
},
{
text: 'King 4',
value: 'King 4',
},
],
title: 'Name',
dataIndex: 'name',
render: (text, record, index) => {text},
},
{
title: Age,
dataIndex: 'age',
sorter: (a, b) => (a.age - b.age > 0 ? 1 : -1),
},
{
title: (