代码之家  ›  专栏  ›  技术社区  ›  Sumchans

垫扩展板拆卸边框

  •  0
  • Sumchans  · 技术社区  · 6 年前

    我有一个mat数据表,以mat扩展面板作为列。出于某种原因,在某些行的垫子扩展面板周围有一个边界,我该如何摆脱它。当用户悬停鼠标时,展开面板展开,当鼠标离开时,展开面板折叠。这些行所拥有的数据,与无边框的数据一样。在这张图片中,注释列在mat单元中有mat扩展面板。 enter image description here

     <mat-cell *matCellDef="let workOrder">
                        <mat-expansion-panel class="" _ngcontent-c0="" ng-reflect-hide-toggle="true" #panel *ngIf="workOrder.notes !== ''" hideToggle="true"
                            (mouseenter)="panel.open()" (mouseleave)="panel.close()">
                            <mat-expansion-panel-header>
                                <mat-panel-title style="justify-content: center">
                                    <mat-icon style="color:#8fbbdf;">notes</mat-icon>
                                </mat-panel-title>
                            </mat-expansion-panel-header>
                            <mat-panel-description>
                                {{ workOrder.notes }}
                            </mat-panel-description>
                        </mat-expansion-panel>
                    </mat-cell>
    
    3 回复  |  直到 5 年前
        1
  •  0
  •   JoelBonetR    6 年前

    问题似乎在扩展面板标签上。如果我删除它的所有类,边界就会消失,所以它可能是某个类的“问题”,或者是多个类的组合。

    <mat-expansion-panel _ngcontent-c0="" class="mat-expansion-panel ng-tns-c3-1 ng-star-inserted" hidetoggle="true" ng-reflect-hide-toggle="true">
    

    收件人:

    <mat-expansion-panel _ngcontent-c0="" class="" hidetoggle="true" ng-reflect-hide-toggle="true">
    

    第一 元素,这就是结果(我认为是理想的结果): enter image description here

    扩展时工作正常: enter image description here

        2
  •  0
  •   salmore    6 年前

    我也有一个类似的问题,我通过设置 background-color mat-expansion-panel 与其他内容的背景色相同。在我的情况下,我把它设置为 white

    您无法在devtools中检查它的原因是,它不是真正的border元素,但由于其大小相似,因此它的外观是border元素。

        3
  •  -1
  •   Srinivas K    6 年前

    推荐文章