ButtonGroup (按钮组)
把一排 KunButton 合并成一个整体(分段操作、分裂按钮):收拢相邻圆角,并把两条 1px 边框叠成一条接缝。
基础用法
Basic.vue
尺寸
Sizes.vue
纵向
Vertical.vue
分裂按钮
主操作 + 一个箭头按钮触发 KunDropdown。菜单面板 Teleport 到 body,不是组的后代,所以只有触发按钮会被切角,菜单里的按钮不受影响。
Split.vue
属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| ariaLabel | string | — | Accessible name for the group (role="group"). |
| className | string | "" | Extra classes, merged after the component's own classes so yours wins the conflict — KunUI's `rounded-kun-*` / `shadow-kun-*` scales included. |
| orientation | KunButtonGroupOrientation | "horizontal" | Lay the segments out as a row or a column; the collapsed seam and the squared inner corners follow. |
插槽
| 插槽 | 作用域 |
|---|---|
| #default | — |