index.589353eb.js 1018 B

1
  1. import{a as h,bK as v,r as a,b as x,c as y,o as H,e as w,i as S,x as R,f as z,n as f,h as e,ag as u,dm as C,j as b}from"./index.ae52ebae.js";import{u as k}from"./useWindowSizeFn.d176b3a5.js";import{a as B}from"./useContentViewHeight.2a59a8a3.js";const L=["src"],$=h({__name:"index",props:{frameSrc:v.string.def("")},setup(m){const s=a(!0),d=a(50),i=a(window.innerHeight),r=a(),{headerHeightRef:p}=B(),{prefixCls:o}=x("iframe-page");k(l,150,{immediate:!0});const c=y(()=>({height:`${e(i)}px`}));function l(){const n=e(r);if(!n)return;const t=p.value;d.value=t,i.value=window.innerHeight-t;const g=document.documentElement.clientHeight-t;n.style.height=`${g}px`}function _(){s.value=!1,l()}return(n,t)=>(H(),w("div",{class:f(e(o)),style:u(e(c))},[S(e(C),{spinning:s.value,size:"large",style:u(e(c))},{default:R(()=>[z("iframe",{src:m.frameSrc,class:f(`${e(o)}__main`),ref_key:"frameRef",ref:r,onLoad:_},null,42,L)]),_:1},8,["spinning","style"])],6))}});var V=b($,[["__scopeId","data-v-179381bf"]]);export{V as default};