ButtonGroup (按钮组)

把一排 KunButton 合并成一个整体(分段操作、分裂按钮):收拢相邻圆角,并把两条 1px 边框叠成一条接缝。

基础用法

Basic.vue

尺寸

Sizes.vue

纵向

Vertical.vue

分裂按钮

主操作 + 一个箭头按钮触发 KunDropdown。菜单面板 Teleport 到 body,不是组的后代,所以只有触发按钮会被切角,菜单里的按钮不受影响。

Split.vue

属性

属性类型默认值说明
ariaLabelstringAccessible name for the group (role="group").
classNamestring""Extra classes, merged after the component's own classes so yours wins the conflict — KunUI's `rounded-kun-*` / `shadow-kun-*` scales included.
orientationKunButtonGroupOrientation"horizontal"Lay the segments out as a row or a column; the collapsed seam and the squared inner corners follow.

插槽

插槽作用域
#default