Skip to content

一些组件(例如select组件onChange/onSearch)传递props绑定事件时使用时报警告[warning] Expected Function, got Array, 导致后续触发事件时报错, 因为组件内部props事件传递给子组件时将function处理成Array了 #7818

@Hmap-Mr

Description

@Hmap-Mr
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.3

Environment

分支标签4.2.3 直接下载download.zip

Reproduction link

https://github.com/vueComponent/ant-design-vue.git

Steps to reproduce

一些组件传递props绑定事件时使用时报警告[warning] Expected Function, got Array, 导致后续触发事件时报错, 因为组件内部props事件传递给子组件时将function处理成Array了, 相关组件包含但可能不限于(select: onChange/onSearch, modal: onClose, )等。复现步骤直接使用Select组件 绑定@change事件后会报警告,触发时对应事件时会报错

What is expected?

修复此bug, 事件传递处理时正确传递事件, 而不是数组

What is actually happening?

线上生产版本不会有此类情况


bug修复后, 希望可以回复一下此条提问

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions