It is mainly used to display a large amount of structured data.
In non-string templates,it is necessary to use h-table.
Set sort to true for Column, then use custom sort to adjust data according to sort event.
Set sort to auto for Column, you can use data sorting by default.
use loading to set up the load effect of the data.
To a setting rows of data _expand is true, the current row can be expanded by default
Fixed height and width, automatic scrolling when internal content is exceeded.
| Property | Description | Type | Optional | Default |
|---|---|---|---|---|
| columns | Define the column of the table | Array | - | [Column] |
| datas | The list shows the required data | Array | - | [] |
| height | Table fixed height | Number | - | - |
| checkbox | Whether to use the checkbox selector | Boolean | - | false |
| border | table has border | Boolean | - | false |
| stripe | Table using a grid background | Boolean | - | false |
| Property | Description | Type | Optional | Default |
|---|---|---|---|---|
| title | Define the header header of the table | String | - | |
| width | Define the width of each item in the table | Number | - | [] |
| fixed | Is it fixed column | String | - | left, right |
| prop | Render data according to a field of data | String | - | |
| align | Header alignment in table | String | left,right,center | left |
| tooltip | Whether the title in the table uses a prompt box | Boolean | - | false |
| placement | Header in table uses reminder position of alert box | String | - | |
| content | Header in table uses the contents of the prompt box | String | - | Use title by default |
| sort | Whether to add sort trigger | Boolean, String | true/auto | false |
| selectWhenClickTr | When clicking on tr, trigger the checkbox switch | Boolean | false |
| Event | Description |
|---|---|
| sort | Events fired when sorted |
| select | Events that fire when checkbox is changed |
| selectAll | When checkbox is selected |
| trclick | When tr is clicked |
| trdblclick | When tr is double clicked |
| Method | Description |
|---|---|
| clearSort | Clear sort |
| clearSelection | Clear selected |
| setSelection | Set the selected value |
| inverseSelection | inverse selection |