我正在尝试将页面添加到IconTabFilter中,我已经得到了,但只有标题投影在屏幕上。
图标选项卡视图 :
createContent : function(oController) {
var oPage = new sap.m.Page({title: "IconTab",showHeader: false});
var oIconTab = new sap.m.IconTabBar ("idTabBar",{});
var itemBar1 = new sap.m.IconTabFilter({
key:"tab1",
icon:"sap-icon://database",
content:[ new sap.ui.view({id:"idTabIcon",viewName:"prova5.tabIcon1", type:sap.ui.core.mvc.ViewType.JS})
]
})
oIconTab.addItem(itemBar3);
oPage.addContent(oIconTab);
return oPage;
}
图标选项卡筛选器视图的内容:
createContent : function(oController) {
var oPage = new sap.m.Page({
title: "Icon Tab Page 1",
showNavButton: true,
navButtonPress: oController.navButtonMethod
});
var obutton = new sap.m.Button({text: "hello"});
oPage.addContent(obutton);
return oPage;
}
有什么解决办法吗?
在视图中使用 sap.m.Page
作为 createContent
函数中的返回值时出现问题。如果视图中 sap.m.Page
的使用对于您的目的不是必需的,请尝试返回另一个控件(例如 sap.m.FlexBox
)。这为我解决了问题。
尝试检查元素并找出div 和 类".sapMITBContent"在像素中添加高度约500px,您将获得页面可见。