var it=Object.defineProperty,ct=Object.defineProperties;var ft=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var gt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable;var U=(s,r,n)=>r in s?it(s,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[r]=n,j=(s,r)=>{for(var n in r||(r={}))gt.call(r,n)&&U(s,n,r[n]);if(Q)for(var n of Q(r))dt.call(r,n)&&U(s,n,r[n]);return s},V=(s,r)=>ct(s,ft(r));var J=(s,r,n)=>new Promise((I,O)=>{var q=e=>{try{t(n.next(e))}catch(m){O(m)}},D=e=>{try{t(n.throw(e))}catch(m){O(m)}},t=e=>e.done?I(e.value):Promise.resolve(e.value).then(q,D);t((n=n.apply(s,r)).next())});import{i as X,a6 as ut,_ as Y,a7 as ht,p as pt,x as mt,E as u,a8 as Ct,w as Z,__tla as _t}from"./index-f0df2f76.js";import{d as tt,_ as T,$ as M,a3 as N,R as v,a0 as W,af as et,k as E,w as ot,q as z,u as C,G as yt,p as Ht,e as _,a7 as nt,a8 as at,ae as Ft,aa as bt,a9 as A,ad as vt,ag as $t,F as wt,E as St,a6 as xt,ac as Rt,ab as st}from"./vue-1631514e.js";import{u as kt,__tla as Pt}from"./useContentViewHeight-c315421e.js";import{o as Et}from"./onMountedOrActivated-5690e97c.js";import{u as Bt,__tla as Lt}from"./useWindowSizeFn-53b82e7c.js";import{aJ as Tt,F as rt}from"./antd-057b41b1.js";let lt,Wt=Promise.all([(()=>{try{return _t}catch(s){}})(),(()=>{try{return Pt}catch(s){}})(),(()=>{try{return Lt}catch(s){}})()]).then(()=>J(void 0,null,function*(){const s=tt({name:"PageFooter",inheritAttrs:!1,setup(){const{prefixCls:t}=X("page-footer"),{getCalcContentWidth:e}=ut();return{prefixCls:t,getCalcContentWidth:e}}});function r(t,e,m,S,y,x){return T(),M("div",{class:W(t.prefixCls),style:et({width:t.getCalcContentWidth})},[N("div",{class:W(`${t.prefixCls}__left`)},[v(t.$slots,"left",{},void 0,!0)],2),v(t.$slots,"default",{},void 0,!0),N("div",{class:W(`${t.prefixCls}__right`)},[v(t.$slots,"right",{},void 0,!0)],2)],6)}const n=Y(s,[["render",r],["__scopeId","data-v-8563d90b"]]);function I(t,e,m,S,y=0,x=E(0)){const H=E(null),{footerHeightRef:g}=kt();let F={useLayoutFooter:!0};const B=a=>{F=a};function G(){z(()=>{k()})}function $(a,w="all"){var f,p,P,b;function h(o){return Number(o.replace(/[^\d]/g,""))}let c=0;const d="0px";if(a){const o=getComputedStyle(a),i=h((f=o==null?void 0:o.marginTop)!=null?f:d),l=h((p=o==null?void 0:o.marginBottom)!=null?p:d),L=h((P=o==null?void 0:o.paddingTop)!=null?P:d),K=h((b=o==null?void 0:o.paddingBottom)!=null?b:d);w==="all"?(c+=i,c+=l,c+=L,c+=K):w==="top"?(c+=i,c+=L):(c+=l,c+=K)}return c}function R(a){return a==null?null:a instanceof HTMLDivElement?a:a.$el}function k(){return J(this,null,function*(){var b;if(!t.value)return;yield z();const a=R(C(e));if(!a)return;const{bottomIncludeBody:w}=ht(a);let h=0;m.forEach(o=>{var i,l;h+=(l=(i=R(C(o)))==null?void 0:i.offsetHeight)!=null?l:0});let c=(b=$(a))!=null?b:0;S.forEach(o=>{c+=$(R(C(o)))});let d=0;function f(o,i){if(o&&i){const l=o.parentElement;l&&(pt(i)?l.classList.contains(i)?d+=$(l,"bottom"):(d+=$(l,"bottom"),f(l,i)):mt(i)&&i>0&&(d+=$(l,"bottom"),f(l,--i)))}}yt(y)?f(a,C(y)):f(a,y);let p=w-C(g)-C(x)-h-c-d;const P=()=>{var o;(o=F.elements)==null||o.forEach(i=>{var l,L;p+=(L=(l=R(C(i)))==null?void 0:l.offsetHeight)!=null?L:0})};F.useLayoutFooter&&C(g)>0,P(),H.value=p})}return Et(()=>{z(()=>{k()})}),Bt(()=>{k()},{wait:50,immediate:!0}),ot(()=>[g.value],()=>{k()},{flush:"post",immediate:!0}),{redoHeight:G,setCompensation:B,contentHeight:H}}const O=tt({name:"PageWrapper",components:{PageFooter:n,PageHeader:Tt},inheritAttrs:!1,props:{title:u.string,dense:u.bool,ghost:u.bool,content:u.string,contentStyle:{type:Object},contentBackground:u.bool,contentFullHeight:u.bool,contentClass:u.string,fixedHeight:u.bool,upwardSpace:u.oneOfType([u.number,u.string]).def(0)},setup(t,{slots:e,attrs:m}){const S=E(null),y=E(null),x=E(null),H=E(null),{prefixCls:g}=X("page-wrapper");Ht(Ct,_(()=>t.fixedHeight));const F=_(()=>t.contentFullHeight),B=_(()=>t.upwardSpace),{redoHeight:G,setCompensation:$,contentHeight:R}=I(F,S,[y,H],[x],B);$({useLayoutFooter:!0,elements:[H]});const k=_(()=>{var f;return[g,{[`${g}--dense`]:t.dense},(f=m.class)!=null?f:{}]}),a=_(()=>t.content||(e==null?void 0:e.headerContent)||t.title||h.value.length),w=_(()=>(e==null?void 0:e.leftFooter)||(e==null?void 0:e.rightFooter)),h=_(()=>Object.keys(rt(e,"default","leftFooter","rightFooter","headerContent"))),c=_(()=>{const{contentFullHeight:f,contentStyle:p,fixedHeight:P}=t;if(!f)return j({},p);const b=`${C(R)}px`;return j(V(j({},p),{minHeight:b}),P?{height:b}:{})}),d=_(()=>{const{contentBackground:f,contentClass:p}=t;return[`${g}-content`,p,{[`${g}-content-bg`]:f}]});return ot(()=>[w.value],()=>{G()},{flush:"post",immediate:!0}),{getContentStyle:c,wrapperRef:S,headerRef:y,contentRef:x,footerRef:H,getClass:k,getHeaderSlots:h,prefixCls:g,getShowHeader:a,getShowFooter:w,omit:rt,getContentClass:d}}});function q(t,e,m,S,y,x){const H=nt("PageHeader"),g=nt("PageFooter");return T(),M("div",{class:W(t.getClass),ref:"wrapperRef"},[t.getShowHeader?(T(),at(H,Rt({key:0,ghost:t.ghost,title:t.title},t.omit(t.$attrs,"class"),{ref:"headerRef"}),Ft({default:A(()=>[t.content?(T(),M(wt,{key:0},[St(xt(t.content),1)],64)):v(t.$slots,"headerContent",{key:1})]),_:2},[bt(t.getHeaderSlots,F=>({name:F,fn:A(B=>[v(t.$slots,F,vt($t(B||{})))])}))]),1040,["ghost","title"])):st("",!0),N("div",{class:W(["overflow-hidden",t.getContentClass]),style:et(t.getContentStyle),ref:"contentRef"},[v(t.$slots,"default")],6),t.getShowFooter?(T(),at(g,{key:1,ref:"footerRef"},{left:A(()=>[v(t.$slots,"leftFooter")]),right:A(()=>[v(t.$slots,"rightFooter")]),_:3},512)):st("",!0)],2)}const D=Y(O,[["render",q]]);Z(n),lt=Z(D)}));export{lt as P,Wt as __tla};
|