概述
查询数据方法里:
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 二个按钮显示与隐藏所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复