mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-03-19 04:03:47 +00:00
2 lines
1.0 KiB
JavaScript
2 lines
1.0 KiB
JavaScript
import{D as e,G as t,I as n,N as r,R as i,S as a,V as o,j as s,k as c,q as l,r as u,x as d}from"./src-USjmpjAT.js";import{r as f,t as p}from"./use-app-CZiSuLy7.js";import{t as m}from"./index-D_GUgIzu.js";var h=e({name:`tmagic-overlay`,__name:`index`,props:{config:{},iteratorIndex:{},iteratorContainerId:{},containerIndex:{},pageFragmentContainerId:{},model:{},disabled:{type:Boolean}},setup(e,{expose:h}){let g=e,_=t(!1),v=c(`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)}),s(()=>{v?.page?.off(`editor:select`,S)});let C=f(g,v);return p(C,{openOverlay:b,closeOverlay:x}),h({openOverlay:b,closeOverlay:x}),(t,s)=>_.value?(r(),d(i(l(y)),{key:0,config:{items:e.config.items,[l(u)]:!1}},{default:o(()=>[n(t.$slots,`default`)]),_:3},8,[`config`])):a(``,!0)}});export{h as default};
|
|
//# sourceMappingURL=src-DoPCmaLc.js.map
|