我想在 vue.js 中将鼠标悬停在一个元素上时显示一个 div.但我似乎无法让它工作.
I would like to show a div when hovering over an element in vue.js. But I can't seem to get it working.
vue.js 中的 hover
或 mouseover
似乎没有事件.这是真的吗?
It looks like there is no event for hover
or mouseover
in vue.js. Is this really true?
可以结合jquery hover和vue方法吗?
Would it be possible to combine jquery hover and vue methods?
这里不需要方法.
HTML
<div v-if="active">
<h2>Hello World!</h2>
</div>
<div v-on:mouseover="active = !active">
<h1>Hover me!</h1>
</div>
JS
new Vue({
el: 'body',
data: {
active: false
}
})
上一篇:&QUOT;隔离&QUOT;特定行/列/从一个64位数字对角线对角线、数字、QUOT
下一篇:使用一个单一的Visual Studio解决方案,同时建立x86和x64的?解决方案、Studio、Visual