import{u as L}from"./useIframe-1ee24748-1782572373740v=1.0.0.js";import{y,c as p,h as _,r as A,m as R,U as S,ar as k,z as o,A as s,M as d,K as x,u as a}from"./vendor-866bb149-1782572373740v=1.0.0.js";import{_ as b}from"./index-f6f689f9-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";const P={class:"preview-module"},B={class:"preview-iframe","element-loading-text":"\u52A0\u8F7D\u4E2D..."},F=["src"],H={key:1,class:"preview-iframe-error"},U=y({name:"PreviewModule"}),z=y({...U,props:{value:{},iframeMode:{default:"EVENT_DETAIL"},pageType:{default:"add"}},emits:["update:value","update:loading","cancel","submit"],setup(h,{emit:D}){const C=h,I=D,T=p({get(){return g(C.value)},set(e){I("update:value",e)}}),g=e=>e,{iframeRef:E,iframeReady:i,addReadySendData:M,readySendDataList:t,onIframeLoad:m,onIframeError:f,sendData:c,iframeLoadError:u}=L("CHARM_LIST");_(i,(e,r)=>{e&&e!==r&&t.value&&t.value.length>0&&(t.value.forEach(n=>{c(n)}),t.value=[])}),_(T,(e,r)=>{e&&(i.value?c({data:e,subModuleType:"formData",moduleType:"CHARM_LIST"}):M({data:e,subModuleType:"formData",moduleType:"CHARM_LIST"}))},{deep:!0});const w=p(()=>"https://hzsdxyjs.ccnu.edu.cn/hkeventh5/#"),v=A(`${w.value}/pages/eventStyle/detailPreview`);return R(()=>{}),S(()=>{v.value=""}),(e,r)=>{const n=k("loading");return o(),s("div",P,[d(` <div class="preview-module-header">\r
			<div class="preview-module-header-title">\u6548\u679C\u9884\u89C8</div>\r
		</div> `),d(" {{ form }} "),x((o(),s("div",B,[a(u)?d("v-if",!0):(o(),s("iframe",{key:0,src:a(v),frameborder:"0",ref_key:"iframeRef",ref:E,onLoad:r[0]||(r[0]=(...l)=>a(m)&&a(m)(...l)),onError:r[1]||(r[1]=(...l)=>a(f)&&a(f)(...l))},null,40,F)),a(u)?(o(),s("div",H,"\u52A0\u8F7D\u5931\u8D25")):d("v-if",!0)])),[[n,!a(i)&&!a(u)]])])}}});const q=b(z,[["__scopeId","data-v-733563c0"]]);export{q as default};
