123 |
- import{M as p,j as h,a3 as k,p as C,m as S,a2 as g,am as b,o as s,T as I,U as L,V as E,$ as M,a,b as r,F as j,ad as B,Q as D,a0 as $,aF as F,aG as T,_ as U,Z as l}from"./vue.60d2ee98.js";import{_ as V}from"./index.beaea096.js";const z=t=>(F("data-v-e5e2cc90"),t=t(),T(),t),N={class:"el-dropdown-menu"},O=["onClick"],R=z(()=>r("div",{class:"el-popper__arrow",style:{left:"10px"}},null,-1)),G=p({name:"pagesWorkflowContextmenu"}),Q=p({...G,props:{dropdown:{type:Object,default:()=>({x:"",y:""})}},emits:["current"],setup(t,{expose:m,emit:u}){const _=t,x=h(),e=k({isShow:!1,dropdownList:[{contextMenuClickId:0,txt:"删除",icon:"ele-Delete"},{contextMenuClickId:1,txt:"编辑",icon:"ele-Edit"}],item:{type:"node"},conn:{}}),i=C(()=>_.dropdown),f=n=>{u("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 S(()=>{document.body.addEventListener("click",o),document.body.addEventListener("contextmenu",o)}),g(()=>{document.body.removeEventListener("click",o),document.body.removeEventListener("contextmenu",o)}),m({openContextmenu:v}),(n,d)=>{const w=b("SvgIcon");return s(),I($,{name:"el-zoom-in-center",ref_key:"contextmenuRef",ref:x,persisted:""},{default:L(()=>[E((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:D(`top: ${i.value.y+5}px;left: ${i.value.x}px;`),key:Math.random()},[r("ul",N,[(s(!0),a(j,null,B(e.dropdownList,(c,y)=>(s(),a("li",{class:"el-dropdown-menu__item","aria-disabled":"false",tabindex:"-1",key:y,onClick:W=>f(c.contextMenuClickId)},[U(w,{name:c.icon},null,8,["name"]),r("span",null,l(c.txt)+l(e.item.type==="line"?"线":"节点"),1)],8,O))),128))]),R],4)),[[M,e.isShow]])]),_:1},512)}}});const A=V(Q,[["__scopeId","data-v-e5e2cc90"],["__file","C:/Users/89282/Desktop/xmgl_yjy/project-manager/h5/src/views/pages/workflow/component/contextmenu/index.vue"]]);export{A as default};
- //# sourceMappingURL=index.d4b05c81.js.map
|