场景:
projectSelectorOpened
设置为true时,侧面板将隐藏页面内容。
当用户触发内容时,内容会正确滑到中间。还尝试使用setTimeout将变量设置为true ...如果设置为几秒钟,则可以使用。
但这不是我想要的。
以下是相关代码:
<mat-sidenav-container fullscreen>
<mat-sidenav #projectSelector mode="side" [(opened)]="projectSelectorOpened">
<div class="list-group-item" (click)="projectSelectorOpened = !projectSelectorOpened">
<i class="fa fa-arrow-circle-left"></i> {{l10n.get('T_Projects')}}
</div>
<project-selector [selectedProjectId]="projectId" [selectedComponentId]="componentId"></project-selector>
</mat-sidenav>
<mat-sidenav-content>
</mat-sidenav-content>
<mat-sidenav #projectSelector2 mode="side" position="end" [(opened)]="projectSelectorOpened">
<div class="list-group-item" (click)="projectSelectorOpened = !projectSelectorOpened">
<i class="fa fa-arrow-circle-left"></i> {{l10n.get('T_Projects')}}
</div>
<project-selector [selectedProjectId]="projectId"></project-selector>
</mat-sidenav>