简体   繁体   English

SAP Fiori/UI5 应用程序设计

[英]Design of SAP Fiori/UI5 Application

I'm trying to develop my first SAP Fiori App.我正在尝试开发我的第一个 SAP Fiori 应用程序。 Now I have some question about themes and background.现在我有一些关于主题和背景的问题。 In my index.html sap_belize_plus is the selected theme.在我的 index.html sap_belize_plus 中是选定的主题。 In the SAP Fiori Launchpad you can chose between different SAP themes.在 SAP Fiori Launchpad 中,您可以选择不同的 SAP 主题。

  1. Does the chosen theme in the Launchpad affect my app or will it be displayed exactly as implemented (only belize theme)? Launchpad 中所选的主题是否会影响我的应用程序,还是会完全按照实施的方式显示(仅限伯利兹主题)?
  2. Should I do custom CSS?我应该做自定义 CSS 吗?
  3. I saw apps with the standard #EBEBEB background and others with the picture background.我看到了带有标准#EBEBEB 背景的应用程序和其他带有图片背景的应用程序。 On what does this depend?这取决于什么?

Thanks for your help!谢谢你的帮助!

  1. Does the chosen theme in the Launchpad affect my app or will it be displayed exactly as implemented (only belize theme)? Launchpad 中所选的主题是否会影响我的应用程序,还是会完全按照实施的方式显示(仅限伯利兹主题)?

Yes.是的。 Chosen theme from the Launchpad will be the one that will be used.从 Launchpad 中选择的主题将被使用。 (Not the one in your index.html) (不是你的 index.html 中的那个)

Should I do custom CSS?我应该做自定义 CSS 吗?

Ideally No. You should create a custom theme (start by copying the standard) and try to achieve your desired result with the theme.理想情况下不。您应该创建一个自定义主题(从复制标准开始)并尝试使用该主题实现您想要的结果。 CSS should be your last resort. CSS 应该是你最后的手段。

I saw apps with the standard #EBEBEB background and others with the picture background.我看到了带有标准#EBEBEB 背景的应用程序和其他带有图片背景的应用程序。 On what does this depend?这取决于什么?

This can be either due to custom CSS to due to the custom theme.这可能是由于自定义 CSS 或由于自定义主题。 You have to look into the 'Developer tools' to determine.您必须查看“开发人员工具”才能确定。

If you use the Fiori Launchpad (FLP) you have 2 options.如果您使用 Fiori Launchpad (FLP),您有 2 个选项。

  1. [Most common & recommended] Configure your tile to open the app calling the Component.js file [最常见和推荐] 配置您的磁贴以打开调用 Component.js 文件的应用程序
  2. Configuring the tile to open the index.html file (UI5 standalone configutarion)配置磁贴以打开 index.html 文件(UI5 独立配置)

In option 1, the index.html file of your app is not used.在选项 1 中,不使用您应用的 index.html 文件。 It's the FLP the one who plays the role of index.html file, and the app is loaded into the ComponentContainer of the FLP using JS-based navigation (hash navigation).扮演index.html 文件角色的是FLP,使用基于JS 的导航(哈希导航)将应用程序加载到FLP 的ComponentContainer 中。 So, in a default app config, the theme you use in your FLP will be the one used in your app.因此,在默认应用配置中,您在 FLP 中使用的主题将是您的应用中使用的主题。 Besides you can configure which are the supported themes for your app in the descriptor file, setting the property此外,您可以在描述符文件中配置哪些是您的应用程序支持的主题,设置属性

"supportedThemes": [
    "sap_bluecrystal"
]

More info in this link 此链接中的更多信息

In option 2 , the app will be opened in a new tab, calling the index.html file, so it will use the theme you configure in the index.html file .在选项 2 中,应用程序将在新选项卡中打开,调用 index.html 文件,因此它将使用您在 index.html 文件中配置的主题

In the most common & easy way, you apply your custom themes in the whole FLP and you configure your apps to use it.以最常见和最简单的方式,您在整个 FLP 中应用您的自定义主题并配置您的应用程序以使用它。

I think you should start reading about Theme Designer before you start coding CSS我认为你应该在开始编写 CSS 代码之前开始阅读Theme Designer

Furthermore if you want to add just a few CSS classes, read this此外,如果您只想添加一些 CSS 类,请阅读此内容

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

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