简体   繁体   English

“我的收件箱”:如何在 Fiori 启动板中启用全宽?

[英]"My Inbox": how to enable full width within Fiori launchpad?

I'm extending My Inbox standard Fiori app so that it fits the whole screen like the image bellow.我正在扩展我的收件箱标准 Fiori 应用程序,使其适合整个屏幕,如下图所示。

在此处输入图像描述

Hence, I've added in the manifest.json of my My Inbox extension (and the apps used in My Inbox, just in case) this line:因此,我在我的收件箱扩展(以及我的收件箱中使用的应用程序,以防万一)的manifest.json中添加了这一行:

{
  "sap.ui": {
    "fullWidth": true
  }
}

When the app is launched, it begins to be full screen, but then it comes back to the standard presentation.当应用程序启动时,它开始全屏显示,但随后又回到标准演示。

Can anybody help me please?有人可以帮我吗?

I manage to find a solution: the fullwidth is actually redefine in the Component.js of My Inbox standard app.我设法找到了一个解决方案:全宽实际上是在 My Inbox 标准应用程序的Component.js of重新定义的。 So I added these lines in the My Inbox extension project:所以我在我的收件箱扩展项目中添加了这些行:

manifest.json

{
  "sap.ui": {
    "fullWidth": true
  }
}

Component.js

this.cross.fnd.fiori.inbox.Component.extend("cross.fnd.fiori.inbox.CA_FIORI_INBOX_EXTENSION.Component", {
    metadata: {
        manifest: "json"
    },
    
    /* Override code : begin ----------------------------------------------------- */
    //function to handle the width of the application. It is called by FLP when app is active.
    active: function () {
            sap.ushell.services.AppConfiguration.setApplicationFullWidth(true);
    }
    /* Override code : end ----------------------------------------------------- */
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM