简体   繁体   English

为角材料步进器中的一步分配全宽

[英]Allocating full width for the one step in the Angular Material stepper

For my project I am using Angular Material Stepper component as it is advised in docs对于我的项目,我正在使用 Angular Material Stepper 组件,因为它是在文档中建议的

But when I run the stepper, the actual width of the text area (first step) is too small for my task (red rectangle).但是当我运行步进器时,文本区域(第一步)的实际宽度对于我的任务(红色矩形)来说太小了。 Is it possible to extend width of a step in the stepper to maximum size (green rectangle).是否可以将步进器中的步进宽度扩展到最大尺寸(绿色矩形)。

角度步进器的示例图像

Markup for the first step text-area looks like that:第一步文本区域的标记如下所示:

<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>

I've tried using css code as it is advised here :我试过使用 css 代码,因为这里建议

::ng-deep .mat-horizontal-stepper-content[aria-expanded="false"] {
  width: 0px !important;
}

But without effect.但是没有效果。

Resume: Is there a way to extend text area in the red square (shown on the picture above) to the width of the green square?简历:有没有办法将红色方块(如上图所示)中的文本区域扩展到绿色方块的宽度?

 <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>

in CSS在 CSS 中

.w100{
width : 100%;

}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM