angular通过ngfor遍历出来的button按钮,如何点击一个在他后面出现一个input框,我现在点击一个,所有的input的框都出现
<ng-container matColumnDef="operate">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let row">
<button mat-button (click)="onOpenEdit(row)">编辑</button>
<button mat-button (click)="onDelete(row.id)">删除</button>
<input *ngIf="isShow" [(ngModel)]="row.newsName" name="newsName">
<button *ngIf="isShow">确认</button>
</td>
</ng-container>
点击第一个编辑按钮后
如何点击一个按钮只出现一个,其他的不出现
row应该设置不同的isShow,例如isShow-${row.id},onOpenEdit(row)方法执行的时候只修改当前与当前row相关的isShow-${row.id}值