字段 | 类型 | 长度 | 含义 |
Id | Bigint | 主键 | |
Spec_name | Varchar | 255 | 规格名称 |
字段 | 类型 | 长度 | 含义 |
Id | Bigint | 主键 | |
Option_name | Varchar | 200 | 规格选项名称 |
Spec_id | Bigint | 30 | 规格 ID |
Orders | Int | 11 | 排序 |
<script type="text/javascript" src="../plugins/angularjs/angular.min.js"> </script>
<script src="../plugins/angularjs/pagination.js"></script>
<link rel="stylesheet" href="../plugins/angularjs/pagination.css">
<script type="text/javascript" src="../js/base_pagination.js"> </script>
<script type="text/javascript" src="../js/service/specificationService.js">
</script>
<script type="text/javascript" src="../js/controller/baseController.js"></script>
<script type="text/javascript" src="../js/controller/specificationController.js">
</script>
<!-- 分 页 -->
<tm-pagination conf="paginationConf"></tm-pagination>
<body class="hold-transition skin-red sidebar-mini"
ng-app="pinyougou" ng-controller="specificationController" >
<tr ng-repeat="entity in list">
<td><input type="checkbox" ></td>
<td>{{entity.id}}</td>
<td>{{entity.specName}}</td>
<td class="text-center">
<button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#editModal">修改</button>
</td>
</tr>
//新增选项行
$scope.addTableRow=function(){
$scope.entity.specificationOptionList.push({});
}
<button type="button" class="btn btn-default" title="新建"
ng-click="addTableRow()"><i class="fa fa-file-o"></i> 新建</button>
<tr ng-repeat="pojo in entity.specificationOptionList">
<td><input type="checkbox"></td>
<td>
<input ng-model="pojo.optionName" class="form-control" placeholder="规格选项">
</td>
<td>
<input ng-model="pojo.orders" class="form-control" placeholder="排序">
</td>
</tr>
< button type="button" class="btn btn-default" title=" 新 建 " data-toggle="modal"
data-target="#editModal" ng-click="entity={'specificationOptionList':[]}"><i class="fa fa-file-o"></i> 新建</button>
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |