radiogroup
# 一、属性
# value
string | number | boolean
当前输入组件的值。
# columns
object
输入组件配置对象。
默认值: {}
提示
textareafield 是基于 <a-checkbox />
封装的组件。这意味着它除了文档中提到的 API 外,还可以支持 官方文档 (opens new window) 中的 API【若发现暂不支持的属性,请及时反馈!!!】。
# columns.xtype
string
该输入组件需要将其指定为 'radiogroup'
。
# columns.defaultValue
string | number | boolean
默认值。
# columns.disabled
boolean | (typeParams: Object) => boolean
是否禁用状态。
默认值: false
# columns.readOnly
boolean
与 disabled 功能相同,优先取 disabled。
默认值: false
# columns.name
string
RadioGroup 下所有 input[type="radio"] 的 name 属性。
默认值: 'radiogroup'
# columns.direction
string
显示方向。
默认值: 'horizontal'
可选值: 'horizontal'、'vertical'
# columns.tooltip
object
悬浮提示信息。
提示
tooltip 属性是基于 <a-tooltip />
封装的。理论上可以支持 官方文档 (opens new window) 中所有的 API【若发现暂不支持的属性,请及时反馈!!!】。
# columns.options
array<{ label, value, disabled? }>
定义 RadioGroup 选项。与 storeConfig 二选一。
array 属性说明:
label: string
: 单选框的标签 必填项value: string | number | boolean
: 单选框的值 必填项disabled: boolean
: 单选框是否禁用,可选,默认为false
# columns.storeConfig
object
配置从请求中加载数据。与 options 二选一。
属性说明:
findUrl: string
: 加载数据的请求地址 必填项isPage: boolean
: 是否分页,默认false
isSelfPage: boolean
: 是否前端分页,默认false
code: string
: 在请求结果中,单选框的值所对应的字段 必填项name: string
: 在请求结果中,单选框的标签所对应的字段 必填项getData: (params) => primose
: 用于手动请求组件数据getDataBefore: (params) => void
: 请求组件数据前的回调事件getDataAfter: (params) => void
: 请求组件数据后的回调事件setBaseParams: (params) => void
: 动态修改请求参数
# size
string
控件大小。
默认值: 'small'
可选值: 'large'
、'default'
、'samll'
提示
该属性可直接挂载至 columns 下。
columns: {
// ...
size: 'small'
}
2
3
4
# typeParams
object
类型参数,可以为其传递任意属性,在各回调事件中,会将其按原样返回。
默认值: {}
# isForm
boolean
是否在表单中使用。
默认值: false
# reseal
boolean
是否重新封装。
默认值: false
# 二、事件
# valueChange
({ that, columns, value, oldValue, typeParams }) => void
当值改变后触发。
参数说明:
- obj
提示
该方法可直接挂载至 columns 下。
columns: {
// ...
valueChange: ({ that, columns, value, oldValue, typeParams }) => {}
}
2
3
4