@gx-design-vue/pro-layout 0.1.0-beta.1 → 0.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,14 +10,6 @@ declare const _default: import("vue").DefineComponent<{
10
10
  }[]>;
11
11
  default: () => never[];
12
12
  };
13
- colorRadioList: {
14
- type: PropType<{
15
- key: keyof ThemeConfig;
16
- title: string;
17
- disabled?: boolean | undefined;
18
- }[]>;
19
- default: () => never[];
20
- };
21
13
  prefixCls: import("vue-types").VueTypeValidableDef<string> & {
22
14
  default: string;
23
15
  };
@@ -35,14 +27,6 @@ declare const _default: import("vue").DefineComponent<{
35
27
  }[]>;
36
28
  default: () => never[];
37
29
  };
38
- colorRadioList: {
39
- type: PropType<{
40
- key: keyof ThemeConfig;
41
- title: string;
42
- disabled?: boolean | undefined;
43
- }[]>;
44
- default: () => never[];
45
- };
46
30
  prefixCls: import("vue-types").VueTypeValidableDef<string> & {
47
31
  default: string;
48
32
  };
@@ -58,10 +42,5 @@ declare const _default: import("vue").DefineComponent<{
58
42
  color: string;
59
43
  title?: string | undefined;
60
44
  }[];
61
- colorRadioList: {
62
- key: keyof ThemeConfig;
63
- title: string;
64
- disabled?: boolean | undefined;
65
- }[];
66
45
  }>;
67
46
  export default _default;
@@ -5299,10 +5299,6 @@ const {
5299
5299
  type: Array,
5300
5300
  default: () => []
5301
5301
  },
5302
- colorRadioList: {
5303
- type: Array,
5304
- default: () => []
5305
- },
5306
5302
  prefixCls: R.string,
5307
5303
  hashId: R.string,
5308
5304
  onChange: Function
@@ -5422,7 +5418,7 @@ const _d = /* @__PURE__ */ X({
5422
5418
  setup(e) {
5423
5419
  const {
5424
5420
  getPrefixCls: t
5425
- } = ne(), [n, r] = It("header"), o = t({
5421
+ } = ne(), [n, r] = It("sider"), o = t({
5426
5422
  suffixCls: "theme-editor",
5427
5423
  isPor: !0
5428
5424
  }), {
@@ -16,4 +16,4 @@
16
16
  ${e.antCls}-menu-submenu-title:hover`]:{color:(ce=(G=e.layout)==null?void 0:G.header)==null?void 0:ce.colorTextMenuActive,borderRadius:e.borderRadius,transition:"none",backgroundColor:(Se=(we=e.layout)==null?void 0:we.header)==null?void 0:Se.colorBgMenuItemSelected,[`${e.antCls}-menu-submenu-arrow`]:{color:(Ie=(Be=e.layout)==null?void 0:Be.header)==null?void 0:Ie.colorTextMenuActive}},[`${e.antCls}-menu-item-selected`]:{color:(Le=(Ve=e.layout)==null?void 0:Ve.header)==null?void 0:Le.colorTextMenuSelected,borderRadius:e.borderRadius,backgroundColor:(Jr=(ze=e.layout)==null?void 0:ze.header)==null?void 0:Jr.colorBgMenuItemSelected}}}},[`${e.antCls}-menu-sub${e.antCls}-menu-inline`]:{backgroundColor:"transparent!important"},[`${e.antCls}-menu-submenu-popup`]:{backgroundColor:"rgba(255, 255, 255, 0.42)","-webkit-backdrop-filter":"blur(8px)",backdropFilter:"blur(8px)",[`${e.antCls}-menu`]:{background:"transparent !important",backgroundColor:"transparent !important",[`${e.antCls}-menu-item:active,
17
17
  ${e.antCls}-menu-submenu-title:active`]:{backgroundColor:"transparent!important"}},[`${e.antCls}-menu-item-selected`]:{color:(_r=($r=e.layout)==null?void 0:$r.sider)==null?void 0:_r.colorTextMenuSelected},[`${e.antCls}-menu-submenu-selected`]:{color:(to=(eo=e.layout)==null?void 0:eo.sider)==null?void 0:to.colorTextMenuSelected},[`${e.antCls}-menu:not(${e.antCls}-menu-horizontal)`]:{[`${e.antCls}-menu-item-selected`]:{backgroundColor:"rgba(0, 0, 0, 0.04)",borderRadius:e.borderRadius,color:(ro=(no=e.layout)==null?void 0:no.sider)==null?void 0:ro.colorTextMenuSelected},[`${e.antCls}-menu-item:hover,
18
18
  ${e.antCls}-menu-item-active,
19
- ${e.antCls}-menu-submenu-title:hover`]:{color:(ao=(oo=e.layout)==null?void 0:oo.sider)==null?void 0:ao.colorTextMenuActive,borderRadius:e.borderRadius,[`${e.antCls}-menu-submenu-arrow`]:{color:(lo=(io=e.layout)==null?void 0:io.sider)==null?void 0:lo.colorTextMenuActive}}}}}},ld=e=>{var t,n;return{[e.componentCls]:{[`&${e.componentCls}-wide`]:{backgroundColor:e.colorBgLayout,[`${e.componentCls}-content`]:{margin:0,marginInlineStart:20}},[`${e.componentCls}-content`]:{position:"relative",margin:(n=(t=e.layout)==null?void 0:t.pageContainer)==null?void 0:n.paddingBlockPageContainerContent},[`${e.componentCls}-container`]:{width:"100%",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,backgroundColor:"transparent"}}}},cd=e=>{var t,n;return{[`${e.componentCls}`]:{"&-fixed":{width:"100%",height:62,background:"transparent"}},[`${e.componentWrapCls}`]:{background:e.colorBgContainer,[`${e.antCls}-tabs-nav`]:{paddingLeft:16,[`${e.componentCls}-title`]:{display:"flex",alignItems:"center",gap:8,[`${e.componentCls}-reload-btn,${e.componentCls}-close-btn`]:{color:e.colorTextSecondary,fontSize:12,margin:0,cursor:"pointer",transition:"color .3s","&:hover":{color:e.colorPrimary}}},[`${e.componentCls}-dropdown-menu-btn`]:{marginInlineEnd:8,padding:12,fontSize:16,cursor:"pointer"}},"&-fixed":{position:"fixed",height:62,top:((n=(t=e.layout)==null?void 0:t.header)==null?void 0:n.heightLayoutHeader)||D.headerHeight,right:0,zIndex:9,transition:"width .2s"}}}};function ud(e){return gt("ProMultiTabs",t=>{const n=on(t,{componentWrapCls:`${t.componentCls}-wrap`});return[cd(n)]},e)}const dd=[{key:"closeOthersTabs",label:"关闭其他"},{key:"closeLeftTabs",label:"关闭左侧"},{key:"closeRightTabs",label:"关闭右侧"},{key:"reloadPage",label:"刷新当前页"}];function sd(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const fd=C.Tabs.TabPane,hd=C.Menu.Item,gd=o.defineComponent({props:Hr,inheritAttrs:!1,setup(e){const{isMobile:t,isFixedMultiTab:n}=o.toRefs(e),r=o.ref(!1),a=o.reactive({activeKey:"",contextMenuActiveKey:""}),i=De.useRouter(),{menuData:l,getPrefixCls:c}=_(),u=c({isPor:!0,suffixCls:"multi-tab"}),{wrapSSR:m,hashId:p}=ud(u),d=o.ref([]);o.watch(d,()=>{var b;(b=e.onChangeTabs)==null||b.call(e,ee.cloneDeep(o.unref(d)))},{deep:!0});const S=o.computed(()=>i.currentRoute.value.path),v=o.computed(()=>n.value&&!t.value),B=o.computed(()=>v.value?`calc(100% - ${e.collapsed?e.collapsedWidth:e.siderWidth}px)`:"100%"),s=o.computed(()=>F.classNames(`${u}-wrap`,{[`${p.value}`]:!0,[`${u}-wrap-fixed`]:e.isFixedMultiTab,[`${u}-wrap-loading`]:e.loading})),h=o.computed(()=>e.isFixedMultiTab?{margin:0,width:B.value,paddingTop:"6px",zIndex:101}:void 0),f=b=>b.fullPath===S.value,g=b=>{if(b.name&&b.meta&&b.meta.tagHidden!==!0){const y=b.fullPath||b.path,E=d.value.find(H=>H.fullPath===y),P={path:b.path,fullPath:y,query:b.query,params:b.params,name:b.name,meta:{...b.meta}};E?Object.assign(E,P):b.meta.tagFixed?d.value.unshift(P):d.value.push(P),f(b)&&(a.activeKey=y)}},k=b=>{b.forEach(y=>{y.meta&&y.meta.tagFixed&&g(y),y.children&&k(y.children)})};o.watch(()=>l.value,b=>{k(b)},{deep:!0,immediate:!0}),o.watch(()=>i.currentRoute.value,b=>{g(b)},{deep:!0,immediate:!0});const A=()=>{const b=d.value.slice(-1)[0];b?i.push(b):i.push("/")},x=async b=>{const y=d.value.find(E=>b===E.fullPath);d.value=d.value.filter(E=>E.fullPath!==b),y&&f(y)&&A()},Q=b=>{const y=d.value.find(E=>E.path===b);a.activeKey!==(y==null?void 0:y.fullPath)&&(y!=null&&y.fullPath)&&i.push(y==null?void 0:y.fullPath)},T=()=>{var b;r.value=!0,e.onReloadPage&&((b=e.onReloadPage)==null||b.call(e)),setTimeout(()=>{r.value=!1},500)},R=b=>b.meta&&b.meta.tagFixed,I=b=>a[b],M=(b,y)=>{const E=d.value.findIndex(P=>P.fullPath===I(y));switch(b){case"closeOthersTabs":d.value=d.value.filter(P=>{var H;return P.fullPath===I(y)||((H=P.meta)==null?void 0:H.tagFixed)});break;case"closeLeftTabs":E&&(d.value=d.value.filter((P,H)=>{var K;return H>=E||((K=P.meta)==null?void 0:K.tagFixed)}));break;case"closeRightTabs":E&&(d.value=d.value.filter((P,H)=>{var K;return H<=E||((K=P.meta)==null?void 0:K.tagFixed)}));break;case"reloadPage":(E===0||E)&&a.activeKey===I(y)&&T();break}a.activeKey!==I(y)&&i.push(I(y))},O=(b,y)=>{const E=d.value.findIndex(P=>P.fullPath===y);switch(b){case"closeOthersTabs":return d.value.filter((X,L)=>{var N;return L!==E&&!((N=X.meta)!=null&&N.tagFixed)}).length===0;case"closeLeftTabs":return d.value.filter((X,L)=>{var N;return L<E&&!((N=X.meta)!=null&&N.tagFixed)}).length===0;case"closeRightTabs":return d.value.filter((X,L)=>{var N;return L>E&&!((N=X.meta)!=null&&N.tagFixed)}).length===0}},W=b=>{let y;const{path:E,stateType:P}=b;return o.createVNode(C.Menu,{selectedKeys:[],onClick:({key:H})=>M(H,P)},sd(y=dd.map(H=>o.createVNode(hd,{key:H.key,disabled:O(H.key,E)},{default:()=>[H.label]})))?y:{default:()=>[y]})},q=b=>{const{router:y}=b;return o.createVNode(C.Dropdown,{trigger:"contextmenu",overlay:o.createVNode(W,{path:(y==null?void 0:y.fullPath)||"",stateType:"contextMenuActiveKey"},null),onOpenChange:E=>{a.contextMenuActiveKey=E&&y.fullPath||""}},{default:()=>{var E;return[o.createVNode("div",{class:[`${u}-title`,p.value]},[(E=y.meta)==null?void 0:E.title,a.activeKey===y.fullPath&&o.createVNode(Z.ReloadOutlined,{class:[`${u}-reload-btn`,p.value],spin:r.value,onClick:P=>{P.stopPropagation(),!r.value&&T()}},null),d.value.length>1&&!R(y)&&o.createVNode(Z.CloseOutlined,{class:[`${u}-close-btn`,p.value],onClick:P=>{P.stopPropagation(),!r.value&&x((y==null?void 0:y.fullPath)||"")}},null)])]}})};return()=>m(o.createVNode(o.Fragment,null,[!!e.isFixedMultiTab&&o.createVNode("div",{class:[`${u}-fixed`,p.value]},null),o.createVNode(C.Tabs,{hideAdd:!0,type:"editable-card",style:h.value,class:s.value,activeKey:a.activeKey,onTabClick:Q},{default:()=>[d.value.map(b=>o.createVNode(fd,{key:b.fullPath,closable:!1,tab:o.createVNode(q,{router:b},null)},null))],rightExtra:()=>o.createVNode(C.Dropdown,{overlay:o.createVNode(W,{path:a.activeKey,stateType:"activeKey"},null)},{default:()=>[o.createVNode(Z.EllipsisOutlined,{class:[`${u}-dropdown-menu-btn`,p.value],rotate:90},null)]})})]))}}),{Content:md}=C.Layout,nt=(e,{slots:t,attrs:n})=>{var s;const{isMobile:r,loading:a,collapsed:i,siderWidth:l,isShowTabsBar:c,isFixedMultiTab:u,onReloadPage:m,onChangeTabs:p}=e;if(e.isChildrenLayout)return(s=t.default)==null?void 0:s.call(t);const{getPrefixCls:d,flatMenuData:S}=_(),v=d({suffixCls:"basic-layout",isPor:!0}),B=o.computed(()=>({[`${v}-content`]:!0}));return o.createVNode(o.Fragment,null,[o.unref(S).length>0&&c&&o.createVNode(gd,{isMobile:r,loading:a,isFixedMultiTab:u,siderWidth:l,collapsed:i,onReloadPage:m,onChangeTabs:p},null),o.createVNode(md,{style:n.style,class:B.value},{default:()=>{var h;return[a&&o.createVNode(Ut,null,null),o.createVNode("div",{style:{opacity:a?"0":void 0}},[(h=t.default)==null?void 0:h.call(t)])]}})])};nt.inheritAttrs=!1,nt.displayName="wrap-content";const bd=e=>{var t,n,r,a;return{[`${e.proComponentsCls}-basic-layout`]:{[`${e.antCls}-layout-header${e.componentCls}${e.componentCls}-light`]:{background:((n=(t=e.layout)==null?void 0:t.header)==null?void 0:n.colorBgMenu)||e.colorBgElevated},[`${e.antCls}-layout-header${e.componentCls}${e.componentCls}-dark`]:{background:(a=(r=e.layout)==null?void 0:r.header)==null?void 0:a.colorDarkBgMenu},[`${e.antCls}-layout-header${e.componentCls}`]:{zIndex:19,paddingBlock:0,paddingInline:0,WebkitBackdropFilter:"blur(8px)",backdropFilter:"blur(8px)",transition:"background-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)",[`&${e.proComponentsCls}`]:{"&-fixed-header":{position:"fixed",width:"100%",zIndex:9,top:0,"&-action":{transition:"width .3s cubic-bezier(.645,.045,.355,1)"}},"&-header-actions":{display:"flex",alignItems:"center",fontSize:"16",cursor:"pointer","& &-item":{paddingBlock:0,paddingInline:8,"&:hover":{color:e.colorText}}},"&-header-realDark":{boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 65%)"},"&-header-actions-header-action":{transition:"width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)"}}}}}};function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe.apply(this,arguments)}var jr=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(a,i){return a[0]===n?(r=i,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),a=this.__entries__[r];return a&&a[1]},t.prototype.set=function(n,r){var a=e(this.__entries__,n);~a?this.__entries__[a][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,a=e(r,n);~a&&r.splice(a,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var a=0,i=this.__entries__;a<i.length;a++){var l=i[a];n.call(r,l[1],l[0])}},t}()}(),Dt=typeof window<"u"&&typeof document<"u"&&window.document===document,rt=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),yd=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(rt):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Ad=2;function pd(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&c()}function l(){yd(i)}function c(){var u=Date.now();if(n){if(u-a<Ad)return;r=!0}else n=!0,r=!1,setTimeout(l,t);a=u}return c}var vd=20,Cd=["top","right","bottom","left","width","height","size","weight"],xd=typeof MutationObserver<"u",wd=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=pd(this.refresh.bind(this),vd)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Dt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),xd?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Dt||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,a=Cd.some(function(i){return!!~r.indexOf(i)});a&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Nr=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},ke=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||rt},Fr=at(0,0,0,0);function ot(e){return parseFloat(e)||0}function Vr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,a){var i=e["border-"+a+"-width"];return r+ot(i)},0)}function Sd(e){for(var t=["top","right","bottom","left"],n={},r=0,a=t;r<a.length;r++){var i=a[r],l=e["padding-"+i];n[i]=ot(l)}return n}function Bd(e){var t=e.getBBox();return at(0,0,t.width,t.height)}function Id(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Fr;var r=ke(e).getComputedStyle(e),a=Sd(r),i=a.left+a.right,l=a.top+a.bottom,c=ot(r.width),u=ot(r.height);if(r.boxSizing==="border-box"&&(Math.round(c+i)!==t&&(c-=Vr(r,"left","right")+i),Math.round(u+l)!==n&&(u-=Vr(r,"top","bottom")+l)),!Md(e)){var m=Math.round(c+i)-t,p=Math.round(u+l)-n;Math.abs(m)!==1&&(c-=m),Math.abs(p)!==1&&(u-=p)}return at(a.left,a.top,c,u)}var Pd=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof ke(e).SVGGraphicsElement}:function(e){return e instanceof ke(e).SVGElement&&typeof e.getBBox=="function"}}();function Md(e){return e===ke(e).document.documentElement}function Td(e){return Dt?Pd(e)?Bd(e):Id(e):Fr}function Ed(e){var t=e.x,n=e.y,r=e.width,a=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,l=Object.create(i.prototype);return Nr(l,{x:t,y:n,width:r,height:a,top:n,right:t+r,bottom:a+n,left:t}),l}function at(e,t,n,r){return{x:e,y:t,width:n,height:r}}var kd=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=at(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Td(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),Od=function(){function e(t,n){var r=Ed(n);Nr(this,{target:t,contentRect:r})}return e}(),Hd=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new jr,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ke(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new kd(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ke(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new Od(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Lr=typeof WeakMap<"u"?new WeakMap:new jr,zr=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=wd.getInstance(),r=new Hd(t,n,this);Lr.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){zr.prototype[e]=function(){var t;return(t=Lr.get(this))[e].apply(t,arguments)}});var Qd=function(){return typeof rt.ResizeObserver<"u"?rt.ResizeObserver:zr}();const Rd=e=>{var t;let n=((t=e==null?void 0:e.vnode)===null||t===void 0?void 0:t.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n},jd=o.defineComponent({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(e,t){let{slots:n}=t;const r=o.reactive({width:0,height:0,offsetHeight:0,offsetWidth:0});let a=null,i=null;const l=()=>{i&&(i.disconnect(),i=null)},c=p=>{const{onResize:d}=e,S=p[0].target,{width:v,height:B}=S.getBoundingClientRect(),{offsetWidth:s,offsetHeight:h}=S,f=Math.floor(v),g=Math.floor(B);if(r.width!==f||r.height!==g||r.offsetWidth!==s||r.offsetHeight!==h){const k={width:f,height:g,offsetWidth:s,offsetHeight:h};Fe(r,k),d&&Promise.resolve().then(()=>{d(Fe(Fe({},k),{offsetWidth:s,offsetHeight:h}),S)})}},u=o.getCurrentInstance(),m=()=>{const{disabled:p}=e;if(p){l();return}const d=Rd(u);d!==a&&(l(),a=d),!i&&d&&(i=new Qd(c),i.observe(d))};return o.onMounted(()=>{m()}),o.onUpdated(()=>{m()}),o.onUnmounted(()=>{l()}),o.watch(()=>e.disabled,()=>{m()},{flush:"post"}),()=>{var p;return(p=n.default)===null||p===void 0?void 0:p.call(n)[0]}}}),Nd=e=>{var t,n,r,a;return{[`${e.proComponentsCls}-header`]:{"&-light":{[`${e.componentCls}-logo`]:{h1:{color:e.colorBgSpotlight}}}},[e.componentCls]:{position:"relative",background:"transparent",display:"flex",alignItems:"center",marginBlock:0,paddingInline:16,height:((n=(t=e.layout)==null?void 0:t.header)==null?void 0:n.heightLayoutHeader)||56,boxShadow:"0 1px 4px rgba(0,21,41,.08)",boxSizing:"border-box","&-mix":{boxShadow:"0 1px 4px 0 rgba(0,21,41,.12)"},"&-wide":{boxShadow:"0 1px 4px 0 rgba(0,21,41,.12)",padding:0,[`${e.componentCls}-main`]:{margin:"0 auto"}},["&-main"]:{display:"flex",height:"100%","&-left":{display:"flex",minWidth:192}},"> a":{height:"100%"},"> *":{height:"100%"},[`${e.proComponentsCls}-layout-apps-icon`]:{marginInlineEnd:16},"&-collapsed-button":{minHeight:"22px",color:(a=(r=e.layout)==null?void 0:r.header)==null?void 0:a.colorTextMenu,fontSize:"18px",marginInlineEnd:"16px"},"&-logo":{position:"relative",marginInlineEnd:"16px",a:{display:"flex",alignItems:"center",height:"100%",minHeight:"22px",fontSize:"20px"},img:{height:"28px"},h1:{marginBlock:0,marginInline:0,marginInlineStart:12,fontWeight:"500",color:e.colorWhite,fontSize:16},"&-mix":{display:"flex",alignItems:"center"}},"&-logo-mobile":{minWidth:"24px",marginInlineEnd:0}}}},Dr={...Y,...zt},Fd=(e,t)=>e===!1?null:e?e(t,null):t,Vd=o.defineComponent({props:Dr,setup(e){const t=o.ref("auto"),n=({width:r})=>{t.value=r};return()=>o.createVNode("div",{style:{minWidth:typeof t.value=="string"?t.value:`${t.value}px`}},[o.createVNode("div",{style:{paddingRight:"8px"}},[o.createVNode(jd,{onResize:n},{default:()=>[e.rightContentRender&&typeof e.rightContentRender=="function"?o.createVNode("div",null,[e.rightContentRender({...e})]):o.createVNode("div",null,null)]})])])}}),Wr=o.defineComponent({props:Dr,inheritAttrs:!1,setup(e,{slots:t,emit:n}){const r=De.useRouter(),{token:a}=se(),{getPrefixCls:i,openKeys:l,selectedKeys:c}=_(),{width:u}=Xt.useWindowSize(),m=i({suffixCls:"global-header",isPor:!0}),{wrapSSR:p,hashId:d}=ae("ProGlobalHeader",[Nd],m),S=o.computed(()=>({[`${d.value}`]:!0,[`${m}`]:!0,[`${m}-${e.layout}`]:!0})),v=f=>{var g;if(r.currentRoute){const k=r.currentRoute.value.matched.concat();e.onSelect&&f==="select"&&e.onSelect(k.filter(A=>A.name!=="index").map(A=>A.path)),e.onOpenKeys&&f==="openKeys"&&((g=e.onOpenKeys)==null||g.call(e,k.filter(A=>A.path!==r.currentRoute.value.path).map(A=>A.path)))}},B=()=>{n("collapse",!e.collapsed)},s=o.computed(()=>e.collapsedButtonRender||Er),h=()=>{var f;return o.createVNode(o.Fragment,null,[e.layout==="mix"&&!e.isMobile&&e.splitMenus?o.createVNode("div",{style:{flex:1},class:[`${m}-menu`,d.value]},[o.createVNode(C.ConfigProvider,{theme:{components:{Layout:{headerBg:"transparent",bodyBg:"transparent"},Menu:mr({radiusItem:4,colorActiveBarWidth:0,colorActiveBarHeight:2,colorActiveBarBorderSize:0,horizontalItemBorderRadius:4},a.value||{},e.theme,"header")}}},{default:()=>[o.createVNode(Vt,o.mergeProps({theme:e.theme,mode:e.mode,collapsed:e.collapsed,menuData:e.menuData,openKeys:l.value,selectedKeys:c.value,iconfontUrl:e.iconfontUrl,menuItemRender:e.menuItemRender,subMenuItemRender:e.subMenuItemRender,class:{"top-nav-menu":e.mode==="horizontal",[`${d.value}`]:!0}},{"onUpdate:openKeys":()=>v("openKeys"),"onUpdate:selectedKeys":()=>v("select")}),null)]})]):o.createVNode("div",{style:{flex:1}},[(f=t.default)==null?void 0:f.call(t)]),e.layout!=="simple"&&o.createVNode(Vd,o.mergeProps(e,{extraRightDropdownRender:e.extraRightDropdownRender,rightContentRender:e.rightContentRender}),null)])};return()=>{const f=o.createVNode("span",{class:[`${m}-logo`,e.isMobile?"mobile":"",d.value],key:"logo"},[o.createVNode("a",null,[Mr(e.logo)])]);return p(o.createVNode("div",{class:S.value},[e.isMobile?o.createVNode(o.Fragment,null,[Fd(e.menuHeaderRender,f),e.isMobile&&o.unref(s)&&o.createVNode("span",{class:`${m}-collapsed-button ${d.value}`,onClick:B},[o.unref(s)(e.collapsed)]),h()]):e.layout==="mix"||e.layout==="wide"?o.createVNode(o.Fragment,null,[o.createVNode("div",{style:{width:e.layout==="wide"?`${e.wideWidth}px`:void 0,padding:e.layout==="wide"&&u.value<e.wideWidth?"0 50px":void 0},class:`${m}-main ${d.value}`},[o.createVNode("div",{class:`${m}-main-left ${d.value}`},[o.createVNode(Lt,o.mergeProps(ee.omit(e,"onMenuHeaderClick"),{renderKey:"headerTitleRender"}),null)]),h()])]):h()]))}}});function Ld(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const{Header:Kr}=C.Layout,Wt=o.defineComponent({inheritAttrs:!1,props:Or,setup(e){const{theme:t,isMobile:n,fixedHeader:r,headerHeight:a,layout:i,onCollapse:l,splitMenus:c}=o.toRefs(e),{getPrefixCls:u,menuData:m}=_(),p=u({suffixCls:"header",isPor:!0}),d=u({suffixCls:"fixed-header",isPor:!0}),{wrapSSR:S,hashId:v}=ae("ProLayoutHeader",[bd],p),B=o.computed(()=>i.value==="wide"),s=o.computed(()=>r.value),h=o.computed(()=>i.value==="mix"||B.value),f=o.computed(()=>i.value==="side"||i.value==="simple"),g=o.computed(()=>f.value&&"light"||t.value),k=o.computed(()=>({[`${v.value}`]:!0,[`${p}-${g.value}`]:!0,[`${p}`]:!0,[`${d}`]:s.value})),A=o.computed(()=>s.value&&!n.value),x=o.computed(()=>c.value?m.value&&yr(m.value)||[]:[]),Q=o.computed(()=>f.value&&A.value?`calc(100% - ${e.collapsed?e.collapsedWidth:e.siderWidth}px)`:"100%"),T=o.computed(()=>s.value?0:void 0),R=()=>{const I=o.createVNode(Wr,o.mergeProps(e,{theme:g.value,mode:"horizontal",onCollapse:l.value,menuData:x.value}),{default:()=>[h.value?null:e.headerContentRender&&typeof e.headerContentRender=="function"?e.headerContentRender(e):e.headerContentRender]});return e.headerRender?e.headerRender(e,I):I};return()=>{let I;return S(o.createVNode(o.Fragment,null,[s.value&&!B.value&&o.createVNode(Kr,{theme:g.value,style:{height:`${a.value}px`,lineHeight:`${a.value}px`,background:"transparent"}},null),o.createVNode(Kr,{theme:g.value,class:k.value,style:{height:`${a.value}px`,lineHeight:`${a.value}px`,width:Q.value,zIndex:f.value?100:101,right:T.value}},Ld(I=R())?I:{default:()=>[I]})]))}}}),zd=o.defineComponent({name:"BaseProLayout",inheritAttrs:!1,components:{GlobalHeader:Wt,GlobalFooter:tt,SiderMenuWrapper:_e},props:Rr,emits:["update:collapsed","update:open-keys","update:selected-keys","collapse","openKeys","reloadPage","select","menuHeaderClick","menuClick","changeTabs"],setup(e,{emit:t,slots:n}){const r=F.getPrefixCls({suffixCls:"basic-layout",isPor:!0}),{wrapSSR:a,hashId:i}=ae("ProLayout",[id,ld],r),l=Pe.useMediaQuery(),c=o.ref(document.body.getBoundingClientRect().width),u=o.computed(()=>e.layout==="mix"||e.layout==="side"||e.layout==="wide"||!1),m=o.computed(()=>e.layout==="wide"),p=o.computed(()=>u.value),d=o.computed(()=>e.collapsed?e.collapsedWidth:e.siderWidth),S=o.computed(()=>(e.theme||"dark").toLocaleLowerCase().includes("dark")?"dark":"light");o.onMounted(()=>{window.addEventListener("resize",s),s()}),o.onBeforeUnmount(()=>{window.removeEventListener("resize",s)});const v=o.computed(()=>(l.value==="sm"||l.value==="xs")&&!e.disableMobile&&!m.value),B=o.reactive({position:"relative"});(e.isChildrenLayout||e.contentStyle&&e.contentStyle.minHeight)&&(B.minHeight=0);const s=()=>{const M=document.body.getBoundingClientRect().width;c.value!==M&&(l.value=Pe.useMediaQuery().value,c.value=M)},h=(M,O)=>M.headerRender===!1||M.pure?null:o.createVNode(Wt,o.mergeProps(M,{matchMenuKeys:O||[]}),null),f=o.computed(()=>({...e.breadcrumb,itemRender:F.getSlot(n,e,"breadcrumbRender")})),g=o.computed(()=>p.value&&e.selectedKeys?Ar(e.menuData,e.selectedKeys[0]):[]),k=M=>{var O;(O=e.onCollapse)==null||O.call(e,M)},A=M=>{var O;(O=e.onOpenKeys)==null||O.call(e,M)},x=M=>{var O;(O=e.onSelect)==null||O.call(e,M)},Q=M=>{t("menuHeaderClick",M)},T=M=>{t("menuClick",M)},R=M=>{t("changeTabs",M)},I=()=>{t("reloadPage")};return Sr({getPrefixCls:F.getPrefixCls,...vr(o.toRefs(e),["layout","waterMark","menuData","openKeys","headerHeight","selectedKeys","disableMobile","fixSiderbar","fixedHeader"].concat(Object.keys(et))),theme:S.value,hasContentWide:m,isMobile:v,siderWidth:d,breadcrumb:f,flatMenuData:g,hasSide:u,flatMenu:p}),()=>{var Le;const M=F.getSlot(n,e,"collapsedButtonRender"),O=F.getSlot(n,e,"headerContentRender"),W=F.getSlot(n,e,"rightContentRender"),q=F.getSlot(n,e,"headerRender"),b=F.getSlot(n,e,"footerRender"),y=F.getSlot(n,e,"links"),E=F.getSlot(n,e,"copyrightRender"),P=F.getSlot(n,e,"extraRightDropdownRender"),H=F.getSlot(n,e,"menuHeaderRender"),K=F.getSlot(n,e,"menuExtraRender"),X=F.getSlot(n,e,"menuContentRender"),L=F.getSlot(n,e,"menuFooterRender"),N=F.getSlot(n,e,"menuItemRender"),G=F.getSlot(n,e,"subMenuItemRender"),ce={menuItemRender:N,subMenuItemRender:G},we=o.computed(()=>h({...e,...ce,hasSiderMenu:u.value,menuData:e.menuData,isMobile:o.unref(v),onCollapse:k,onOpenKeys:A,onSelect:x,onMenuHeaderClick:Q,rightContentRender:W,extraRightDropdownRender:P,headerTitleRender:H,headerContentRender:O,headerRender:q,theme:S.value},e.matchMenuKeys)),Se=o.computed(()=>({[`${i.value}`]:!0,[`${r}`]:!0,[`${r}-${e.layout}`]:!0})),Be=o.computed(()=>m.value?{minWidth:`${e.wideWidth}px`}:void 0),Ie=o.computed(()=>m.value?{width:e.menuData.length?`${e.wideWidth}px`:`${e.wideWidth-e.siderWidth-20}px`,paddingTop:`${e.headerHeight+20}px`,margin:m.value?"0 auto":void 0}:void 0),Ve=o.computed(()=>m.value?{minHeight:"835px"}:{});return a(o.createVNode(o.Fragment,null,[e.pure?(Le=n.default)==null?void 0:Le.call(n):o.createVNode("div",{class:Se.value,style:Be.value},[o.createVNode(C.Layout,{style:Ie.value},{default:()=>[o.createVNode(_e,o.mergeProps(ee.omit(e,["pure","onCollapse","onSelect","onOpenKeys","onMenuClick","theme"]),{links:y,theme:S.value,isMobile:v.value,menuHeaderRender:H,menuContentRender:X,menuExtraRender:K,menuFooterRender:L,collapsedButtonRender:M,onCollapse:k,onSelect:x,onOpenKeys:A,onMenuClick:T}),null),o.createVNode(C.Layout,{style:B},{default:()=>[we.value,o.createVNode(nt,{isMobile:v.value,collapsedWidth:e.collapsedWidth,isChildrenLayout:e.isChildrenLayout,loading:e.loading,isShowTabsBar:e.showTabsBar,isFixedMultiTab:e.fixedMultiTab,siderWidth:e.siderWidth,collapsed:e.collapsed,style:e.disableContentMargin?Ve.value:{...e.contentStyle,...Ve.value},onReloadPage:I,onChangeTabs:R},{default:()=>{var ze;return[(ze=n.default)==null?void 0:ze.call(n)]}}),b===!1?null:b?b(e):o.createVNode(tt,{copyright:E},null)]})]})])]))}}}),Dd=o.defineComponent({components:{GlobalHeader:Wt,GlobalFooter:tt,SiderMenuWrapper:_e},props:Rr,emits:["update:collapsed","update:open-keys","update:selected-keys","collapse","openKeys","reloadPage","select","menuHeaderClick","menuClick","changeTabs"],setup(e,{slots:t,emit:n}){const r=o.computed(()=>e.theme!==void 0?{dark:e.theme==="realDark"}:{}),a=c=>{n("update:collapsed",c),n("collapse",c)},i=c=>{n("update:open-keys",c),n("openKeys",c)},l=c=>{n("update:selected-keys",c),n("select",c)};return()=>o.createVNode(C.ConfigProvider,{theme:e.primaryColor?{token:{colorPrimary:e.primaryColor}}:void 0},{default:()=>[o.createVNode(Ze,o.mergeProps({token:e.token},r.value),{default:()=>[o.createVNode(zd,o.mergeProps(ee.omit(e,["onSelect","onOpenKeys","onCollapse"]),{onSelect:l,onOpenKeys:i,onCollapse:a}),t)]})]})}}),Xr=(e,t)=>e.map(n=>(n.path=n.path.replace("//","/"),n.children&&n.children.length>0&&(n.children=Xr(n.children,t)),t[`${n.path}`]=n,n)),Wd=e=>{const t=e.find(r=>r.path==="/"),n={};return{menuData:Xr((t==null?void 0:t.children)||[],n),breadcrumb:n}},qr=[{key:"light",title:"亮色菜单风格"},{key:"dark",title:"暗色菜单风格"},{key:"realDark",title:"暗黑模式"}],Ur=[{key:"side",title:"侧边菜单布局"},{key:"mix",title:"混合菜单布局"},{key:"wide",title:"定宽菜单布局"},{key:"simple",title:"简单菜单布局"}],Kd=[{key:"header",title:"顶部主题"},{key:"sider",title:"左侧主题"}],Xd=e=>({[e.componentCls]:{[`${e.antCls}-drawer-content-wrapper`]:{transform:"translate(100%)",display:"block !important"},"&-show":{[`${e.antCls}-drawer-content-wrapper`]:{transform:"translate(0%)"}},"&-trantion-none":{[`${e.antCls}-drawer-content-wrapper`]:{transition:"none !important;"}},["&-handle"]:{position:"absolute",top:240,right:300,zIndex:0,display:"flex",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",fontSize:"16px",textAlign:"center",backgroundColor:e.colorPrimary,borderEndStartRadius:e.borderRadiusLG,borderStartStartRadius:e.borderRadiusLG,"-webkit-backdropilter":"saturate(180%) blur(20px)",backdropFilter:"saturate(180%) blur(20px)",cursor:"pointer",pointerEvents:"auto"},"&-wrapper":{position:"relative",height:`calc(100vh - ${e.marginLG*2}px)`},"&-content":{padding:e.marginLG},"&-body-title":{margin:0,marginBlockEnd:e.marginSM,fontSize:"14px",lineHeight:"22px",color:e.colorBgSpotlight},"&-block-checkbox":{display:"flex",minHeight:42,gap:e.marginSM,"& &-item":{position:"relative",width:"44px",height:"36px",overflow:"hidden",borderRadius:"4px",boxShadow:"0 1px 2.5px rgba(0,0,0,.18)",cursor:"pointer",fontSize:56,lineHeight:"56px","&::before":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"33%",height:"100%",content:"''"},"&::after":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"25%",content:"''"},"&-dark":{backgroundColor:"rgba(0, 21, 41, 0.85)","&::before":{backgroundColor:"rgba(0, 0, 0, 0.65)"},"&::after":{backgroundColor:"rgba(0, 0, 0, 0.85)"}},"&-light":{backgroundColor:"#f7f8fa","&::before":{backgroundColor:"#fff"},"&::after":{backgroundColor:"#fff"}},"&-realDark":{backgroundColor:"rgba(0, 21, 41, 0.85)","&::before":{backgroundColor:"rgba(0, 0, 0, 0.65)"},"&::after":{backgroundColor:"rgba(0, 0, 0, 0.85)"}},"&-dark,&-side":{backgroundColor:"#f7f8fa","&::before":{zIndex:"1",backgroundColor:"#001529"},"&::after":{backgroundColor:"#fff"}},"&-wide":{backgroundColor:"#f7f8fa","&::before":{backgroundColor:"#fff",left:"15%",width:"15%",height:"calc(100% - 38%)",top:"38%"},"&::after":{backgroundColor:"#fff"},"&-content":{position:"absolute",height:"calc(100% - 38%)",top:"38%",right:"15%",width:"calc(100% - 15% - 15% - 10% - 15%)",backgroundColor:"#fff"}},"&-simple":{backgroundColor:"#f7f8fa","&::before":{backgroundColor:"#fff"},"&::after":{display:"none"}},"&-mix":{backgroundColor:"#f7f8fa","&::before":{backgroundColor:"#fff"},"&::after":{backgroundColor:"#001529"}}},"& &-selectIcon":{position:"absolute",insetInlineEnd:"6px",bottom:"4px",color:e.colorPrimary,fontWeight:"bold",fontSize:"14px",pointerEvents:"none",".action":{color:e.colorPrimary}},"& &-icon":{fontSize:56,lineHeight:"56px"}},"&-theme-color":{marginBlockStart:"16px",display:"flex",gap:8,"&-label":{marginBlock:"16px"},"&-block":{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",color:"#fff",fontWeight:"bold",textAlign:"center",borderRadius:"2px",cursor:"pointer"}},"&-list":{[`&${e.antCls}-list-sm ${e.antCls}-list-item`]:{paddingInline:0}}}}),Gr=o.defineComponent({name:"BlockCheckbox",props:{value:j.string,list:{type:Array,default:()=>[]},configType:j.string,prefixCls:j.string,hashId:j.string,onChange:Function},setup(e){return()=>{const t=`${e.prefixCls}-block-checkbox`;return o.createVNode("div",{class:[t,e.hashId]},[e.list.map(n=>o.createVNode(C.Tooltip,{title:n.title,key:n.key},{default:()=>[o.createVNode("div",{class:F.classNames(e.hashId,`${t}-item`,`${t}-item-${n.key}`,`${t}-${e.configType}-item`),onClick:()=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.key)}},[n.key==="wide"&&o.createVNode("div",{class:[`${t}-item-${n.key}-content`,e.hashId]},null),o.createVNode(Z.CheckOutlined,{class:`${t}-selectIcon ${e.hashId}`.trim(),style:{display:e.value===n.key?"block":"none"}},null),n!=null&&n.icon?o.createVNode("div",{class:`${t}-icon ${e.hashId}`.trim()},[n.icon]):null])]}))])}}}),qd=o.defineComponent({name:"ThemeColor",inheritAttrs:!1,props:{settingValue:Object,colorList:{type:Array,default:()=>[]},colorRadioList:{type:Array,default:()=>[]},prefixCls:j.string,hashId:j.string,onChange:Function},setup(e){return()=>{var n;const t=`${e.prefixCls}-theme-color`;return o.createVNode(o.Fragment,null,[o.createVNode("div",{class:`${t} ${e.hashId}`.trim()},[(n=e.colorList)==null?void 0:n.map(({key:r,color:a,title:i})=>r?o.createVNode(C.Tooltip,{key:a,title:i},{default:()=>{var l,c;return[o.createVNode("div",{class:[`${t}-block ${e.hashId}`.trim(),((l=e.settingValue)==null?void 0:l.primaryColor)===a?`${t}-block-checked`:""],style:{backgroundColor:a},onClick:()=>e.onChange&&e.onChange(a)},[((c=e.settingValue)==null?void 0:c.primaryColor)===a&&o.createVNode(Z.CheckOutlined,null,null)])]}}):null)])])}}}),it=o.defineComponent({name:"RegionalChange",props:{label:j.string,value:j.bool,prefixCls:j.string,valueKey:String,hashId:j.string,disabled:j.bool,onChange:Function},setup(e){return()=>o.createVNode(C.List,{class:`${e.prefixCls}-list ${e.hashId}`.trim(),split:!1,size:"small",renderItem:({item:t})=>o.createVNode(C.Tooltip,{title:t.disabled?t.disabledReason:"",placement:"left"},{default:()=>[o.createVNode(C.List.Item,{actions:[t.action]},{default:()=>[o.createVNode("span",{style:{opacity:t.disabled?.5:1}},[t.title])]})]}),dataSource:[{title:e.label,action:o.createVNode(C.Switch,{size:"small",disabled:e.disabled,checked:!!e.value,onChange:t=>{e.onChange&&e.onChange(e.valueKey,t)}},null)}]},null)}}),Ud=e=>({[e.componentCls]:{padding:e.marginLG,"&-title":{display:"flex",alignItems:"center",margin:0,gap:10,marginBlockEnd:e.marginSM,fontSize:"14px",lineHeight:"22px",color:e.colorBgSpotlight},"&-sub-title":{margin:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:"normal",color:e.colorTextDescription},"&-list":{[`&${e.antCls}-list-sm ${e.antCls}-list-item`]:{paddingInline:0,[`${e.antCls}-list-item-action`]:{marginInlineStart:10}}}}});function Gd(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const Yd=o.defineComponent({name:"ThemeEditor",props:{settingValue:Object,onChange:Function},setup(e){const{getPrefixCls:t}=_(),[n,r]=Pe.useState("header"),a=t({suffixCls:"theme-editor",isPor:!0}),{wrapSSR:i,hashId:l}=ae("ProThemeEditor",[Ud],a),{token:c}=se(),u=o.computed(()=>{var v;return(v=c.value)==null?void 0:v.layout}),m=o.computed(()=>{var v,B,s,h,f,g,k,A,x,Q,T,R,I,M,O,W,q,b,y,E,P,H,K,X,L;return[{key:"colorBgMenu",title:"全部背景",disabled:((v=e.settingValue)==null?void 0:v.theme)==="dark"&&["mix","wide"].includes((B=e.settingValue)==null?void 0:B.layout)},{key:"colorDarkBgMenu",title:"全部背景",disabled:((s=e.settingValue)==null?void 0:s.theme)==="light"||((h=e.settingValue)==null?void 0:h.theme)==="dark"&&["side","simple"].includes((f=e.settingValue)==null?void 0:f.layout)},{key:"colorSubItemBg",title:"子菜单背景",disabled:!0},{key:"colorDarkSubItemBg",title:"子菜单背景",disabled:!0},{key:"colorBgMenuItemSelected",title:"菜单选中背景",disabled:((g=e.settingValue)==null?void 0:g.theme)==="dark"&&["mix","wide"].includes((k=e.settingValue)==null?void 0:k.layout)},{key:"colorDarkBgMenuItemSelected",title:"菜单选中背景",disabled:((A=e.settingValue)==null?void 0:A.theme)==="light"||((x=e.settingValue)==null?void 0:x.theme)==="dark"&&["side","simple"].includes((Q=e.settingValue)==null?void 0:Q.layout)},{key:"colorTextMenu",title:"菜单文字颜色",disabled:((T=e.settingValue)==null?void 0:T.theme)==="dark"&&["mix","wide"].includes((R=e.settingValue)==null?void 0:R.layout)},{key:"colorDarkTextMenu",title:"菜单文字颜色",disabled:((I=e.settingValue)==null?void 0:I.theme)==="light"||((M=e.settingValue)==null?void 0:M.theme)==="dark"&&["side","simple"].includes((O=e.settingValue)==null?void 0:O.layout)},{key:"colorTextMenuHover",title:"菜单文字移入颜色",disabled:((W=e.settingValue)==null?void 0:W.theme)==="dark"&&["mix","wide"].includes((q=e.settingValue)==null?void 0:q.layout)},{key:"colorDarkTextMenuHover",title:"菜单文字移入颜色",disabled:((b=e.settingValue)==null?void 0:b.theme)==="light"||((y=e.settingValue)==null?void 0:y.theme)==="dark"&&["side","simple"].includes((E=e.settingValue)==null?void 0:E.layout)},{key:"colorTextMenuSelected",title:"菜单文字选中颜色",disabled:((P=e.settingValue)==null?void 0:P.theme)==="dark"&&["mix","wide"].includes((H=e.settingValue)==null?void 0:H.layout)},{key:"colorDarkTextMenuSelected",title:"菜单文字选中颜色",disabled:((K=e.settingValue)==null?void 0:K.theme)==="light"||((X=e.settingValue)==null?void 0:X.theme)==="dark"&&["side","simple"].includes((L=e.settingValue)==null?void 0:L.layout)}]}),p=o.computed(()=>{var v,B,s,h,f,g,k,A,x,Q,T,R,I,M,O,W,q,b,y,E,P,H,K,X,L,N,G,ce,we,Se,Be,Ie;return[{key:"colorBgMenu",title:"全部背景",disabled:((v=e.settingValue)==null?void 0:v.theme)==="dark"&&["side","simple"].includes((B=e.settingValue)==null?void 0:B.layout)},{key:"colorDarkBgMenu",title:"全部背景",disabled:((s=e.settingValue)==null?void 0:s.theme)==="light"||((h=e.settingValue)==null?void 0:h.theme)==="dark"&&["mix","wide"].includes((f=e.settingValue)==null?void 0:f.layout)},{key:"colorSubItemBg",title:"子菜单背景",disabled:((g=e.settingValue)==null?void 0:g.theme)==="dark"&&["side","simple"].includes((k=e.settingValue)==null?void 0:k.layout)},{key:"colorDarkSubItemBg",title:"子菜单背景",disabled:((A=e.settingValue)==null?void 0:A.theme)==="light"||((x=e.settingValue)==null?void 0:x.theme)==="dark"&&["mix","wide"].includes((Q=e.settingValue)==null?void 0:Q.layout)},{key:"colorBgMenuItemHover",title:"菜单移入背景",disabled:((T=e.settingValue)==null?void 0:T.theme)==="dark"&&((R=e.settingValue)==null?void 0:R.layout)!=="mix"},{key:"colorBgMenuItemSelected",title:"菜单选中背景",disabled:((I=e.settingValue)==null?void 0:I.theme)==="dark"&&((M=e.settingValue)==null?void 0:M.layout)!=="mix"},{key:"colorDarkBgMenuItemSelected",title:"菜单选中背景",disabled:((O=e.settingValue)==null?void 0:O.theme)==="light"||((W=e.settingValue)==null?void 0:W.theme)==="dark"&&["mix","wide"].includes((q=e.settingValue)==null?void 0:q.layout)},{key:"colorTextMenu",title:"菜单文字颜色",disabled:((b=e.settingValue)==null?void 0:b.theme)==="dark"&&((y=e.settingValue)==null?void 0:y.layout)!=="mix"},{key:"colorDarkTextMenu",title:"菜单文字颜色",disabled:((E=e.settingValue)==null?void 0:E.theme)==="light"||((P=e.settingValue)==null?void 0:P.theme)==="dark"&&["mix","wide"].includes((H=e.settingValue)==null?void 0:H.layout)},{key:"colorTextMenuHover",title:"菜单文字移入颜色",disabled:((K=e.settingValue)==null?void 0:K.theme)==="dark"&&((X=e.settingValue)==null?void 0:X.layout)!=="mix"},{key:"colorDarkTextMenuHover",title:"菜单文字移入颜色",disabled:((L=e.settingValue)==null?void 0:L.theme)==="light"||((N=e.settingValue)==null?void 0:N.theme)==="dark"&&["mix","wide"].includes((G=e.settingValue)==null?void 0:G.layout)},{key:"colorTextMenuSelected",title:"菜单文字选中颜色",disabled:((ce=e.settingValue)==null?void 0:ce.theme)==="dark"&&((we=e.settingValue)==null?void 0:we.layout)!=="mix"},{key:"colorDarkTextMenuSelected",title:"菜单文字选中颜色",disabled:((Se=e.settingValue)==null?void 0:Se.theme)==="light"||((Be=e.settingValue)==null?void 0:Be.theme)==="dark"&&["mix","wide"].includes((Ie=e.settingValue)==null?void 0:Ie.layout)}]}),d=o.computed(()=>n.value==="header"?m.value:n.value==="sider"?p.value:[]),S=v=>{var B,s;return(s=(B=u.value)==null?void 0:B[n.value])==null?void 0:s[v]};return()=>{var B,s,h;let v;return i(o.createVNode("div",{class:[a,l.value]},[o.createVNode("h3",{class:[`${a}-title`,l.value]},[o.createTextVNode("主题编辑器"),o.createVNode("div",{class:[`${a}-sub-title`,l.value]},[o.createVNode("span",null,[(B=qr.find(f=>{var g;return f.key===((g=e.settingValue)==null?void 0:g.theme)}))==null?void 0:B.title]),o.createVNode("span",{style:{marginInline:"8px"}},[o.createTextVNode("/")]),o.createVNode("span",null,[(s=Ur.find(f=>{var g;return f.key===((g=e.settingValue)==null?void 0:g.layout)}))==null?void 0:s.title])])]),o.createVNode("div",{class:[`${a}-content`,l.value]},[o.createVNode(C.List,{class:`${a}-list ${l.value}`.trim(),split:!1,size:"small",renderItem:({item:f})=>o.createVNode(C.List.Item,{actions:[f.action]},{default:()=>[o.createVNode("span",{style:{opacity:f.disabled?.5:1}},[f.title])]}),dataSource:[{title:"自定义主题色",action:o.createVNode(qt.GColorPicker,{value:(h=e.settingValue)==null?void 0:h.primaryColor,actions:["confirm"],modes:["rgb"],size:"small",onConfirm:f=>e.onChange&&e.onChange(f,"primaryColor")},null)}]},null),o.createVNode(C.Tabs,{activeKey:n.value,onChange:r},Gd(v=Kd.map(f=>o.createVNode(C.TabPane,{key:f.key,tab:f.title},{default:()=>[o.createVNode(C.List,{class:`${a}-list ${l.value}`.trim(),split:!1,size:"small",renderItem:({item:g})=>o.createVNode(C.List.Item,{actions:[g.action]},{default:()=>[o.createVNode("span",{style:{opacity:g.disabled?.5:1}},[g.title])]}),dataSource:d.value.filter(g=>!g.disabled).map(g=>({...g,action:o.createVNode(qt.GColorPicker,{value:S(g.key),actions:["confirm"],modes:["rgb"],size:"small",onConfirm:k=>e.onChange&&e.onChange(k,n.value,g.key)},null)}))},null)]})))?v:{default:()=>[v]})])]))}}}),Kt=Object.keys(D).filter(e=>e!=="title"),Yr={color:"#fff",fontSize:20},Zd=[{label:"fixedHeader",title:"固定 Header"},{label:"fixSiderbar",title:"固定侧边菜单"},{label:"splitMenus",title:"自动分割菜单"}],Jd=[{label:"showTabsBar",title:"多标签"},{label:"fixedMultiTab",title:"固定多标签"}],Zr=e=>F.isBrowser()?{...ee.pick(D,Kt),...e||{}}:ee.cloneDeep(D),lt=(e,{slots:t})=>{var n;return o.createVNode("div",{style:{marginBottom:"24px"}},[o.createVNode("h3",{class:`${e.prefixCls}-body-title ${e.hashId}`.trim()},[e.title]),(n=t.default)==null?void 0:n.call(t)])},$d=o.defineComponent({name:"SettingDrawer",props:{themeOnly:Boolean,hideHintAlert:Boolean,hideCopyButton:Boolean,weakmode:Boolean,showProgress:Boolean,settings:{type:Object},colorList:{type:[Boolean,Array],default:()=>Ho},onChange:Function,onChangeLayout:Function},emits:["change","changeLayout"],setup(e){const{getPrefixCls:t}=_(),n=t({suffixCls:"setting-drawer",isPor:!0}),{wrapSSR:r,hashId:a}=ae("ProSettingDraw",[Xd],n),i=o.ref(!1),[l,c]=Pe.useState(!1),[u,m]=Pe.useState(!1),p=o.computed(()=>Zr(ee.pick(e.settings,Kt))),[d,S]=Pe.useMergedState(()=>Zr(ee.pick(e.settings,Kt)),{value:p,onChange:e.onChange}),v=o.computed(()=>e.colorList&&F.isArray(e.colorList)?e.colorList:[]),B=o.computed(()=>Xu(o.unref(d))),{copy:s,copied:h,isSupported:f}=Xt.useClipboard();o.watch(l,()=>{i.value||(i.value=!0)});const g=(A,x,Q)=>{const T=["header","sider"],R={};if(Q&&T.includes(A)){R[A]={},R[A][Q]=x,e.onChangeLayout&&e.onChangeLayout(ee.pick(R,T));return}else R[A]=x;if(A==="colorWeak"){const I=document.querySelector("body");I&&(I.dataset.prosettingdrawer=x===!0?I.style.filter:I.dataset.prosettingdrawer||"none",x===!0&&(I.dataset.prosettingdrawer=I.style.filter),I.style.filter=x===!0?"invert(80%)":I.dataset.prosettingdrawer||"none",x||delete I.dataset.prosettingdrawer)}S({...o.unref(d),...pr(ee.omit(R,T))})},k=()=>{f.value&&s(JSON.stringify(o.unref(d)))};return o.watch(h,A=>{A&&C.message.success("拷贝成功,请到 config/default/themeConfig.js 中替换默认配置")}),()=>r(o.createVNode(C.Drawer,{width:300,closable:!1,open:l.value,rootClassName:`${n} ${a.value} ${l.value&&`${n}-show`} ${!i.value&&`${n}-trantion-none`}`,placement:"right",rootStyle:{zIndex:999},bodyStyle:{padding:0},contentWrapperStyle:{transform:"translateX(100%)"},onClose:()=>c(!1),handle:o.createVNode("div",{class:[`${n}-handle`,a.value],onClick:()=>c(!l.value)},[l.value?o.createVNode(Z.CloseOutlined,{style:Yr},null):o.createVNode(Z.SettingOutlined,{style:Yr},null)])},{default:()=>[o.createVNode("div",{class:[`${n}-wrapper`,a.value]},[o.createVNode(so,null,{default:()=>[o.createVNode("div",{class:[`${n}-content`,a.value]},[o.createVNode(lt,{prefixCls:n,hashId:a.value,title:"整体风格设置"},{default:()=>[o.createVNode(Gr,{hashId:a.value,prefixCls:n,list:qr,value:d.value.theme,configType:"theme",key:"navTheme",onChange:A=>g("theme",A)},null)]}),o.createVNode(lt,{hashId:a.value,title:o.createVNode("span",null,[o.createTextVNode("主题色 "),o.createVNode("a",{style:{fontSize:"12px"},onClick:()=>m(!0)},[o.createTextVNode("更多配置")])]),prefixCls:n},{default:()=>[o.createVNode(qd,{hashId:a.value,prefixCls:n,colorList:v.value,settingValue:d.value,onChange:(A,x)=>g(x||"primaryColor",A)},null)]}),!e.themeOnly&&o.createVNode(o.Fragment,null,[o.createVNode(C.Divider,null,null),o.createVNode(lt,{hashId:a.value,prefixCls:n,title:"导航模式"},{default:()=>[o.createVNode(Gr,{prefixCls:n,value:o.unref(d).layout,key:"layout",hashId:a.value,configType:"layout",list:Ur,onChange:A=>g("layout",A)},null)]}),Zd.map(({label:A,title:x})=>o.createVNode(it,{label:x,disabled:o.unref(B)[A],value:o.unref(d)[A],prefixCls:n,hashId:a.value,valueKey:A,onChange:(Q,T)=>g(Q,T)},null)),o.createVNode(C.Divider,null,null),o.createVNode(lt,{hashId:a.value,prefixCls:n,title:"其他设置"},{default:()=>[Jd.map(({label:A,title:x})=>o.createVNode(it,{label:x,disabled:o.unref(B)[A],value:o.unref(d)[A],prefixCls:n,hashId:a.value,valueKey:A,onChange:(Q,T)=>g(Q,T)},null)),e.weakmode&&o.createVNode(it,{label:"色弱模式",value:o.unref(d).colorWeak,prefixCls:n,hashId:a.value,valueKey:"colorWeak",onChange:(A,x)=>g(A,x)},null),e.showProgress&&o.createVNode(it,{label:"顶部进度条",value:o.unref(d).showProgressBar,prefixCls:n,hashId:a.value,valueKey:"showProgressBar",onChange:(A,x)=>g(A,x)},null)]})]),e.hideHintAlert&&e.hideCopyButton?null:o.createVNode(C.Divider,null,null),e.hideHintAlert?null:o.createVNode(C.Alert,{type:"warning",message:"配置栏只在开发环境用于预览,生产环境不会展现,请拷贝后手动修改配置文件",icon:o.createVNode(Z.NotificationOutlined,null,null),showIcon:!0,style:{marginBottom:"16px"}},null),e.hideCopyButton?null:o.createVNode(C.Button,{onClick:()=>k(),block:!0},{default:()=>[o.createVNode(Z.CopyOutlined,null,null),o.createTextVNode("拷贝设置")]})])]})]),o.createVNode(C.Drawer,{width:320,closable:!1,placement:"right",open:u.value,bodyStyle:{padding:0},onClose:()=>m(!1)},{default:()=>[o.createVNode(Yd,{settingValue:d.value,onChange:(A,x,Q)=>g(x||"primaryColor",A,Q)},null)]})]}))}});w.BaseMenu=Vt,w.DefaultHeader=Wr,w.GProLayout=Dd,w.GlobalFooter=tt,w.PageContainer=od,w.PageLoading=Ut,w.SettingDrawer=$d,w.SiderMenuWrapper=_e,w.WrapContent=nt,w.baseMenuProps=Je,w.clearMenuItem=br,w.createContext=Cr,w.createRouteContext=wr,w.flatMap=yr,w.getMenuData=Wd,w.getMenuFirstChildren=Ar,w.handleThemeConfig=pr,w.provideProLayoutContext=Sr,w.useContext=xr,w.useProLayoutContext=_,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
19
+ ${e.antCls}-menu-submenu-title:hover`]:{color:(ao=(oo=e.layout)==null?void 0:oo.sider)==null?void 0:ao.colorTextMenuActive,borderRadius:e.borderRadius,[`${e.antCls}-menu-submenu-arrow`]:{color:(lo=(io=e.layout)==null?void 0:io.sider)==null?void 0:lo.colorTextMenuActive}}}}}},ld=e=>{var t,n;return{[e.componentCls]:{[`&${e.componentCls}-wide`]:{backgroundColor:e.colorBgLayout,[`${e.componentCls}-content`]:{margin:0,marginInlineStart:20}},[`${e.componentCls}-content`]:{position:"relative",margin:(n=(t=e.layout)==null?void 0:t.pageContainer)==null?void 0:n.paddingBlockPageContainerContent},[`${e.componentCls}-container`]:{width:"100%",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,backgroundColor:"transparent"}}}},cd=e=>{var t,n;return{[`${e.componentCls}`]:{"&-fixed":{width:"100%",height:62,background:"transparent"}},[`${e.componentWrapCls}`]:{background:e.colorBgContainer,[`${e.antCls}-tabs-nav`]:{paddingLeft:16,[`${e.componentCls}-title`]:{display:"flex",alignItems:"center",gap:8,[`${e.componentCls}-reload-btn,${e.componentCls}-close-btn`]:{color:e.colorTextSecondary,fontSize:12,margin:0,cursor:"pointer",transition:"color .3s","&:hover":{color:e.colorPrimary}}},[`${e.componentCls}-dropdown-menu-btn`]:{marginInlineEnd:8,padding:12,fontSize:16,cursor:"pointer"}},"&-fixed":{position:"fixed",height:62,top:((n=(t=e.layout)==null?void 0:t.header)==null?void 0:n.heightLayoutHeader)||D.headerHeight,right:0,zIndex:9,transition:"width .2s"}}}};function ud(e){return gt("ProMultiTabs",t=>{const n=on(t,{componentWrapCls:`${t.componentCls}-wrap`});return[cd(n)]},e)}const dd=[{key:"closeOthersTabs",label:"关闭其他"},{key:"closeLeftTabs",label:"关闭左侧"},{key:"closeRightTabs",label:"关闭右侧"},{key:"reloadPage",label:"刷新当前页"}];function sd(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const fd=C.Tabs.TabPane,hd=C.Menu.Item,gd=o.defineComponent({props:Hr,inheritAttrs:!1,setup(e){const{isMobile:t,isFixedMultiTab:n}=o.toRefs(e),r=o.ref(!1),a=o.reactive({activeKey:"",contextMenuActiveKey:""}),i=De.useRouter(),{menuData:l,getPrefixCls:c}=_(),u=c({isPor:!0,suffixCls:"multi-tab"}),{wrapSSR:m,hashId:p}=ud(u),d=o.ref([]);o.watch(d,()=>{var b;(b=e.onChangeTabs)==null||b.call(e,ee.cloneDeep(o.unref(d)))},{deep:!0});const S=o.computed(()=>i.currentRoute.value.path),v=o.computed(()=>n.value&&!t.value),B=o.computed(()=>v.value?`calc(100% - ${e.collapsed?e.collapsedWidth:e.siderWidth}px)`:"100%"),s=o.computed(()=>F.classNames(`${u}-wrap`,{[`${p.value}`]:!0,[`${u}-wrap-fixed`]:e.isFixedMultiTab,[`${u}-wrap-loading`]:e.loading})),h=o.computed(()=>e.isFixedMultiTab?{margin:0,width:B.value,paddingTop:"6px",zIndex:101}:void 0),f=b=>b.fullPath===S.value,g=b=>{if(b.name&&b.meta&&b.meta.tagHidden!==!0){const y=b.fullPath||b.path,E=d.value.find(H=>H.fullPath===y),P={path:b.path,fullPath:y,query:b.query,params:b.params,name:b.name,meta:{...b.meta}};E?Object.assign(E,P):b.meta.tagFixed?d.value.unshift(P):d.value.push(P),f(b)&&(a.activeKey=y)}},k=b=>{b.forEach(y=>{y.meta&&y.meta.tagFixed&&g(y),y.children&&k(y.children)})};o.watch(()=>l.value,b=>{k(b)},{deep:!0,immediate:!0}),o.watch(()=>i.currentRoute.value,b=>{g(b)},{deep:!0,immediate:!0});const A=()=>{const b=d.value.slice(-1)[0];b?i.push(b):i.push("/")},x=async b=>{const y=d.value.find(E=>b===E.fullPath);d.value=d.value.filter(E=>E.fullPath!==b),y&&f(y)&&A()},Q=b=>{const y=d.value.find(E=>E.path===b);a.activeKey!==(y==null?void 0:y.fullPath)&&(y!=null&&y.fullPath)&&i.push(y==null?void 0:y.fullPath)},T=()=>{var b;r.value=!0,e.onReloadPage&&((b=e.onReloadPage)==null||b.call(e)),setTimeout(()=>{r.value=!1},500)},R=b=>b.meta&&b.meta.tagFixed,I=b=>a[b],M=(b,y)=>{const E=d.value.findIndex(P=>P.fullPath===I(y));switch(b){case"closeOthersTabs":d.value=d.value.filter(P=>{var H;return P.fullPath===I(y)||((H=P.meta)==null?void 0:H.tagFixed)});break;case"closeLeftTabs":E&&(d.value=d.value.filter((P,H)=>{var K;return H>=E||((K=P.meta)==null?void 0:K.tagFixed)}));break;case"closeRightTabs":E&&(d.value=d.value.filter((P,H)=>{var K;return H<=E||((K=P.meta)==null?void 0:K.tagFixed)}));break;case"reloadPage":(E===0||E)&&a.activeKey===I(y)&&T();break}a.activeKey!==I(y)&&i.push(I(y))},O=(b,y)=>{const E=d.value.findIndex(P=>P.fullPath===y);switch(b){case"closeOthersTabs":return d.value.filter((X,L)=>{var N;return L!==E&&!((N=X.meta)!=null&&N.tagFixed)}).length===0;case"closeLeftTabs":return d.value.filter((X,L)=>{var N;return L<E&&!((N=X.meta)!=null&&N.tagFixed)}).length===0;case"closeRightTabs":return d.value.filter((X,L)=>{var N;return L>E&&!((N=X.meta)!=null&&N.tagFixed)}).length===0}},W=b=>{let y;const{path:E,stateType:P}=b;return o.createVNode(C.Menu,{selectedKeys:[],onClick:({key:H})=>M(H,P)},sd(y=dd.map(H=>o.createVNode(hd,{key:H.key,disabled:O(H.key,E)},{default:()=>[H.label]})))?y:{default:()=>[y]})},q=b=>{const{router:y}=b;return o.createVNode(C.Dropdown,{trigger:"contextmenu",overlay:o.createVNode(W,{path:(y==null?void 0:y.fullPath)||"",stateType:"contextMenuActiveKey"},null),onOpenChange:E=>{a.contextMenuActiveKey=E&&y.fullPath||""}},{default:()=>{var E;return[o.createVNode("div",{class:[`${u}-title`,p.value]},[(E=y.meta)==null?void 0:E.title,a.activeKey===y.fullPath&&o.createVNode(Z.ReloadOutlined,{class:[`${u}-reload-btn`,p.value],spin:r.value,onClick:P=>{P.stopPropagation(),!r.value&&T()}},null),d.value.length>1&&!R(y)&&o.createVNode(Z.CloseOutlined,{class:[`${u}-close-btn`,p.value],onClick:P=>{P.stopPropagation(),!r.value&&x((y==null?void 0:y.fullPath)||"")}},null)])]}})};return()=>m(o.createVNode(o.Fragment,null,[!!e.isFixedMultiTab&&o.createVNode("div",{class:[`${u}-fixed`,p.value]},null),o.createVNode(C.Tabs,{hideAdd:!0,type:"editable-card",style:h.value,class:s.value,activeKey:a.activeKey,onTabClick:Q},{default:()=>[d.value.map(b=>o.createVNode(fd,{key:b.fullPath,closable:!1,tab:o.createVNode(q,{router:b},null)},null))],rightExtra:()=>o.createVNode(C.Dropdown,{overlay:o.createVNode(W,{path:a.activeKey,stateType:"activeKey"},null)},{default:()=>[o.createVNode(Z.EllipsisOutlined,{class:[`${u}-dropdown-menu-btn`,p.value],rotate:90},null)]})})]))}}),{Content:md}=C.Layout,nt=(e,{slots:t,attrs:n})=>{var s;const{isMobile:r,loading:a,collapsed:i,siderWidth:l,isShowTabsBar:c,isFixedMultiTab:u,onReloadPage:m,onChangeTabs:p}=e;if(e.isChildrenLayout)return(s=t.default)==null?void 0:s.call(t);const{getPrefixCls:d,flatMenuData:S}=_(),v=d({suffixCls:"basic-layout",isPor:!0}),B=o.computed(()=>({[`${v}-content`]:!0}));return o.createVNode(o.Fragment,null,[o.unref(S).length>0&&c&&o.createVNode(gd,{isMobile:r,loading:a,isFixedMultiTab:u,siderWidth:l,collapsed:i,onReloadPage:m,onChangeTabs:p},null),o.createVNode(md,{style:n.style,class:B.value},{default:()=>{var h;return[a&&o.createVNode(Ut,null,null),o.createVNode("div",{style:{opacity:a?"0":void 0}},[(h=t.default)==null?void 0:h.call(t)])]}})])};nt.inheritAttrs=!1,nt.displayName="wrap-content";const bd=e=>{var t,n,r,a;return{[`${e.proComponentsCls}-basic-layout`]:{[`${e.antCls}-layout-header${e.componentCls}${e.componentCls}-light`]:{background:((n=(t=e.layout)==null?void 0:t.header)==null?void 0:n.colorBgMenu)||e.colorBgElevated},[`${e.antCls}-layout-header${e.componentCls}${e.componentCls}-dark`]:{background:(a=(r=e.layout)==null?void 0:r.header)==null?void 0:a.colorDarkBgMenu},[`${e.antCls}-layout-header${e.componentCls}`]:{zIndex:19,paddingBlock:0,paddingInline:0,WebkitBackdropFilter:"blur(8px)",backdropFilter:"blur(8px)",transition:"background-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)",[`&${e.proComponentsCls}`]:{"&-fixed-header":{position:"fixed",width:"100%",zIndex:9,top:0,"&-action":{transition:"width .3s cubic-bezier(.645,.045,.355,1)"}},"&-header-actions":{display:"flex",alignItems:"center",fontSize:"16",cursor:"pointer","& &-item":{paddingBlock:0,paddingInline:8,"&:hover":{color:e.colorText}}},"&-header-realDark":{boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 65%)"},"&-header-actions-header-action":{transition:"width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)"}}}}}};function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe.apply(this,arguments)}var jr=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(a,i){return a[0]===n?(r=i,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),a=this.__entries__[r];return a&&a[1]},t.prototype.set=function(n,r){var a=e(this.__entries__,n);~a?this.__entries__[a][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,a=e(r,n);~a&&r.splice(a,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var a=0,i=this.__entries__;a<i.length;a++){var l=i[a];n.call(r,l[1],l[0])}},t}()}(),Dt=typeof window<"u"&&typeof document<"u"&&window.document===document,rt=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),yd=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(rt):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Ad=2;function pd(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&c()}function l(){yd(i)}function c(){var u=Date.now();if(n){if(u-a<Ad)return;r=!0}else n=!0,r=!1,setTimeout(l,t);a=u}return c}var vd=20,Cd=["top","right","bottom","left","width","height","size","weight"],xd=typeof MutationObserver<"u",wd=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=pd(this.refresh.bind(this),vd)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Dt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),xd?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Dt||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,a=Cd.some(function(i){return!!~r.indexOf(i)});a&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Nr=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},ke=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||rt},Fr=at(0,0,0,0);function ot(e){return parseFloat(e)||0}function Vr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,a){var i=e["border-"+a+"-width"];return r+ot(i)},0)}function Sd(e){for(var t=["top","right","bottom","left"],n={},r=0,a=t;r<a.length;r++){var i=a[r],l=e["padding-"+i];n[i]=ot(l)}return n}function Bd(e){var t=e.getBBox();return at(0,0,t.width,t.height)}function Id(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Fr;var r=ke(e).getComputedStyle(e),a=Sd(r),i=a.left+a.right,l=a.top+a.bottom,c=ot(r.width),u=ot(r.height);if(r.boxSizing==="border-box"&&(Math.round(c+i)!==t&&(c-=Vr(r,"left","right")+i),Math.round(u+l)!==n&&(u-=Vr(r,"top","bottom")+l)),!Md(e)){var m=Math.round(c+i)-t,p=Math.round(u+l)-n;Math.abs(m)!==1&&(c-=m),Math.abs(p)!==1&&(u-=p)}return at(a.left,a.top,c,u)}var Pd=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof ke(e).SVGGraphicsElement}:function(e){return e instanceof ke(e).SVGElement&&typeof e.getBBox=="function"}}();function Md(e){return e===ke(e).document.documentElement}function Td(e){return Dt?Pd(e)?Bd(e):Id(e):Fr}function Ed(e){var t=e.x,n=e.y,r=e.width,a=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,l=Object.create(i.prototype);return Nr(l,{x:t,y:n,width:r,height:a,top:n,right:t+r,bottom:a+n,left:t}),l}function at(e,t,n,r){return{x:e,y:t,width:n,height:r}}var kd=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=at(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Td(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),Od=function(){function e(t,n){var r=Ed(n);Nr(this,{target:t,contentRect:r})}return e}(),Hd=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new jr,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ke(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new kd(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ke(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new Od(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Lr=typeof WeakMap<"u"?new WeakMap:new jr,zr=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=wd.getInstance(),r=new Hd(t,n,this);Lr.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){zr.prototype[e]=function(){var t;return(t=Lr.get(this))[e].apply(t,arguments)}});var Qd=function(){return typeof rt.ResizeObserver<"u"?rt.ResizeObserver:zr}();const Rd=e=>{var t;let n=((t=e==null?void 0:e.vnode)===null||t===void 0?void 0:t.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n},jd=o.defineComponent({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(e,t){let{slots:n}=t;const r=o.reactive({width:0,height:0,offsetHeight:0,offsetWidth:0});let a=null,i=null;const l=()=>{i&&(i.disconnect(),i=null)},c=p=>{const{onResize:d}=e,S=p[0].target,{width:v,height:B}=S.getBoundingClientRect(),{offsetWidth:s,offsetHeight:h}=S,f=Math.floor(v),g=Math.floor(B);if(r.width!==f||r.height!==g||r.offsetWidth!==s||r.offsetHeight!==h){const k={width:f,height:g,offsetWidth:s,offsetHeight:h};Fe(r,k),d&&Promise.resolve().then(()=>{d(Fe(Fe({},k),{offsetWidth:s,offsetHeight:h}),S)})}},u=o.getCurrentInstance(),m=()=>{const{disabled:p}=e;if(p){l();return}const d=Rd(u);d!==a&&(l(),a=d),!i&&d&&(i=new Qd(c),i.observe(d))};return o.onMounted(()=>{m()}),o.onUpdated(()=>{m()}),o.onUnmounted(()=>{l()}),o.watch(()=>e.disabled,()=>{m()},{flush:"post"}),()=>{var p;return(p=n.default)===null||p===void 0?void 0:p.call(n)[0]}}}),Nd=e=>{var t,n,r,a;return{[`${e.proComponentsCls}-header`]:{"&-light":{[`${e.componentCls}-logo`]:{h1:{color:e.colorBgSpotlight}}}},[e.componentCls]:{position:"relative",background:"transparent",display:"flex",alignItems:"center",marginBlock:0,paddingInline:16,height:((n=(t=e.layout)==null?void 0:t.header)==null?void 0:n.heightLayoutHeader)||56,boxShadow:"0 1px 4px rgba(0,21,41,.08)",boxSizing:"border-box","&-mix":{boxShadow:"0 1px 4px 0 rgba(0,21,41,.12)"},"&-wide":{boxShadow:"0 1px 4px 0 rgba(0,21,41,.12)",padding:0,[`${e.componentCls}-main`]:{margin:"0 auto"}},["&-main"]:{display:"flex",height:"100%","&-left":{display:"flex",minWidth:192}},"> a":{height:"100%"},"> *":{height:"100%"},[`${e.proComponentsCls}-layout-apps-icon`]:{marginInlineEnd:16},"&-collapsed-button":{minHeight:"22px",color:(a=(r=e.layout)==null?void 0:r.header)==null?void 0:a.colorTextMenu,fontSize:"18px",marginInlineEnd:"16px"},"&-logo":{position:"relative",marginInlineEnd:"16px",a:{display:"flex",alignItems:"center",height:"100%",minHeight:"22px",fontSize:"20px"},img:{height:"28px"},h1:{marginBlock:0,marginInline:0,marginInlineStart:12,fontWeight:"500",color:e.colorWhite,fontSize:16},"&-mix":{display:"flex",alignItems:"center"}},"&-logo-mobile":{minWidth:"24px",marginInlineEnd:0}}}},Dr={...Y,...zt},Fd=(e,t)=>e===!1?null:e?e(t,null):t,Vd=o.defineComponent({props:Dr,setup(e){const t=o.ref("auto"),n=({width:r})=>{t.value=r};return()=>o.createVNode("div",{style:{minWidth:typeof t.value=="string"?t.value:`${t.value}px`}},[o.createVNode("div",{style:{paddingRight:"8px"}},[o.createVNode(jd,{onResize:n},{default:()=>[e.rightContentRender&&typeof e.rightContentRender=="function"?o.createVNode("div",null,[e.rightContentRender({...e})]):o.createVNode("div",null,null)]})])])}}),Wr=o.defineComponent({props:Dr,inheritAttrs:!1,setup(e,{slots:t,emit:n}){const r=De.useRouter(),{token:a}=se(),{getPrefixCls:i,openKeys:l,selectedKeys:c}=_(),{width:u}=Xt.useWindowSize(),m=i({suffixCls:"global-header",isPor:!0}),{wrapSSR:p,hashId:d}=ae("ProGlobalHeader",[Nd],m),S=o.computed(()=>({[`${d.value}`]:!0,[`${m}`]:!0,[`${m}-${e.layout}`]:!0})),v=f=>{var g;if(r.currentRoute){const k=r.currentRoute.value.matched.concat();e.onSelect&&f==="select"&&e.onSelect(k.filter(A=>A.name!=="index").map(A=>A.path)),e.onOpenKeys&&f==="openKeys"&&((g=e.onOpenKeys)==null||g.call(e,k.filter(A=>A.path!==r.currentRoute.value.path).map(A=>A.path)))}},B=()=>{n("collapse",!e.collapsed)},s=o.computed(()=>e.collapsedButtonRender||Er),h=()=>{var f;return o.createVNode(o.Fragment,null,[e.layout==="mix"&&!e.isMobile&&e.splitMenus?o.createVNode("div",{style:{flex:1},class:[`${m}-menu`,d.value]},[o.createVNode(C.ConfigProvider,{theme:{components:{Layout:{headerBg:"transparent",bodyBg:"transparent"},Menu:mr({radiusItem:4,colorActiveBarWidth:0,colorActiveBarHeight:2,colorActiveBarBorderSize:0,horizontalItemBorderRadius:4},a.value||{},e.theme,"header")}}},{default:()=>[o.createVNode(Vt,o.mergeProps({theme:e.theme,mode:e.mode,collapsed:e.collapsed,menuData:e.menuData,openKeys:l.value,selectedKeys:c.value,iconfontUrl:e.iconfontUrl,menuItemRender:e.menuItemRender,subMenuItemRender:e.subMenuItemRender,class:{"top-nav-menu":e.mode==="horizontal",[`${d.value}`]:!0}},{"onUpdate:openKeys":()=>v("openKeys"),"onUpdate:selectedKeys":()=>v("select")}),null)]})]):o.createVNode("div",{style:{flex:1}},[(f=t.default)==null?void 0:f.call(t)]),e.layout!=="simple"&&o.createVNode(Vd,o.mergeProps(e,{extraRightDropdownRender:e.extraRightDropdownRender,rightContentRender:e.rightContentRender}),null)])};return()=>{const f=o.createVNode("span",{class:[`${m}-logo`,e.isMobile?"mobile":"",d.value],key:"logo"},[o.createVNode("a",null,[Mr(e.logo)])]);return p(o.createVNode("div",{class:S.value},[e.isMobile?o.createVNode(o.Fragment,null,[Fd(e.menuHeaderRender,f),e.isMobile&&o.unref(s)&&o.createVNode("span",{class:`${m}-collapsed-button ${d.value}`,onClick:B},[o.unref(s)(e.collapsed)]),h()]):e.layout==="mix"||e.layout==="wide"?o.createVNode(o.Fragment,null,[o.createVNode("div",{style:{width:e.layout==="wide"?`${e.wideWidth}px`:void 0,padding:e.layout==="wide"&&u.value<e.wideWidth?"0 50px":void 0},class:`${m}-main ${d.value}`},[o.createVNode("div",{class:`${m}-main-left ${d.value}`},[o.createVNode(Lt,o.mergeProps(ee.omit(e,"onMenuHeaderClick"),{renderKey:"headerTitleRender"}),null)]),h()])]):h()]))}}});function Ld(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const{Header:Kr}=C.Layout,Wt=o.defineComponent({inheritAttrs:!1,props:Or,setup(e){const{theme:t,isMobile:n,fixedHeader:r,headerHeight:a,layout:i,onCollapse:l,splitMenus:c}=o.toRefs(e),{getPrefixCls:u,menuData:m}=_(),p=u({suffixCls:"header",isPor:!0}),d=u({suffixCls:"fixed-header",isPor:!0}),{wrapSSR:S,hashId:v}=ae("ProLayoutHeader",[bd],p),B=o.computed(()=>i.value==="wide"),s=o.computed(()=>r.value),h=o.computed(()=>i.value==="mix"||B.value),f=o.computed(()=>i.value==="side"||i.value==="simple"),g=o.computed(()=>f.value&&"light"||t.value),k=o.computed(()=>({[`${v.value}`]:!0,[`${p}-${g.value}`]:!0,[`${p}`]:!0,[`${d}`]:s.value})),A=o.computed(()=>s.value&&!n.value),x=o.computed(()=>c.value?m.value&&yr(m.value)||[]:[]),Q=o.computed(()=>f.value&&A.value?`calc(100% - ${e.collapsed?e.collapsedWidth:e.siderWidth}px)`:"100%"),T=o.computed(()=>s.value?0:void 0),R=()=>{const I=o.createVNode(Wr,o.mergeProps(e,{theme:g.value,mode:"horizontal",onCollapse:l.value,menuData:x.value}),{default:()=>[h.value?null:e.headerContentRender&&typeof e.headerContentRender=="function"?e.headerContentRender(e):e.headerContentRender]});return e.headerRender?e.headerRender(e,I):I};return()=>{let I;return S(o.createVNode(o.Fragment,null,[s.value&&!B.value&&o.createVNode(Kr,{theme:g.value,style:{height:`${a.value}px`,lineHeight:`${a.value}px`,background:"transparent"}},null),o.createVNode(Kr,{theme:g.value,class:k.value,style:{height:`${a.value}px`,lineHeight:`${a.value}px`,width:Q.value,zIndex:f.value?100:101,right:T.value}},Ld(I=R())?I:{default:()=>[I]})]))}}}),zd=o.defineComponent({name:"BaseProLayout",inheritAttrs:!1,components:{GlobalHeader:Wt,GlobalFooter:tt,SiderMenuWrapper:_e},props:Rr,emits:["update:collapsed","update:open-keys","update:selected-keys","collapse","openKeys","reloadPage","select","menuHeaderClick","menuClick","changeTabs"],setup(e,{emit:t,slots:n}){const r=F.getPrefixCls({suffixCls:"basic-layout",isPor:!0}),{wrapSSR:a,hashId:i}=ae("ProLayout",[id,ld],r),l=Pe.useMediaQuery(),c=o.ref(document.body.getBoundingClientRect().width),u=o.computed(()=>e.layout==="mix"||e.layout==="side"||e.layout==="wide"||!1),m=o.computed(()=>e.layout==="wide"),p=o.computed(()=>u.value),d=o.computed(()=>e.collapsed?e.collapsedWidth:e.siderWidth),S=o.computed(()=>(e.theme||"dark").toLocaleLowerCase().includes("dark")?"dark":"light");o.onMounted(()=>{window.addEventListener("resize",s),s()}),o.onBeforeUnmount(()=>{window.removeEventListener("resize",s)});const v=o.computed(()=>(l.value==="sm"||l.value==="xs")&&!e.disableMobile&&!m.value),B=o.reactive({position:"relative"});(e.isChildrenLayout||e.contentStyle&&e.contentStyle.minHeight)&&(B.minHeight=0);const s=()=>{const M=document.body.getBoundingClientRect().width;c.value!==M&&(l.value=Pe.useMediaQuery().value,c.value=M)},h=(M,O)=>M.headerRender===!1||M.pure?null:o.createVNode(Wt,o.mergeProps(M,{matchMenuKeys:O||[]}),null),f=o.computed(()=>({...e.breadcrumb,itemRender:F.getSlot(n,e,"breadcrumbRender")})),g=o.computed(()=>p.value&&e.selectedKeys?Ar(e.menuData,e.selectedKeys[0]):[]),k=M=>{var O;(O=e.onCollapse)==null||O.call(e,M)},A=M=>{var O;(O=e.onOpenKeys)==null||O.call(e,M)},x=M=>{var O;(O=e.onSelect)==null||O.call(e,M)},Q=M=>{t("menuHeaderClick",M)},T=M=>{t("menuClick",M)},R=M=>{t("changeTabs",M)},I=()=>{t("reloadPage")};return Sr({getPrefixCls:F.getPrefixCls,...vr(o.toRefs(e),["layout","waterMark","menuData","openKeys","headerHeight","selectedKeys","disableMobile","fixSiderbar","fixedHeader"].concat(Object.keys(et))),theme:S.value,hasContentWide:m,isMobile:v,siderWidth:d,breadcrumb:f,flatMenuData:g,hasSide:u,flatMenu:p}),()=>{var Le;const M=F.getSlot(n,e,"collapsedButtonRender"),O=F.getSlot(n,e,"headerContentRender"),W=F.getSlot(n,e,"rightContentRender"),q=F.getSlot(n,e,"headerRender"),b=F.getSlot(n,e,"footerRender"),y=F.getSlot(n,e,"links"),E=F.getSlot(n,e,"copyrightRender"),P=F.getSlot(n,e,"extraRightDropdownRender"),H=F.getSlot(n,e,"menuHeaderRender"),K=F.getSlot(n,e,"menuExtraRender"),X=F.getSlot(n,e,"menuContentRender"),L=F.getSlot(n,e,"menuFooterRender"),N=F.getSlot(n,e,"menuItemRender"),G=F.getSlot(n,e,"subMenuItemRender"),ce={menuItemRender:N,subMenuItemRender:G},we=o.computed(()=>h({...e,...ce,hasSiderMenu:u.value,menuData:e.menuData,isMobile:o.unref(v),onCollapse:k,onOpenKeys:A,onSelect:x,onMenuHeaderClick:Q,rightContentRender:W,extraRightDropdownRender:P,headerTitleRender:H,headerContentRender:O,headerRender:q,theme:S.value},e.matchMenuKeys)),Se=o.computed(()=>({[`${i.value}`]:!0,[`${r}`]:!0,[`${r}-${e.layout}`]:!0})),Be=o.computed(()=>m.value?{minWidth:`${e.wideWidth}px`}:void 0),Ie=o.computed(()=>m.value?{width:e.menuData.length?`${e.wideWidth}px`:`${e.wideWidth-e.siderWidth-20}px`,paddingTop:`${e.headerHeight+20}px`,margin:m.value?"0 auto":void 0}:void 0),Ve=o.computed(()=>m.value?{minHeight:"835px"}:{});return a(o.createVNode(o.Fragment,null,[e.pure?(Le=n.default)==null?void 0:Le.call(n):o.createVNode("div",{class:Se.value,style:Be.value},[o.createVNode(C.Layout,{style:Ie.value},{default:()=>[o.createVNode(_e,o.mergeProps(ee.omit(e,["pure","onCollapse","onSelect","onOpenKeys","onMenuClick","theme"]),{links:y,theme:S.value,isMobile:v.value,menuHeaderRender:H,menuContentRender:X,menuExtraRender:K,menuFooterRender:L,collapsedButtonRender:M,onCollapse:k,onSelect:x,onOpenKeys:A,onMenuClick:T}),null),o.createVNode(C.Layout,{style:B},{default:()=>[we.value,o.createVNode(nt,{isMobile:v.value,collapsedWidth:e.collapsedWidth,isChildrenLayout:e.isChildrenLayout,loading:e.loading,isShowTabsBar:e.showTabsBar,isFixedMultiTab:e.fixedMultiTab,siderWidth:e.siderWidth,collapsed:e.collapsed,style:e.disableContentMargin?Ve.value:{...e.contentStyle,...Ve.value},onReloadPage:I,onChangeTabs:R},{default:()=>{var ze;return[(ze=n.default)==null?void 0:ze.call(n)]}}),b===!1?null:b?b(e):o.createVNode(tt,{copyright:E},null)]})]})])]))}}}),Dd=o.defineComponent({components:{GlobalHeader:Wt,GlobalFooter:tt,SiderMenuWrapper:_e},props:Rr,emits:["update:collapsed","update:open-keys","update:selected-keys","collapse","openKeys","reloadPage","select","menuHeaderClick","menuClick","changeTabs"],setup(e,{slots:t,emit:n}){const r=o.computed(()=>e.theme!==void 0?{dark:e.theme==="realDark"}:{}),a=c=>{n("update:collapsed",c),n("collapse",c)},i=c=>{n("update:open-keys",c),n("openKeys",c)},l=c=>{n("update:selected-keys",c),n("select",c)};return()=>o.createVNode(C.ConfigProvider,{theme:e.primaryColor?{token:{colorPrimary:e.primaryColor}}:void 0},{default:()=>[o.createVNode(Ze,o.mergeProps({token:e.token},r.value),{default:()=>[o.createVNode(zd,o.mergeProps(ee.omit(e,["onSelect","onOpenKeys","onCollapse"]),{onSelect:l,onOpenKeys:i,onCollapse:a}),t)]})]})}}),Xr=(e,t)=>e.map(n=>(n.path=n.path.replace("//","/"),n.children&&n.children.length>0&&(n.children=Xr(n.children,t)),t[`${n.path}`]=n,n)),Wd=e=>{const t=e.find(r=>r.path==="/"),n={};return{menuData:Xr((t==null?void 0:t.children)||[],n),breadcrumb:n}},qr=[{key:"light",title:"亮色菜单风格"},{key:"dark",title:"暗色菜单风格"},{key:"realDark",title:"暗黑模式"}],Ur=[{key:"side",title:"侧边菜单布局"},{key:"mix",title:"混合菜单布局"},{key:"wide",title:"定宽菜单布局"},{key:"simple",title:"简单菜单布局"}],Kd=[{key:"header",title:"顶部主题"},{key:"sider",title:"左侧主题"}],Xd=e=>({[e.componentCls]:{[`${e.antCls}-drawer-content-wrapper`]:{transform:"translate(100%)",display:"block !important"},"&-show":{[`${e.antCls}-drawer-content-wrapper`]:{transform:"translate(0%)"}},"&-trantion-none":{[`${e.antCls}-drawer-content-wrapper`]:{transition:"none !important;"}},["&-handle"]:{position:"absolute",top:240,right:300,zIndex:0,display:"flex",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",fontSize:"16px",textAlign:"center",backgroundColor:e.colorPrimary,borderEndStartRadius:e.borderRadiusLG,borderStartStartRadius:e.borderRadiusLG,"-webkit-backdropilter":"saturate(180%) blur(20px)",backdropFilter:"saturate(180%) blur(20px)",cursor:"pointer",pointerEvents:"auto"},"&-wrapper":{position:"relative",height:`calc(100vh - ${e.marginLG*2}px)`},"&-content":{padding:e.marginLG},"&-body-title":{margin:0,marginBlockEnd:e.marginSM,fontSize:"14px",lineHeight:"22px",color:e.colorBgSpotlight},"&-block-checkbox":{display:"flex",minHeight:42,gap:e.marginSM,"& &-item":{position:"relative",width:"44px",height:"36px",overflow:"hidden",borderRadius:"4px",boxShadow:"0 1px 2.5px rgba(0,0,0,.18)",cursor:"pointer",fontSize:56,lineHeight:"56px","&::before":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"33%",height:"100%",content:"''"},"&::after":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"25%",content:"''"},"&-dark":{backgroundColor:"rgba(0, 21, 41, 0.85)","&::before":{backgroundColor:"rgba(0, 0, 0, 0.65)"},"&::after":{backgroundColor:"rgba(0, 0, 0, 0.85)"}},"&-light":{backgroundColor:"#f7f8fa","&::before":{backgroundColor:"#fff"},"&::after":{backgroundColor:"#fff"}},"&-realDark":{backgroundColor:"rgba(0, 21, 41, 0.85)","&::before":{backgroundColor:"rgba(0, 0, 0, 0.65)"},"&::after":{backgroundColor:"rgba(0, 0, 0, 0.85)"}},"&-dark,&-side":{backgroundColor:"#f7f8fa","&::before":{zIndex:"1",backgroundColor:"#001529"},"&::after":{backgroundColor:"#fff"}},"&-wide":{backgroundColor:"#f7f8fa","&::before":{backgroundColor:"#fff",left:"15%",width:"15%",height:"calc(100% - 38%)",top:"38%"},"&::after":{backgroundColor:"#fff"},"&-content":{position:"absolute",height:"calc(100% - 38%)",top:"38%",right:"15%",width:"calc(100% - 15% - 15% - 10% - 15%)",backgroundColor:"#fff"}},"&-simple":{backgroundColor:"#f7f8fa","&::before":{backgroundColor:"#fff"},"&::after":{display:"none"}},"&-mix":{backgroundColor:"#f7f8fa","&::before":{backgroundColor:"#fff"},"&::after":{backgroundColor:"#001529"}}},"& &-selectIcon":{position:"absolute",insetInlineEnd:"6px",bottom:"4px",color:e.colorPrimary,fontWeight:"bold",fontSize:"14px",pointerEvents:"none",".action":{color:e.colorPrimary}},"& &-icon":{fontSize:56,lineHeight:"56px"}},"&-theme-color":{marginBlockStart:"16px",display:"flex",gap:8,"&-label":{marginBlock:"16px"},"&-block":{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",color:"#fff",fontWeight:"bold",textAlign:"center",borderRadius:"2px",cursor:"pointer"}},"&-list":{[`&${e.antCls}-list-sm ${e.antCls}-list-item`]:{paddingInline:0}}}}),Gr=o.defineComponent({name:"BlockCheckbox",props:{value:j.string,list:{type:Array,default:()=>[]},configType:j.string,prefixCls:j.string,hashId:j.string,onChange:Function},setup(e){return()=>{const t=`${e.prefixCls}-block-checkbox`;return o.createVNode("div",{class:[t,e.hashId]},[e.list.map(n=>o.createVNode(C.Tooltip,{title:n.title,key:n.key},{default:()=>[o.createVNode("div",{class:F.classNames(e.hashId,`${t}-item`,`${t}-item-${n.key}`,`${t}-${e.configType}-item`),onClick:()=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.key)}},[n.key==="wide"&&o.createVNode("div",{class:[`${t}-item-${n.key}-content`,e.hashId]},null),o.createVNode(Z.CheckOutlined,{class:`${t}-selectIcon ${e.hashId}`.trim(),style:{display:e.value===n.key?"block":"none"}},null),n!=null&&n.icon?o.createVNode("div",{class:`${t}-icon ${e.hashId}`.trim()},[n.icon]):null])]}))])}}}),qd=o.defineComponent({name:"ThemeColor",inheritAttrs:!1,props:{settingValue:Object,colorList:{type:Array,default:()=>[]},prefixCls:j.string,hashId:j.string,onChange:Function},setup(e){return()=>{var n;const t=`${e.prefixCls}-theme-color`;return o.createVNode(o.Fragment,null,[o.createVNode("div",{class:`${t} ${e.hashId}`.trim()},[(n=e.colorList)==null?void 0:n.map(({key:r,color:a,title:i})=>r?o.createVNode(C.Tooltip,{key:a,title:i},{default:()=>{var l,c;return[o.createVNode("div",{class:[`${t}-block ${e.hashId}`.trim(),((l=e.settingValue)==null?void 0:l.primaryColor)===a?`${t}-block-checked`:""],style:{backgroundColor:a},onClick:()=>e.onChange&&e.onChange(a)},[((c=e.settingValue)==null?void 0:c.primaryColor)===a&&o.createVNode(Z.CheckOutlined,null,null)])]}}):null)])])}}}),it=o.defineComponent({name:"RegionalChange",props:{label:j.string,value:j.bool,prefixCls:j.string,valueKey:String,hashId:j.string,disabled:j.bool,onChange:Function},setup(e){return()=>o.createVNode(C.List,{class:`${e.prefixCls}-list ${e.hashId}`.trim(),split:!1,size:"small",renderItem:({item:t})=>o.createVNode(C.Tooltip,{title:t.disabled?t.disabledReason:"",placement:"left"},{default:()=>[o.createVNode(C.List.Item,{actions:[t.action]},{default:()=>[o.createVNode("span",{style:{opacity:t.disabled?.5:1}},[t.title])]})]}),dataSource:[{title:e.label,action:o.createVNode(C.Switch,{size:"small",disabled:e.disabled,checked:!!e.value,onChange:t=>{e.onChange&&e.onChange(e.valueKey,t)}},null)}]},null)}}),Ud=e=>({[e.componentCls]:{padding:e.marginLG,"&-title":{display:"flex",alignItems:"center",margin:0,gap:10,marginBlockEnd:e.marginSM,fontSize:"14px",lineHeight:"22px",color:e.colorBgSpotlight},"&-sub-title":{margin:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:"normal",color:e.colorTextDescription},"&-list":{[`&${e.antCls}-list-sm ${e.antCls}-list-item`]:{paddingInline:0,[`${e.antCls}-list-item-action`]:{marginInlineStart:10}}}}});function Gd(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const Yd=o.defineComponent({name:"ThemeEditor",props:{settingValue:Object,onChange:Function},setup(e){const{getPrefixCls:t}=_(),[n,r]=Pe.useState("sider"),a=t({suffixCls:"theme-editor",isPor:!0}),{wrapSSR:i,hashId:l}=ae("ProThemeEditor",[Ud],a),{token:c}=se(),u=o.computed(()=>{var v;return(v=c.value)==null?void 0:v.layout}),m=o.computed(()=>{var v,B,s,h,f,g,k,A,x,Q,T,R,I,M,O,W,q,b,y,E,P,H,K,X,L;return[{key:"colorBgMenu",title:"全部背景",disabled:((v=e.settingValue)==null?void 0:v.theme)==="dark"&&["mix","wide"].includes((B=e.settingValue)==null?void 0:B.layout)},{key:"colorDarkBgMenu",title:"全部背景",disabled:((s=e.settingValue)==null?void 0:s.theme)==="light"||((h=e.settingValue)==null?void 0:h.theme)==="dark"&&["side","simple"].includes((f=e.settingValue)==null?void 0:f.layout)},{key:"colorSubItemBg",title:"子菜单背景",disabled:!0},{key:"colorDarkSubItemBg",title:"子菜单背景",disabled:!0},{key:"colorBgMenuItemSelected",title:"菜单选中背景",disabled:((g=e.settingValue)==null?void 0:g.theme)==="dark"&&["mix","wide"].includes((k=e.settingValue)==null?void 0:k.layout)},{key:"colorDarkBgMenuItemSelected",title:"菜单选中背景",disabled:((A=e.settingValue)==null?void 0:A.theme)==="light"||((x=e.settingValue)==null?void 0:x.theme)==="dark"&&["side","simple"].includes((Q=e.settingValue)==null?void 0:Q.layout)},{key:"colorTextMenu",title:"菜单文字颜色",disabled:((T=e.settingValue)==null?void 0:T.theme)==="dark"&&["mix","wide"].includes((R=e.settingValue)==null?void 0:R.layout)},{key:"colorDarkTextMenu",title:"菜单文字颜色",disabled:((I=e.settingValue)==null?void 0:I.theme)==="light"||((M=e.settingValue)==null?void 0:M.theme)==="dark"&&["side","simple"].includes((O=e.settingValue)==null?void 0:O.layout)},{key:"colorTextMenuHover",title:"菜单文字移入颜色",disabled:((W=e.settingValue)==null?void 0:W.theme)==="dark"&&["mix","wide"].includes((q=e.settingValue)==null?void 0:q.layout)},{key:"colorDarkTextMenuHover",title:"菜单文字移入颜色",disabled:((b=e.settingValue)==null?void 0:b.theme)==="light"||((y=e.settingValue)==null?void 0:y.theme)==="dark"&&["side","simple"].includes((E=e.settingValue)==null?void 0:E.layout)},{key:"colorTextMenuSelected",title:"菜单文字选中颜色",disabled:((P=e.settingValue)==null?void 0:P.theme)==="dark"&&["mix","wide"].includes((H=e.settingValue)==null?void 0:H.layout)},{key:"colorDarkTextMenuSelected",title:"菜单文字选中颜色",disabled:((K=e.settingValue)==null?void 0:K.theme)==="light"||((X=e.settingValue)==null?void 0:X.theme)==="dark"&&["side","simple"].includes((L=e.settingValue)==null?void 0:L.layout)}]}),p=o.computed(()=>{var v,B,s,h,f,g,k,A,x,Q,T,R,I,M,O,W,q,b,y,E,P,H,K,X,L,N,G,ce,we,Se,Be,Ie;return[{key:"colorBgMenu",title:"全部背景",disabled:((v=e.settingValue)==null?void 0:v.theme)==="dark"&&["side","simple"].includes((B=e.settingValue)==null?void 0:B.layout)},{key:"colorDarkBgMenu",title:"全部背景",disabled:((s=e.settingValue)==null?void 0:s.theme)==="light"||((h=e.settingValue)==null?void 0:h.theme)==="dark"&&["mix","wide"].includes((f=e.settingValue)==null?void 0:f.layout)},{key:"colorSubItemBg",title:"子菜单背景",disabled:((g=e.settingValue)==null?void 0:g.theme)==="dark"&&["side","simple"].includes((k=e.settingValue)==null?void 0:k.layout)},{key:"colorDarkSubItemBg",title:"子菜单背景",disabled:((A=e.settingValue)==null?void 0:A.theme)==="light"||((x=e.settingValue)==null?void 0:x.theme)==="dark"&&["mix","wide"].includes((Q=e.settingValue)==null?void 0:Q.layout)},{key:"colorBgMenuItemHover",title:"菜单移入背景",disabled:((T=e.settingValue)==null?void 0:T.theme)==="dark"&&((R=e.settingValue)==null?void 0:R.layout)!=="mix"},{key:"colorBgMenuItemSelected",title:"菜单选中背景",disabled:((I=e.settingValue)==null?void 0:I.theme)==="dark"&&((M=e.settingValue)==null?void 0:M.layout)!=="mix"},{key:"colorDarkBgMenuItemSelected",title:"菜单选中背景",disabled:((O=e.settingValue)==null?void 0:O.theme)==="light"||((W=e.settingValue)==null?void 0:W.theme)==="dark"&&["mix","wide"].includes((q=e.settingValue)==null?void 0:q.layout)},{key:"colorTextMenu",title:"菜单文字颜色",disabled:((b=e.settingValue)==null?void 0:b.theme)==="dark"&&((y=e.settingValue)==null?void 0:y.layout)!=="mix"},{key:"colorDarkTextMenu",title:"菜单文字颜色",disabled:((E=e.settingValue)==null?void 0:E.theme)==="light"||((P=e.settingValue)==null?void 0:P.theme)==="dark"&&["mix","wide"].includes((H=e.settingValue)==null?void 0:H.layout)},{key:"colorTextMenuHover",title:"菜单文字移入颜色",disabled:((K=e.settingValue)==null?void 0:K.theme)==="dark"&&((X=e.settingValue)==null?void 0:X.layout)!=="mix"},{key:"colorDarkTextMenuHover",title:"菜单文字移入颜色",disabled:((L=e.settingValue)==null?void 0:L.theme)==="light"||((N=e.settingValue)==null?void 0:N.theme)==="dark"&&["mix","wide"].includes((G=e.settingValue)==null?void 0:G.layout)},{key:"colorTextMenuSelected",title:"菜单文字选中颜色",disabled:((ce=e.settingValue)==null?void 0:ce.theme)==="dark"&&((we=e.settingValue)==null?void 0:we.layout)!=="mix"},{key:"colorDarkTextMenuSelected",title:"菜单文字选中颜色",disabled:((Se=e.settingValue)==null?void 0:Se.theme)==="light"||((Be=e.settingValue)==null?void 0:Be.theme)==="dark"&&["mix","wide"].includes((Ie=e.settingValue)==null?void 0:Ie.layout)}]}),d=o.computed(()=>n.value==="header"?m.value:n.value==="sider"?p.value:[]),S=v=>{var B,s;return(s=(B=u.value)==null?void 0:B[n.value])==null?void 0:s[v]};return()=>{var B,s,h;let v;return i(o.createVNode("div",{class:[a,l.value]},[o.createVNode("h3",{class:[`${a}-title`,l.value]},[o.createTextVNode("主题编辑器"),o.createVNode("div",{class:[`${a}-sub-title`,l.value]},[o.createVNode("span",null,[(B=qr.find(f=>{var g;return f.key===((g=e.settingValue)==null?void 0:g.theme)}))==null?void 0:B.title]),o.createVNode("span",{style:{marginInline:"8px"}},[o.createTextVNode("/")]),o.createVNode("span",null,[(s=Ur.find(f=>{var g;return f.key===((g=e.settingValue)==null?void 0:g.layout)}))==null?void 0:s.title])])]),o.createVNode("div",{class:[`${a}-content`,l.value]},[o.createVNode(C.List,{class:`${a}-list ${l.value}`.trim(),split:!1,size:"small",renderItem:({item:f})=>o.createVNode(C.List.Item,{actions:[f.action]},{default:()=>[o.createVNode("span",{style:{opacity:f.disabled?.5:1}},[f.title])]}),dataSource:[{title:"自定义主题色",action:o.createVNode(qt.GColorPicker,{value:(h=e.settingValue)==null?void 0:h.primaryColor,actions:["confirm"],modes:["rgb"],size:"small",onConfirm:f=>e.onChange&&e.onChange(f,"primaryColor")},null)}]},null),o.createVNode(C.Tabs,{activeKey:n.value,onChange:r},Gd(v=Kd.map(f=>o.createVNode(C.TabPane,{key:f.key,tab:f.title},{default:()=>[o.createVNode(C.List,{class:`${a}-list ${l.value}`.trim(),split:!1,size:"small",renderItem:({item:g})=>o.createVNode(C.List.Item,{actions:[g.action]},{default:()=>[o.createVNode("span",{style:{opacity:g.disabled?.5:1}},[g.title])]}),dataSource:d.value.filter(g=>!g.disabled).map(g=>({...g,action:o.createVNode(qt.GColorPicker,{value:S(g.key),actions:["confirm"],modes:["rgb"],size:"small",onConfirm:k=>e.onChange&&e.onChange(k,n.value,g.key)},null)}))},null)]})))?v:{default:()=>[v]})])]))}}}),Kt=Object.keys(D).filter(e=>e!=="title"),Yr={color:"#fff",fontSize:20},Zd=[{label:"fixedHeader",title:"固定 Header"},{label:"fixSiderbar",title:"固定侧边菜单"},{label:"splitMenus",title:"自动分割菜单"}],Jd=[{label:"showTabsBar",title:"多标签"},{label:"fixedMultiTab",title:"固定多标签"}],Zr=e=>F.isBrowser()?{...ee.pick(D,Kt),...e||{}}:ee.cloneDeep(D),lt=(e,{slots:t})=>{var n;return o.createVNode("div",{style:{marginBottom:"24px"}},[o.createVNode("h3",{class:`${e.prefixCls}-body-title ${e.hashId}`.trim()},[e.title]),(n=t.default)==null?void 0:n.call(t)])},$d=o.defineComponent({name:"SettingDrawer",props:{themeOnly:Boolean,hideHintAlert:Boolean,hideCopyButton:Boolean,weakmode:Boolean,showProgress:Boolean,settings:{type:Object},colorList:{type:[Boolean,Array],default:()=>Ho},onChange:Function,onChangeLayout:Function},emits:["change","changeLayout"],setup(e){const{getPrefixCls:t}=_(),n=t({suffixCls:"setting-drawer",isPor:!0}),{wrapSSR:r,hashId:a}=ae("ProSettingDraw",[Xd],n),i=o.ref(!1),[l,c]=Pe.useState(!1),[u,m]=Pe.useState(!1),p=o.computed(()=>Zr(ee.pick(e.settings,Kt))),[d,S]=Pe.useMergedState(()=>Zr(ee.pick(e.settings,Kt)),{value:p,onChange:e.onChange}),v=o.computed(()=>e.colorList&&F.isArray(e.colorList)?e.colorList:[]),B=o.computed(()=>Xu(o.unref(d))),{copy:s,copied:h,isSupported:f}=Xt.useClipboard();o.watch(l,()=>{i.value||(i.value=!0)});const g=(A,x,Q)=>{const T=["header","sider"],R={};if(Q&&T.includes(A)){R[A]={},R[A][Q]=x,e.onChangeLayout&&e.onChangeLayout(ee.pick(R,T));return}else R[A]=x;if(A==="colorWeak"){const I=document.querySelector("body");I&&(I.dataset.prosettingdrawer=x===!0?I.style.filter:I.dataset.prosettingdrawer||"none",x===!0&&(I.dataset.prosettingdrawer=I.style.filter),I.style.filter=x===!0?"invert(80%)":I.dataset.prosettingdrawer||"none",x||delete I.dataset.prosettingdrawer)}S({...o.unref(d),...pr(ee.omit(R,T))})},k=()=>{f.value&&s(JSON.stringify(o.unref(d)))};return o.watch(h,A=>{A&&C.message.success("拷贝成功,请到 config/default/themeConfig.js 中替换默认配置")}),()=>r(o.createVNode(C.Drawer,{width:300,closable:!1,open:l.value,rootClassName:`${n} ${a.value} ${l.value&&`${n}-show`} ${!i.value&&`${n}-trantion-none`}`,placement:"right",rootStyle:{zIndex:999},bodyStyle:{padding:0},contentWrapperStyle:{transform:"translateX(100%)"},onClose:()=>c(!1),handle:o.createVNode("div",{class:[`${n}-handle`,a.value],onClick:()=>c(!l.value)},[l.value?o.createVNode(Z.CloseOutlined,{style:Yr},null):o.createVNode(Z.SettingOutlined,{style:Yr},null)])},{default:()=>[o.createVNode("div",{class:[`${n}-wrapper`,a.value]},[o.createVNode(so,null,{default:()=>[o.createVNode("div",{class:[`${n}-content`,a.value]},[o.createVNode(lt,{prefixCls:n,hashId:a.value,title:"整体风格设置"},{default:()=>[o.createVNode(Gr,{hashId:a.value,prefixCls:n,list:qr,value:d.value.theme,configType:"theme",key:"navTheme",onChange:A=>g("theme",A)},null)]}),o.createVNode(lt,{hashId:a.value,title:o.createVNode("span",null,[o.createTextVNode("主题色 "),o.createVNode("a",{style:{fontSize:"12px"},onClick:()=>m(!0)},[o.createTextVNode("更多配置")])]),prefixCls:n},{default:()=>[o.createVNode(qd,{hashId:a.value,prefixCls:n,colorList:v.value,settingValue:d.value,onChange:(A,x)=>g(x||"primaryColor",A)},null)]}),!e.themeOnly&&o.createVNode(o.Fragment,null,[o.createVNode(C.Divider,null,null),o.createVNode(lt,{hashId:a.value,prefixCls:n,title:"导航模式"},{default:()=>[o.createVNode(Gr,{prefixCls:n,value:o.unref(d).layout,key:"layout",hashId:a.value,configType:"layout",list:Ur,onChange:A=>g("layout",A)},null)]}),Zd.map(({label:A,title:x})=>o.createVNode(it,{label:x,disabled:o.unref(B)[A],value:o.unref(d)[A],prefixCls:n,hashId:a.value,valueKey:A,onChange:(Q,T)=>g(Q,T)},null)),o.createVNode(C.Divider,null,null),o.createVNode(lt,{hashId:a.value,prefixCls:n,title:"其他设置"},{default:()=>[Jd.map(({label:A,title:x})=>o.createVNode(it,{label:x,disabled:o.unref(B)[A],value:o.unref(d)[A],prefixCls:n,hashId:a.value,valueKey:A,onChange:(Q,T)=>g(Q,T)},null)),e.weakmode&&o.createVNode(it,{label:"色弱模式",value:o.unref(d).colorWeak,prefixCls:n,hashId:a.value,valueKey:"colorWeak",onChange:(A,x)=>g(A,x)},null),e.showProgress&&o.createVNode(it,{label:"顶部进度条",value:o.unref(d).showProgressBar,prefixCls:n,hashId:a.value,valueKey:"showProgressBar",onChange:(A,x)=>g(A,x)},null)]})]),e.hideHintAlert&&e.hideCopyButton?null:o.createVNode(C.Divider,null,null),e.hideHintAlert?null:o.createVNode(C.Alert,{type:"warning",message:"配置栏只在开发环境用于预览,生产环境不会展现,请拷贝后手动修改配置文件",icon:o.createVNode(Z.NotificationOutlined,null,null),showIcon:!0,style:{marginBottom:"16px"}},null),e.hideCopyButton?null:o.createVNode(C.Button,{onClick:()=>k(),block:!0},{default:()=>[o.createVNode(Z.CopyOutlined,null,null),o.createTextVNode("拷贝设置")]})])]})]),o.createVNode(C.Drawer,{width:320,closable:!1,placement:"right",open:u.value,bodyStyle:{padding:0},onClose:()=>m(!1)},{default:()=>[o.createVNode(Yd,{settingValue:d.value,onChange:(A,x,Q)=>g(x||"primaryColor",A,Q)},null)]})]}))}});w.BaseMenu=Vt,w.DefaultHeader=Wr,w.GProLayout=Dd,w.GlobalFooter=tt,w.PageContainer=od,w.PageLoading=Ut,w.SettingDrawer=$d,w.SiderMenuWrapper=_e,w.WrapContent=nt,w.baseMenuProps=Je,w.clearMenuItem=br,w.createContext=Cr,w.createRouteContext=wr,w.flatMap=yr,w.getMenuData=Wd,w.getMenuFirstChildren=Ar,w.handleThemeConfig=pr,w.provideProLayoutContext=Sr,w.useContext=xr,w.useProLayoutContext=_,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gx-design-vue/pro-layout",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.2",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",