P粉1896062692023-08-29 16:17:40
I don't think you'll get this directly, but you don't need to do anything more to get the results you want.
Out of the box...
Use the Hover
component to trigger events and use slot (boolean) values to toggle CSS classes.
template
<v-hover v-slot="{ hover }"> <v-card :class="{ 'on-hover': hover }"> // ... </v-card> </v-hover>
customize... Then add some range styles. The following is just a simple example, but you can style it to your liking.
style
.v-image { transition: filter .4s ease-in-out; } .v-card:hover .v-image { filter: brightness(25%); }
Example:https://codepen.io/alexpetergill/pen/NWBadjV p >
Documentation: https://vuetifyjs.com/en/components/hover/
API: https://vuetifyjs.com/en/api/v-hover/#slots