extjs 中比较常见且好用的监听事件

时间:2022-09-01 05:05:08
ComboBox
listeners:{
expand:function(){
//此函数是,点击下拉框展开的时候事件
},
select:function(com, record, index){
//下拉框选择事件
   //比如二级联动
},
change:function(this,newValue,oldValue,e){
//下拉框值改变事件
}
} Grid
listeners:{
itemdbclick:function(grid,record,item,reowIndex,e){
//双击事件
//比如双击grid行,显示详情出来
},
afterrenderer:function(){
//渲染后事件,可以去后台校验登录人信息去设置相关的权限等等
//比如某些点击按钮只对有某个角色的人员的显示
},
beforerenderer:function(){
//渲染前事件
}
} Store
//解决分页查询传参问题。
store.on(‘beforeload’,function(){
var apply = Ext.getCmp('applytime').getValue();
var end = Ext.getCmp('endtime').getValue();
var new_params = {
applytime : start,
endtime : stop
};
Ext.apply(store.proxy.extraParams, new_params);
})