美文网首页
SAP Spartacus org unit list当前行is

SAP Spartacus org unit list当前行is

作者: _扫地僧_ | 来源:发表于2021-02-20 11:44 被阅读0次

    在Spartacus _list.scss里有这样的mixin定义:

    is-current-active-selection:

    定义在organization unit list行项目的a标签的class:is-current上

    运行时效果:

    换一种颜色:

    什么时候给这个tr标签分配的is-current class?

     <tr
          *ngFor="let item of data; trackBy: trackData"
          [class.is-current]="isCurrentItem(item)"
          (click)="launchItem(item)"
        >
    

    下面这段代码给tr标签赋上is-current的class:

    最后在platform-browser.js里调用浏览器原生的html元素的classList属性的add方法,添加新的is-current类:

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


    相关文章

      网友评论

          本文标题:SAP Spartacus org unit list当前行is

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