Skip to content

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

@Mrchensama

Description

@Mrchensama

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions