ng-disabled控制按钮是否可点击
1 <div class="edit-template-column" style="padding-bottom: 15px;" 2 ng-if="!$ctrl.displayMore && $index<0||$ctrl.displayMore"> 3 <span class="margin-right-12">导入设置:</span> 4 <md-checkbox class="no-margin-bottom" aria-label="checked" 5 ng-checked="table.WillUpdate" 6 ng-click="table.WillUpdate=!table.WillUpdate"> 7 <span>导入时是否更新数据</span> 8 </md-checkbox> 9 <md-checkbox class="no-margin-bottom" aria-label="checkbox" 10 ng-checked="table.WillInsert" 11 ng-click="table.WillInsert=!table.WillInsert" 12 ng-disabled="!table.WillUpdate"> 13 <span>导入时是否新增数据</span> 14 </md-checkbox> 15 <md-checkbox class="no-margin-bottom" aria-label="checkbox" 16 ng-checked="table.WillDelete" 17 ng-click="table.WillDelete=!table.WillDelete" 18 ng-disabled="!table.WillUpdate"> 19 <span>导入时是否删除数据</span> 20 </md-checkbox> 21 </div>
未选中时状态:
选中时状态: