- extend callback through passing the tippy element (and vnode) to the callback #49 (@marvinhuebner)
<template>
<button title="I'm called when a tooltip begins to show." @show="onShow" v-tippy>
@show
</button>
</template>
<script>
export default {
methods: {
onShow(el,vnode) {
if (!el.classList.contains('is-active')) {
el.classList.add('is-active')
} else {
el.classList.remove('is-active');
}
}
},
};
</script>