查看嵌套的 Angular Material Stepper,子 stepper ( labelPosition="end"
)中的标签位置被父 stepper ( ) 中的标签位置覆盖labelPosition="bottom"
,如下例所示:
<mat-horizontal-stepper labelPosition="bottom" linear #stepper>
<mat-step [stepControl]="firstFormGroup" [editable]="isEditable">
<ng-template matStepLabel>ParentLabel</ng-template>
<mat-horizontal-stepper labelPosition="end" linear #stepperChild>
<mat-step [stepControl]="firstFormGroup" [editable]="isEditable">
<form [formGroup]="firstFormGroup">
<ng-template matStepLabel>ChildLabel</ng-template>
<mat-form-field>
<mat-label>Name</mat-label>
<input matInput
formControlName="firstCtrl"
placeholder="Last name, First name"
required
/>
</mat-form-field>
</form>
</mat-step>
</mat-horizontal-stepper>
</mat-step>
</mat-horizontal-stepper>
这是一个展示该问题的 Stackblitz。有没有解决的办法?