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