1. 程式人生 > >element UI 的row-click事件如何使用引數?

element UI 的row-click事件如何使用引數?

 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中,再方法裡直接使用就可以了