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 (triggers onBefore, opens the dialog, etc.)
  • Custom key options trigger the onSelect callback 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

FieldDescriptionType
typeBuilt-in type, reuses the edit/delete logic'edit' | 'del'
keyCustom option identifier, triggers the onSelect callbackstring | number
labelCustom option display labelstring | (() => VNode)

Built-in types and custom keys can be mixed, e.g. [{ type: 'edit' }, { type: 'del' }, { key: 'export', label: 'Export' }].