EditTable ​

EditTable combines el-table and el-form to provide inline cell editing, batch paste, per-cell validation, and Excel-like vertical drag fill.

Basic Usage ​

Basic editable table with column configuration.

Drag Fill ​

Set dragCopy to enable Excel-like vertical fill-handle copying.

Validation ​

Use rules in the column config to validate each editable cell.

Behavior Notes ​

  • Each non-operateCol column renders EditCell by default. If a column defines render, that renderer replaces the built-in editor for the column.
  • Set prop: 'operateCol' to render an operation column. That column does not participate in inline editing, paste fill, or validation.
  • Pasting supports both plain text and HTML tables copied from spreadsheet-like sources.
  • When paste-limit is false, pasting beyond the current data length appends new rows automatically.
  • Disabled cells are skipped during paste and drag fill. Pasted text also respects the column maxlength.
  • When drag-copy is enabled, EditTable forces table borders on and copies the start cell value vertically within the same column.
  • The exposed validation methods proxy the internal el-form, so field paths follow the row-array model such as [0].name.

API ​

EditTable Attributes ​

NameDescriptionTypeDefault
table-data / v-model:table-dataeditable row dataarray[]
table-columnscolumn configuration arrayarray[]
heighttable heightstring / number'auto'
paste-limitstop pasting when the current row count is reached instead of appending rowsbooleanfalse
bordershow table border; automatically treated as true when drag-copy is enabledbooleanfalse
no-indexhide the built-in index columnbooleanfalse
use-virtualenable virtual scrollingbooleanfalse
span-methodcell merge calculation method for row/column spanning; params and return value mirror el-table span-methodFunction—
drag-copyenable vertical fill-handle copyingbooleanfalse
need-batch-copylet inner cells intercept paste and hand it to the table paste logicbooleantrue

EditTableColumn Configuration ​

NameDescriptionTypeDefault
propfield namestring—
labelcolumn header textstring—
label-rendercustom header render functionFunction—
rulesvalidation rules used by the wrapping el-form-itemarray—
elementeditor type passed to EditCellstring'el-input'
optionsoption list used by select-like editorsarray—
is-disabledcontrol whether the current cell is disabledFunction—
min-widthcolumn minimum widthstring / number—
widthcolumn widthstring / number—
fixedfixed column positionenum—
always-editalways show the editor instead of click-to-edit modebooleanfalse
maxlengthmax text length applied during paste handlingnumber—
rendercustom cell renderer; when provided, it replaces the built-in EditCell rendererFunction—
suffix-rendercustom suffix renderer displayed after EditCellFunction—

Any extra column fields are forwarded to the inner EditCell as item-props, so editor-specific props such as placeholder, clearable, filterable, format, min, and max can be set directly on the column config.

EditTable Events ​

NameDescriptionType
update:table-dataemitted when row data changes through editing, paste, or drag fillFunction
after-pasteemitted after table paste handling finishesFunction
changeemitted when a cell value change is committedFunction
focusemitted when a cell editor receives focusFunction

Exposes ​

NameDescriptionType
validateproxy of the internal el-form validate() methodFunction
validateFieldproxy of the internal el-form validateField() methodFunction
clearValidateproxy of the internal el-form clearValidate() methodFunction

Source ​

Docs