UNPKG

maz-ui

Version:

A standalone components library for Vue.Js 3 & Nuxt.Js 3

45 lines (44 loc) 1.02 kB
import { inject as l, defineComponent as s, ref as c, watch as i, openBlock as u, createElementBlock as m, normalizeClass as f, renderSlot as d } from "vue"; function v(n, e) { let t; return function(...o) { clearTimeout(t), t = setTimeout(() => { n.apply(this, o); }, e); }; } function p(n, e) { const t = l(n, e); if (!t) throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${n.toString()}`); return t; } const h = /* @__PURE__ */ s({ __name: "MazTabsContent", setup(n) { const e = c(!1), { currentTab: t } = p("maz-tabs"), o = v(() => { e.value = !1; }, 700); function r() { e.value = !0, o(); } return i( () => t.value, () => r(), { immediate: !0 } ), (a, w) => (u(), m( "div", { class: f(["m-tabs-content m-reset-css maz-relative", { "maz-overflow-hidden": e.value }]) }, [ d(a.$slots, "default") ], 2 /* CLASS */ )); } }); export { h as default };