mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-10-01 07:15:50 +08:00
3 lines
1.2 KiB
JavaScript
3 lines
1.2 KiB
JavaScript
import{d as m,l as u,u as g,i as p,m as y,I as _,f as v,q as C,j as I,o as N,s as S,r as b}from"./index-DGi0-hAa.js";import{a as O,r as D,_ as $}from"./plugin-vueexport-helper-CAXJ8sGA.js";const j=m({name:"tmagic-overlay",props:{config:{type:Object,required:!0},iteratorIndex:Array,iteratorContainerId:Array,containerIndex:Number,pageFragmentContainerId:[String,Number],model:{type:Object,default:()=>({})}},setup(o){var l;const n=u(!1),e=p("app"),i=g({componentType:"container",app:e}),t=()=>{n.value=!0,e==null||e.emit("overlay:open",s)},r=()=>{n.value=!1,e==null||e.emit("overlay:close",s)},c=(a,d)=>{d.find(f=>f.id===o.config.id)?t():r()};(l=e==null?void 0:e.page)==null||l.on("editor:select",c),y(()=>{var a;(a=e==null?void 0:e.page)==null||a.off("editor:select",c)});const s=O(o,e);return D(s,{openOverlay:t,closeOverlay:r}),{containerComponent:i,visible:n,IS_DSL_NODE_KEY:_}}});function k(o,n,e,i,t,r){return o.visible?(N(),v(I(o.containerComponent),{key:0,config:{items:o.config.items,[o.IS_DSL_NODE_KEY]:!1}},{default:S(()=>[b(o.$slots,"default")]),_:3},8,["config"])):C("",!0)}const h=$(j,[["render",k]]);export{h as default};
|
|
//# sourceMappingURL=index-GCqbqFTJ.js.map
|