如何在SAPUI5中自定义Shell容器

Naf*_*asi 4 sapui5 sap-fiori sapui5-theming

贝壳容器

我有一个shell容器,在大屏幕上我想充分利用屏幕.我想覆盖整个区域.我如何定制它.

mat*_*btt 5

我假设您正在使用XML来查看视图.将以下属性添加appWidthLimited="false"到Shell标记.


Kun*_*hal 5

根据最新文档,我提到了 1.48.X,但它不再存在于sap.ui5

"sap.ui": {
    "technology": "UI5",
    "icons": {
        "icon": "sap-icon://add-contact",
        "favIcon": "icon/F1373_Approve_Purchase_Orders.ico",
        "phone": "icon/launchicon/57_iPhone_Desktop_Launch.png",
        "phone@2": "icon/launchicon/114_iPhone-Retina_Web_Clip.png",
        "tablet": "icon/launchicon/72_iPad_Desktop_Launch.png",
        "tablet@2": "icon/launchicon/144_iPad_Retina_Web_Clip.png"
    },
    "deviceTypes": {
        "desktop": true,
        "tablet": true,
        "phone": false
    },
    "supportedThemes": [
        "sap_hcb"
    ],
    "fullWidth": true
},
Run Code Online (Sandbox Code Playgroud)

欲了解更多信息:https://openui5.hana.ondemand.com/#/topic/be0cf40f61184b358b5faedaec98b2da

另外,如果您正在使用sap.m.Shell,那么上述内容将无济于事。
为此,您需要设置属性appWidthLimited: false

<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)