Skip to content

Select 下拉选择组件

tips

继承所有 el-select 属性
multipletrue 时会自动添加全选选项

单选

多选

多选时会自动添加 全选 选项


代码示例

html
<El2Select
  placeholder="请选择工序"
  v-model="selectVlaue"
  :optionSource="state.stepList"
  valueKey="label"
  @change="selectChange"
/>

Attributes

下拉选择组件(多选可使用全选功能) 继承所有 ElSelect 的属性。
详情可查看 -> Element Plus Select

参数说明类型默认值
v-model绑定值boolean / string / 多选时any[]
multiple是否多选Booleanfalse
optionSource仅在(multiple为true时):下拉数据源Array
valueKey仅在(multiple为true时):传入的 option 数组中,要作为最终选择项的键值 keyString'key'
labelKey仅在(multiple为true时):传入的 option 数组中,要作为显示项的键值名称String'label'