实验版本为:Element2.13.1
‘’this.$refs.multipleTable.selection‘获取表格选中行信息 :
<el-button type=”primary” @click=”getSelection”>获取</el-button>
<el-table :data=”tableData” ref=”multipleTable” border>
<el-table-column type=”selection” width=”55″></el-table-column>
<el-table-column prop=”date” label=”日期” width=”180″></el-table-column>
<el-table-column prop=”name” label=”姓名” width=”180″></el-table-column>
<el-table-column prop=”address” label=”地址” width=”300″></el-table-column>
</el-table>
methods: {
getSelection() {
const _selectData = this.$refs.multipleTable.selection;
console.log(_selectData);
}
}
————————————————
版权声明:本文为CSDN博主「duansamve」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/duansamve/article/details/105900195