Select 选择器

提供一组选项供用户选择,当选项较少时使用 radio 组件应该是更好的选择

基础用法

禁用某个选项

多选

远程搜索

前后缀

最大选中数

Select API

Select Props

属性名描述类型默认值
modelValue / v-model绑定值string/ number/ object/ array——
placeholder占位符string——
disabled是否禁用booleanfalse
size组件尺寸string——
clearValue选中值是否可以被清除booleanfalse
multiple是否多选booleanfalse
valueKey当option的value为对象时 做为判定对象是否相等的键名string——
persistent持久显示popperbooleantrue
popperClasspopper的classstring——
popperOptionpopper.js 的配置项object 参考popper.js文档——
placementpopper出现的方向eum'bottom'
tagType标签类型eum'info'
height组件高度number288
showSearch是否可搜索booleanfalse
filterMethod是否筛选选项 接收一个自定义函数Function——
maxTagCount最大tag数量number——
maxTagCountWithTooltip超过最大tag数量后显示tooltipbooleanfalse
showArrow是否显示popper的箭头booleantrue
loading是否显示loadingbooleanfalse
showSuffix是否显示后缀booleantrue

Select Emits

属性名描述类型
select选择后触发的事件Function
changeselect所绑定的值发生变化时触发Function
search搜索时触发Function
focusselect聚焦时触发Function
blurselect失焦时触发Function

Select Slots

插槽名描述
suffixselect前缀内容
prefixselect后缀内容
上次更新时间: