下拉框中传多值的处理方式:
假设ds传递的模型为{id:111,name:'张三',code:'0088'},设置两个隐藏field:name、code
listeners : {
select : function(combo,records) {
this.up('form').getForm().findField(
'name').setValue(
records[0].get('name'));
this.up('form').getForm().findField(
'code').setValue(
records[0].get('code'));
}
}
同理可通过此方式传递任意多个数值
本文详细介绍了如何通过设置隐藏字段和监听器,在下拉框选择时实现多值传递的方法,并说明了该技术在实际场景中的应用。
1236

被折叠的 条评论
为什么被折叠?



