Component's props
doesn't validate a property with required
& default
specified correctly
#3365
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
🐞 bug
Something isn't working
Version
3.0.7
Reproduction link
Steps to reproduce
prop
in a component, withrequired: true
anddefault
value set.What is expected?
This component can access the pre-defined
default
value, but get a runtime warning message in console.What is actually happening?
This component can access the pre-defined
default
value, and without any warning or log in console.The expected behavior is referenced from Vue 2.x.
I don't sure whether Vue 3.x has changed its specification on this, but I think the behavior of Vue2.x is indeed more reasonable as a validator for developer.
The text was updated successfully, but these errors were encountered: