UNPKG

adverich-kun-ui

Version:

Una librería de componentes Vue.js con Tailwind CSS

16 lines (15 loc) 590 B
const c = { mounted(e, s) { e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", (i) => { const t = document.createElement("span"), o = Math.max(e.clientWidth, e.clientHeight), l = o / 2; t.style.width = t.style.height = `${o}px`, t.style.left = `${i.offsetX - l}px`, t.style.top = `${i.offsetY - l}px`, t.classList.add("ripple"); const a = typeof s.value == "object" && s.value.class; a && t.classList.add(a), e.appendChild(t), setTimeout(() => { t.remove(); }, 600); }); } }; export { c as vRipple };