1 table-group组件:
<label class="btnBar" style="position: relative ;" ng-if="$ctrl.exportBtn">
<button class="btn btn-warning" style="margin-top:-10px;margin-bottom: 6px" ng-click="$ctrl.exportSum()"><span
class="glyphicon glyphicon-cloud-download" style="right: 4px"></span>导出
</button>
</label>
ctrl=this;
ctrl.exportSum=function () {
ctrl.onExport({deviceNo: deviceNo});
}
bindings: {
exportBtn:'<', // 代表输入属性
onDetail: '&', // 代表输出属性
onExport: '&',
}
2 其他组件
<table-group
export-btn="true"
on-export="$ctrl.export(deviceNo)"
></table-group>
var vm = this;
vm.export = function (params) {
console.log("---------导出", params);
}