I have been attempting to attach a v-mouseover
directive to a bootstrap Vue component called b-list-group-item
in the following code snippet.
<b-row>
<b-col cols="3">
<b-list-group>
<b-list-group-item :active="register"
@click="switchRegister" button
@mouseover="isRegisterHover = true"
@mouseleave="isRegisterHover = false"
class="border-0 bg-transparent register"> Register </b-list-group-item>
</b-list-group>
</b-col>
<b-col cols="9">
<div id="action-screen-canvas-register v-if="isRegisterHover"> </div>
</b-col>
</b-row>
The variable isRegisterHover
in the data determines whether the div will be displayed or not.
export default {
name: 'Home',
components: {
Navi
},
data() {
return {
isRegisterHover: false,
// ...
}
},
// ...
}
Despite setting up the action-canvas-register
div, it remains hidden even when I hover over the item. The Vue devtool indicates that the data stays unchanged upon mouseover. How can I update the isRegisterHover
value based on hovering over the item?