SAP Fiori图标(icon)设计原理
When you are creating a new button and assign an icon to it, there is no way for you to know exactly what does this “add” icon look like.
Even if you use the star symbol in launchpad designer, there is still no convenient way to find this add icon.
Since all icons are listed in F4 help, there is no filter there:
Instead we can use this useful tool to find the icon you need efficiently: Currently there are 535 icons available.
We can easily find the icon we need by search button.
And in the right-bottom part of the page, there is an id “e000” displayed for icon “accidental-leave”. We will explain the meaning of this id in the end part of this blog.
How is icon rendered in Fiori
Originally I thought that the binary content of all icons are stored in the server side. And in the runtime when an icon is to be rendered, there is a conversion done, transferring the internal url like “sap-icon://XXX” to absolute path like “https://XXXX” which points to the icon stored in the server. However I am wrong.
Figure: how the traditional image is displayed in Fiori
If you use the element inspection function in Chrome development tool, you will find the corresponding html element for image in the final html source code does not contain any attribute like src. Instead, it has an attribute defined by SAP which seems to have something to do with image content: data-sap-ui-icon-content.
The value of this attribute is filled by IconRenderer when the icon is to be displayed in UI. The variable oIconInfo.content stores the actual value.
Check the source code of this js file, where all the supported icons together with their icon name and icon code are hard coded.
So the icon id for icon “accidental-leave” we find in icon browser page, e000, is just its corresponding code hard coded in IconPool.js.
- DevOps Tools
- Docker 虚拟机之 Redis
- Spring boot with HTTPS SSL
- Spring boot with Git version
- Spring boot with Elasticsearch 5.5.1
- 怎样将 MySQL 数据表导入到 Elasticsearch
- Spring data 数据库建表(一对一,一对多,多对多)
- Apache Sqoop 将mysql导入到Hadoop HDFS
- Redis 4.0.0 一键安装脚本,CentOS 7 systemd 完美启动
- Spring boot with Apache Hive
- Apache Hive 快速入门
- CentOS 7.3 + Server JRE 1.8 + Hadoop-2.8.0
- Apache Hbase 快速入门
- Mototrbo TMS 协议分析(数字电台短信协议分析)
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- c语言之使用typedef定义类型
- 代数效应与React
- spring之在配置Bean时如何关联不同的Bean
- spring之级联属性赋值的两种方式
- hz(赫兹)
- spring之为java.util.Properties类型的属性进行赋值
- python之类也是一个对象
- spring之使用命名空间p来简化bean的配置
- SpringBoot 2.X中的@Async和Java8中的completableFuture的使用比较
- c语言之创建字符串的两种方式
- 机器学习-文本分类(1)之独热编码、词袋模型、N-gram、TF-IDF
- spring之自动装配的三种方式
- 机器学习-文本分类(2)-新闻文本分类
- Mysql5.6版本新增列,执行DDL的时候竟然锁表了,这应该是是最好的解决办法之一了!!
- spring之bean的作用域