Custom Operation Column
Use the operation config to flexibly control the display and behavior of the operation column.
Hide the Operation Column
Set operation to false to hide both the operation column and the top "Add" button.
operation-hide.en.vue
Prefix and Suffix Slots
Use prefixRender and suffixRender to insert custom content before and after the default action buttons.
operation-render.en.vue
Custom Options and onSelect
Use options to configure dropdown menu items, and use onSelect to handle clicks on custom items.
{ type: 'edit' }/{ type: 'del' }reuses the built-in edit/delete logic (triggersonBefore, opens the dialog, etc.)- Custom
keyoptions trigger theonSelectcallback on click
operation-custom.en.vue
Types
operation
operation?:
| false
| {
label?: string
width?: number | string
prefixRender?: (rowData: T, rowIndex: number) => VNode
suffixRender?: (rowData: T, rowIndex: number) => VNode
options?: TableOperationOption[]
onSelect?: (key: string) => void | boolean
onBefore?: (rowData: T, type: 'add' | 'edit' | 'del') => boolean | T | void | Promise<...>
}
TableOperationOption
| Field | Description | Type |
|---|---|---|
type | Built-in type, reuses the edit/delete logic | 'edit' | 'del' |
key | Custom option identifier, triggers the onSelect callback | string | number |
label | Custom option display label | string | (() => VNode) |
Built-in types and custom keys can be mixed, e.g.
[{ type: 'edit' }, { type: 'del' }, { key: 'export', label: 'Export' }].
