我有一个基于 UI5 的应用程序 (1.66+),它可以正常工作,但屏幕左右两侧有巨大的空白区域(又名信箱打开):
我想禁用信箱以使用整个屏幕空间。
到目前为止,我尝试了以下方法:
"fullWidth": true
在manifest.json 的sap.ui
部分中使用<html class="sap-desktop sapUiMedia-Std-Desktop sapUiMedia-StdExt-LargeDesktop">
Run Code Online (Sandbox Code Playgroud)
appWidthLimited: false
到index.html:<script>
sap.ui.getCore().attachInit(function () {
new sap.m.Shell({
app: new sap.ui.core.ComponentContainer({
height: "100%",
name: "APPNAME"
}),
appWidthLimited: false
}).placeAt("content");
});
</script>
Run Code Online (Sandbox Code Playgroud)
就像《如何在 SAPUI5 中自定义 Shell 容器》中描述的那样。
但它们都不适合我。
更新:
我成功地通过静态 XML 模板解决了这个问题——只需添加<Shell id="shell" appWidthLimited="false">
到主 XML 模板中,但现在我想了解如何通过 JS 在new sap.m.Shell(…)
定义中实现它。
代码实验的起点如下。
索引.html:
<!DOCTYPE html>
<html>
<head> …
Run Code Online (Sandbox Code Playgroud)