element-ui设置table某些项不可勾选

    技术2022-07-11  100

    selectable仅对 type=selection 的列有效,类型为 Function,Function 的返回值用来决定这一行的 CheckBox 是否可以勾选Function(row, index)—— <el-table-column type="selection" width="55" :selectable='selectInit'></el-table-column> selectInit(row,index){     if(row.onlineState==0){    //判断条件                        return false  //不可勾选      }else{             return true  //可勾选       } }

     

    Processed: 0.009, SQL: 9