import React, { useMemo } from 'react'; import Table from '../index'; import { DataType } from '../Table'; const JSXColumnsNest: React.FunctionComponent = () => { const data = useMemo(() => { const _data = []; for (let i = 0; i < 100; i++) { const age = (i * 1000) % 149 ; const name = `Edward King ${i}`; _data.push({ key: `${ i}`, company: { name: 'ByteDance', address: 'No. 48, Zhichun Road', }, name, age, address: `No ${i + 1}, Zhongguancun Street`, description: `My name is ${name}, I am ${age} years old, living in No ${i + 1}, Zhongguancun Street`, }); } return _data; }, []); return (
{record.description}
} dataSource={data} scroll={{ x: '120%', y: 400 }} onChange={(...args: Array): void => console.log(args)} > record.name.includes(value)} /> { // 这样做是为了查看是否符合类型定义 (Math.random() > 0.5) ? ( (a.age - b.age > 0 ? 1 : -1)} /> ) : null }
); }; export default JSXColumnsNest;