mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-03-23 05:52:25 +00:00
2 lines
1.0 KiB
JavaScript
2 lines
1.0 KiB
JavaScript
import{A as e,C as t,H as n,J as r,K as i,L as a,M as o,O as s,P as c,S as l,r as u,z as d}from"./src-XkKNkxz7.js";import{r as f,t as p}from"./use-app-Brp2GW0k.js";import{t as m}from"./index-BOI1j6Pm.js";var h=s({name:`tmagic-overlay`,__name:`index`,props:{config:{},iteratorIndex:{},iteratorContainerId:{},containerIndex:{},pageFragmentContainerId:{},model:{},disabled:{type:Boolean}},setup(s,{expose:h}){let g=s,_=i(!1),v=e(`app`),y=m({componentType:`container`,app:v}),b=()=>{_.value=!0,v?.emit(`overlay:open`,C)},x=()=>{_.value=!1,v?.emit(`overlay:close`,C)},S=(e,t)=>{t.find(e=>e.id===g.config.id)?b():x()};v?.page?.on(`editor:select`,S),v?.on(`page-change`,()=>{v?.page?.on(`editor:select`,S)}),o(()=>{v?.page?.off(`editor:select`,S)});let C=f(g,v);return p(C,{openOverlay:b,closeOverlay:x}),h({openOverlay:b,closeOverlay:x}),(e,i)=>_.value?(c(),l(d(r(y)),{key:0,config:{items:s.config.items,[r(u)]:!1}},{default:n(()=>[a(e.$slots,`default`)]),_:3},8,[`config`])):t(``,!0)}});export{h as default};
|
|
//# sourceMappingURL=src-BJeftTdO.js.map
|