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