查询数据方法里:
for (let i = 0; i <data.length; i++) {
this.$set(data[i],'disShow','true')
this.$set(data[i],'disHide','false')
}
return:{
disShow: '',
disHide: '',
}
js:
this.tableData[index].disHide = 'false';
this.tableData[index].disShow = 'true';
vue:
<el-button v-if="scope.row.type == '1' && scope.row.disHide == 'false'" @click="devicesLock(scope.$index,scope.row,scope.row.batchKey)" type="primary" size="mini" >{{$t("batchJobManagement.perform")}}</el-button>
<el-button v-if="scope.row.type == '1' && scope.row.disShow == 'false'" @click="getExcpetion(scope.$index,scope.row,scope.row.batchKey)" type="primary" size="mini">{{$t("batchJobManagement.update")}}</el-button>
最后
以上就是勤恳小兔子最近收集整理的关于el-table 二个按钮显示与隐藏的全部内容,更多相关el-table内容请搜索靠谱客的其他文章。
发表评论 取消回复