跳到主要内容

eo-radio

<eo-radio>
Alias: <form.general-radio>

表单单选构件。

Playground

Examples

Label

Playground

Value

Playground

Options

Playground

Disabled

Playground

Size

Used only when type is button.

Playground

Type

Playground

Event

Playground

Properties

NameDescriptionTypeDefaultRequired
name

下拉框字段名

string
label

单选框字段说明

string
options

单选框选项表

GeneralOption[]
value

单选框当前选中始值

any
required

是否必填

boolean
message

校验文本信息

Record<string, string>
disabled

是否禁用

boolean
type

单选框样式类型

RadioType "default"
ui

UI样式

UIType "default"
size

大小,只对按钮样式生效

ComponentSize "medium"
customStyle

自定义radio的外层样式

React.CSSProperties
useBrick

自定义radio的内容

UseSingleBrickConf

Events

NameDescriptionEvent Detail
change

值变化事件

GeneralComplexOption | undefined
options.change

选项列表变化事件

{ options: { label: string; value: any; [key: string]: any }; name: string }

Type references

GeneralComplexOption

<T = string | number | boolean>
NameTypeRequiredDescription
labelstring
valueT
[key: string]any

GeneralOption

string | number | boolean | GeneralComplexOption | Record<string, any>

RadioType

"button" | "default" | "icon" | "icon-circle" | "icon-square" | "custom"

UIType

"default" | "dashboard"

ComponentSize

"large" | "medium" | "small" | "xs"