当前位置:网站首页>How does SAP Spartacus get the corresponding supported slots according to page layout
How does SAP Spartacus get the corresponding supported slots according to page layout
2022-07-21 06:25:00 【Hua Weiyun】
stay SAP Spartacus PageLayout Component In the realization of , every last layoutName There is a corresponding cxOutlet Scalable :
The first 13 Yes ngFor Instructions , Implement the slots$ an , For every one slot Place the corresponding CMS Component.
slots$ Is an array , adopt pageLayoutService.getSlots Method to get .
This article introduces this getSlots Method execution details .
switchMap This rxjs The operator , Implies its incoming arrow function , It's a cancellable Time consuming operation .
Execute in this closure :
combineLatest: as long as this.page$ and this.breakpointService.breakpoint$ One is subscribed , It will trigger map operation :
All supported slots and slots What's allowed inside Components list :
breakpoint:xl
Read slot To configure :
all template Configuration is all in tis.config.layoutSlots In the :
Got it header Configuration of :
final result :
About SAP Spartacus defaultCmsContentProvider And default layoutConfig Some tests of
With Spartacus-b2c-configuration.module.ts File as an example :
These default profiles , All from another library , namely @Spartacus/Storefront Imported from , The entrance of the latter is public_api file :
Add a line of print statements to this file , You can see all the default configurations :
These default configurations are hard coded in layout-config.ts Inside :
If you comment out a part :
The effect is as follows :Header The whole area is gone .
And then footer The area is also annotated :
Now? header and footer It's gone :
边栏推荐
- VRRP虚拟冗余协议配置
- 模拟实现strstr
- Section 11 of Chapter 1: loop statement while
- 工程师的基本功是什么?如何练习?—学习心得分享「建议收藏」
- Cloudreve-部署一个属于自己的公有云云盘(宝塔安装方法)
- 第一章第十一节:循环语句while
- Custom persistence layer framework myormframework (II) - Framework Design
- 在 Business Application Studio 里使用 SAP UI5 应用消费 OData 的 Create 和 Delete 操作
- 基于CLAR架构打造的宝马i3,并非是简单的“油改电”产品
- Sys_rman备份报错
猜你喜欢
Redis-Set类型
第一章第十节:条件判断 if
Redis list type
在 Business Application Studio 里使用 SAP UI5 应用消费 OData 的 Create 和 Delete 操作
VRRP虚拟冗余协议配置
创建数据快照失败: lock file [/SiYuan/data/assets/image- 20220702163332-jijwccs.png failed: open /SiYuan/data/assets/image- 20220702163332-jijwccs.png: permission denied; unable to lock file
Redis sortset type
Industrial control safety PLC firmware reverse I
Section 11 of Chapter 1: loop statement while
Winform中实现窗体控件适配(自适应窗体)布局_通过C#代码方式
随机推荐
Sys_ RMAN backup error
NIO基础之三大组件
node卸载
Abstraction of operational expressions
“問天號”已就比特!喻京川2013年暢想的《中國空間站》,即將啟航星辰大海!...
基于二维声子晶体的体声波谐振器仿真分析
10 GHz室内无线体域网无线信道测量与建模
爱普生发票打印机 每次连续打印发票,都跳页,中间一张空白
从源码角度看JedisPoolConfig参数配置
第一章第九节:最简单的用户交互
Section 4 of Chapter 1: pychar installation
Exchange 2010 SSL证书安装文档
LeetCode简单题之重排字符形成目标字符串
Custom persistence layer framework myormframework (II) - Framework Design
Redis set type
Jenkins首次安装选择推荐插件时出现“: No such plugin: cloudbees-folder” 解决方案
Sys_rman备份报错
What are the types of personal financial products in 2022?
Flink实战:消费Wikipedia实时消息
【云驻共创】全场景软件开发生产线,端到端提效,全链路安全