<el-table ref="table" v-loading="listLoading" :data="tableData" border :row-key="getRow" stripe :height="tableHeight" :header-cell-style="{'background':'#F5F4F7'}" @selection-change="handleCurrentChange" > <el-table-column type="selection" width="50" align="center" fixed="left" :resizable="false" /> <el-table-column type="index" label="序号" width="60" fixed="left" :index="indexMethod" align="center" /> <el-table-column prop="strdate" label="单据日期" min-width="160" /> </el-table> methods: { handleCurrentChange(val) { this.currentRow = val this.tableData.forEach(item => { if (val[val.length - 1] === item) { this.$refs.table.toggleRowSelection(item, true) } else { this.$refs.table.toggleRowSelection(item, false) } }) }, }