2 lines
8.2 KiB
Java
2 lines
8.2 KiB
Java
|
|
import{l as ae,m as ie,a as x,f as A,gD as U,cq as le,j as se,k as j,h as W,P as p,gE as F,fV as _,cp as X,gF as de}from"./index-X7Y8jykP.js";import{e as L,f as g,c as ce,r as ue,a2 as q,s as E,h as V,S as ge,o as fe,x as pe}from"./vue-vendor-DNhG1Cve.js";import{i as me}from"./isNumeric-DjvBa-1E.js";const he=e=>{const{componentCls:o,colorBgContainer:t,colorBgBody:i,colorText:n}=e;return{[`${o}-sider-light`]:{background:t,[`${o}-sider-trigger`]:{color:n,background:t},[`${o}-sider-zero-width-trigger`]:{color:n,background:t,border:`1px solid ${i}`,borderInlineStart:0}}}},ye=e=>{const{antCls:o,componentCls:t,colorText:i,colorTextLightSolid:n,colorBgHeader:f,colorBgBody:d,colorBgTrigger:l,layoutHeaderHeight:c,layoutHeaderPaddingInline:h,layoutHeaderColor:y,layoutFooterPadding:r,layoutTriggerHeight:s,layoutZeroTriggerSize:v,motionDurationMid:S,motionDurationSlow:a,fontSize:m,borderRadius:u}=e;return{[t]:x(x({display:"flex",flex:"auto",flexDirection:"column",color:i,minHeight:0,background:d,"&, *":{boxSizing:"border-box"},[`&${t}-has-sider`]:{flexDirection:"row",[`> ${t}, > ${t}-content`]:{width:0}},[`${t}-header, &${t}-footer`]:{flex:"0 0 auto"},[`${t}-header`]:{height:c,paddingInline:h,color:y,lineHeight:`${c}px`,background:f,[`${o}-menu`]:{lineHeight:"inherit"}},[`${t}-footer`]:{padding:r,color:i,fontSize:m,background:d},[`${t}-content`]:{flex:"auto",minHeight:0},[`${t}-sider`]:{position:"relative",minWidth:0,background:f,transition:`all ${S}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:s},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:s,color:n,lineHeight:`${s}px`,textAlign:"center",background:l,cursor:"pointer",transition:`all ${S}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:c,insetInlineEnd:-v,zIndex:1,width:v,height:v,color:n,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:f,borderStartStartRadius:0,borderStartEndRadius:u,borderEndEndRadius:u,borderEndStartRadius:0,cursor:"pointer",transition:`background ${a} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${a}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-v,borderStartStartRadius:u,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:u}}}}},he(e)),{"&-rtl":{direction:"rtl"}})}},ve=ae("Layout",e=>{const{colorText:o,controlHeightSM:t,controlHeight:i,controlHeightLG:n,marginXXS:f}=e,d=n*1.25,l=ie(e,{layoutHeaderHeight:i*2,layoutHeaderPaddingInline:d,layoutHeaderColor:o,layoutFooterPadding:`${t}px ${d}px`,layoutTriggerHeight:n+f*2,layoutZeroTriggerSize:n});return[ye(l)]},e=>{const{colorBgLayout:o}=e;return{colorBgHeader:"#001529",colorBgBody:o,colorBgTrigger:"#002140"}}),I=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function B(e){let{suffixCls:o,tagName:t,name:i}=e;return n=>L({compatConfig:{MODE:3},name:i,props:I(),setup(d,l){let{slots:c}=l;const{prefixCls:h}=A(o,d);return()=>{const y=x(x({},d),{prefixCls:h.value,tagName:t});return g(n,y,c)}}})}const R=L({compatConfig:{MODE:3},props:I(),setup(e,o){let{slots:t}=o;return()=>g(e.tagName,{class:e.prefixCls},t)}}),xe=L({compatConfig:{MODE:3},inheritAttrs:!1,props:I(),setup(e,o){let{slots:t,attrs:i}=o;const{prefixCls:n,direction:f}=A("",e),[d,l]=ve(n),c=ue([]);q(U,{addSider:r=>{c.value=[...c.value,r]},removeSider:r=>{c.value=c.value.filter(s=>s!==r)}});const y=ce(()=>{const{prefixCls:r,hasSider:s}=e;return{[l.value]:!0,[`${r}`]:!0,[`${r}-has-sider`]:typeof s=="boolean"?s:c.value.length>0,[`${r}-rtl`]:f.value==="rtl"}});return()=>{const{tagName:r}=e;return d(g(r,x(x({},i),{class:[y.value,i.class]}),t))}}}),P=B({suffixCls:"layout",tagName:"section",name:"ALayout"})(xe),C=B({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(R),w=B({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(R),H=B({suffixCls:"layout-content",tagName:"main",name:"ALayou
|