Skip to content

ColumnSelect 选择列

说明

基于 el-table-column 封装的表格选择列。

(1)默认使用官方 type="selection" 多选列能力,支持 selectablereserve-selection 等选择列属性;

(2)开启 single 后使用当前行能力实现单选,适合业务表格只允许选择一行的场景。

(3)单选和多选的禁用状态都由 selectable(row, index) 决定。

用法示例

多选

多选结果:暂无

单选

单选结果:暂无

API

Attributes

属性名说明类型默认值
single是否为单选模式booleanfalse
selectable行是否可选,同 el-table-columnselectableFunctiontrue
disabled-tip禁用时的提示内容,返回空值时不显示;只负责提示,不决定禁用状态Function
width列宽度string / number55
min-width列最小宽度string / number55
tip-props禁用提示 el-tooltip 属性object{placement: 'top',enterable: false,popperClass:'y-column-select__tooltip'}
resizable是否可以通过拖动改变宽度booleanfalse
show-overflow-tooltip当内容过长被隐藏时显示 tooltipboolean / objectfalse
class-name列的 classNamestring'y-column-select'

Slots

名称说明参数
default自定义选择单元格内容object
header单选模式表头内容object