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

Getting a warning when passing multiple @keyup.x handlers on n-input #5101

Closed
shaniqwa-drm opened this issue Jul 25, 2023 · 0 comments · Fixed by #5118
Closed

Getting a warning when passing multiple @keyup.x handlers on n-input #5101

shaniqwa-drm opened this issue Jul 25, 2023 · 0 comments · Fixed by #5118
Labels
untriaged need to sort

Comments

@shaniqwa-drm
Copy link
Contributor

TuSimple/naive-ui version (版本)

2.34.2

Vue version (Vue 版本)

3.3.4

Browser and its version (浏览器及其版本)

Chrome(114.0.5735.198)

System and its version (系统及其版本)

MacOS(12.6.7)

Node version (Node 版本)

v19.5.0

Reappearance link (重现链接)

https://codesandbox.io/p/sandbox/distracted-mclean-rtd5kl

Reappearance steps (重现步骤)

add n-input element with more then one @keyup handler, for example:

<n-input
    @keyup.enter="handleInput"
    @keyup.up="handleUpKey"
    @keyup.down="handleDownKey"
  />

Expected results (期望的结果)

No warning should appear in console.

Actual results (实际的结果)

Getting this warning multiple times, each time the event triggers:
[Vue warn]: Invalid prop: type check failed for prop "onKeyup". Expected Function, got Array

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Jul 25, 2023
jizai1125 added a commit to jizai1125/naive-ui that referenced this issue Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant