-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Prop with required: false
or default value should not trigger prop validation error when not provided
#2141
Comments
|
This was referenced Aug 14, 2020
When no component prop in template: // case 1 -> warning
props: [foo, bar]
// case 2 -> warning
props: {
foo: String,
bar: String,
}
// case 3 -> error
props: {
foo: {
type: String,
required: true
}
}
// case 4 -> No any errors or warning
props: {
foo: {
type: String,
required: false
},
bar: {
type: String,
default: ''
}
} |
yoyo930021
added a commit
to yoyo930021/vuter
that referenced
this issue
Aug 31, 2020
yoyo930021
added a commit
to yoyo930021/vuter
that referenced
this issue
Aug 31, 2020
Merged
octref
added a commit
that referenced
this issue
Sep 3, 2020
cereschen
pushed a commit
to cereschen/vetur
that referenced
this issue
Sep 10, 2020
cereschen
pushed a commit
to cereschen/vetur
that referenced
this issue
Sep 10, 2020
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From #2135 (comment)
The text was updated successfully, but these errors were encountered: