1
我在我的MEAN應用程序中使用PrimeNG 4.2.0。 代碼片段如下:PrimeNG p-dataTable響應斷點
<div class="ui-g-12" *ngIf="orders">
<p-dataTable
[value]="orders"
[responsive]="true"
selectionMode="single"
[(selection)]="selectedOrder"
(onRowDblclick)="onRowSelect($event)"
styleClass="ordersTable"
>
<p-column header="Date" [style]="{'width':'15%'}">
<ng-template let-col let-order="rowData" pTemplate='body'>
<span>{{order.orderDate | date:'shortDate'}}</span>
</ng-template>
</p-column>
<p-column field="orderNumber" header="ID" [style]="{'width':'15%'}" [filter]="true"></p-column>
<p-column field="userId" header="Client ID" [style]="{'width':'20%'}"></p-column>
<p-column header="No. of Products" [style]="{'width':'12%'}">
<ng-template pTemplate="body" let-col let-order="rowData">
<span>{{order.orderDetails.length}}</span>
</ng-template>
</p-column>
...
<p-footer *ngIf="orders">
Total orders: {{orders.length}}
</p-footer>
</p-dataTable>
</div> <!--Orders DATA Ends-->
有沒有辦法來設置DataTable的響應斷點?因爲寬度上的當前結果:667(iPhone 6橫向模式)非常可怕。