Skip to content

VBtnToggle API

组件页面

属性

名称类型默认值
base-color
Sets the color of component when not focused.
border
Designates the border-radius applied to the component. This can be xs, sm, md, lg, xl.
color
Applies specified color to the control - supports utility colors (for example success or purple) or css color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page .
density
调整组件使用的垂直高度。
disabled
将所有子组件设置为禁用状态。
divided
Add dividers between children v-btn components.
elevation
组件的海拔可接受 0 到 24 之间的值。你可以在 elevation page 浏览更多信息。
mandatory
强制至少选择一个项目(如果可用)。
max
设置可以选择的最大数量。
model-value
组件 v-mode 的值。如果组件支持多属性,默认为空数组。
multiple
允许您选择多个选项。
rounded
Round edge buttons.
selected-class
配置被选中项目时应用的 CSS 类名。
tag
指定在根元素上使用的自定义标签。
theme
Specify a theme for this component and all of its children.
tile
删除组件的 border-radius。
variant
Applies a distinct style to the component.

事件

名称类型
update:modelValue
当组件的 model-value 更改时引发的事件。

插槽

default
默认Vue 插槽。

可用属性

next
Activates the next button.
prev
Activates the previous button.
select
Selects a button by index, the second parameter is a boolean to indicate if the button should be selected or not.

SASS 变量

名称默认值
$btn-toggle-selected-opacity