PickList 选择列表
胶囊式多选,选中显示对勾。
用法
已选:vue
API
Props
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| modelValue | (string | number)[] | — | v-model 选中值数组(必填) |
| options | { value: string | number; label: string; disabled?: boolean }[] | — | 选项(必填) |
| testPrefix | string | — | 为每项生成 data-test="${testPrefix}-${value}",便于测试定位 |
Events
| 名称 | 参数 | 说明 |
|---|---|---|
| update:modelValue | (v: (string | number)[]) | 切换选中时触发 |
Slots
| 名称 | 说明 |
|---|---|
| empty | options 为空时的占位内容 |