Table-select 下拉表格

基础用法-单选

默认用法

搜索

: 1
自定义搜索
远程搜索

基础用法-多选

默认用法

请选择

搜索

自定义搜索
远程搜索

远程搜索时自动打开弹窗 1.2.2

远程搜索输入关键字时会自动打开弹窗;设置 remote-open-on-search 后,聚焦输入框时也会自动打开弹窗并展示加载、空状态或搜索结果。

输入药品名称

Select API

Attributes

参数说明类型默认值Version
options选项的数据源 value and label and disabled 可以通过 props自定义array
columns列配置项Array
table-sizeTable 的尺寸enumdefault
table-widthtable 宽度Number/String500
table-max-heighttable 高度Number/String300
model-value / v-model选中项绑定值string / number / boolean / object / array
multiple是否多选booleanfalse
disabled是否禁用booleanfalse
size输入框尺寸enum
clearable是否可以清空选项booleanfalse
collapse-tags多选时是否将选中值按文字的形式展示booleanfalse
collapse-tags-tooltip当鼠标悬停于折叠标签的文本时,是否显示所有选中的标签。 要使用此属性,collapse-tags属性必须设定为 truebooleantrue
multiple-limitmultiple 属性设置为 true 时,代表多选场景下用户最多可以选择的项目数, 为 0 则不限制number0
nameSelect 输入框的原生 name 属性string
effecttooltip 主题,内置了 dark / light 两种enum / stringlighter
autocompleteSelect 输入框的原生 autocomplete 属性stringoff
placeholder占位符,默认为“Select”string
filterableSelect 组件是否可筛选booleanfalse
filter-method自定义筛选方法Function
remote其中的选项是否从服务器远程加载booleanfalse
remote-open-on-search远程搜索聚焦输入框时是否自动打开下拉弹窗booleanfalse1.2.2
remote-method自定义远程搜索方法Function
loading是否正在从远程获取数据booleanfalse
loading-text从服务器加载数据时显示的文本,默认为“Loading”string
no-match-text搜索条件无匹配时显示的文字,也可以使用 empty 插槽设置,默认是 “No matching data'”string
no-data-text无选项时显示的文字,也可以使用 empty 插槽设置自定义内容,默认是 “暂无数据”string
popper-class选择器下拉菜单的自定义类名string''
popper-style为 Select 下拉菜单和标签提示设置自定义样式string / object
reserve-keywordmultiplefilterable被设置为 true 时,是否在选中一个选项后保留当前的搜索关键词booleantrue
default-first-option是否在输入框按下回车时,选择第一个匹配项。 需配合 filterableremote 使用booleanfalse
teleported是否使用 teleport。设置成 true则会被追加到 append-to 的位置booleantrue
append-to下拉框挂载到哪个 DOM 元素string
persistent当下拉选择器未被激活并且persistent设置为false,选择器会被删除。booleantrue
automatic-dropdown对于不可搜索的 Select,是否在输入框获得焦点后自动弹出选项菜单booleanfalse
clear-icon自定义清除图标string / objectCircleCloseFilled
fit-input-width下拉框的宽度是否与输入框相同booleanfalse
suffix-icon自定义后缀图标组件string / object
suffix-icon-rotate自定义后缀图标组件是否旋转booleantrue
tag-type标签类型enuminfo
tag-effect标签效果enumlight
validate-event是否触发表单验证booleantrue
offset下拉面板偏移量number12
show-arrow下拉菜单的内容是否有箭头booleanfalse
placement下拉框出现的位置enumbottom-start
fallback-placementsdropdown 可用的 positions 请查看popper.js 文档array['bottom-start', 'top-start', 'right', 'left']
max-collapse-tags需要显示的 Tag 的最大数量 只有当 collapse-tags 设置为 true 时才会生效。number1
aria-label a11y等价于原生 input aria-label 属性string
empty-values组件的空值配置 参考 config-providerarray
value-on-clear清空选项的值 参考 config-providerstring / number / boolean / Function
tabindexinput 的 tabindexstring / number
plain朴素的 SelectbooleanfalseV0.0.8
props配置 optionsobject
debounce远程搜索时的防抖延迟(以毫秒为单位)number300

props

AttributeDescriptionTypeDefault
value指定选项的值为选项对象的某个属性值stringvalue
label指定节点标签为节点对象的某个属性值stringlabel
disabled指定选项的禁用为选项对象的某个属性值stringdisabled

Events

事件名说明Type
change选中值发生变化时触发Function
visible-change下拉框出现/隐藏时触发Function
remove-tag多选模式下移除 tag 时触发Function
clear可清空的单选模式下用户点击清空按钮时触发Function
blur当 input 失去焦点时触发Function
focus当 input 获得焦点时触发Function
header-dragend 1.1.15当拖动表头改变了列的宽度的时候会触发该事件Function

Slots

插槽名说明子标签
header下拉列表顶部的内容
footer下拉列表底部的内容
prefixSelect 组件头部内容
empty无选项时的列表
tagselect 组件自定义标签内容
loadingselect 组件自定义 loading 内容
labelselect 组件自定义标签内容

Exposes

插槽名说明类型
focus使选择器的输入框获取焦点Function
blur使选择器的输入框失去焦点,并隐藏下拉框Function
selectedLabel获取当前选中的标签object

Copyright 2025 Winning Health 版权所有