index.168de4c3.js 2.1 KB

123
  1. import{e as p,r as y,G as k,f as g,o as C,Z as S,a0 as b,g as s,p as I,q as E,t as L,B,h as a,j as r,F as M,Q as D,l as j,T as z,aE as F,aF as T,A as $,z as l}from"./vue.e266cb73.js";import{_ as N}from"./_plugin-vue_export-helper.c27b6911.js";const O=t=>(F("data-v-e5e2cc90"),t=t(),T(),t),R={class:"el-dropdown-menu"},U=["onClick"],V=O(()=>r("div",{class:"el-popper__arrow",style:{left:"10px"}},null,-1)),q=p({name:"pagesWorkflowContextmenu"}),A=p({...q,props:{dropdown:{type:Object,default:()=>({x:"",y:""})}},emits:["current"],setup(t,{expose:u,emit:m}){const _=t,x=y(),e=k({isShow:!1,dropdownList:[{contextMenuClickId:0,txt:"删除",icon:"ele-Delete"},{contextMenuClickId:1,txt:"编辑",icon:"ele-Edit"}],item:{type:"node"},conn:{}}),i=g(()=>_.dropdown),f=n=>{m("current",Object.assign({},{contextMenuClickId:n},e.item),e.conn)},v=(n,d={})=>{e.item=n,e.conn=d,o(),setTimeout(()=>{e.isShow=!0},10)},o=()=>{e.isShow=!1};return C(()=>{document.body.addEventListener("click",o),document.body.addEventListener("contextmenu",o)}),S(()=>{document.body.removeEventListener("click",o),document.body.removeEventListener("contextmenu",o)}),u({openContextmenu:v}),(n,d)=>{const w=b("SvgIcon");return s(),I(z,{name:"el-zoom-in-center",ref_key:"contextmenuRef",ref:x,persisted:""},{default:E(()=>[L((s(),a("div",{"aria-hidden":"true",class:"el-dropdown__popper el-popper is-light is-pure custom-contextmenu",role:"tooltip","data-popper-placement":"bottom",style:j(`top: ${i.value.y+5}px;left: ${i.value.x}px;`),key:Math.random()},[r("ul",R,[(s(!0),a(M,null,D(e.dropdownList,(c,h)=>(s(),a("li",{class:"el-dropdown-menu__item","aria-disabled":"false",tabindex:"-1",key:h,onClick:G=>f(c.contextMenuClickId)},[$(w,{name:c.icon},null,8,["name"]),r("span",null,l(c.txt)+l(e.item.type==="line"?"线":"节点"),1)],8,U))),128))]),V],4)),[[B,e.isShow]])]),_:1},512)}}});const Z=N(A,[["__scopeId","data-v-e5e2cc90"],["__file","C:/Users/89282/Desktop/lechang_storage/lechang_storage/vue-next-admin/src/views/pages/workflow/component/contextmenu/index.vue"]]);export{Z as default};
  2. //# sourceMappingURL=index.168de4c3.js.map