mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
2 lines
1.1 KiB
JavaScript
2 lines
1.1 KiB
JavaScript
import{d as g,H as x,r as i,a6 as I,u as t,a7 as k,o as w,j as R,m as S,e as V,k as B,f as E,n as L,_ as P}from"./index-2abGzBFj.js";const b=["element-loading-text"],D=["src"],j=g({name:"FrameView",__name:"frameView",props:{frameInfo:{}},setup(v){var m,u,d;const o=v,{t:h}=x(),f=i(!0),n=I(),r=i(""),l=i(null);(m=t(n.meta))!=null&&m.frameSrc&&(r.value=(u=t(n.meta))==null?void 0:u.frameSrc),((d=t(n.meta))==null?void 0:d.frameLoading)===!1&&c();function c(){f.value=!1}function p(){L(()=>{const e=t(l);if(!e)return;const a=e;a.attachEvent?a.attachEvent("onload",()=>{c()}):e.onload=()=>{c()}})}return k(()=>n.fullPath,e=>{var a,s,_;((a=o.frameInfo)==null?void 0:a.fullPath)===e&&(r.value=(s=o.frameInfo)==null?void 0:s.frameSrc),e.indexOf("/redirect/")>-1&&(r.value=(_=o.frameInfo)==null?void 0:_.fullPath,f.value=!0)}),w(()=>{p()}),(e,a)=>{const s=R("loading");return S((V(),B("div",{class:"frame","element-loading-text":t(h)("status.hsLoad")},[E("iframe",{ref_key:"frameRef",ref:l,src:r.value,class:"frame-iframe"},null,8,D)],8,b)),[[s,f.value]])}}}),C=P(j,[["__scopeId","data-v-bd46cb26"]]);export{C as default};
|