【发布时间】:2021-05-03 05:41:51
【问题描述】:
当我点击一个选项是 mat-selction-list 然后它保持突出显示
但是,我想删除突出显示,因为单击此选项会打开一个对话框,并且在关闭对话框时我想让列表恢复正常状态:
知道怎么做吗?
代码:
<mat-selection-list #members
fxLayout="row"
[multiple]="false"
>
<mat-list-option *ngFor="let item of links"
fxFlex="50%"
class="fs-24 mb-10"
>
<a class="fs-24 black" (click)="openDialog(item.key)">
<div fxLayout="column" fxLayoutAlign="center center">
<div class="fs-24 mb-5">{{registrationsAll | countIfInData: 'status' : item.key}}</div>
<div>{{ item.name }}</div>
</div>
</a>
</mat-list-option>
</mat-selection-list>
【问题讨论】:
-
尝试添加背景:对 .mat-list-option:focus css 透明
-
@zainhassan 建议在我删除 :focus 时有效。谢谢!
标签: angular material-design mat-list