Angular 单元格合并
在Angular实现表格输出的话,使用ng-repeat输出信息, 使用了:
ng-repeat-start
ng-repeat-end
ng-hide="$first"
1 <tbody> 2 3 <tr data-ng-repeat-start="orderItem in currentPageStores"> 4 <td rowspan="{{orderItem.GOODS.length}}">{{orderItem.NAME}}</td> 5 <td rowspan="{{orderItem.GOODS.length}}">{{orderItem.COMMUNITY_NAME}}</td> 6 <td rowspan="{{orderItem.GOODS.length}}">{{orderItem.BUILDING}}</td> 7 <td rowspan="{{orderItem.GOODS.length}}">{{orderItem.UNIT}}</td> 8 9 <td>{{orderItem.GOODS[0].GOODS_NAME}}</td> 10 <td>{{orderItem.GOODS[0].GOODS_PRICE}}</td> 11 <td>{{orderItem.GOODS[0].COUNT}}</td> 12 <td>{{orderItem.GOODS[0].DICOUNT_PRICE}}</td> 13 14 <td rowspan="{{orderItem.GOODS.length}}" class="td-wx-oper4">{{orderItem.CREDATE_DATE|date:"yyyy-MM-dd HH:mm"}}</td> 15 <td rowspan="{{orderItem.GOODS.length}}">{{orderItem.USER_NAME}}</td> 16 </tr> 17 18 <tr data-ng-repeat-end ng-repeat="goodsItem in orderItem.GOODS" ng-hide="$first"> 19 <td>{{goodsItem.GOODS_NAME}}</td> 20 <td>{{orderItem.GOODS[0].GOODS_PRICE}}</td> 21 <td>{{goodsItem.COUNT}}</td> 22 <td>{{goodsItem.DICOUNT_PRICE}}</td> 23 </tr> 24 25 </tbody>