| 12 |
- import{d as k,n as u,u as E,c as w,L as Z,cq as q,f as ue,l as x,p as P,_ as ce,a_ as de,F as fe,I as ve,h as V,cr as ge,o as me,be as pe,cs as he,k as G,ct as J,cu as K,P as f,H as Q,q as ye}from"./index-8a67e3df.js";var F=function(){return{prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String}};function A(t){var e=t.suffixCls,r=t.tagName,i=t.name;return function(c){var v=k({compatConfig:{MODE:3},name:i,props:F(),setup:function(C,m){var a=m.slots,l=E(e,C),d=l.prefixCls;return function(){var z=P(P({},C),{},{prefixCls:d.value,tagName:r});return u(c,z,a)}}});return v}}var I=k({compatConfig:{MODE:3},props:F(),setup:function(e,r){var i=r.slots;return function(){return u(e.tagName,{class:e.prefixCls},i)}}}),xe=k({compatConfig:{MODE:3},props:F(),setup:function(e,r){var i=r.slots,c=E("",e),v=c.direction,g=w([]),C={addSider:function(l){g.value=[].concat(ce(g.value),[l])},removeSider:function(l){g.value=g.value.filter(function(d){return d!==l})}};Z(q,C);var m=ue(function(){var a,l=e.prefixCls,d=e.hasSider;return a={},x(a,"".concat(l),!0),x(a,"".concat(l,"-has-sider"),typeof d=="boolean"?d:g.value.length>0),x(a,"".concat(l,"-rtl"),v.value==="rtl"),a});return function(){var a=e.tagName;return u(a,{class:m.value},i)}}}),Ce=A({suffixCls:"layout",tagName:"section",name:"ALayout"})(xe),L=A({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(I),M=A({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(I),B=A({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(I);const T=Ce;var be={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};const Se=be;function X(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable}))),i.forEach(function(c){Oe(t,c,r[c])})}return t}function Oe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $=function(e,r){var i=X({},e,r.attrs);return u(de,X({},i,{icon:Se}),null)};$.displayName="BarsOutlined";$.inheritAttrs=!1;const we=$;var Y={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},Le=function(){return{prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:f.any,width:f.oneOfType([f.number,f.string]),collapsedWidth:f.oneOfType([f.number,f.string]),breakpoint:f.oneOf(Q("xs","sm","md","lg","xl","xxl","xxxl")),theme:f.oneOf(Q("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}},Be=function(){var t=0;return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t+=1,"".concat(e).concat(t)}}();const N=k({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:fe(Le(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup:function(e,r){var i=r.emit,c=r.attrs,v=r.slots,g=E("layout-sider",e),C=g.prefixCls,m=ve(q,void 0),a=w(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),l=w(!1);V(function(){return e.collapsed},function(){a.value=!!e.collapsed}),Z(ge,a);var d=function(o,h){e.collapsed===void 0&&(a.value=o),i("update:collapsed",o),i("collapse",o,h)},z=w(function(n){l.value=n.matches,i("breakpoint",n.matches),a.value!==n.matches&&d(n.matches,"responsive")}),p;function y(n){return z.value(n)}var D=Be("ant-sider-");m&&m.addSider(D),me(function(){V(function(){return e.breakpoint},function(){try{var n;(n=p)===null||n===void 0||n.removeEventListener("change",y)}catch{var o;(o=p)===null||o===void 0||o.removeListener(y)}if(typeof window<"u"){var h=window,s=h.matchMedia;if(s&&e.breakpoint&&e.breakpoint in Y){p=s("(max-width: ".concat(Y[e.breakpoint],")"));try{p.addEventListener("change",y)}catch{p.addListener(y)}y(p)}}},{immediate:!0})}),pe(function(){try{var n;(n=p)===null||n===void 0||n.removeEventListener("change",y)}catch{var o;(o=p)===null||o===void 0||o.removeListener(y)}m&&m.removeSider(D)});var _=function(){d(!a.value,"clickTrigger")};return function(){var n,o,h,s=C.value,S=e.collapsedWidth,ee=e.width,H=e.reverseArrow,te=e.zeroWidthTriggerStyle,R=e.trigger,O=R===void 0?(n=v.trigger)===null||n===void 0?void 0:n.call(v):R,U=e.collapsible,ae=e.theme,j=a.value?S:ee,b=he(j)?"".concat(j,"px"):String(j),W=parseFloat(String(S||0))===0?u("span",{onClick:_,class:G("".concat(s,"-zero-width-trigger"),"".concat(s,"-zero-width-trigger-").concat(H?"right":"left")),style:te},[O||u(we,null,null)]):null,ne={expanded:H?u(J,null,null):u(K,null,null),collapsed:H?u(K,null,null):u(J,null,null)},re=a.value?"collapsed":"expanded",oe=ne[re],ie=O!==null?W||u("div",{class:"".concat(s,"-trigger"),onClick:_,style:{width:b}},[O||oe]):null,le=[c.style,{flex:"0 0 ".concat(b),maxWidth:b,minWidth:b,width:b}],se=G(s,"".concat(s,"-").concat(ae),(o={},x(o,"".concat(s,"-collapsed"),!!a.value),x(o,"".concat(s,"-has-trigger"),U&&O!==null&&!W),x(o,"".concat(s,"-below"),!!l.value),x(o,"".concat(s,"-zero-width"),parseFloat(b)===0),o),c.class);return u("aside",P(P({},c),{},{class:se,style:le}),[u("div",{class:"".concat(s,"-children")},[(h=v.default)===null||h===void 0?void 0:h.call(v)]),U||l.value&&W?ie:null])}}});var Pe=L,ke=N,Ae=B;const ze=ye(T,{Header:L,Footer:M,Content:B,Sider:N,install:function(e){return e.component(T.name,T),e.component(L.name,L),e.component(M.name,M),e.component(N.name,N),e.component(B.name,B),e}});export{ke as L,Pe as a,ze as b,Ae as c};
- //# sourceMappingURL=index-5769f132.js.map
|