同 SAP Fiori 一样,SAP Spartacus 里也有大量的自定义 icon 设计,比如下图的 iconTypes.RESET:


需要调用 iconLoader 获取 RESET icon 对应的 HTML 源代码:

动态创建新的 link 标签,并加载对应的 css:

css 地址:https://use.fontawesome.com/releases/v5.8.1/css/all.css


SAP Spartacus 所有支持的 icon 类型和提供这些 icon 形状的 css 文件 url,来自这个配置文件:projects\storefrontlib\src\cms-components\misc\icon\fontawesome-icon.config.ts

更多Jerry的原创文章,尽在:"汪子熙":

网友评论