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