GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lowcode-engine/docs/docs/faq/faq003.md at main · li55/lowcode-engine

Expand file tree

/

faq003.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
32 lines (26 loc) · 922 Bytes
/

faq003.md

Copy path

File metadata and controls

32 lines (26 loc) · 922 Bytes
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions
title 点击事件如何添加参数
sidebar_position 3
tags
FAQ

背景:

  • Antd Table 下 button 点击事件怎么拿到行数据?

方式 1

image.png

参考 fusion protable,将操作列直接耦合 button 组件,因为 col.render 函数能拿到 行数据 record,那么 pro-table 组件封装的时候,就可以在渲染操作列按钮的时候,将 col.render 参数透传给 button 组件

方式 2

slot + 扩展参数

image.png

将扩展参数写成:

{
  record: this.record,
  index: this.index
}

那事件处理函数的第二个参数即可得到:

onClick_new_new(...args){
  console.log(args)
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.