Column Table column
Examples
See Table examples.
API
Props
| Name | Type | Default | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
title | string | - | The column title. | ||||||||
field | string | - | The key name of the column, corresponds to a field of a data item in the data prop of the Table component. | ||||||||
width | string=|number | - | The width of the column in pixel value. | ||||||||
sortable | boolean | false | Whether this column supports sorting. | ||||||||
align | string | - | The alignment of the column content, supports left / center / right. | ||||||||
span | function(number): Object | Cell merge configuration. The type is | |||||||||
desc | string | - | The description of the table header. | ||||||||
fixed | boolean | 'left' | 'right' | false | Whether the column is fixed. 'left' means fixed on the left side, 'right' means fixed on the right side. | ||||||||
filter-value | * | - |
The filter condition value. The value | ||||||||
filter-multiple | boolean | false | Whether the built-in filter is multi-select. | ||||||||
filter-options | Array<Object> | - | The filtering options list, the item type is {label, value, options, disabled, ...}, refer to the options prop of the Select component. | ||||||||
filter-title | string | - | The title of the filter drop-down. | ||||||||
allowed-orders | Array | [false, 'desc', 'asc'] | Specifies the sorting range of this column. When the user clicks, it will switch in the order specified.
| ||||||||
ellipsis | boolean | tablecolumn.ellipsis | Whether to automatically truncate cell content when it overflows. | ||||||||
tooltip | boolean | ((item: Object) => string) | - | Whether to automatically truncate cell content and display a tooltip when it overflows. By default, it displays the current cell's textContent. When a function is provided, the item parameter represents the entire data item, and the returned string will be shown as the tooltip content. |
Slots
| Name | Description | ||||||
|---|---|---|---|---|---|---|---|
head | The column header area. | ||||||
foot | The column footer area. | ||||||
default | The content of the cell. Default content: The value of the field corresponding to the The slot props are all properties in the current row data in | ||||||
sub-row | The content of the sub-row after the row is expanded. When using this slot, the content will be the cell content of the corresponding column in the expanded sub-row below the row. The row data source comes from the Default content: The value of the field corresponding to the The slot props are all properties in the current sub-row data and the current main row corresponding index value | ||||||
desc | The description of the header. When using this slot, it will override the
| ||||||
filter | The content of the filter layer.
|
Events
| Name | Description |
|---|---|
filterchange | Triggered when the filter of this column is modified. The callback parameter is (value). value is the current value of the filter. |
Configs
| Key | Type | Default | Description |
|---|---|---|---|
tablecolumn.ellipsis | boolean | false | Whether to automatically truncate cell content when it overflows. |
tablecolumn.tooltip | boolean | ((item: Object) => string) | false | Whether to automatically truncate cell content and display a tooltip when it overflows. By default, it displays the current cell's textContent. When a function is provided, the item parameter represents the entire data item, and the returned string will be shown as the tooltip content. |