var component = new NEKUI.Component({template: template,data: {source: [{name: '选项1'},{name: '选项2'},{name: '选项3'},{name: '选项4'},{name: '选项5'},{name: '选项6'}]}});
数据绑定
<radio.group source={source} value={value} selected={selected} /><div>value: {value}</div><div>selected: {selected ? JSON.stringify(selected) : ''}</div>
var component = new NEKUI.Component({template: template,data: {source: [{id: 11, name: '选项1'},{id: 22, name: '选项2'},{id: 33, name: '选项3'},]}});
在表单中使用
var component = new NEKUI.Component({template: template,data: {source: [{name: '选项1'},{name: '选项2'},{name: '选项3'},{name: '选项4'},{name: '选项5'},{name: '选项6'}]}});
禁用组件
<radio.group source={source} disabled />
var component = new NEKUI.Component({template: template,data: {source: [{name: '选项1'},{name: '选项2'},{name: '选项3'},{name: '选项4'},{name: '选项5'},{name: '选项6'}]}});
var component = new NEKUI.Component({template: template,service: {getList: function(params, success) {NEKUI.ajax.request({url: '../data/list.json',method: 'get',type: 'json',data: params,success: success});}}});
多行
var component = new NEKUI.Component({template: template,data: {source: [{name: '选项1'},{name: '选项2'},{name: '选项3'},{name: '选项4'},{name: '选项5'},{name: '选项6'}]}});
API
Classes
- config()
- 选择某一) ⇒
- validate() 根据required验证组件的值是否正确() ⇒
object
Events
RadioGroup
Kind: global classExtend: SourceComponent
Kind: global functionAccess: protected
select(item) 选择某一(item) ⇒ void
Kind: global functionAccess: public
validate() 根据required验证组件的值是否正确() ⇒ object
Kind: event emittedProperties