gpt4 book ai didi

sapui5 - 主菜单在移动设备上不可见,但在平板电脑上可见

转载 作者:行者123 更新时间:2023-12-04 02:13:23 26 4
gpt4 key购买 nike

我使用 sap.m.SplitApp 控件创建了一个拆分应用程序。

移动设备:

enter image description here

iPad:

enter image description here

最佳答案

我相信这是预期的行为。

查看此 github 问题:https://github.com/SAP/openui5/issues/30

一位开发者说

The SplitApp is designed to behave like e.g. the "Settings" app on iPhone, where a master-detail structure on tablet is mapped to a linear set of pages on phone. As such it is correct not to display a "Show Master" button.

然而,他们提出以下建议

On phones there is no master button, but you should initially see the master area and navigate from there to the detail area by selecting items.

要实现此目的,您可以执行以下操作:您的详细信息页面应包含一个按钮,您可以使用该按钮导航回主视图(此按钮应仅在设备为手机时可见):

<Page id="detailPage" showNavButton="{device>/isPhone}" navButtonPress="handleNavButtonPress">
</Page>

navButtonPress 处理程序在详细 View 的 Controller 中实现

handleNavButtonPress: function () {
var oSplitApp = this.getView().getParent().getParent();
var oMaster = oSplitApp.getMasterPages()[0];
oSplitApp.toMaster(oMaster, "flip");
}

我使用的device模型可以实现如下(将这段代码放在Component.js

init中)
var deviceModel = new sap.ui.model.json.JSONModel({
isPhone: sap.ui.Device.system.phone
});
this.setModel(deviceModel, "device");

有关更多信息,请参阅此资源:http://help.sap.com/saphelp_hanaplatform/helpdata/en/32/5b8edafcfa4c9c8fbd42455a60e379/content.htm

关于sapui5 - 主菜单在移动设备上不可见,但在平板电脑上可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36326189/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com