OptionGroup 选择组

Demos

See the demos of Select or the demos of Dropdown.

API

Props

NameTypeDefaultDescription
labelstringThe descriptive label of the option group.
optionsArray<Object>[]

The list of options with the option type being {label, value, disabled, ...}.

NameTypeDescription
labelstringThe descriptive label of the option.
value*The value of the option.
disabledboolean=Whether the option is disabled.
positionstringinline

The way to display child options.

ValueDescription
inlineDisplays child options inline.
popupDisplays child options in a separate popup menu.
overlay-classstring | Array | Object=-See the overlay-class prop of the Overlay component.
overlay-stylestring | Array | Object=-See the overlay-style prop of the Overlay component.

Slots

NameDescription
defaultThe content of the options dropdown. Can be used to place Options or OptionGroupss when the options prop is not specified.
label

The label of the option group. Displays the label prop by default.

NameTypeDescription
labelstringThe descriptive label of the option group.
disabledboolean=Whether the option group is disabled.
group-label

The label text of each option group (option with child options). Displays the label of the option by default.

NameTypeDescription
labelstringThe descriptive label of the option group.
disabledboolean=Whether the option group is disabled.

Additionally, custom properties in current option, apart from the listed ones, will also be passes into the scope object via v-bind.

option-label

The label text of each option (option without child options). Displays the label of the option by default.

NameTypeDescription
labelstringThe descriptive label of the option.
value*The value of the option.
selectedbooleanWhether the the option is selected.
disabledboolean=Whether the option is disabled.

Additionally, custom properties in current option, apart from the listed ones, will also be passes into the scope object via v-bind.

option

The entire content area of each option (option without child options). Displays the default content of Options component by default.

NameTypeDescription
labelstringThe descriptive label of the option.
value*The value of the option.
selectedbooleanWhether the the option is selected.
disabledboolean=Whether the option is disabled.

Additionally, custom properties in current option, apart from the listed ones, will also be passes into the scope object via v-bind.

Icons

NameDescription
expandableExpandable options.
Edit this page on GitHubEdit