const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/iframes.Cwac9Bo3.js","assets/vue.BxlDVA1H.js","assets/index.lP_uh0LI.js","assets/index.TG7KVPIy.css"])))=>i.map(i=>d[i]);
import{K as I,u as P,t as w,S as B,_ as E}from"./index.lP_uh0LI.js";import{d as g,R as x,C as S,N as d,r as D,a as O,c as f,O as U,J as c,o as M,P as b,m as j,b as q,e as z,f as v,g as r,w as h,S as _,h as V,j as J,U as Q,z as R,q as F,E as y,u as G,Q as H,V as W}from"./vue.BxlDVA1H.js";const X={class:"layout-parent"},Y=g({name:"layoutParentView"}),ae=g({...Y,setup(Z){const K=H(()=>E(()=>import("./iframes.Cwac9Bo3.js"),__vite__mapDeps([0,1,2,3]))),t=x(),A=S(),N=I(),k=P(),{keepAliveNames:i,cachedViews:n}=d(N),{themeConfig:u}=d(k),e=D({refreshRouterViewKey:"",iframeRefreshKey:"",keepAliveNameList:[],iframeList:[]}),m=O(!0);W("refreshView",function(){m.value=!1,c(()=>{m.value=!0})});const l=f(()=>u.value.animation),L=f(()=>(console.log(n.value),u.value.isTagsview?n.value:e.keepAliveNameList)),p=f(()=>t.meta.isIframe),T=async()=>{A.getRoutes().forEach(s=>{s.meta.isIframe&&(s.meta.isIframeOpen=!1,s.meta.loading=!0,e.iframeList.push({...s}))})};return U(()=>{e.keepAliveNameList=i.value,w.on("onTagsViewRefreshRouterView",s=>{e.keepAliveNameList=i.value.filter(a=>t.name!==a),e.refreshRouterViewKey="",e.iframeRefreshKey="",c(()=>{e.refreshRouterViewKey=s,e.iframeRefreshKey=s,e.keepAliveNameList=i.value})})}),M(()=>{T(),c(()=>{setTimeout(()=>{if(u.value.isCacheTagsView){let s=B.get("tagsViewList")||[];n.value=s.filter(a=>{var o;return(o=a.meta)==null?void 0:o.isKeepAlive}).map(a=>a.name)}},0)})}),b(()=>{w.off("onTagsViewRefreshRouterView",()=>{})}),j(()=>t.fullPath,()=>{e.refreshRouterViewKey=decodeURI(t.fullPath)},{immediate:!0}),(s,a)=>{const o=q("router-view");return v(),z("div",X,[r(o,null,{default:h(({Component:C})=>[r(_,{name:l.value,mode:"out-in"},{default:h(()=>[m.value?(v(),V(Q,{key:0,include:L.value},[R((v(),V(F(C),{key:e.refreshRouterViewKey,class:"w100"})),[[y,!p.value]])],1032,["include"])):J("",!0)]),_:2},1032,["name"])]),_:1}),r(_,{name:l.value,mode:"out-in"},{default:h(()=>[R(r(G(K),{class:"w100",refreshKey:e.iframeRefreshKey,name:l.value,list:e.iframeList},null,8,["refreshKey","name","list"]),[[y,p.value]])]),_:1},8,["name"])])}}});export{ae as default};
