Fast-Table
Fast Table is a quick table template based on search-form
, pagination
, table
, and form components, designed to support rapid business development.
Basic Usage
INFO
If your business's basic request and the current component's pagination handling are not aligned, you can extract common methods and convert them into a new Promise
to adapt to this component. You can also handle other business parameters besides pagination.
Combination Usage
INFO
You can use the header
slot to quickly access selected items. The default value for row-key
is id
, which is essential when handling selected items.
Properties
Property | Description | Type | Default |
---|---|---|---|
api | Quick API service | Promise<Response> | - |
v-model:columns | table-columns type | Table-Columns | - |
v-model:loading | Asynchronous request status | boolean | - |
v-model:params | Query parameters for the form, two-way bound with pagination info | SearchParams | - |
... | Other properties, passed directly to ez-table | - | - |
INFO
Other attributes of fast-table
are passed to ez-table
, and finally to el-table
.
SearchParams
Property Name | Description | Type | Required | Default |
---|---|---|---|---|
current | Current page number, two-way binding with pagination config | number | No | 1 |
size | Number of items displayed per page, two-way binding with pagination config | number | No | 10 |
desc | Custom descending sort field | string | No | - |
asc | Custom ascending sort field | string | No | - |
... | Other properties, business-specific parameters | Record | No | - |
Slots
Slot Name | Description | Type |
---|---|---|
${prop} | Data column slot, same as ez-table | object |
form | Passed to search-form | - |
header | Area above the table | object |
Events
Event Name | Description | Parameters |
---|---|---|
update:loading | Monitor asynchronous request status | Function |
update:params | Monitor changes in query parameters | Function |
changePage | Page size or current page changes, can determine the type of change based on value | Function |
... | Other events passed directly to ez-table | - |
INFO
Other events of fast-table
are passed to ez-table
, and eventually to el-table
.
Exposes
Method Name | Description | Type |
---|---|---|
getTableRef | Get el-table instance | Function |
query | Directly trigger api call | Function |
search | Trigger api call, resets current = 1 | Function |