我将resize属性添加到了此简单的mat扩展中(取自Material网站)。但是,一旦垂直调整面板的大小并尝试关闭扩展面板,它就会隐藏内容,但不会关闭扩展。你如何解决这个问题。这是堆栈闪电示例:https://stackblitz.com/edit/angular-kywskk?file=styles.css和图片以更好地说明: HTML
<mat-expansion-panel class="re-size" [expanded] = "true">
<mat-expansion-panel-header>
<mat-panel-title>
Personal data
</mat-panel-title>
<mat-panel-description>
Type your name and age
</mat-panel-description>
</mat-expansion-panel-header>
<mat-form-field>
<input matInput placeholder="First name">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Age">
</mat-form-field>
CSS
.re-size{
margin: 15px !important;
resize: both;
overflow: hidden;
}