UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

34 lines (33 loc) 1.06 kB
import { defineComponent as m, useTemplateRef as d, createBlock as f, openBlock as o, Transition as x, withCtx as h, createElementBlock as y, createCommentVNode as _, unref as e, normalizeStyle as C, normalizeClass as k, renderSlot as w } from "vue"; import { useContextMenu as M } from "./hook/useContextMenu.mjs"; const z = /* @__PURE__ */ m({ name: "ContextMenu", __name: "index", props: { zIndex: { default: 100 }, shadow: { type: Boolean } }, setup(n, { expose: s }) { const a = n, t = d("contextMenuEl"), { isShadow: l, isDisplay: r, positionStyle: i, show: c, hide: p } = M(a, t); return s({ show: c, hide: p }), (u, B) => (o(), f(x, { name: "slide-up" }, { default: h(() => [ e(r) ? (o(), y("div", { key: 0, ref_key: "contextMenuEl", ref: t, class: k(["app-context-menu", { "is-shadow": e(l) }]), style: C(e(i)) }, [ w(u.$slots, "default") ], 6)) : _("", !0) ]), _: 3 })); } }); export { z as default };