我正在考虑ngtable.只有一个问题,我怎样才能使列固定宽度?在此示例中,帐户和顾问列在转到下一页时具有可变宽度.
这是html:
这是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>
解决方法
只需为“td”添加css
td{ width:20%; float:left; word-wrap:break-word; }