Files
qhmes/web-dist/js/index-BskC1_qK.js
2026-06-16 18:19:57 +08:00

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:"ALayoutContent"})(R);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"};function Z(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?Object(arguments[o]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.forEach(function(n){Se(e,n,t[n])})}return e}function Se(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}var D=function(o,t){var i=Z({},o,t.attrs);return g(le,Z({},i,{icon:be}),null)};D.displayName="BarsOutlined";D.inheritAttrs=!1;const G={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},$e=()=>({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:p.any,width:p.oneOfType([p.number,p.string]),collapsedWidth:p.oneOfType([p.number,p.string]),breakpoint:p.oneOf(X("xs","sm","md","lg","xl","xxl","xxxl")),theme:p.oneOf(X("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),Ce=(()=>{let e=0;return function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${o}${e}`}})(),k=L({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:se($e(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,o){let{emit:t,attrs:i,slots:n}=o;const{prefixCls:f}=A("layout-sider",e),d=ge(U,void 0),l=E(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),c=E(!1);V(()=>e.collapsed,()=>{l.value=!!e.collapsed}),q(de,l);const h=(a,m)=>{e.collapsed===void 0&&(l.value=a),t("update:collapsed",a),t("collapse",a,m)},y=E(a=>{c.value=a.matches,t("breakpoint",a.matches),l.value!==a.matches&&h(a.matches,"responsive")});let r;function s(a){return y.value(a)}const v=Ce("ant-sider-");d&&d.addSider(v),fe(()=>{V(()=>e.breakpoint,()=>{try{r==null||r.removeEventListener("change",s)}catch(a){r==null||r.removeListener(s)}if(typeof window!="undefined"){const{matchMedia:a}=window;if(a&&e.breakpoint&&e.breakpoint in G){r=a(`(max-width: ${G[e.breakpoint]})`);try{r.addEventListener("change",s)}catch(m){r.addListener(s)}s(r)}}},{immediate:!0})}),pe(()=>{try{r==null||r.removeEventListener("change",s)}catch(a){r==null||r.removeListener(s)}d&&d.removeSider(v)});const S=()=>{h(!l.value,"clickTrigger")};return()=>{var a,m;const u=f.value,{collapsedWidth:M,width:J,reverseArrow:O,zeroWidthTriggerStyle:K,trigger:$=(a=n.trigger)===null||a===void 0?void 0:a.call(n),collapsible:N,theme:Q}=e,z=l.value?M:J,b=me(z)?`${z}px`:String(z),T=parseFloat(String(M||0))===0?g("span",{onClick:S,class:j(`${u}-zero-width-trigger`,`${u}-zero-width-trigger-${O?"right":"left"}`),style:K},[$||g(D,null,null)]):null,Y={expanded:O?g(_,null,null):g(F,null,null),collapsed:O?g(F,null,null):g(_,null,null)},ee=l.value?"collapsed":"expanded",te=Y[ee],oe=$!==null?T||g("div",{class:`${u}-trigger`,onClick:S,style:{width:b}},[$||te]):null,re=[i.style,{flex:`0 0 ${b}`,maxWidth:b,minWidth:b,width:b}],ne=j(u,`${u}-${Q}`,{[`${u}-collapsed`]:!!l.value,[`${u}-has-trigger`]:N&&$!==null&&!T,[`${u}-below`]:!!c.value,[`${u}-zero-width`]:parseFloat(b)===0},i.class);return g("aside",W(W({},i),{},{class:ne,style:re}),[g("div",{class:`${u}-children`},[(m=n.default)===null||m===void 0?void 0:m.call(n)]),N||c.value&&T?oe:null])}}}),Le=C,Be=w,Oe=k,ze=H,Te=x(P,{Header:C,Footer:w,Content:H,Sider:k,install:e=>(e.component(P.name,P),e.component(C.name,C),e.component(w.name,w),e.component(k.name,k),e.component(H.name,H),e)});export{Te as L,Oe as a,ze as b,Le as c,Be as d};