Skip to content
Power

Select 选择器

常用于选择选项的场景。

注意

pa-select 可独立使用,在 pa-form/pa-table 中可使用时,需配置 prop 字段。

组件功能展示

基础使用
基础使用
Display
选项1
异步请求选项
显示代码

SaSelectType

字段描述类型默认值
modelValue绑定值Array<number | string> number string
displayValue纯展示类型下,直接显示值string
type组件类型multiple-online-select multiple-request-select multiple-select online-select request-select selectselect
exOptions选项MOptionV2Type.SelectList
requestApi异步选项请求接口({ query: string }) => Promise<MOptionV2Type.SelectList>
placeholder输入框提示Record<"en-US" | "zh-CN", string> string
disabled禁用状态booleanfalse
display纯展示booleanfalse
clearable显示清除按钮booleantrue
contrastData对比用原数据Array<number | string> number string
alwaysContrast是否总是显示对不数据booleanfalse

request-selectonline-select 区别

request-select 只会在组件创建时单次调用 requestApi,而 online-select 会在输入框值变化时调用 requestApi

SaSelectEvents

字段描述类型
change当值改变时触发function

MOptionV2Type.SelectList(Array<SaSelectOptionsType>)

字段描述类型默认值
label选项名string
value选项值string number boolean
children子选项Array<SaSelectOptionsType>
disabled禁用状态booleanfalse
base默认数据any
tagStyle标签样式{bgColor?: string, textColor?: string} string