在 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的原创文章,尽在:"汪子熙":