| 1 |
- var J=Object.defineProperty,M=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var v=(e,t,o)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,m=(e,t)=>{for(var o in t||(t={}))Q.call(t,o)&&v(e,o,t[o]);if(w)for(var o of w(t))X.call(t,o)&&v(e,o,t[o]);return e},k=(e,t)=>M(e,U(t));import{F as z,C as Y,a as A,H as n,w as D}from"./index-BFfnEkVs.js";import{d as I,aq as H,ar as g,aA as N,as as c,at as y,aG as r,f as C,p as Z,e as a,u as _,w as x,ag as b,aB as R,ah as B,aE as ee,aH as te,aD as $,F as oe,G as ne,au as ae,aC as re,aJ as se,aK as le}from"./vue-vendor-Be68asQ6.js";import{o as W,a1 as ie}from"./antd-vue-vendor-DcqS7Wvq.js";import{useContentHeight as ge}from"./useContentHeight-DnE6GxS2.js";import{P as ce}from"./injectionKey-DPVn4AgL.js";const de=I({name:"PageFooter",inheritAttrs:!1,setup(){const{prefixCls:e}=z("page-footer"),{getCalcContentWidth:t}=Y();return{prefixCls:e,getCalcContentWidth:t}}});function pe(e,t,o,d,p,f){return g(),H("div",{class:c(e.prefixCls),style:N({width:e.getCalcContentWidth})},[y("div",{class:c(`${e.prefixCls}__left`)},[r(e.$slots,"left",{},void 0,!0)],2),r(e.$slots,"default",{},void 0,!0),y("div",{class:c(`${e.prefixCls}__right`)},[r(e.$slots,"right",{},void 0,!0)],2)],6)}const O=A(de,[["render",pe],["__scopeId","data-v-3e586038"]]),fe=I({name:"PageWrapper",components:{PageFooter:O,PageHeader:ie},inheritAttrs:!1,props:{title:n.string,dense:n.bool,ghost:n.bool,content:n.string,contentStyle:{type:Object},contentBackground:n.bool,contentFullHeight:n.bool,contentClass:n.string,fixedHeight:n.bool,upwardSpace:n.oneOfType([n.number,n.string]).def(0)},setup(e,{slots:t,attrs:o}){const d=C(null),p=C(null),f=C(null),i=C(null),{prefixCls:s}=z("page-wrapper");Z(ce,a(()=>e.fixedHeight));const u=a(()=>e.contentFullHeight),F=a(()=>e.upwardSpace),{redoHeight:T,setCompensation:V,contentHeight:j}=ge(u,d,[p,i],[f],F);V({useLayoutFooter:!0,elements:[i]});const E=a(()=>{var l;return[s,{[`${s}--dense`]:e.dense},(l=o.class)!=null?l:{}]}),S=a(()=>(t==null?void 0:t.leftFooter)||(t==null?void 0:t.rightFooter)),G=a(()=>Object.keys(W(t,"default","leftFooter","rightFooter","headerContent"))),K=a(()=>{const{contentFullHeight:l,contentStyle:h,fixedHeight:q}=e;if(!l)return m({},h);const P=`${_(j)}px`;return m(k(m({},h),{minHeight:P}),q?{height:P}:{})}),L=a(()=>{const{contentBackground:l,contentClass:h}=e;return[`${s}-content`,h,{[`${s}-content-bg`]:l}]});return x(()=>[S.value],()=>{T()},{flush:"post",immediate:!0}),{getContentStyle:K,wrapperRef:d,headerRef:p,contentRef:f,footerRef:i,getClass:E,getHeaderSlots:G,prefixCls:s,getShowFooter:S,omit:W,getContentClass:L}}});function ue(e,t,o,d,p,f){const i=b("PageHeader"),s=b("PageFooter");return g(),H("div",{class:c(e.getClass),ref:"wrapperRef"},[e.content||e.$slots.headerContent||e.title||e.getHeaderSlots.length?(g(),R(i,ee({key:0,ghost:e.ghost,title:e.title},e.omit(e.$attrs,"class"),{ref:"headerRef"}),te({default:$(()=>[e.content?(g(),H(oe,{key:0},[ne(ae(e.content),1)],64)):r(e.$slots,"headerContent",{key:1})]),_:2},[re(e.getHeaderSlots,u=>({name:u,fn:$(F=>[r(e.$slots,u,se(le(F||{})))])}))]),1040,["ghost","title"])):B("",!0),y("div",{class:c(["overflow-hidden",e.getContentClass]),style:N(e.getContentStyle),ref:"contentRef"},[r(e.$slots,"default")],6),e.getShowFooter?(g(),R(s,{key:1,ref:"footerRef"},{left:$(()=>[r(e.$slots,"leftFooter")]),right:$(()=>[r(e.$slots,"rightFooter")]),_:3},512)):B("",!0)],2)}const he=A(fe,[["render",ue]]),Se=D(O),Pe=D(he);export{Pe as P};
|