SAP Spartacus Org Unit User List页面的设计原理
從cx-org-unit-user-list selector出發:
Component為UnitUserListComponent:
打開其html實現,里面又消費了cx-org-sub-list這個selector,同時a標簽指定了actions屬性:
cx-org-sub-list下面的這個a標簽,渲染時不會直接出現在cx-org-sub-list下面,而是出現在cx-org-sub-list內部出現了ng-content select=actions的地方:
所以進入selector cx-org-sub-list的實現:sub-list.component.html, 這是一個shared Component:
打開sub-list.component.html,里面使用ng-content select=actions, 定義了可以動態注入UI的注入點:
上圖能看到,cx-org-sub-list里的a actions會出現在selector cx-org-card的正下方。
再看cx-org-card的實現card.component.html:
看來所有的真實UI都位于
card.component.html定義的cx-view里:
上圖actions class div內的a,實際是通過下面這個ng-content動態注入的:
為了驗證這一點,我們可以做個實驗:
運行時,果然發現create a標簽頁出現在擁有fairy class的div下面:
因此,最后處理issue,精力應集中在sub-list.component.html中的cx-table:
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的SAP Spartacus Org Unit User List页面的设计原理的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我的工作日志 2020年12月1日 星期
- 下一篇: 杭州乐园里都有什么好玩的项目