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