vue 引用element的table

vue 引用element的table,怎么给table的每一行添加点击事件?(vue小白求大神指点)

<template>
  <div>
    <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
          @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55"></el-table-column>
      <el-table-column label="昵称" width="120">
    <template slot-scope="scope">{{ scope.row.NickName }}</template>
      </el-table-column>
      <el-table-column prop="Province" label="省份" width="120"></el-table-column>
      <el-table-column prop="City" label="地址" show-overflow-tooltip></el-table-column>
    </el-table>
  </div>
</template>

插件的table只有表头,在哪里给每一行添加click事件?
就是这个tr

clipboard.png

阅读 2.6k
2 个回答

row-click 文档上有

element-ui的table自带row-click事件

详见文档

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题