mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-24 03:18:35 +08:00
2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
var x=Object.defineProperty;var u=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var m=(e,o,t)=>o in e?x(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,_=(e,o)=>{for(var t in o||(o={}))f.call(o,t)&&m(e,t,o[t]);if(u)for(var t of u(o))v.call(o,t)&&m(e,t,o[t]);return e};import{h,i as C,I as y,o as k,j as S,t as b,P as I,z as B,T as L,C as a,w as $,v as g,l as i,m as d,X as E,W as j,p as M,x as w,J as z,A as F,B as T}from"./vendor.14d7a511.js";import{_ as D}from"./index.1f7143d6.js";const O=h({name:"pagesWorkflowContextmenu",props:{dropdown:{type:Object}},setup(e,{emit:o}){const t=C({isShow:!1,dropdownList:[{contextMenuClickId:0,txt:"\u5220\u9664",icon:"el-icon-delete"},{contextMenuClickId:1,txt:"\u7F16\u8F91",icon:"el-icon-edit-outline"}],item:{type:"node"},conn:{}}),r=y(()=>e.dropdown),c=s=>{o("current",Object.assign({},{contextMenuClickId:s},t.item),t.conn)},l=(s,p={})=>{t.item=s,t.conn=p,n(),setTimeout(()=>{t.isShow=!0},10)},n=()=>{t.isShow=!1};return k(()=>{document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n)}),S(()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n)}),_({dropdowns:r,openContextmenu:l,closeContextmenu:n,onCurrentClick:c},b(t))}}),W=e=>(F("data-v-5a418f79"),e=e(),T(),e),A={class:"el-dropdown-menu"},J=["onClick"],N=W(()=>d("div",{class:"el-popper__arrow",style:{left:"10px"}},null,-1));function P(e,o,t,r,c,l){return a(),I(L,{name:"el-zoom-in-center"},{default:B(()=>[$((a(),i("div",{"aria-hidden":"true",class:"el-dropdown__popper el-popper is-light is-pure custom-contextmenu",role:"tooltip","data-popper-placement":"bottom",style:z(`top: ${e.dropdowns.y+5}px;left: ${e.dropdowns.x}px;`),key:Math.random()},[d("ul",A,[(a(!0),i(E,null,j(e.dropdownList,(n,s)=>(a(),i("li",{class:"el-dropdown-menu__item","aria-disabled":"false",tabindex:"-1",key:s,onClick:p=>e.onCurrentClick(n.contextMenuClickId)},[d("i",{class:M(n.icon)},null,2),d("span",null,w(n.txt)+w(e.item.type==="line"?"\u7EBF":"\u8282\u70B9"),1)],8,J))),128))]),N],4)),[[g,e.isShow]])]),_:1})}var X=D(O,[["render",P],["__scopeId","data-v-5a418f79"]]);export{X as default};
|