如何使用 html body 设置表格行高
P粉436052364
P粉436052364 2024-01-29 12:53:58
0
1
498

`

 <colgroup>
                  <col span="1" style="width: 50%;">
                  <col span="2" style="width: 50%;">
                </colgroup>
                <tr class="others-row">
                  <td class="traverse table-td-height">
                    <p class="others-type">Feature</p>
                  </td>
                  <td class="other-c-table-td table-td-height">
                    <mat-form-field appearance="none">
                      <ng-container *ngIf="!row.reviewed && 
                              !testThreatSource(row.threatSource)">
                        <mat-select [(ngModel)]="row.fromFeature" 
                               (ngModelChange)="onFeatureChange(row)">
                          <mat-option *ngFor="let selected of featureList.name; trackBy: 
                                   trackByFeature"
                            [value]="selected">
                            {{selected}}
                          </mat-option>
                        </mat-select>
                      </ng-container>
                      <ng-container *ngIf="row.reviewed || 
                             testThreatSource(row.threatSource)">
                        <textarea matInput [ngModel]="row.fromFeature" [readonly]="true" 
                               cdkTextareaAutosize
                          #autosize="cdkTextareaAutosize" cdkAutosizeMinRows="1"
                          cdkAutosizeMaxRows="2"></textarea>
                      </ng-container>
                    </mat-form-field>
                  </td> </tr> 

`这是图像我想修复 tr 大小如果我在 tr 内得到多行而不展开 tr 高度调整相同的表行。在下图中,您可以看到由于第一行中有多行,我的行变得不合适

特点

{{已选择}}

P粉436052364
P粉436052364

全部回复(1)
P粉348915572

请提供更多信息以明确您的要求。

要获取角度元素,您可以使用 @ViewChild。查看文档。 https://angular.io/api/core/ViewChild

要直接操作 ts 文件中的元素,您可以使用 Renderer2。 https://angular.io/api/core/Renderer2

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板