102
rated 0 times
[
107]
[
5]
/ answers: 1 / hits: 17877
/ 6 Years ago, fri, november 9, 2018, 12:00:00
I am trying to change the class to apply on a Vuetify.js component based on whether there is a mouse hover or not:
<v-card
class=mx-auto
width=344
>
<v-hover>
<v-card-title
slot-scope=hover
:class=`${hover? class1: class2}`>
<div>
<span class=headline>Hover</span>
</div>
</div>
</v-card-title>
</v-hover>
</v-card>
The CSS classes simply set the background-color
property:
.class1 {
background-color:red;
}
.class2 {
background-color:blue;
}
For some reason, this is not working. What am I missing?
More From » vuetify.js