Skip to content

When adding the @click event to the button element, the onClick attribute is also defined in the value of v-bind. The operation prompts that onClick needs to accept a Function, but it gets an Array, and the code can run normally. How to remove this warning prompt #6363

@ay-seeing

Description

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

Version

3.2.14

Environment

浏览器环境

Reproduction link

Edit on CodeSandbox

Steps to reproduce

打开控制台就可以看到

What is expected?

希望去掉 [Vue warn]: Invalid prop: type check failed for prop "onClick". Expected Function, got Array 提示

What is actually happening?

代码运行提示warn

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