更换Ext.viewport各个方位上的显示内容
定义replace方法
var replace = function(id, config){
var comp = Ext.getCmp(id);
comp.remove(0);
comp.add(config);
comp.doLayout();
}
方法说明:id是viewport各方位的id,config是即将显示在viewport上的内容
在viewport的center方位更换一个EditorGrid
handler:function(){
editGrid = newBankCxGrid();
replace('cmp_center',editGrid);
}
在方法newBankCxGrid创建并返回editGrid。
本文介绍了一种在ExtJS中通过自定义replace方法实现Viewport内容动态替换的方法。该方法接受Viewport方位ID和配置参数,能方便地更新Viewport的特定区域内容,例如将Center方位的内容替换为新的EditorGrid。
1044

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



