Table
Lightweight data table: column-config driven, per-cell scoped slots, built-in empty state.
Basic usage
| 项目 | 负责人 | 进度 |
|---|---|---|
| 预约小程序 | 李工 | 80% |
| 企业官网 | 王工 | 45% |
| 数据看板 | 张工 | 12% |
Custom cells
Each column exposes a scoped slot named cell-<key> receiving { row, value }:
| 任务 | 负责人 | 状态 |
|---|---|---|
| 聊天室消息引用 | 李李工 | 已完成 |
| 工程量导出 | 王王工 | 进行中 |
| 合同模板 | 张张工 | 待开始 |
Empty data
When rows is empty a built-in empty state shows; replace it via the empty slot:
| 任务 | 状态 |
|---|
还没有任务
创建第一条任务开始协作
API
Props
| Name | Type | Default | Description |
|---|---|---|---|
| columns | { key: string; title: string; width?: string; align?: 'left' | 'center' | 'right' }[] | — | column config (required) |
| rows | Record<string, unknown>[] | — | row data (required) |
| rowKey | string | 'id' | row key field |
Slots
| Name | Payload | Description |
|---|---|---|
| cell-<key> | { row, value } | cell content for that column |
| empty | — | empty placeholder (defaults to built-in EmptyState) |