[Vue warn]: Invalid prop: type check failed for prop "height". Expected Number, got String.
itsyub opened this issue · comments
I got a message in console after adding it in Vue 2.0
[Vue warn]: Invalid prop: type check failed for prop "height". Expected Number, got String.
As the message says, you need to pass a Number
@egoist
Already given number. Here is my content loader component.
<content-loader height=200 primaryColor="#ffffff" secondaryColor="#ecebeb">
<rect x="0" y="0" rx="3" ry="3" width="100%" height="150"></rect>
<circle cx="90%" cy="150" r="25" fill="#ededed"></circle>
</content-loader>
that looks like number, but it's not, try :height="200"
@egoist its not working by adding :height="200"
or :height=200
I think this warning only comes in Vue 2.0. it works fine without warning in Vue 1.0.
what do you mean by "not working"? it is working for me: https://codepan.net/gist/b800b190f36a9e51067019d0ac32f864
@egoist I mean, the component is working fine but still getting the same warning.
see image.
Thanks @egoist
:height="300"
is working, i think you should add this syntax to the documentation.