feat: add column desc api and example (#2)
Co-authored-by: GU Yiling <justice360@gmail.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
| `sortable` | `boolean=` | `false` | [^sortable] |
|
||||
| `align` | `string=` | - | 内容对齐方式,支持 `left`/`center`/`right`。 |
|
||||
| `span` | `function(number): Object=` | | [^span] |
|
||||
| `desc` | `string` | - | 表头描述。 |
|
||||
|
||||
^^^sortable
|
||||
本列是否支持排序。
|
||||
@@ -45,6 +46,7 @@
|
||||
| `foot` | [^slot-foot] |
|
||||
| `default` | [^scoped-slot-default] |
|
||||
| `sub-row` | [^scoped-slot-sub-row] |
|
||||
| `desc` | [^scoped-slot-desc] |
|
||||
|
||||
^^^slot-foot
|
||||
列脚区域。
|
||||
@@ -73,3 +75,7 @@
|
||||
如果所属的 `Table` 组件定义了插槽 `sub-row`,单独列的 `sub-row` 将被覆盖。
|
||||
:::
|
||||
^^^
|
||||
|
||||
^^^scoped-slot-desc
|
||||
表头描述。提供 `close` 函数,用于关闭展现描述内容的容器。使用此插槽时会覆盖 `Column` 的插槽 `desc` 内容。
|
||||
^^^
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
|
||||
[[ demo src="/demo/table/expandable.vue" ]]
|
||||
|
||||
### 表头描述
|
||||
|
||||
使用 `desc` 属性或 `desc` 插槽来为表头增加描述信息。
|
||||
|
||||
[[ demo src="/demo/table/desc.vue" ]]
|
||||
|
||||
## API
|
||||
|
||||
### 属性
|
||||
|
||||
Reference in New Issue
Block a user