function Example() {
const { dataSource: cityData, isLoading } = assets.ncov19.useCityDataSource()
const dataSource = cityData.slice(16, 19).flatMap((d) => d.children.slice(0, 4))
const columns = [
{ code: 'provinceName', name: '省份', width: 150, features: { autoRowSpan: true, sortable: true } },
{ code: 'cityName', name: '城市', width: 150, features: { autoRowSpan: true, sortable: true } },
{ code: 'confirmedCount', name: '确诊', align: 'right', features: { autoRowSpan: true, sortable: true } },
{ code: 'curedCount', name: '治愈', align: 'right', features: { autoRowSpan: true, sortable: true } },
{ code: 'deadCount', name: '死亡', align: 'right', features: { autoRowSpan: true, sortable: true } },
]
const pipeline = useTablePipeline({ components: fusion })
.input({ dataSource, columns })
.use(features.sort({ mode: 'single', defaultSorts: [{ code: 'provinceName', order: 'desc' }] }))
.use(features.autoRowSpan())
return <BaseTable defaultColumnWidth={100} isLoading={isLoading} {...pipeline.getProps()} />
}