Skip to content
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

Open
Mrchensama opened this issue Jul 10, 2019 · 4 comments
Open

反馈:mip-toast组件实现代码存在问题 #671

Mrchensama opened this issue Jul 10, 2019 · 4 comments
Assignees

Comments

@Mrchensama
Copy link

组件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() }

@Mrchensama Mrchensama changed the title 反馈:docs/contribute/development/component-syntax.md 反馈:mip-toast组件实现代码存在问题 Jul 10, 2019
@Brunoon
Copy link
Contributor

Brunoon commented Jul 15, 2019

感谢您的反馈,会在周四上线修复

@Brunoon Brunoon transferred this issue from mipengine/mip2 Jul 18, 2019
@Brunoon
Copy link
Contributor

Brunoon commented Jul 19, 2019

该方法还需要讨论如何修复,预计下周可以上线

@Mrchensama
Copy link
Author

@Mrchensama
Copy link
Author

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants