我有一个 mat-data-table,其中 mat-expansion-panel 作为一列。出于某种原因,在某些行上,垫扩展面板周围有边框,我该如何摆脱它。当用户悬停鼠标时,扩展面板展开,当鼠标离开时,它会折叠。这些行拥有的数据,与没有边界的行一样。在这张图片中,它的注释栏在垫子单元格内有垫子扩展面板。
<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>
最佳答案
问题似乎出在 mat-expansion-panel 标签上。如果我删除它的所有类别,边框就会消失,因此它可能是某些类别或多个类别的组合的“问题”。 我从:
<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">
关于html - 垫扩展面板删除边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50458540/