angular - Angular 4 渲染子选择器将列对齐中断到我的表中
问题描述
我在我的应用程序中使用了 angular 4,但我遇到了角度选择器的问题。我有一个带有行子的组件表。孩子的选择器名称是“行”。我从表格组件中调用它,如下所示:
<table class="table table--striped">
<thead class="thead--dark">
<tr>
<th>Data versamento</th>
<th>Importo</th>
<th>ABI</th>
<th>CAB</th>
<th></th>
</tr>
</thead>
<tbody class="form--light">
<row [data]="item" *ngFor="let item of enpals_payments"></row>
</tbody>
</table>
将子选择器打印到 html 表中,它会破坏列对齐。
如何强制跳过行选择器渲染?
解决方案
您可以使用colspan
<tbody class="form--light">
<tr>
<td colspan="5">
<row [data]="item" *ngFor="let item of enpals_payments"></row>
</td>
</tr>
</tbody>
推荐阅读
- python - 变量值在单元测试中的函数调用后持续存在
- python - 创建与现有数据集具有相似特征的时间序列数据集
- html - 将引导文本粘贴到左侧
- javascript - 未捕获的错误:无效的挂钩调用。Hooks 只能在函数组件的主体内部调用 - 错误仅在 Electron 中显示
- amazon-timestream - 您如何字符串操作来自时间流的返回结果?
- javascript - Reactjs onClick
- reactjs - 如何播放从烧瓶 send_file 发送的音频文件?
- algorithm - 难以思考分而治之的方法
- c - gem5 系统调用查看陷阱指令
- mysql - 损坏的 mysqld 包阻止在 ubuntu 中进行任何其他安装