use*_*624 7 angular-material angular
我正在使用有角度的材料垫选择组件。
<mat-table [dataSource]="dataSource" class="mat-elevation-z8" matSort >
<ng-container matColumnDef="sensitive">
<mat-header-cell class="table-header header-p" *matHeaderCellDef> <b>sensitive</b> </mat-header-cell>
<mat-cell class="table-content context-position " *matCellDef="let element" >
<mat-select placeholder="sensitive" multiple [(ngModel)]="element.sensitive" >
<mat-option *ngFor="let type of sensitiveList" [value]="type">{{type}}</mat-option>
</mat-select>
</mat-cell>
</ng-container>
<mat-header-row class="table-header-row" *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row [ngClass]="((i%2) == 1) ? 'table-content-row-single' : 'table-content-row-double'" *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
Run Code Online (Sandbox Code Playgroud)
打字稿敏感列表:字符串[] = ['无','敏感']; 为(变量我= 0;我
为什么运行代码会给我一个错误
Value must be an array in multiple-selection mode
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28836 次 |
| 最近记录: |