element-ui表格添加复选框及根据列表中的数据判断是否可选
1、
<el-table :data="tableData" stripe style="width: 100%; text-align: center" @selection-change="handleSelectionChange"> <!-- checkbox选中框 --> <el-table-column type="selection" width="55" :selectable="selectable"></el-table-column> </el-table>
2、
selectable(row, index) { if(row.status == 1){ return true }else { return false } },