-
-
Notifications
You must be signed in to change notification settings - Fork 681
vue/require-default-prop not picking up property name #776
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
Comments
I think that the problem will be solved if you change as follows. <script>
export default {
props: {
tallStyle: {
type: Object,
default() {
return undefined // The default value you want to set.
}
},
'inverse': Boolean,
'actions': {
type: Array,
default() {
return [] // The default value you want to set.
}
}
}
}
</script> https://vuejs.org/v2/guide/components-props.html#Prop-Validation |
@ota-meshi issue is with resolving name of property, right now its instead of propName: prop.key.name we should do propName: utils.getStaticPropertyName(prop.key) feel free to submit pr with this i'm out of time now |
@armano2 Thank you for pointing that out. I fixed a similar problem a little while ago, but I think that it is correct not to specify the propName: utils.getStaticPropertyName(prop) I will fix this. |
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
The warnings should show the property names "tallStyle" and "actions"
What actually happened?
The text was updated successfully, but these errors were encountered: