1.仅添加复选框
<el-table-column type="selection" width="55"></el-table-column>
2.添加复选框和文字行号在一列
<el-table-column> <template #header> <el-checkbox v-model="selectAll" @change="handleSelectAll">全选</el-checkbox> </template> <template #default="{$index}"> <el-checkbox v-model="selectedRows"></el-checkbox> <span>{{$index+1}}</span> </template> </el-table-column>
标签:checkbox,复选框,行号,elementplus,vue3,添加 From: https://www.cnblogs.com/junwuxiao/p/17786791.html