Vuejs error, Invalid prop: type check failed for prop. Expected Date, got Number with value
This is because you pass in an expression in props javascript. From your example: 11 - 31 - 2011 === -1991.
I recommend reading the documentation for understanding props:
https://v2.vuejs.org/v2/guide/components-props.html#Passing-Static-or-Dynamic-Props
You can fix it as follows:
<my-component
v-bind:first-date="new Date('12-12-2019')"
v-bind:second-date="new Date('31-11-2011')"
></my-component>
[Vue warn]: Invalid prop: type check failed for prop "productCartData". Expected Object, got String with value "[object Object]"
You cant pass getter cart of array as params in router link. if you want access getter of cart into your component just access it directly in that component.
or you don't event need getter. just create a computed property in your component.
params can only be string or number and they need to be declared in routerread for params.
https://next.router.vuejs.org/guide/essentials/dynamic-matching.html
to access objects arrays from store or data of components just use computed property.
[Vue warn]: Invalid prop: type check failed for prop "xxx". Expected Number with value X, got String with value "X"
You need to add the .number modifier to v-model
, otherwise the type from the input will be string.
<v-text-field v-model.number="daysNumber" type="number"></v-text-field>
VueJs - Invalid prop: type check failed for prop "page". Expected DocumentPageDto, got Object
Instead of declaring props like
props: {
page: DocumentPageDto,
}
Use a property and apply the @Prop
decorator from the vue-property-decorator library works just fine.
@Prop()
diagram: DiagramDto = null;
Related Topics
Update Value in Localstorage Array by Existing Key
How to Get the Ajax Response from Success and Assign It in a Variable Using Jquery
Stop Just One Dropdown Toggle from Closing on Click
How to Trigger Click Event on Select Element (Not Change)
Angular - How to Get Result of a Json Object
Remove Everything After Last Backslash
How to Select Json Response Item With Spaces
Pdf Blob - Pop Up Window Not Showing Content
Expected Linebreaks to Be 'Lf' But Found 'Crlf' Linebreak-Style
Make Discord Bot Send Picture With Message With Nodejs
Prevent Form Submission on Enter Key Press
Javascript Sum and Group by of Json Data
Mongodb Get Data to Display in HTML
How to Change the Image(Slider) One by One Every 3 Seconds in JavaScript