1.编写表单

 <el-table-column type="selection" :reserve-selection="true" v-if="updateShow" fixed="left" :width="100"></el-table-column>

    <el-table-column reset="桩复位" label="桩复位" fixed="right" :width="100" v-if="resetShow">
      <template slot-scope="scope">
        <el-button class="reset" @click="inreset(scope.row)">复位</el-button>
      </template>
    </el-table-column>

2.el-table 上添加事件

<el-table ref="multipleTable" :row-key="(row)=>{ return row.id}" tooltip-effect="dark" @selection-change="handleSelectionChange"  border style="width: 100%">
          <myTable :tableKey="tableKey" :width="width" :update-show="true"></myTable>//这是内容
</el-table>

3.如果想清楚集合使用

this.$refs.multipleTable.clearSelection();

棘丶
12 声望1 粉丝