欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

SAP Spartacus 懒加载 Customized CMS Component 的问题

发布时间:2023/12/19 编程问答 50 豆豆
生活随笔 收集整理的这篇文章主要介绍了 SAP Spartacus 懒加载 Customized CMS Component 的问题 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

Lazy-loaded overriden or custom CMS Components

SAP Spartacus 有两种 lazy load 方式:

  • CMS-driven lazy loading of feature modules",as explained here
  • 以 feature module 的方式加载。

    2.以 Component 为粒度进行加载: lazy loading of separate components (using component: () => import())

    前者更优。

    Using component: () => import() will lazy load only component code (no module, unless defined in the same file)

    上述语法只能懒加载单个的 Component.

    • is it possible to lazy-load components which we have overriden, for example BannerComponent, SearchBoxComponent…?

    答案:yes. 这里可以看到更多明细。

    • is it possible to apply lazy-load on custom CMS components ?
      答案:yes.

    总结

    以上是生活随笔为你收集整理的SAP Spartacus 懒加载 Customized CMS Component 的问题的全部内容,希望文章能够帮你解决所遇到的问题。

    如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。