I have some card with height prop for height ofc.. I need to have different heights for xs and higher sizes so I did this:
<v-card height="250"> --> works
<v-card :height="[$vuetify.breakpoint.xs ? 450 : '250']">
And I get error that says, number or string expected got array.
For other things like :class, :style etc works fine...
Try a computed property to return the height like :
computed:{
getHeight(){
return this.$vuetify.breakpoint.xs ? 450 : '250';
}
}
and inside template :
<v-card :height="getHeight">
if you don't want to use any property you could use it by removing the brackets like :
<v-card :height="$vuetify.breakpoint.xs ? 450 : '250'">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With