Skip to content

ButtonGroup

Zhexuan Liu edited this page Jun 21, 2018 · 5 revisions

ButtonGroup

image

ButtonGroup 为按钮组,通常位于界面底部,包含一个或者两个按钮:

<buttongroup alignment="bottom">
  <button type="cancel" on-click={ linkEvent(this, xxx) }>{myStore.leftTitle}</button>
  <button type="confirm" on-click={ linkEvent(this, xxx) >{myStore.rightTitle}</button>
</buttongroup>
import { ButtonGroup } from 'mesh-envoy-tag'

const component = (
  <ButtonGroup>
    <ButtonGroup.Button type="cancel" onClick={() => foo('Cancel')}>
      Cancel
    </ButtonGroup.Button>
    <ButtonGroup.Button type="confirm" onClick={() => foo('Confirm')}>
      Confirm
    </ButtonGroup.Button>
  </ButtonGroup>
)

Button

名称 作用 必须 可否更改
text 按钮的 title true true
type 按钮类型,控制显示的图标,以及标题颜色 false false
事件 触发条件 附带参数
click 点击按钮时触发的事件
Clone this wiki locally