学无先后,达者为师

网站首页 编程语言 正文

element table表格里的多选按钮,根据条件判断是否可以被选中

作者:沉、睡 更新时间: 2022-01-30 编程语言

element table表格里的多选按钮,根据条件判断是否可以被选中

<el-table v-loading="loading" :data="contentList" border style="width: 100%" @selection-change="handleSelectionChange" >
<template slot-scope="scope">
    <el-table-column type="selection" width="55" style="" :selectable="selectInit(scope)"> </el-table-column>
</template>
</el-table>

<script>
methods: {
//已提交验证
selectInit(row,index){
    console.log(row)
    if(row.flowStatus=="已提交"){
        return false  //不可勾选
    }else{
        return true  //可勾选
    }
},
}
</script>

原文链接:https://blog.csdn.net/zz975896590/article/details/119991185

栏目分类
最近更新