[英]Allocating full width for the one step in the Angular Material stepper
對於我的項目,我正在使用 Angular Material Stepper 組件,因為它是在文檔中建議的
但是當我運行步進器時,文本區域(第一步)的實際寬度對於我的任務(紅色矩形)來說太小了。 是否可以將步進器中的步進寬度擴展到最大尺寸(綠色矩形)。
第一步文本區域的標記如下所示:
<mat-step [stepControl]="firstFormGroup">
<form [formGroup]="firstFormGroup">
<ng-template matStepLabel>Raw text</ng-template>
<mat-form-field appearance="outline">
<mat-label>Input raw text here</mat-label>
<textarea
matInput
rows="15"
placeholder="Raw text"
required
[(ngModel)]="sourceText"
></textarea>
</mat-form-field>
<div>
<button mat-button matStepperNext>Next</button>
</div>
</form>
</mat-step>
我試過使用 css 代碼,因為這里建議:
::ng-deep .mat-horizontal-stepper-content[aria-expanded="false"] {
width: 0px !important;
}
但是沒有效果。
簡歷:有沒有辦法將紅色方塊(如上圖所示)中的文本區域擴展到綠色方塊的寬度?
<mat-form-field appearance="outline" class='w100'>
<mat-label>Input raw text here</mat-label>
<textarea
matInput
rows="15"
placeholder="Raw text"
required
[(ngModel)]="sourceText"
></textarea>
</mat-form-field>
在 CSS 中
.w100{
width : 100%;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.