我是靠谱客的博主 勤恳小兔子,这篇文章主要介绍el-table 二个按钮显示与隐藏,现在分享给大家,希望可以做个参考。

查询数据方法里:

 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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部