在 Spartacus-configuration.module.ts 裏可以打印出默認的 layout Config 對象:
這些都是 slots id,如何映射到 CMS Component?
比如索引爲3的 SiteLogo, 這個 slot ID,包含的 Component,在 CMS Page API 返回的 response 裏。對應的 CMS Component 爲 SiteLogoComponent:
Slot 和 Component 可以是1對多的關係,比如 Site Context slot 包含 language 和 currency 兩個 Component:
Footer slot 要稍稍複雜一點:
其包含的 FooterNavigationComponent,是一個複合 Component,本身又包含了很多子 Component:
更多Jerry的原創文章,盡在:"汪子熙":