You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
911 B
2 lines
911 B
import{_ as d}from"./ContextMenu.vue_vue_type_style_index_0_lang-e7e68c11.js";import{c0 as v,b as f,c1 as u}from"./index-f4658ae7.js";import"./index-0e56c5c3.js";const t={domList:[],resolve:()=>{}},C=function(n){const{event:e}=n||{};if(e&&(e==null||e.preventDefault()),!!v)return new Promise(l=>{const r=document.body,i=document.createElement("div"),s={};n.styles&&(s.styles=n.styles),n.items&&(s.items=n.items),n.event&&(s.customEvent=e,s.axis={x:e.clientX,y:e.clientY});const a=f(d,s);u(a,i);const o=function(){t.resolve("")};t.domList.push(i);const m=function(){t.domList.forEach(c=>{try{c&&r.removeChild(c)}catch(y){}}),r.removeEventListener("click",o),r.removeEventListener("scroll",o)};t.resolve=function(c){m(),l(c)},m(),r.appendChild(i),r.addEventListener("click",o),r.addEventListener("scroll",o)})},p=function(){t&&(t.resolve(""),t.domList=[])};export{C as createContextMenu,p as destroyContextMenu};
|