我正在了解 ngtable
。只是一个问题,我怎样才能使列固定宽度?在此示例中,转到下一页时,帐户和顾问列的宽度可变。
这是html:
<table ng-table="tableParams" template-pagination="custom/pager" class="table">
<tr ng-repeat="account in $data | filter:accountName | filter:key" class="orders tablerow">
<td data-title="'ID'" sortable="'account.accountId.key'">
{{account.account.accountId.key}}
</td>
<td data-title="'Account'" sortable="'account.accountName'">
{{account.account.accountName}}
</td>
<td data-title="'Adviser'" sortable="'account.adviser.key'">
{{account.account.adviser.key}}
</td>
<td data-title="'Product'" sortable="'account.productName'">
{{account.account.productName}}
</td>
<td data-title="'Status'" sortable="'minOpenOrderState'">
{{account.minOpenOrderState}}
</td>
</tr>
</table>
Plunkr:http://plnkr.co/edit/vPQeVx?p=info
最佳答案
只需为“td”添加css
td{
width:20%;
float:left;
word-wrap:break-word;
}
关于angularjs - 如何使用ngtable获得固定的列宽?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31800900/