import { Table, Tag, Text } from '../../src' import { Demo } from '../components/Demo' import { PropsTable } from '../components/PropsTable' import { Section } from '../components/Section' const COLUMNS = [ { key: 'name', title: '分区' }, { key: 'kind', title: '类型', width: 100 }, { key: 'count', title: '条目数', width: 100, align: 'right' as const }, { key: 'status', title: '状态', width: 120 }, ] const ROWS = [ { id: 'recommend', name: '常用推荐', kind: apps, count: 18, status: 已上线, }, { id: 'movie', name: '推荐电影', kind: posters, count: 12, status: 已上线, }, { id: 'ces', name: 'CES 现场报道', kind: articles, count: 12, status: 草稿, }, ] export function Tables() { return (
`} > `} >
`} >
[]', required: true, desc: '行数据,键对应列的 key' }, { name: 'rowKey', type: 'string', defaultValue: "'id'", desc: '行的唯一键字段' }, { name: 'size', type: "'md' | 'sm'", defaultValue: "'md'", desc: '行高密度' }, { name: 'emptyText', type: 'ReactNode', defaultValue: "'暂无数据'", desc: '空态文案' }, ]} /> ) }