<el-table
ref="multipleTable"
@select="pickAddressSelect"
:data="pickAddressList"
height="450"
:header-cell-class-name="headerCellClassName"
>
</el-table>
pickAddressSelect (selection, row) {
console.log(row)
if (this.rowAddress && this.rowAddress.id === row.id) {
this.$refs.multipleTable.clearSelection()
this.rowAddress = null
return
}
this.$refs.multipleTable.clearSelection()
this.$refs.multipleTable.toggleRowSelection(row)
this.rowAddress = row
},
headerCellClassName ({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
return 'seltAllbtnDis'
}
}
<style lang="scss" scoped>
::v-deep .seltAllbtnDis .cell {
visibility: hidden;
}
</style>
el-table中的type=“selection“ 不显示全选并实现单选
最新推荐文章于 2025-05-13 19:12:00 发布