SAPUI5 图标存储在哪里? [英] where are the SAPUI5 icons stored?

查看:49
本文介绍了SAPUI5 图标存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于 SAPUI5 的应用程序,我在其中使用 SAP 站点下图标的 url 设置按钮图标 https://sapui5.hana.ondemand.com/iconExplorer.html.

I have an SAPUI5 based application in which I'm setting the button icons using the url to the icon under the SAP site https://sapui5.hana.ondemand.com/iconExplorer.html.

示例代码

<Button id="excel" text="Excel" icon="sap-icon://excel-attachment" type="Accept" enabled="false" press="onDataExport"/>

现在我们必须迁移到无法使用这些 url 的不同环境.我们下载了 SAPUI5 api 并在应用程序中远程引用它.我查看了文件夹下,但找不到这些图标的存储位置.有谁知道我在哪里可以找到 api 文件夹中的 sap 图标?假设它们存储在那里.如果没有,有没有办法获取这些图标,以便我可以将它们存储在本地?

Now we have to migrate to a different environment in which we cannot use these url's. We downloaded the SAPUI5 api and reference it remotely within the app. I looked under the folders but I cannot find where these icons are stored. Does anyone know where I can find the sap icons within the api folder? Assuming they are stored in there. If not, is there a way to get these icons so I can store them locally?

推荐答案

是的.它们是 https 上的字体://sapui5.hana.ondemand.com/resources/sap/ui/core/themes/base/fonts/SAP-icons.ttf

如果您查看 https://sapui5.hana.ondemand.com/resources/sap/ui/core/IconPool-dbg.js,你可以看到图标名​​称和数值之间的映射,数值代表了'SAP-图标的字体.

And if you check https://sapui5.hana.ondemand.com/resources/sap/ui/core/IconPool-dbg.js, you can see the mapping between icon name and a numeric value which represents the char code of an icon in the 'SAP-icons' font.

您还可以查看此博客UI5 图标映射逻辑和引用此处关于字体.

You can also check this blog for the UI5 Icon mapping logic and quote here about Fonts.

字体是图像的矢量表示,而不是 GIF、JPEG 或 PNG 等二进制文件.这意味着它们可以调整到任何尺寸而不会降低质量."

"Fonts are a vector representation of images instead of binaries like GIF, JPEG or PNG. This means that they are able to be sized to any dimension without the loss of quality."

谢谢!

这篇关于SAPUI5 图标存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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