签入版本

This commit is contained in:
2026-10-11 19:06:33 +08:00
parent 17d28de8b7
commit 4084c6bd17
674 changed files with 58855 additions and 1892 deletions
@@ -14,7 +14,7 @@
:row-key="(row) => row.id"
ref="tableRef"
:actionColumn="actionColumn"
@selection-change="onSelectionChange"
:row-selection="{ onChange: onSelectionChange }"
/>
</template>
@@ -36,7 +36,7 @@ const actionColumn = {
```
:::tip 分页字段约定
本项目 `BasicTable` 通过 `:request` 传入分页请求函数(没有 `useTable` hook),内部绑定后端固定分页结构 `data.records` / `data.total`。`statusText` 等 `*Text` 字段由后端 `serializeMaps` 自动补全,直接作为列 `field` 使用即可。
本项目 `BasicTable` 通过 `:request` 传入分页请求函数(没有 `useTable` hook),内部绑定后端固定分页结构 `data.records` / `data.total`。`statusText` 等 `*Text` 字段由后端 `serializeMaps` 自动补全,直接作为列 `dataIndex` 使用即可。
:::
### 列定义常用属性
@@ -44,10 +44,11 @@ const actionColumn = {
| 属性 | 说明 | 示例 |
|------|------|------|
| `title` | 列标题 | `'创建时间'` |
| `field` | 字段名(camelCase,与响应一致) | `'createTime'` |
| `dataIndex` | 数据字段名(camelCase,与响应一致) | `'createTime'` |
| `key` | 列标识(`#bodyCell` 插槽按 `column.key` 匹配) | `'action'` |
| `width` | 列宽 | `180` |
| `formatter` | 自定义格式化 | `(v) => v ?? '-'` |
| `slots` | 自定义单元格插槽 | `'statusSlot'` |
| `customRender` | 自定义渲染函数(参数 `{ record }`) | `({ record }) => h(Tag, ...)` |
| `slots` | 自定义单元格插槽 | `{ customRender: 'statusSlot' }` |
## Page 页面容器