【发布时间】:2021-02-25 14:13:53
【问题描述】:
查看嵌套的 Angular Material Stepper,子步进器 (labelPosition="end") 中的标签位置被父步进器 (@987654323) 中的标签位置覆盖 @),如下例所示:
<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>
Here's a Stackblitz 展示了这个问题。有没有办法解决这个问题?
【问题讨论】:
标签: angular angular-material angular-material-stepper