UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

2 lines (1 loc) 734 B
"use strict";const e=require("vue"),p=require("./hook/useContextMenu.cjs"),d=e.defineComponent({name:"ContextMenu",__name:"index",props:{zIndex:{default:100},shadow:{type:Boolean}},setup(n,{expose:o}){const s=n,t=e.useTemplateRef("contextMenuEl"),{isShadow:r,isDisplay:u,positionStyle:l,show:a,hide:c}=p.useContextMenu(s,t);return o({show:a,hide:c}),(i,m)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-up"},{default:e.withCtx(()=>[e.unref(u)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextMenuEl",ref:t,class:e.normalizeClass(["app-context-menu",{"is-shadow":e.unref(r)}]),style:e.normalizeStyle(e.unref(l))},[e.renderSlot(i.$slots,"default")],6)):e.createCommentVNode("",!0)]),_:3}))}});module.exports=d;