【发布时间】:2019-10-03 14:10:03
【问题描述】:
这是它的 html 定义:
<div class="card card">
<div class="header">
<div class="typo-line">
<h4>Suivi des approbations</h4>
</div>
<!-- <h4 class="title">Table on Plain Background</h4> -->
<!-- <p class="category">Here is a subtitle for this table</p> -->
</div>
<div class="content table-responsive table-full-width">
<table class="table table-hover">
<thead>
<tr>
<th *ngFor="let cell of tableData2.headerRow">{{ cell }}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let row of tableData2.dataRows">
<td *ngFor="let cell of row">{{ cell }}</td>
</tr>
</tbody>
</table>
</div>
</div>
这是其相关的打字稿代码:
ngOnInit(){
this.tableData2 = {
headerRow: [ 'Version', 'Approbateur(nom+fonction)', 'Principales remarques', 'Date d\'approbation'],
dataRows: [
['', '', '', ''],
['', '', '', ''],
['', '', '', ''],
['', '', '', ''],
['', '', '', ''],
['', '', '', ''],
['', '', '', ''],
]
};
行不可编辑。所以这是我的问题:
1/ 为什么不能从用户端编辑行?
2/ 我怎样才能使它们可编辑?我必须使用表格吗?
谢谢!
【问题讨论】:
标签: angular html css bootstrap-4