import React, { useState } from 'react'; import { Row, Col, Table, Button } from '@btri-ui/base'; import { ColumnsType } from '@btri-ui/base/lib/Table'; interface DataType { key: React.Key; title1: string; title2: string; title3: string; title4: string; description?: string; } const data: DataType[] = [ { key: 1, title1: '内容1', title2: '内容2', title3: '内容3', title4: '内容4', description: '展开内容,展开内容', }, { key: 2, title1: '内容1', title2: '内容2', title3: '内容3', title4: '内容4', description: '展开内容,展开内容', }, ]; export default () => { const columns: ColumnsType = [ { title: '标题1', dataIndex: 'title1', }, { title: '标题2', dataIndex: 'title2', }, { title: '标题3', dataIndex: 'title4', }, { title: '标题4', dataIndex: 'title4', }, { title: 'Action', dataIndex: '', key: 'x', actions: () => [编辑, 删除], width: 150, }, ]; return ( (

{record.description}

), rowExpandable: record => record.name !== 'Not Expandable', }} /> ); };