默认情况下,当您单击关闭抽屉时,它会关闭,但我只希望它在用户单击抽屉中的取消或保存按钮时关闭。
<mat-drawer #drawer mode="over" position="end" class="edit-drawer" disableClose="false" [opened]="false" closedStart="matDrawerClosedStart($event)">
<app-vendor-edit *ngIf="selectedVendor" [vendor]="selectedVendor" (save)="saveVendor($event)"
(cancel)="closeDrawer()" (delete)="deleteVendor($event)">
</app-vendor-edit>
</mat-drawer>
你说得对。disableClose=true有效的