API
Component

ButtonGroup ($UI/system/components/justep/button/buttonGroup)

使用范围:UI2

Contents

component ButtonGroup ($UI/system/components/justep/button/buttonGroup) extends BindComponent

<b>使用场景</b>:可以添加一排按钮设置各种功能; <b>使用方法</b>:可与左右滑动组件搭配,设置每个按钮对应的激活页实现页签切换的效果; ## <b>文档链接</b>:#http://docs.newdao.net/appnei-rong-zu-4ef6-lhj/an-niu.html#

Constructor Top

  ButtonGroup ()
  ButtonGroup ( options)

Properties Top

boolean disabled

禁用

string selected

激活的按钮xid

boolean tabbed

可切换组,按钮激活状态互斥

Attributes Top

string class

组件class

boolean disabled

禁用

string selected

激活的按钮xid

boolean tabbed

可切换组,按钮激活状态互斥

string xid

组件标示

Methods Top

Object get (String name)
void set (json arg)

Events Top

void onSelect (ButtonGroupSelectEvent event)

Constructor details Top

public ButtonGroup ()

<b>使用场景</b>:可以添加一排按钮设置各种功能; <b>使用方法</b>:可与左右滑动组件搭配,设置每个按钮对应的激活页实现页签切换的效果; ## <b>文档链接</b>:#http://docs.newdao.net/appnei-rong-zu-4ef6-lhj/an-niu.html#

public ButtonGroup ( options)

构造函数

Inherited from ViewComponent

	
		参数options格式类似{parent:xx, config:{}},parent是组件的父节点,允许为空或不指定,config是组件的参数选项
	 

Parameters

options

参数选项

Properties Detail Top

public boolean disabled

禁用

public string selected

激活的按钮xid

public boolean tabbed

可切换组,按钮激活状态互斥

Attributes Detail Top

public string class

组件class

	
		基础样式: btn-group(必须),
		尺寸样式: btn-group-lg、btn-group-sm、btn-group-xs
		排列方式: btn-group-vertical、btn-group-justified
	

public boolean disabled

禁用

public string selected

激活的按钮xid

public boolean tabbed

可切换组,按钮激活状态互斥

public string xid

组件标示

Methods Detail Top

public Object get (String name)

获取属性值

Parameters

String name

属性名称,取值范围:"disabled"、"tabbed"、"selected"

Return Value

Object

public void set (json arg)

设置属性值

Parameters

json arg

属性值对
结构如下:

{ "disabled" : 禁用, "tabbed" : 可切换组,按钮激活状态互斥 "selected" : 激活的按钮xid }

Return Value

void

Events Detail Top

public void onSelect (ButtonGroupSelectEvent event)

[回调型事件]切换激活按钮触发事件,当tabbed=true时有效,注意不能阻止直接写在btn上的click事件

Parameters

ButtonGroupSelectEvent event


结构如下:

{ "source" : 组件的js对象, "item" : 按钮对象, "cancel" : 取消激活 "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 }

Return Value

void