方法:addButtondropdown($button=[],$groups=[],$has_drbtn=false,$class='',$dr_class='')

标识符:buttondropdown

参数 含义 类型
button 顶部按钮,元素参数见button,须为关联数组 array
groups 每个元素参数见button,须为关联数组 array
has_drbtn 是否单独下拉按钮 bool
class 'dropup'=上拉显示 ''=下拉 string
dr_class 下拉class样式
dropdown-menu-right
dropdown-default
dropdown-danger..等
string

返回:Widget

$widget=new Widget();
return $widget
       ->addButtondropdown(
	   ['title'=>'Action'],
	   [
	    ['title'=>'post'],
		['title'=>'get']
	   ]
	   )
       ->fetch();

普通下拉菜单

groups每个按钮元素可以设置是否为分隔符,如:

$widget=new Widget();
return $widget
       ->addButtondropdown(
	   ['title'=>'Action'],
	   [
	    ['title'=>'post'],
	    ['title'=>'get'],
		['is_divider'=>1],
		['title'=>'head']
	   ]
	   )
       ->fetch();

分隔符下拉菜单

设置单独下拉按钮

$widget=new Widget();
return $widget
       ->addButtondropdown(
	   ['title'=>'Action'],
	   [
	    ['title'=>'post'],
		['title'=>'get'],
		['is_divider'=>1],
		['title'=>'head']
	   ],
	   true
	   )
       ->fetch();

单独下拉按钮

上拉下拉设置

$widget=new Widget();
return $widget
       ->addButtondropdown(
	   ['title'=>'Action'],
	   [['title'=>'post'],
	   ['title'=>'get'],
	   ['is_divider'=>1],
	   ['title'=>'head']],
	   true,
	   'dropup'
	   )
       ->fetch();

下拉class样式

$widget=new Widget();
return $widget
       ->addButtondropdown(
	   ['title'=>'Action'],
	   [
	    ['title'=>'post'],
		['title'=>'get'],
		['is_divider'=>1],
		['title'=>'head']
	   ],
	   true,
	   '',
	   'dropdown-danger'
	   )
       ->fetch();

下拉class样式

其它各种样式参考ace1.4