extjs中想在renderer方法传两个dataIndex值是不可以的,有一个便捷的方式

来源:互联网 发布:航天金穗发票数据导出 编辑:程序博客网 时间:2024/05/19 02:00
   {"header":"状态",width:150,dataIndex:"isstate",          renderer:function(value){            GLOBAL.gl=value  //当你想利用这个值来对下面的进行判断,不妨给个全局变量            if(value==false){              return '<a class="xn_tablea">正常</a>'            }else{              return '<a class="xn_tablea" style="color:red">已冻结</a>'            }          }        },       {"header":"操作",width:150,dataIndex:"tokenId",         renderer:function(value){           if(GLOBAL.gl==false){             return '<a class="xn_tablea  cao"   onclick=dong('+value+')  style="color:blue" >冻结</a>'           }else{             return '<a class="xn_tablea cao" onclick=dong('+value+') style="color:blue">解冻</a>'           }         }       }
希望可以帮助你
0 0
原创粉丝点击