[英]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.