index-C3btRQxu.js 33 KB

1
  1. import{_ as Ue,a as Fe,b as Pe}from"./index-N2jux3wK.js";import{u as Oe,a as ge,b as be,i as ve,c as he,o as He,d as xe,e as Ke,f as $e,l as We,r as ze,g as De,p as Ne,h as Ie}from"./index-CL6hUm94.js";import{u as Ce,_ as Ee}from"./route-view-BRnePKql.js";import{f as je,u as e,ac as Ge,V as X,a8 as ie,a9 as h,a5 as o,aa as l,a3 as w,k as i,ad as S,G as B,c as L,a2 as b,ae as x,af as R,s as J,F as T,S as K,ag as U,ah as V,ai as Ve,aj as Y,H as Je,n as Se,A as we,ak as Qe,b as Xe,B as ye,w as Ye,al as pe}from"./vue-DApy1uhY.js";import{b as Ze,M as Z,c as te,U as et,e as tt,f as at,L as nt,D as _e,g as qe,h as se,S as lt,i as ot,I as it,j as st,m as dt,n as Me,p as rt,q as ct,r as ut,s as Re,t as ae,u as re,v as Be,w as mt,x as ce,y as ue,z as de,B as ke,E as ft,F as ht,N as yt,G as pt,H as kt,J as gt,R as bt,K as vt,T as xt,O as $t}from"./antd-B7v2hwFR.js";import{u as N,e as ee,s as E,a as ne,b as H,n as le,c as Ct}from"./context-BAOSbWj-.js";import{u as St}from"./query-breakpoints-uy9h4l3_.js";function me(){return new DOMException("The request is not allowed","NotAllowedError")}async function wt(t){if(!navigator.clipboard)throw me();return navigator.clipboard.writeText(t)}async function _t(t){const n=document.createElement("span");n.textContent=t,n.style.whiteSpace="pre",n.style.webkitUserSelect="auto",n.style.userSelect="all",document.body.appendChild(n);const a=window.getSelection(),u=window.document.createRange();a.removeAllRanges(),u.selectNode(n),a.addRange(u);let f=!1;try{f=window.document.execCommand("copy")}finally{a.removeAllRanges(),window.document.body.removeChild(n)}if(!f)throw me()}async function qt(t){try{await wt(t)}catch(n){try{await _t(t)}catch(a){throw a||n||me()}}}var Mt=(t=3e3)=>{const n=je(!1);return{copied:n,copy:u=>{const f=e(u);qt(f).then(()=>{n.value=!0;const r=setTimeout(()=>{n.value=!1,clearTimeout(r)},t)})}}};const Rt={hover:"bg-[var(--hover-color)]",flex:"","items-center":"","h-48px":"","px-12px":"","cursor-pointer":"",class:"transition-all-300"},Bt={class:"anticon"},Tt={__name:"index",setup(t){const n=Oe(),a=ge(),u=Ce(),f=be(),r=Ge(),{avatar:y,nickname:m,userInfo:d}=X(a);async function C({key:$}){if($==="logout"){const g=n.loading("退出登录...",0);try{await a.logout()}finally{g(),n.success("退出登录成功",3),r.push({path:"/login"}).then(()=>{u.clear(),f.clear()})}}}return($,g)=>{const v=Ze,p=ie("RouterLink"),s=te,c=at,M=Z,W=_e;return o(),h(W,null,{overlay:l(()=>[i(M,{onClick:C},{default:l(()=>[i(s,{key:"0"},{icon:l(()=>[i(e(et))]),default:l(()=>[i(p,{to:"/account/center"},{default:l(()=>g[0]||(g[0]=[B(" 个人中心 ")])),_:1})]),_:1}),i(s,{key:"1"},{icon:l(()=>[i(e(tt))]),default:l(()=>[i(p,{to:"/account/settings"},{default:l(()=>g[1]||(g[1]=[B(" 个人设置 ")])),_:1})]),_:1}),i(c),i(s,{key:"logout"},{icon:l(()=>[i(e(nt))]),default:l(()=>[g[2]||(g[2]=B(" 退出登录 "))]),_:1})]),_:1})]),default:l(()=>[w("span",Rt,[i(v,{src:e(y)??"/logo.svg","mr-8px":"",size:"small"},null,8,["src"]),w("span",Bt,S(e(m)),1)])]),_:1})}}},Lt={"c-primary":""},At=["src"],Ut={key:0},Ft={__name:"global-header-logo",setup(t){const{logo:n,title:a,layout:u,isMobile:f}=N(),r=L(()=>({"ant-pro-global-header-logo":u.value==="mix"||f.value,"ant-pro-top-nav-header-logo":u.value==="top"&&!f.value}));return(y,m)=>(o(),b("div",{class:R(e(r))},[w("a",Lt,[w("img",{src:e(n)},null,8,At),e(f)?x("",!0):(o(),b("h1",Ut,S(e(a)),1))])],2))}},Pt={__name:"index",setup(t){const{layout:n,isMobile:a,handleMobileCollapsed:u,theme:f,menuHeader:r,collapsed:y,handleCollapsed:m,leftCollapsed:d}=N(),C=J("ant-pro-global-header"),$=L(()=>({[C.value]:!0,[`${C.value}-layout-${n.value}`]:!!n.value,[`${C.value}-inverted`]:f.value==="inverted"&&n.value==="top"}));return(g,v)=>{const p=lt;return o(),b("div",{class:R([e($)])},[e(n)==="side"&&!e(a)&&!e(d)?(o(),b("span",{key:0,class:"ml-0 text-18px",onClick:v[0]||(v[0]=s=>{var c;return(c=e(m))==null?void 0:c(!e(y))})},[e(y)?(o(),h(e(qe),{key:0})):(o(),h(e(se),{key:1}))])):x("",!0),e(r)?(o(),b(T,{key:1},[e(n)!=="side"||e(a)?(o(),h(Ft,{key:0})):x("",!0)],64)):x("",!0),e(a)?(o(),b("span",{key:2,class:"ant-pro-global-header-collapsed-button",onClick:v[1]||(v[1]=(...s)=>e(u)&&e(u)(...s))},[i(e(se))])):x("",!0),w("div",{class:R(["flex-1",e(n)==="top"?`${e(C)}-top`:"overflow-x-auto"])},[K(g.$slots,"headerContent")],2),i(p,{align:"center","flex-shrink-0":""},{default:l(()=>[K(g.$slots,"headerActions")]),_:3})],2)}}},Ot={__name:"index",setup(t){const{headerHeight:n,fixedHeader:a,layout:u,isMobile:f,collapsed:r,collapsedWidth:y,siderWidth:m,menu:d,splitMenus:C,selectedMenus:$}=N(),g=L(()=>{const s={height:`${n.value}px`,lineHeight:`${n.value}px`,paddingInline:0};if((a.value||u.value==="mix")&&(s.zIndex=100,s.width="100%",s.right=0),u.value==="side"&&d.value){if(!f.value&&a.value){const c=r.value?y.value:m.value;s.width=`calc(100% - ${c}px)`}s.zIndex=19}return s}),v=L(()=>{const s=[];return(a.value||u.value==="mix")&&s.push("ant-pro-fixed-header"),u.value&&s.push("ant-pro-fixed-header-action"),u.value==="mix"&&s.push("ant-pro-fixed-header-inverted"),s}),p=L(()=>a.value||u.value==="mix"&&(C.value?($.value??[]).length>0:!0));return(s,c)=>{const M=ot;return o(),b(T,null,[e(p)?(o(),h(M,{key:0,style:U({height:`${e(n)}px`,lineHeight:`${e(n)}px`,background:"transparent"})},null,8,["style"])):x("",!0),i(M,{style:U(e(g)),class:R(e(v))},{default:l(()=>[i(Pt,null,V({_:2},[s.$slots.headerActions?{name:"headerActions",fn:l(()=>[K(s.$slots,"headerActions")]),key:"0"}:void 0,s.$slots.headerContent?{name:"headerContent",fn:l(()=>[K(s.$slots,"headerContent")]),key:"1"}:void 0]),1024)]),_:3},8,["style","class"])],64)}}},oe={__name:"async-icon",props:{icon:{type:[String,Function],required:!0}},setup(t){const n=t,a=L(()=>{if(ve(n.icon)){const u=n.icon();if(u)return u}else return it[n.icon]});return(u,f)=>t.icon?(o(),h(Ve(e(a)),{key:0})):x("",!0)}},Ht=["href","target"],Kt=["href","target"],Te={__name:"sub-menu",props:{item:{type:Object,required:!0},link:{type:Boolean,required:!1,default:!0}},setup(t){function n(a){return ve(a)?a():a}return(a,u)=>{const f=ie("sub-menu",!0),r=ie("RouterLink"),y=te,m=st;return t.item.children&&!t.item.hideChildrenInMenu?(o(),h(m,{key:t.item.path},V({title:l(()=>[B(S(n(t.item.title)),1)]),default:l(()=>[(o(!0),b(T,null,Y(t.item.children,d=>(o(),b(T,null,[d.hideInMenu?x("",!0):(o(),b(T,{key:0},[d.children?(o(),h(f,{key:d.path,item:d},null,8,["item"])):(o(),h(y,{key:d.path},V({default:l(()=>[e(he)(d.path)?(o(),b("a",{key:1,href:d.path,target:d.target??"_blank"},S(n(d.title)),9,Ht)):(o(),b(T,{key:0},[t.link?(o(),h(r,{key:0,to:d.path},{default:l(()=>[B(S(n(d.title)),1)]),_:2},1032,["to"])):(o(),b(T,{key:1},[B(S(n(d.title)),1)],64))],64))]),_:2},[d.icon?{name:"icon",fn:l(()=>[i(oe,{icon:d.icon},null,8,["icon"])]),key:"0"}:void 0]),1024))],64))],64))),256))]),_:2},[t.item.icon?{name:"icon",fn:l(()=>[i(oe,{icon:t.item.icon},null,8,["icon"])]),key:"0"}:void 0]),1024)):(o(),h(y,{key:t.item.path},V({default:l(()=>[e(he)(t.item.path)?(o(),b("a",{key:1,href:t.item.path,target:t.item.target??"_blank"},S(n(t.item.title)),9,Kt)):(o(),b(T,{key:0},[t.link?(o(),h(r,{key:0,to:t.item.path},{default:l(()=>[B(S(n(t.item.title)),1)]),_:1},8,["to"])):(o(),b(T,{key:1},[B(S(n(t.item.title)),1)],64))],64))]),_:2},[t.item.icon?{name:"icon",fn:l(()=>[i(oe,{icon:t.item.icon},null,8,["icon"])]),key:"0"}:void 0]),1024))}}},Le={__name:"index",setup(t){const{theme:n,collapsed:a,layout:u,isMobile:f,selectedMenus:r,selectedKeys:y,openKeys:m,handleOpenKeys:d,handleSelectedKeys:C,handleMenuSelect:$}=N(),g=L(()=>n.value==="inverted"?"dark":n.value);return(v,p)=>{const s=Z;return o(),h(s,{"selected-keys":e(y),"open-keys":e(a)?[]:e(m),mode:e(u)==="top"&&!e(f)?"horizontal":"inline",theme:e(g),collapsed:e(a),class:"ant-pro-sider-menu","onUpdate:openKeys":e(d),"onUpdate:selectedKeys":e(C),onSelect:e($)},{default:l(()=>[(o(!0),b(T,null,Y(e(r),c=>(o(),b(T,null,[c.hideInMenu?x("",!0):(o(),h(Te,{key:c.path,item:c},null,8,["item"]))],64))),256))]),_:1},8,["selected-keys","open-keys","mode","theme","collapsed","onUpdate:openKeys","onUpdate:selectedKeys","onSelect"])}}},Wt=["src"],zt={class:"flex-1 of-x-hidden of-y-auto scrollbar"},Ae={__name:"index",setup(t){const{collapsed:n,leftCollapsed:a,handleCollapsed:u,selectedMenus:f,splitMenus:r,layout:y,logo:m,theme:d,title:C,collapsedWidth:$,siderWidth:g,headerHeight:v,fixedSider:p,isMobile:s,header:c}=N(),M=J("ant-pro-sider"),W=L(()=>{const k={paddingTop:`${y.value!=="side"&&!s.value?v.value:0}px`,transition:"background-color 0.3s ease 0s, min-width 0.3s ease 0s, max-width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) 0s",overflow:"hidden"};return y.value==="mix"&&c.value===!1&&(k.paddingTop="0px"),k}),Q=L(()=>({[M.value]:!0,[`${M.value}-fixed`]:p.value,[`${M.value}-layout-${y.value}`]:!!y.value})),I=L(()=>(y.value==="side"||s.value)&&y.value!=="mix");return(k,q)=>{const _=te,P=Z,O=dt;return o(),b(T,null,[e(p)?(o(),b("div",{key:0,style:U({width:e(n)?`${e($)}px`:`${e(g)}px`,maxWidth:e(n)?`${e($)}px`:`${e(g)}px`,minWidth:e(n)?`${e($)}px`:`${e(g)}px`,...e(W)})},null,4)):x("",!0),!e(r)||(e(f)??[]).length>0?(o(),h(O,{key:1,theme:e(d)==="inverted"?"dark":"light",collapsed:e(n)&&!e(s),trigger:null,"collapsed-width":e($),width:e(g),collapsible:"",class:R(e(Q)),style:U(e(W))},{default:l(()=>[e(I)?(o(),b("div",{key:0,class:R(["ant-pro-sider-logo",e(n)&&!e(s)?"ant-pro-sider-collapsed":""])},[w("a",null,[w("img",{src:e(m),alt:"logo"},null,8,Wt),!e(n)||e(s)?(o(),b("h1",{key:0,style:U({color:e(d)==="inverted"||e(d)==="dark"?"#fff":"#000"})},S(e(C)),5)):x("",!0)])],2)):x("",!0),w("div",zt,[i(Le)]),!e(s)&&e(a)?(o(),b("div",{key:1,class:R(["w-100% flex-shrink-0 ant-pro-sider-collapsed-button",e(d)==="inverted"?"ant-pro-sider-collapsed-button-inverted":""])},[i(P,{class:"ant-pro-sider-menu",mode:"inline",theme:e(d)==="inverted"?"dark":"light",selectable:!1,onClick:q[0]||(q[0]=z=>{var D;return(D=e(u))==null?void 0:D(!e(n))})},{default:l(()=>[i(_,null,{icon:l(()=>[e(n)?(o(),h(e(qe),{key:0})):(o(),h(e(se),{key:1}))]),_:1})]),_:1},8,["theme"])],2)):x("",!0)]),_:1},8,["theme","collapsed","collapsed-width","width","class","style"])):x("",!0)],64)}}},Dt={__name:"index",setup(t){const{mobileCollapsed:n,siderWidth:a}=N();return(u,f)=>{const r=Me;return o(),h(r,{open:e(n),"onUpdate:open":f[0]||(f[0]=y=>Je(n)?n.value=y:null),closable:!1,placement:"left",width:e(a)},{default:l(()=>[i(Ae)]),_:1},8,["open","width"])}}},Nt={__name:"split-menu",setup(t){const{splitState:n,menuData:a,handleSplitSelectedKeys:u}=N(),f=L(()=>{var r;return(r=a.value)==null?void 0:r.map(y=>({...He(y,["children"]),childrenCount:(y.children??[]).length}))});return(r,y)=>{const m=Z;return o(),h(m,{mode:"horizontal",theme:"dark",class:"ant-pro-sider-menu-header","selected-keys":e(n).selectedKeys,"onUpdate:selectedKeys":e(u)},{default:l(()=>[(o(!0),b(T,null,Y(e(f),d=>(o(),b(T,null,[d.hideInMenu?x("",!0):(o(),h(Te,{key:d.path,item:d,link:d.childrenCount<=0},null,8,["item","link"]))],64))),256))]),_:1},8,["selected-keys","onUpdate:selectedKeys"])}}},It={"onUpdate:openKeys":ee(),"onUpdate:selectedKeys":ee(),onMenuSelect:ee()},Et={layout:E("mix"),logo:E(),title:E(),collapsedWidth:le(48),siderWidth:le(234),headerHeight:le(48),menuData:ne(),fixedHeader:H(!1),fixedSider:H(!0),splitMenus:H(),collapsed:H(!1),leftCollapsed:H(!1),theme:E("light"),onCollapsed:ee(),isMobile:H(),contentWidth:E(),header:H(!0),footer:H(!0),menu:H(!0),menuHeader:H(!0),openKeys:ne(),selectedKeys:ne(),copyright:E(),...It},jt=["data-theme"],Gt=Object.assign({name:"BasicLayout"},{__name:"index",props:Et,emits:["update:collapsed"],setup(t,{emit:n}){const a=t,u=n;function f(d){var C;u("update:collapsed",d),(C=a==null?void 0:a.onCollapsed)==null||C.call(a,d)}const{layout:r,contentWidth:y}=Ct(a,{handleCollapsed:f}),m=L(()=>y.value==="Fixed"?"ant-pro-basicLayout-content-fixed":"");return(d,C)=>{const $=ct,g=Fe,v=ut,p=rt;return o(),b("div",{class:"ant-pro-basicLayout","data-theme":d.theme},[i(p,null,{default:l(()=>[d.menu?(o(),b(T,{key:0},[e(r)!=="top"&&!d.isMobile?(o(),h(Ae,{key:0})):x("",!0)],64)):x("",!0),i(p,null,{default:l(()=>[d.header?(o(),h(Ot,{key:0},V({_:2},[d.$slots.headerActions?{name:"headerActions",fn:l(()=>[K(d.$slots,"headerActions")]),key:"0"}:void 0,d.$slots.headerContent||e(r)==="top"||e(r)==="mix"?{name:"headerContent",fn:l(()=>[K(d.$slots,"headerContent",{},()=>[!d.isMobile&&e(r)==="top"?(o(),h(Le,{key:0})):x("",!0),!d.isMobile&&e(r)==="mix"&&a.splitMenus?(o(),h(Nt,{key:1})):x("",!0)])]),key:"1"}:void 0]),1024)):x("",!0),K(d.$slots,"contentPrefix"),i($,{class:"ant-pro-basicLayout-content",flex:"","flex-col":""},{default:l(()=>[w("div",{"h-full":"",flex:"","flex-col":"","flex-1":"",class:R(e(m))},[K(d.$slots,"default")],2)]),_:3}),d.footer?(o(),h(v,{key:1,style:{"background-color":"transparent"}},{default:l(()=>[K(d.$slots,"footerRender",{},()=>[i(Ue,{copyright:d.copyright},V({_:2},[d.$slots.renderFooterLinks?{name:"renderFooterLinks",fn:l(()=>[i(g)]),key:"0"}:void 0]),1032,["copyright"])])]),_:3})):x("",!0)]),_:3})]),_:3}),d.menu?(o(),h(Dt,{key:0})):x("",!0)],8,jt)}}}),Vt={"mb-24px":""},Jt={"font-500":"","mb-12px":"","text-14px":"","line-height-22px":""},j={__name:"body",props:{title:{type:String,required:!1}},setup(t){return(n,a)=>(o(),b("div",Vt,[w("h3",Jt,S(t.title),1),K(n.$slots,"default")]))}},G={__name:"block-checkbox",props:{theme:{type:String,required:!1},isDark:{type:Boolean,required:!1},checked:{type:Boolean,required:!1},t:{type:Function,required:!1}},setup(t){const n=t,a=J("ant-pro-drawer-setting-block-checkbox"),u=L(()=>({[`${a.value}-item`]:!0,[`${a.value}-theme-item`]:n.isDark,[`${a.value}-item-${n.theme}`]:!!n.theme,[`${a.value}-theme-item-${n.theme}`]:n.isDark})),{token:f}=xe();return(r,y)=>{const m=ae;return o(),h(m,null,{title:l(()=>{var d;return[B(S((d=t.t)==null?void 0:d.call(t,`app.setting.pagestyle.${t.theme}`??"")),1)]}),default:l(()=>{var d;return[w("div",{class:R(e(u))},[Se(i(e(Re),{style:U({color:(d=e(f))==null?void 0:d.colorPrimary}),class:R(`${e(a)}-selectIcon`)},null,8,["style","class"]),[[we,t.checked]])],2)]}),_:1})}}},Qt=["onClick"],Xt={__name:"theme-color",props:{colorList:{type:Array,required:!0},color:{type:String,required:!1},onChange:{type:Function,required:!1},t:{type:Function,required:!1}},setup(t){const n=J("ant-pro-drawer-setting-theme-color");return(a,u)=>{const f=ae;return o(),b("div",{class:R(`${e(n)}`)},[w("div",{class:R(`${e(n)}-content`)},[(o(!0),b(T,null,Y(t.colorList,r=>(o(),h(f,{key:r.color},{title:l(()=>{var y;return[B(S((y=t.t)==null?void 0:y.call(t,`app.setting.themecolor.${r.key}`)),1)]}),default:l(()=>[w("div",{class:R(`${e(n)}-block`),style:U({backgroundColor:r.color}),onClick:y=>{var m;return(m=t.onChange)==null?void 0:m.call(t,r.color)}},[Se(i(e(Re),null,null,512),[[we,t.color===r.color]])],14,Qt)]),_:2},1024))),128))],2)],2)}}},Yt={__name:"layout-setting",props:{contentWidth:{type:String,required:!1},layout:{type:String,required:!1},fixedHeader:{type:Boolean,required:!1},fixedSider:{type:Boolean,required:!1},splitMenus:{type:Boolean,required:!1},keepAlive:{type:Boolean,required:!1},accordionMode:{type:Boolean,required:!1},leftCollapsed:{type:Boolean,required:!1},compactAlgorithm:{type:Boolean,required:!1},t:{type:Function,required:!1}},emits:["changeSetting"],setup(t,{emit:n}){const a=t,u=n,f=L(()=>[{title:"内容区域宽度",key:"contentWidth",disabled:!1,disabledReason:""},{title:"固定 Header",key:"fixedHeader",disabled:a.layout==="mix",disabledReason:""},{title:"固定侧边菜单",key:"fixSiderbar",disabled:!1,disabledReason:""},{title:"自动分割菜单",key:"splitMenus",disabled:a.layout!=="mix",disabledReason:""},{title:"缓存功能",key:"keepAlive",disabled:!1,disabledReason:""},{title:"菜单手风琴模式",key:"accordionMode",disabled:!1,disabledReason:""},{title:"侧边菜单折叠 左侧",key:"leftCollapsed",disabled:a.layout!=="side",disabledReason:""},{title:"紧凑模式",key:"compactAlgorithm",disabled:!1,disabledReason:""}]);function r(y,m){u("changeSetting",y,m)}return(y,m)=>{const d=mt,C=Be,$=ce,g=re,v=ae,p=ue;return o(),h(p,{"data-source":e(f),split:!1},{renderItem:l(({item:s})=>[i(v,{title:s.disabled?s.disabledReason:"",placement:"left"},{default:l(()=>[i(g,null,{actions:l(()=>[s.key==="contentWidth"?(o(),h(C,{key:0,size:"small",disabled:s.disabled,value:t.contentWidth||"Fluid","onUpdate:value":m[0]||(m[0]=c=>r("contentWidth",c))},{default:l(()=>[t.layout==="top"?(o(),h(d,{key:0,value:"Fixed"},{default:l(()=>{var c;return[B(S(((c=t.t)==null?void 0:c.call(t,"app.setting.content-width.fixed"))??"Fixed"),1)]}),_:1})):x("",!0),i(d,{value:"Fluid"},{default:l(()=>{var c;return[B(S(((c=t.t)==null?void 0:c.call(t,"app.setting.content-width.fluid"))??"Fluid"),1)]}),_:1})]),_:2},1032,["disabled","value"])):x("",!0),s.key==="fixedHeader"?(o(),h($,{key:1,size:"small",checked:t.fixedHeader,disabled:s.disabled,"onUpdate:checked":m[1]||(m[1]=c=>r("fixedHeader",c))},null,8,["checked","disabled"])):x("",!0),s.key==="fixSiderbar"?(o(),h($,{key:2,size:"small",checked:t.fixedSider,disabled:s.disabled,"onUpdate:checked":m[2]||(m[2]=c=>r("fixedSider",c))},null,8,["checked","disabled"])):x("",!0),s.key==="splitMenus"?(o(),h($,{key:3,size:"small",checked:t.splitMenus,disabled:s.disabled,"onUpdate:checked":m[3]||(m[3]=c=>r("splitMenus",c))},null,8,["checked","disabled"])):x("",!0),s.key==="keepAlive"?(o(),h($,{key:4,size:"small",checked:t.keepAlive,disabled:s.disabled,"onUpdate:checked":m[4]||(m[4]=c=>r("keepAlive",c))},null,8,["checked","disabled"])):x("",!0),s.key==="accordionMode"?(o(),h($,{key:5,size:"small",checked:t.accordionMode,disabled:s.disabled,"onUpdate:checked":m[5]||(m[5]=c=>r("accordionMode",c))},null,8,["checked","disabled"])):x("",!0),s.key==="leftCollapsed"?(o(),h($,{key:6,size:"small",checked:t.leftCollapsed,disabled:s.disabled,"onUpdate:checked":m[6]||(m[6]=c=>r("leftCollapsed",c))},null,8,["checked","disabled"])):x("",!0),s.key==="compactAlgorithm"?(o(),h($,{key:7,size:"small",checked:t.compactAlgorithm,disabled:s.disabled,"onUpdate:checked":m[7]||(m[7]=c=>r("compactAlgorithm",c))},null,8,["checked","disabled"])):x("",!0)]),default:l(()=>{var c;return[w("span",{style:U({opacity:s.disabled?"0.5":"1"})},S(((c=t.t)==null?void 0:c.call(t,`app.setting.content-width.${s.key}`,s.title))??s.title),5)]}),_:2},1024)]),_:2},1032,["title"])]),_:1},8,["data-source"])}}},Zt={__name:"regional-setting",props:{layout:{type:String,required:!1},header:{type:Boolean,required:!1},footer:{type:Boolean,required:!1},menu:{type:Boolean,required:!1},watermark:{type:Boolean,required:!1},menuHeader:{type:Boolean,required:!1},multiTab:{type:Boolean,required:!1},multiTabFixed:{type:Boolean,required:!1},animationName:{type:String,required:!1},animationNameList:{type:Array,required:!1},t:{type:Function,required:!1}},emits:["changeSetting"],setup(t,{emit:n}){const a=t,u=n,f=L(()=>[{title:"动画",key:"animationName",disabled:!1,disabledReason:""},{title:"水印",key:"watermark",disabled:!1,disabledReason:""},{title:"顶栏",key:"header",disabled:!1,disabledReason:""},{title:"页脚",key:"footer",disabled:!1,disabledReason:""},{title:"菜单",key:"menu",disabled:a.layout==="top",disabledReason:""},{title:"菜单头",key:"menuHeader",disabled:!1,disabledReason:""},{title:"多页签",key:"multiTab",disabled:!1,disabledReason:""},{title:"固定多页签",key:"multiTabFixed",disabled:!1,disabledReason:"多页签开启后功能正常使用"}]);function r(y,m){u("changeSetting",y,m)}return(y,m)=>{const d=ce,C=Be,$=re,g=ae,v=ue;return o(),h(v,{"data-source":e(f),split:!1},{renderItem:l(({item:p})=>[i(g,{title:p.disabled?p.disabledReason:"",placement:"left"},{default:l(()=>[i($,null,{actions:l(()=>[p.key!=="animationName"?(o(),h(d,{key:0,size:"small",checked:a[p.key],disabled:p.disabled,"onUpdate:checked":s=>r(p.key,s)},null,8,["checked","disabled","onUpdate:checked"])):(o(),h(C,{key:1,style:{width:"120px"},value:t.animationName,options:t.animationNameList,size:"small","onUpdate:value":s=>r(p.key,s)},null,8,["value","options","onUpdate:value"]))]),default:l(()=>{var s;return[w("span",{style:U({opacity:p.disabled?"0.5":"1"})},S(((s=t.t)==null?void 0:s.call(t,`app.setting.content-area.${p.key}`,p.title))??p.title),5)]}),_:2},1024)]),_:2},1032,["title"])]),_:1},8,["data-source"])}}},ea={__name:"other-setting",props:{colorWeak:{type:Boolean,required:!1},colorGray:{type:Boolean,required:!1},t:{type:Function,required:!1}},emits:["changeSetting"],setup(t,{emit:n}){const a=t,u=n,f=L(()=>[{title:"weakmode",key:"colorWeak",disabled:!1,disabledReason:""},{title:"graymode",key:"colorGray",disabled:!1,disabledReason:""}]);function r(m,d){u("changeSetting",m,d)}function y(m){return Reflect.get(a,m)}return(m,d)=>{const C=ce,$=re,g=ue;return o(),h(g,{"data-source":e(f),split:!1},{renderItem:l(({item:v})=>[i($,null,{actions:l(()=>[i(C,{size:"small",checked:y(v.key),disabled:v.disabled,"onUpdate:checked":p=>r(v.key,p)},null,8,["checked","disabled","onUpdate:checked"])]),default:l(()=>{var p;return[w("span",{style:U({opacity:v.disabled?"0.5":"1"})},S(((p=t.t)==null?void 0:p.call(t,`app.setting.${v.title}`,v.title))??v.title),5)]}),_:2},1024)]),_:1},8,["data-source"])}}},ta={flex:"","gap-2":"","flex-col":""},aa=Object.assign({name:"SettingDrawer"},{__name:"index",props:{open:{type:Boolean,required:!1},theme:{type:String,required:!1,default:"light"},colorPrimary:{type:String,required:!1},colorList:{type:Array,required:!1,default:()=>[{key:"techBlue",color:"#1677FF"},{key:"daybreak",color:"#1890ff"},{key:"dust",color:"#F5222D"},{key:"volcano",color:"#FA541C"},{key:"sunset",color:"#FAAD14"},{key:"cyan",color:"#13C2C2"},{key:"green",color:"#52C41A"},{key:"geekblue",color:"#2F54EB"},{key:"purple",color:"#722ED1"}]},layout:{type:String,required:!1},contentWidth:{type:String,required:!1},fixedHeader:{type:Boolean,required:!1},fixedSider:{type:Boolean,required:!1},splitMenus:{type:Boolean,required:!1},keepAlive:{type:Boolean,required:!1},accordionMode:{type:Boolean,required:!1},leftCollapsed:{type:Boolean,required:!1},watermark:{type:Boolean,required:!1},header:{type:Boolean,required:!1},footer:{type:Boolean,required:!1},menu:{type:Boolean,required:!1},menuHeader:{type:Boolean,required:!1},colorWeak:{type:Boolean,required:!1},colorGray:{type:Boolean,required:!1},multiTab:{type:Boolean,required:!1},multiTabFixed:{type:Boolean,required:!1},compactAlgorithm:{type:Boolean,required:!1},animationName:{type:String,required:!1},animationNameList:{type:Array,required:!1},layoutSetting:{type:Object,required:!1},t:{type:Function,required:!1}},emits:["update:open","settingChange"],setup(t,{emit:n}){const a=t,u=n,{copy:f}=Mt(),r=J("ant-pro-drawer-setting"),{message:y}=Ke();function m(){var s;f(JSON.stringify(a.layoutSetting??{})),y==null||y.success((s=a==null?void 0:a.t)==null?void 0:s.call(a,"app.setting.copyinfo","拷贝成功,请到 config/default-settings.js 中替换默认配置"))}function d(s){u("update:open",s)}function C(s){u("settingChange","theme",s)}function $(s){u("settingChange","colorPrimary",s)}function g(s){u("settingChange","layout",s)}function v(s,c){u("settingChange",s,c)}const{token:p}=xe();return(s,c)=>{var k,q,_;const M=ft,W=ht,Q=pt,I=Me;return o(),b(T,null,[w("div",{class:R(`${e(r)}-handle`),style:U({backgroundColor:(k=e(p))==null?void 0:k.colorPrimary,borderEndStartRadius:`${(q=e(p))==null?void 0:q.borderRadius}px`,borderStartStartRadius:`${(_=e(p))==null?void 0:_.borderRadius}px`}),onClick:c[0]||(c[0]=P=>d(!t.open))},[t.open?(o(),h(e(de),{key:0,class:R(`${e(r)}-handle-icon${t.theme==="light"?"":"-dark"}`),style:{"font-size":"20px"}},null,8,["class"])):(o(),h(e(ke),{key:1,class:R(`${e(r)}-handle-icon${t.theme==="light"?"":"-dark"}`),style:{"font-size":"20px"}},null,8,["class"]))],6),i(I,{open:t.open,width:300,placement:"right",closable:!1,"onUpdate:open":d},{handle:l(()=>{var P,O,z;return[w("div",{class:R(`${e(r)}-handle`),style:U({position:"absolute",top:"240px",right:"300px",backgroundColor:(P=e(p))==null?void 0:P.colorPrimary,borderEndStartRadius:`${(O=e(p))==null?void 0:O.borderRadius}px`,borderStartStartRadius:`${(z=e(p))==null?void 0:z.borderRadius}px`}),onClick:c[1]||(c[1]=D=>d(!t.open))},[t.open?(o(),h(e(de),{key:0,class:R(`${e(r)}-handle-icon${a.theme==="light"?"":"-dark"}`),style:{"font-size":"20px"}},null,8,["class"])):(o(),h(e(ke),{key:1,class:R(`${e(r)}-handle-icon${a.theme==="light"?"":"-dark"}`),style:{"font-size":"20px"}},null,8,["class"]))],6)]}),default:l(()=>{var P,O,z,D,A;return[w("div",{class:R(`${e(r)}-content`)},[i(j,{title:((P=t.t)==null?void 0:P.call(t,"app.setting.pagestyle"))??"整体风格设计"},{default:l(()=>[w("div",{class:R(`${e(r)}-block-checkbox`)},[i(G,{t:t.t,checked:a.theme==="light",theme:"light","is-dark":a.theme==="dark",onClick:c[2]||(c[2]=F=>C("light"))},null,8,["t","checked","is-dark"]),t.layout!=="mix"?(o(),h(G,{key:0,t:t.t,checked:a.theme==="inverted",theme:"inverted","is-dark":a.theme==="dark",onClick:c[3]||(c[3]=F=>C("inverted"))},null,8,["t","checked","is-dark"])):x("",!0),i(G,{t:t.t,checked:a.theme==="dark",theme:"dark","is-dark":a.theme==="dark",onClick:c[4]||(c[4]=F=>C("dark"))},null,8,["t","checked","is-dark"])],2)]),_:1},8,["title"]),i(j,{title:((O=t.t)==null?void 0:O.call(t,"app.setting.themecolor"))??"主题色"},{default:l(()=>[i(Xt,{t:t.t,"color-list":t.colorList,color:t.colorPrimary,onChange:$},null,8,["t","color-list","color"])]),_:1},8,["title"]),i(M),i(j,{title:((z=t.t)==null?void 0:z.call(t,"app.setting.pagestyle.mode"))??"导航模式"},{default:l(()=>[w("div",{class:R(`${e(r)}-block-checkbox`)},[i(G,{t:t.t,theme:"side",checked:t.layout==="side","is-dark":a.theme==="dark",onClick:c[5]||(c[5]=F=>g("side"))},null,8,["t","checked","is-dark"]),i(G,{t:t.t,theme:"top",checked:t.layout==="top","is-dark":a.theme==="dark",onClick:c[6]||(c[6]=F=>g("top"))},null,8,["t","checked","is-dark"]),i(G,{t:t.t,theme:"mix",checked:t.layout==="mix","is-dark":a.theme==="dark",onClick:c[7]||(c[7]=F=>g("mix"))},null,8,["t","checked","is-dark"])],2)]),_:1},8,["title"]),i(Yt,{layout:t.layout,t:t.t,"content-width":t.contentWidth,"fixed-header":t.fixedHeader,"fixed-sider":t.fixedSider,"split-menus":t.splitMenus,"keep-alive":t.keepAlive,"accordion-mode":t.accordionMode,"left-collapsed":t.leftCollapsed,"compact-algorithm":t.compactAlgorithm,onChangeSetting:v},null,8,["layout","t","content-width","fixed-header","fixed-sider","split-menus","keep-alive","accordion-mode","left-collapsed","compact-algorithm"]),i(M),i(j,{title:((D=t.t)==null?void 0:D.call(t,"app.setting.content-area.title"))??"内容区域"},{default:l(()=>[i(Zt,{t:t.t,layout:t.layout,header:t.header,watermark:t.watermark,"menu-header":t.menuHeader,footer:t.footer,"animation-name":t.animationName,"animation-name-list":t.animationNameList,"multi-tab":t.multiTab,"multi-tab-fixed":t.multiTabFixed,menu:t.menu,onChangeSetting:v},null,8,["t","layout","header","watermark","menu-header","footer","animation-name","animation-name-list","multi-tab","multi-tab-fixed","menu"])]),_:1},8,["title"]),i(M),i(j,{title:((A=t.t)==null?void 0:A.call(t,"app.setting.othersettings"))??"其他设置"},{default:l(()=>[i(ea,{t:t.t,"color-weak":t.colorWeak,"color-gray":t.colorGray,onChangeSetting:v},null,8,["t","color-weak","color-gray"])]),_:1},8,["title"]),i(M),i(j,null,{default:l(()=>{var F;return[w("div",ta,[i(W,{type:"warning","show-icon":"",message:((F=t.t)==null?void 0:F.call(t,"app.setting.production.hint"))??"配置栏只在开发环境用于预览,生产环境不会展现,请拷贝后手动修改配置文件"},{icon:l(()=>[i(e(yt))]),_:1},8,["message"]),i(Q,{onClick:m},{default:l(()=>{var fe;return[i(e(kt)),B(" "+S((fe=t.t)==null?void 0:fe.call(t,"app.setting.copy","拷贝设置")),1)]}),_:1})])]}),_:1})],2)]}),_:1},8,["open"])],64)}}}),na=["onClick"],la=["onClick"],oa={class:"w-48px flex item-center justify-center"},ia={__name:"index",setup(t){const n=Ce(),{list:a,activeKey:u}=X(n),{layoutSetting:f}=X($e()),{layout:r,isMobile:y,collapsed:m,collapsedWidth:d,siderWidth:C,menu:$,selectedMenus:g}=N(),v=L(()=>{var q;const k={};if(f.value.multiTabFixed&&(k.position="fixed",k.top=`${f.value.headerHeight}px`,k.zIndex=199,k.right=0),(r.value==="side"||r.value==="mix")&&$.value&&!y.value&&f.value.multiTabFixed&&(q=g.value)!=null&&q.length){const _=m.value?d.value:C.value;k.width=`calc(100% - ${_}px)`}return f.value.header===!1&&(k.top="0px"),k}),p=J(),{height:s}=Qe(p);function c({key:k},q){k==="closeCurrent"?n.close(u.value):k==="closeLeft"?n.closeLeft(q):k==="closeRight"?n.closeRight(q):k==="closeOther"?n.closeOther(q):k==="refresh"&&n.refresh(u.value)}const M=L(()=>a.value.length===1||a.value.filter(k=>!k.affix).length<=1);function W(k){return a.value.findIndex(_=>_.fullPath===k)===0||a.value.filter(_=>!_.affix).length<=1}function Q(k){return a.value.findIndex(_=>_.fullPath===k)===a.value.length-1||a.value.filter(_=>!_.affix).length<=1}const I=L(()=>a.value.length===1||a.value.filter(k=>!k.affix).length<=1);return We(k=>{if(k.fullPath.startsWith("/redirect"))return;const q=a.value.find(_=>_.fullPath===k.fullPath);k.fullPath===u.value&&!(q!=null&&q.loading)||(u.value=k.fullPath,n.addItem(k))},!0),Xe(()=>{ze()}),(k,q)=>{const _=te,P=Z,O=_e,z=gt,D=xt;return o(),b(T,null,[e(f).multiTabFixed?(o(),b("div",{key:0,style:U({height:`${e(s)}px`})},null,4)):x("",!0),i(D,{ref_key:"tabsRef",ref:p,"active-key":e(u),style:U(e(v)),class:"bg-white dark:bg-#242525 w-100% pro-ant-multi-tab","pt-10px":"",type:"card",size:"small","tab-bar-gutter":5,"onUpdate:activeKey":e(n).switchTab},{leftExtra:l(()=>q[1]||(q[1]=[w("div",{class:"w-24px"},null,-1)])),rightExtra:l(()=>[w("div",oa,[i(O,{trigger:["hover"]},{overlay:l(()=>[i(P,{onClick:q[0]||(q[0]=A=>c(A,e(u)))},{default:l(()=>[i(_,{key:"closeOther",disabled:e(M)||e(I)},{default:l(()=>[B(S(k.$t("app.multiTab.closeOther")),1)]),_:1},8,["disabled"]),i(_,{key:"refresh"},{default:l(()=>[B(S(k.$t("app.multiTab.refresh")),1)]),_:1})]),_:1})]),default:l(()=>[i(e(vt),{class:"text-16px"})]),_:1})])]),default:l(()=>[(o(!0),b(T,null,Y(e(a),A=>(o(),h(z,{key:A.fullPath},{tab:l(()=>[i(O,{trigger:["contextmenu"]},{overlay:l(()=>[i(P,{onClick:F=>c(F,A.fullPath)},{default:l(()=>[i(_,{key:"closeCurrent",disabled:e(M)||e(u)!==A.fullPath},{default:l(()=>[B(S(k.$t("app.multiTab.closeCurrent")),1)]),_:2},1032,["disabled"]),i(_,{key:"closeLeft",disabled:e(M)||W(A.fullPath)},{default:l(()=>[B(S(k.$t("app.multiTab.closeLeft")),1)]),_:2},1032,["disabled"]),i(_,{key:"closeRight",disabled:e(M)||Q(A.fullPath)},{default:l(()=>[B(S(k.$t("app.multiTab.closeRight")),1)]),_:2},1032,["disabled"]),i(_,{key:"closeOther",disabled:e(M)||e(I)},{default:l(()=>[B(S(k.$t("app.multiTab.closeOther")),1)]),_:1},8,["disabled"]),i(_,{key:"refresh",disabled:!e(M)},{default:l(()=>[B(S(k.$t("app.multiTab.refresh")),1)]),_:1},8,["disabled"])]),_:2},1032,["onClick"])]),default:l(()=>[w("div",null,[B(S(A.locale?k.$t(A.locale):A.title)+" ",1),e(u)===A.fullPath?(o(),b("button",{key:0,class:"ant-tabs-tab-remove",style:{margin:"0"},onClick:ye(F=>e(n).refresh(A.fullPath),["stop"])},[i(e(bt),{spin:A.loading},null,8,["spin"])],8,na)):x("",!0),!A.affix&&e(a).length>1?(o(),b("button",{key:1,class:"ant-tabs-tab-remove",style:{margin:"0"},onClick:ye(F=>e(n).close(A.fullPath),["stop"])},[i(e(de))],8,la)):x("",!0)])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["active-key","style","onUpdate:activeKey"])],64)}}},ha=Object.assign({name:"ProLayout"},{__name:"index",setup(t){const n=$e(),{layoutSetting:a}=X(n),u=ge(),f=be(),{t:r}=De(),{selectedKeys:y,openKeys:m}=X(f),{isMobile:d,isPad:C}=St();Ye(C,g=>{g?n.toggleCollapsed(!0):n.toggleCollapsed(!1)});const $=L(()=>Ne(n.layoutSetting,["fixedHeader","fixedSider","splitMenus","menuHeader","header","menu","layout","footer","contentWidth","compactAlgorithm"]));return(g,v)=>{const p=Tt,s=Pe,c=$t;return o(),b(T,null,[i(Gt,pe({collapsed:e(a).collapsed,theme:e(a).theme,"menu-data":e(u).menuData},e($),{"selected-keys":e(y),"open-keys":e(a).layout==="top"?[]:e(m),copyright:e(a).copyright,"is-mobile":e(d),logo:e(a).logo,title:e(a).title,"accordion-mode":e(a).accordionMode,"left-collapsed":e(a).leftCollapsed,"header-height":e(a).headerHeight,"onUpdate:openKeys":e(f).handleOpenKeys,"onUpdate:selectedKeys":e(f).handleSelectedKeys,"onUpdate:collapsed":e(n).toggleCollapsed}),{headerActions:l(()=>[i(p),i(s)]),contentPrefix:l(()=>[e(a).multiTab?(o(),h(ia,{key:0})):x("",!0)]),renderFooterLinks:l(()=>v[1]||(v[1]=[])),default:l(()=>[i(c,{"h-full":"",flex:"","flex-col":"","flex-1":"",content:e(a).watermark?e(a).title??"Antdv Pro":""},{default:l(()=>[i(Ee)]),_:1},8,["content"])]),_:1},16,["collapsed","theme","menu-data","selected-keys","open-keys","copyright","is-mobile","logo","title","accordion-mode","left-collapsed","header-height","onUpdate:openKeys","onUpdate:selectedKeys","onUpdate:collapsed"]),i(aa,pe({open:e(a).drawerVisible,"onUpdate:open":v[0]||(v[0]=M=>e(a).drawerVisible=M),t:e(r),theme:e(a).theme,"color-primary":e(a).colorPrimary,"color-weak":e(a).colorWeak,"color-gray":e(a).colorGray,"multi-tab":e(a).multiTab,"multi-tab-fixed":e(a).multiTabFixed,"animation-name-list":e(Ie),"animation-name":e(a).animationName,"keep-alive":e(a).keepAlive,"accordion-mode":e(a).accordionMode,"left-collapsed":e(a).leftCollapsed,watermark:e(a).watermark},e($),{"layout-setting":e(a),onSettingChange:e(n).changeSettingLayout}),null,16,["open","t","theme","color-primary","color-weak","color-gray","multi-tab","multi-tab-fixed","animation-name-list","animation-name","keep-alive","accordion-mode","left-collapsed","watermark","layout-setting","onSettingChange"])],64)}}});export{ha as default};