-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
Description
Version
3.2.30
Reproduction link
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:
core/packages/runtime-dom/src/apiCustomElement.ts
Lines 269 to 275 in 9c304bf
protected _setAttr(key: string) { | |
let value = this.getAttribute(key) | |
if (this._numberProps && this._numberProps[key]) { | |
value = toNumber(value) | |
} | |
this._setProp(camelize(key), value, false) | |
} |