我们如何在 SAPUI5 中开发自定义主题 [英] How can we develop custom themes in SAPUI5

查看:30
本文介绍了我们如何在 SAPUI5 中开发自定义主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究 SAPUI5 应用程序中的主题概念.

i am working on theming concepts in SAPUI5 application.

我知道可以通过使用 UI 主题设计器(这是 SAP 后端的一个工具)来完成主题.

I got to know that the theming can be done by using UI Theme Designer (which is a tool in SAP backend).

我是从 此处.

是否可以在不使用主题设计器的情况下在 SAPUI5 中开发自定义主题.

Is it possible to develop a custom theme in SAPUI5 with out using Theme Designer.

推荐答案

有一系列选项,主题设计器是最简单和最不灵活的一个,另一个极端是完全从头开始编写的 CSS 文件.在这两者之间有一些选项,例如复制现有主题、重命名它以及附加修改现有外观的 CSS 部分(这在主题设计器中也是可能的!).

There is a range of options, Theme Designer being the easiest and least flexible one, a completely written-from scratch CSS file the other extreme. In between there are options like copying an existing theme, renaming it, and appending CSS parts that modify the existing appearance (this is also possible in Theme Designer!).

一个主要的决定因素是您的主题应该与现有主题有多大不同,以及您的升级策略是什么.非常不同的主题可能最好使用基础"主题来创建……嗯,基础.但是,每当您创建大量额外的 CSS 时,您都需要意识到您必须使其适应新的 UI5 版本.只要您不添加任何自定义 CSS,主题设计器就会自动执行此操作.

One main deciding factor is how different your theme should look from an existing one, and what your upgrade strategy is. Very different themes might be best created using the "base" theme as... well, base. But whenever you create lots of extra CSS you need to be aware that you have to adapt it to new UI5 releases. The Theme Designer does this automatically, as long as you don't add any custom CSS.

在从头开始编写主题或大量修改主题之前,您应该查看现有主题有多大,并估计您是否想要并且可以自己开发和维护这样的东西.(为什么它们如此复杂?200 个控件 - 这只是 OpenUI5 的子集 - 其中许多非常强大,具有不同的外观和响应能力,跨设备工作,并且还以从右到左的模式出现,......这是没有的其他框架提供,所以 UI5 主题当然比小得多的框架大.)

Before writing a theme from scratch or vastly modifying one, you should look at how large existing themes are and estimate whether you want and can develop and maintain such a thing on your own. (Why are they so complex? 200 controls - and that's only the OpenUI5 subset - and many of them very powerful with different appearances and responsiveness, working across devices, and also appearing in right-to-left mode,... that's something no other framework offers, so of course the UI5 themes are larger than those of much smaller frameworks.)

这篇关于我们如何在 SAPUI5 中开发自定义主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆