如何使用 html body 設定表格行高
P粉436052364
P粉436052364 2024-01-29 12:53:58
0
1
494

`

 <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

#
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板