BeX5中的功能树默认都是现实的,如果需要在从功能树上打开功能时隐藏功能数据,可以在创建功能树的代码中控制
/UI2/portal/pc3/index.js文件Model.prototype.doCreateFunctionTree = function(event){方法的实现中找到
me.showPage(pageKey);在其下面调用$(“.sidebar-toggle”).click();即可实现从功能树中打开功能隐藏功能
具体修改如下:
//设置main的显示名
$content.find('li>.x-portal-showMain>.title').html(this._cfg.main.title);
var me = this;
$('li>a', $content).click(function(){
var el = $(this),pageKey=el.attr('pageKey');
if(pageKey){
$(".func-open", $content).removeClass("func-open");
el.parent().addClass("func-open");
me.showPage(pageKey);
$(".sidebar-toggle").click();
}
});
评一波