-
Notifications
You must be signed in to change notification settings - Fork 100
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
反馈:mip-toast组件实现代码存在问题 #671
Comments
Mrchensama
changed the title
反馈:docs/contribute/development/component-syntax.md
反馈:mip-toast组件实现代码存在问题
Jul 10, 2019
感谢您的反馈,会在周四上线修复 |
该方法还需要讨论如何修复,预计下周可以上线 |
@Brunoon 你好 请问 该issue中提及的mip-toast组件中参数列表不匹配,info参数实际接收为event参数的值,导致带参数调用时,无法正确判断info类型,始终显示info-text的初始值的问题。为什么在issue#672中解决后,又在issue#673中重新更改为错误版本。目前我们项目中已经无法正常使用。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
组件mip-toast的js实现代码中,handleShow方法的参数错误,当前为handleShow (info),遗漏了事件对象参数event,导致info形参实际接收的是event对象参数,外部传入参数遗漏,应修改为handleShow (event,info)。
目前版本该组件无法正确获取组件上的属性info-text 来动态修改提示内容。
修改前方法代码
handleShow (info) { const {infoText} = this.props this.close = true if (typeof info === 'string') { this.showToastText = info } else { this.showToastText = infoText } this.update() }
修改后方法代码
handleShow (event,info) { const {infoText} = this.props this.close = true if (typeof info === 'string') { this.showToastText = info } else { this.showToastText = infoText } this.update() }
The text was updated successfully, but these errors were encountered: