ElementPlus组件内置方法传递 内置参数+自定义参数 办法
一、方法原理:
利用;
二、demo演示el-table为例【其余类比】
html :
@row-click="(row, column, event)=>{show(row, column, event,'自定义函数')}"
<el-table
:data="tableData"
style="width: 100%"
@row-click="(row, column, event)=>{show(row, column, event,'自定义函数')}"
>
<el-table-column prop="date" label="Date" sortable width="180" />
<el-table-column prop="name" label="Name" width="180" />
</el-table>
JS 方法定义 :
show(row, column, event,custom) { }
show(row, column, event,custom){
console.log(row,column,event,'内置参数custom',custom) // custom ='自定义函数';
}