Balloon.2.5 —— UI组件之复选框

方法入口

var $checkbox = $().$b("checkbox",config)  //返回组件的jQuery对象,即下面模板的jQuery对象

组件模板

<span id="<%=id%>" >
<% if( checkboxArray.length != 0){ %>
<table>
<% if( arrange == 'h' ){ %>
<tr>
<% for(var i=0; i < checkboxArray.length; i++){ %>
<td>
<input 
	style="height:auto;<%= style %>" 
	type="checkbox" 
	id="<%=id%>_<%=i%>" 
	value="<%=checkboxArray[i].value%>"
	<%= defaultValue ===  checkboxArray[i].value ? "checked" : "" %>
	/>
<label for="<%= id %>_<%= i %>"><%= checkboxArray[i].name %></label>
</td>
<% } %>
</tr>
<% }else{ %>
<% for(var i=0; i < checkboxArray.length; i++){ %>
<tr>
<td>
<input 
	style="height:auto;<%= style %>" 
	type="checkbox" 
	id="<%=id%>_<%=i%>" 
	value="<%=checkboxArray[i].value%>"
	<%= defaultValue ===  checkboxArray[i].value ? "checked" : "" %>
	/>
<label for="<%= id %>_<%= i %>"><%= checkboxArray[i].name %></label>
</td>
</tr>
<% } %>
<% } %>
</table>
<% }else{%>
<span><%= emptyMsg %></span>
<% } %>
</span>

配置属性(通用属性参看2.3节)

属性名类型默认值说明
localOptionArray[]复选框选项,静态数据源,固定不变
dataOptionArray[]复选框选项,动态数据源
isVerifyBooleanfalse组件是否需要验证
arrangeString"h""h"水平排列,"v"垂直排列
tplUrlString"template/checkbox.html"模板路径

方法(通用方法参看2.3节)
暂无
说明 
入参  
返回  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值