New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何向FormPreview组件buttons中的onButtonClick事件传参呢 #1123
Comments
不知道你想实现什么,具体说明下吧。 |
假如我有这样一个使用情景:我有个订单列表,展示形式是FormPreview,当我点击FormPreview的button的时候跳转到相应订单的详情页面,这样的话,我就需要在点击的时候传递给onButtonClick回调函数一个参数ID,但是目前咱们的这个组件是不支持传参的,我现在目前为了满足业务只能是在源码中加了一个props,用来接收这个ID参数 |
我也遇到这个问题,有点不灵活 |
可以绑定name属性的值。 |
传参数的话用 计算属性返回闭包函数其实更简单,有没有办法可以替代按钮的点击时间,自己写一些逻辑 |
在form-preview中绑定name值,然后在button数组中调用:onButtonClick: (name) => {} |
2.1.0
Android and iOS
Expected behavior and actual behavior.
如何向FormPreview组件buttons中的onButtonClick事件传参呢
Steps to reproduce the problem
The text was updated successfully, but these errors were encountered: