.vue
<el-table
ref="table"
:data="tableData"
height="100%"
border
stripe
@selection-change="handleSelectionChange"
@select="dialogCheck"
style="width: 100%">
<el-table-column align="center" type="selection" width="50"></el-table-column>
data(){
return{
selectioned:'',
}
}
methods:{
dialogCheck: function(selection, row) {
this.$refs.table.clearSelection()
if (selection.length === 0) {
return
}
if (row) {
this.selectioned = row
this.$refs.table.toggleRowSelection(row, true)
}
},
}
css:
/deep/ .has-gutter{
.el-checkbox{
display: none;
}
}