element-ui表格中的复选框默认选中状态、禁用状态以及默认选中不可取消状态_表格中el-checkbox默认显示选择-CSDN博客
<el-table ref="multipleTable" :data="tableData3" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55"> </el-table-column> <el-table-column label="日期" width="120"> <template slot-scope="scope">{{ scope.row.date }}</template> </el-table-column> <el-table-column prop="name" label="姓名" width="120"> </el-table-column> <el-table-column prop="address" label="地址" show-overflow-tooltip> </el-table-column> </el-table>
根据后台返回数据的特定字段确定多选框是否选中
SelectionChange() { this.$nextTick(() => { let table = this.tableData3; // 从后台获取到的数据 table.forEach(row => { if (row.SIGN_STAT == "已签署") this.$refs.multipleTable.toggleRowSelection(row, true); }); }); },
标签:状态,表格,默认,复选框,选中,row From: https://www.cnblogs.com/tingorb/p/18297954