-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
函数式组件传参 {参数} 写法报undefind #3675
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
这个写法在函数式组件 1.3.0 还不支持,得升级到 1.3.4 |
cli 更新了吗 |
@yuche 非常感谢 cli 更新到1.3.5 以后就没有报错了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
函数式组件传参时,使用 props 传参,用 props.title 方式可以获取参数 title 的值,但是用 {title} 方法传参时 会报 title is not defind 错误
复现步骤
[复现问题的步骤]
一下是一个简易例子
正常组件
报错组件
组件使用
期望行为
希望可以实现 ({ title, children, cancelTxt, confirmTxt }) 这样的传参方式
报错信息


系统信息
The text was updated successfully, but these errors were encountered: