javascript - Is it possible to get the DOM element of a vuejs element? -
vue.js supplies variable $el return whole template dom element. possible "sub-element", in other words, dom element inside whole template element?
for example, want show floating window position depends on current "mouse-over" element.
<div v-for="..." v-on:mouseover="showfloating(current_element)">   is possible dom element "current_element"?
try this
<div v-for="..." v-on:mouseover="showfloating">
methods:{     showfloating(event){         console.log(event);     } }   this give current element attributes`
Comments
Post a Comment