第一步给表格添加ref属性
<el-table
ref="table"
:data="examList"
border
height="80vh"
style="width: 100%"
>
第二步·:触发函数
函数名:() {
console.log(this.$refs.table.selection)//此时打印出来的就是被选中的所有列的数组集合
}
第一步给表格添加ref属性
<el-table
ref="table"
:data="examList"
border
height="80vh"
style="width: 100%"
>
第二步·:触发函数
函数名:() {
console.log(this.$refs.table.selection)//此时打印出来的就是被选中的所有列的数组集合
}