Props named after 'onXXX' are considered as event handler and skipped by mergeProps
Vue version
3.2.47
Link to minimal reproduction
Steps to reproduce
- Comp define prop
onProgressNum
in typenumber
- create vnode of Comp with props
{onProgressNum: 0}
- clone vnode with extra props
{onProgressNum: 0}
, name it ascloned0
- clone vnode with extra props
{onProgressNum: 1}
, name it ascloned1
- prop
onProgressNum
incloned0
was skipped and gotundefined
What is expected?
Do not skip props name after 'onXXX' or print warning to indicate the problem.
What is actually happening?
prop onProgressNum
in cloned0
was skipped and got undefined
System Info
System:
OS: macOS 13.3.1
CPU: (8) x64 Apple M2
Memory: 30.43 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 14.20.0 - ~/.nvm/versions/node/v14.20.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v14.20.0/bin/yarn
npm: 6.14.18 - ~/.nvm/versions/node/v14.20.0/bin/npm
Browsers:
Safari: 16.4
npmPackages:
vue: ^3.2.47 => 3.2.47
Any additional comments?
The issue was probably introduced by this commit which release in 3.2.28
duplicate of https://github.com/vuejs/core/issues/7871