Subscribe on changes!

Prop type conversion fails on Custom Element with camelCase prop name

avatar
Feb 8th 2022

Version

3.2.30

Reproduction link

stackblitz.com

Steps to reproduce

Click the button to increment the page number

What is expected?

No type check warnings should appear in the console

What is actually happening?

[Vue warn]: Invalid prop: type check failed for prop "pageNumber". Expected Number with value 1, got String with value "1".


I think the key chould be camelized before checking _numberProps here: https://github.com/vuejs/core/blob/9c304bfe7942a20264235865b4bb5f6e53fdee0d/packages/runtime-dom/src/apiCustomElement.ts#L269-L275