html - 垫扩展面板删除边框

标签 html angular css angular-material

我有一个 mat-data-table,其中 mat-expansion-panel 作为一列。出于某种原因,在某些行上,垫扩展面板周围有边框,我该如何摆脱它。当用户悬停鼠标时,扩展面板展开,当鼠标离开时,它会折叠。这些行拥有的数据,与没有边界的行一样。在这张图片中,它的注释栏在垫子单元格内有垫子扩展面板。 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>

最佳答案

问题似乎出在 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">

first 元素上,这是结果(我认为是期望的结果): enter image description here

扩展时也能正常工作: enter image description here 希望对你有帮助

关于html - 垫扩展面板删除边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50458540/

相关文章:

javascript - 使用头像设置单个 Twitter 提要的样式

Angular 8 | primeng/fullcalendar 根据事件类型(循环事件)、单元格 bg-color 设置不同的样式

CSS textarea 不会隐藏在 Firefox 12 中,但它适用于 IE9 和 Chrome

html - 围绕多行 float div 的 CSS 收缩以适合容器 div

html - 在 div 的一侧显示一个 ul 列表元素符号

javascript - 在标签标签中的 2 个文本字段之间添加数据而不更改其位置

javascript - 将参数传递给自定义 Kendo UI 通知组件

angular - 为什么 angular-cli 会创建 component/shared/index.ts?

css - 伪类 :active not applying

javascript - jQuery Fullpage - 在菜单上用水平线显示当前部分位置