parent.CBIcAb6b.js 2.2 KB

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