1 <template>
2 <el-table
3 :data="tableData"
4 stripe
5 @row-click="handdle"
6 style="width: 100%">
7 <el-table-column
8 prop="date"
9 label="日期"
10 width="180">
11 </el-table-column>
12 </el-table>
13 </template>
14
15 <script>
16 export default {
17 data() {
18 return {
19 tableData: []
20 }
21 },
22 methods: {
23 handle(row, event, column) {
24 console.log(row, event, column)
25 }
26 }
27 }
28 </script>
点击行就会触发handdle事件,row, event, column参数不需要写在html中,再方法里直接使用就可以了
element UI 的row-click事件如何使用参数?
猜你喜欢
转载自blog.csdn.net/Gochan_Tao/article/details/79606066
今日推荐
周排行