extjs radiogroup 动态选中

待我称王封你为后i 2022-06-12 22:25 351阅读 0赞
  1. {
  2. xtype : 'radiogroup',
  3. hidden: true,
  4. name: 'funconeparam',
  5. fieldLabel: '<font color=red>* </font>第一层函数参数',
  6. layout: 'hbox',
  7. defaults: {
  8. flex: 1
  9. },
  10. items: [
  11. {
  12. boxLabel : '同等行',
  13. name : 'param1',
  14. inputValue: '同等行'
  15. }, {
  16. boxLabel : '前n期',
  17. name : 'param1',
  18. inputValue: '前n期'
  19. }
  20. ],
  21. listeners: {
  22. change: function( thiz, newValue, oldValue, eOpts ){
  23. var val = newValue.param1;
  24. var cm1 = thiz.up('form').down('radiogroup[name=functwoparam]');
  25. if(val == '同等行'){
  26. cm1.items.get(1).setValue(true);
  27. }else{
  28. cm1.items.get(0).setValue(true);
  29. }
  30. }
  31. }
  32. }

发表评论

表情:
评论列表 (有 0 条评论,351人围观)

还没有评论,来说两句吧...

相关阅读