美文网首页SAP
SAP Spartacus B2B功能,只渲染BodyConte

SAP Spartacus B2B功能,只渲染BodyConte

作者: _扫地僧_ | 来源:发表于2021-03-21 11:52 被阅读0次

    将page slot html的源代码做如下修改:

    <ng-template
      [cxOutlet]="position"
      [cxOutletContext]="{ components$: components$ }"
    >
      <ng-template
        *ngFor="let component of components"
        [cxOutlet]="component.flexType"
        [cxOutletContext]="{ component: component }"
        [cxOutletDefer]="getComponentDeferOptions(component.flexType)"
        (loaded)="isLoaded($event)"
      >
    
        <ng-container *ngIf='position === "BodyContent"'[cxComponentWrapper]="component">
          <div>
            {{ component | json }}
          </div>
        </ng-container>
      </ng-template>
    </ng-template>
    
    { "uid": "BudgetsHomeLink", "typeCode": "BannerComponent", "flexType": "BannerComponent" }
    
    { "uid": "CostCentersHomeLink", "typeCode": "BannerComponent", "flexType": "BannerComponent" }
    
    { "uid": "UnitsHomeLink", "typeCode": "BannerComponent", "flexType": "BannerComponent" }
    
    { "uid": "UsersHomeLink", "typeCode": "BannerComponent", "flexType": "BannerComponent" }
    
    { "uid": "UserGroupsHomeLink", "typeCode": "BannerComponent", "flexType": "BannerComponent" }
    
    { "uid": "PurchaseLimitsHomeLink", "typeCode": "BannerComponent", "flexType": "BannerComponent" }、
    

    Banner里包含了Budget,unit,costcenter等等。

    更多Jerry的原创文章,尽在:"汪子熙":


    相关文章

      网友评论

        本文标题:SAP Spartacus B2B功能,只渲染BodyConte

        本文链接:https://www.haomeiwen.com/subject/xmangktx.html