mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-15 05:36:39 +00:00
922 B
922 B
title, sidebar_position, tags
| title | sidebar_position | tags | |
|---|---|---|---|
| 点击事件如何添加参数 | 3 |
|
背景:
方式 1
参考 fusion protable,将操作列直接耦合 button 组件,因为 col.render 函数能拿到 行数据 record,那么 pro-table 组件封装的时候,就可以在渲染操作列按钮的时候,将 col.render 参数透传给 button 组件
方式 2
slot + 扩展参数
将扩展参数写成:
{
record: this.record,
index: this.index
}
那事件处理函数的第二个参数即可得到:
onClick_new_new(...args){
console.log(args)
}

