mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-09 04:31:35 +08:00
feat(table): doc add property
This commit is contained in:
parent
0c133c4c60
commit
3843308459
22
demo/documentation/components/table/enUS/column.md
Normal file
22
demo/documentation/components/table/enUS/column.md
Normal file
@ -0,0 +1,22 @@
|
||||
# Columns
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| :--------------- | :-------------------------------------------------------------------------------------------------------- | :---------------------------- | :------ |
|
||||
| align | specify which way that column is aligned | 'left' \| 'right' \| 'center' | 'left' |
|
||||
| ellipsis | ellipsize cell content,recommended when no property:render is used | boolean | false |
|
||||
| className | className of this column | boolean | false |
|
||||
| title | Title of this column | String | - |
|
||||
| key | Unique key of this column,**required** | string | - |
|
||||
| render | Renderer of the table cell. The return value should be a VueNode | Function(h, record, index) {} | - |
|
||||
| renderHeader | Renderer of the table header cell. The return value should be a VueNode | Function(h, column) {} | - |
|
||||
| sortable | use column sort, need property:sorter | boolean | false |
|
||||
| sorter | Sort function for local sort, see Array.sort's compareFunction.If you need network sorter,set to `custom` | Function \| 'custom' | - |
|
||||
| defaultSortOrder | default sort order | 'ascend' \| 'descend' | - |
|
||||
| filterable | use filter | boolean | false |
|
||||
| filter | Filter function for local filter.If you need network sorter,set to `custom` | Function \| 'custom' | - |
|
||||
| filterMultiple | Whether multiple filters can be selected | boolean | false |
|
||||
| defaultFilter | default filter selected | String | - |
|
||||
| filterItems | Filter menu config,format as [{label,value}] | object[] | - |
|
||||
| asyncFilterItems | async filter menu config ,Function returns [{label,value}] | Function | - |
|
||||
| fixed | Set column to be fixed: 'left' 'right' | 'left'\| 'right' | - |
|
||||
| width | Width of this column | string | number | - |
|
@ -24,24 +24,6 @@ fixedHeaderColumn
|
||||
ellipsis
|
||||
renderHeader
|
||||
bestPractices
|
||||
property
|
||||
column
|
||||
```
|
||||
|
||||
## Column
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| :--------------- | :-------------------------------------------------------------------------------------------------------- | :---------------------------- | :------ |
|
||||
| align | specify which way that column is aligned | 'left' \| 'right' \| 'center' | 'left' |
|
||||
| ellipsis | ellipsize cell content,recommended when no property:render is used | boolean | false |
|
||||
| className | className of this column | boolean | false |
|
||||
| title | Title of this column | String | - |
|
||||
| key | Unique key of this column,**required** | string | - |
|
||||
| render | Renderer of the table cell. The return value should be a VueNode | Function(h, record, index) {} | - |
|
||||
| sortable | use column sort, need property:sorter | boolean | false |
|
||||
| sorter | Sort function for local sort, see Array.sort's compareFunction.If you need network sorter,set to `custom` | Function \| 'custom' | - |
|
||||
| defaultSortOrder | default sort order | 'ascend' \| 'descend' | - |
|
||||
| filterable | use filter | boolean | false |
|
||||
| filter | Filter function for local filter.If you need network sorter,set to `custom` | Function \| 'custom' | - |
|
||||
| filterMultiple | Whether multiple filters can be selected | boolean | false |
|
||||
| defaultFilter | default filter selected | String | - |
|
||||
| filterItems | Filter menu config,format as [{label,value}] | object[] | - |
|
||||
| asyncFilterItems | async filter menu config ,Function returns [{label,value}] | Function | - |
|
||||
|
11
demo/documentation/components/table/enUS/property.md
Normal file
11
demo/documentation/components/table/enUS/property.md
Normal file
@ -0,0 +1,11 @@
|
||||
# Property
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------- | :------ |
|
||||
| data | Structured data displayed. | Array | - |
|
||||
| columns | Column configuration. Details are mentioned below. | Array | - |
|
||||
| max-height | The max-height of the table. Unit: px / When this prop is set, if the content height is larger then the set value, the header will be fixed at the top. | Number \| String | - |
|
||||
| row-class-name | Callback function for row's class name. Accept two arguments: -params: current row's data. -index: current row's index | Function | - |
|
||||
| loading | Whether the table is loading. | Boolean | false |
|
||||
| scroll-x | Set horizontal scrolling, can also be used to specify the width and height of the scroll area | number | - |
|
||||
| pagination | Config of pagination. | object | - |
|
Loading…
Reference in New Issue
Block a user