Skip to content

ButtonGroup 按钮组

将多个按钮组合在一起,支持水平/垂直排列。

基础用法

vue
<template>
  <parrot-button-group>
    <parrot-button type="primary">上一步</parrot-button>
    <parrot-button type="primary">下一步</parrot-button>
  </parrot-button-group>
</template>

垂直排列

vue
<parrot-button-group direction="vertical" gap="16rpx">
  <parrot-button type="primary" block>选项一</parrot-button>
  <parrot-button type="primary" block>选项二</parrot-button>
</parrot-button-group>

API

Props

属性类型默认值说明
directionstring'horizontal'排列方向
gapstring'0'间距

Released under the MIT License.