@robot-admin/layout 2.1.0 → 2.2.0
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.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +932 -895
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/layouts.scss +78 -34
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),se=require("pinia"),p=require("naive-ui"),R=require("vue-router"),ee=[{name:"拂晓蓝",value:"#409eff"},{name:"薄暮红",value:"#f5222d"},{name:"火山橙",value:"#fa541c"},{name:"日暮黄",value:"#faad14"},{name:"极光绿",value:"#52c41a"},{name:"明青",value:"#13c2c2"},{name:"极客蓝",value:"#2f54eb"},{name:"酱紫",value:"#722ed1"}],te=[{name:"科技蓝",icon:"💙",primaryColor:"#409eff"},{name:"清新绿",icon:"💚",primaryColor:"#52c41a"},{name:"商务灰",icon:"🖤",primaryColor:"#595959"},{name:"活力橙",icon:"🧡",primaryColor:"#fa8c16"},{name:"优雅紫",icon:"💜",primaryColor:"#722ed1"},{name:"经典红",icon:"❤️",primaryColor:"#f5222d"}],re=[{mode:"side",label:"左侧菜单",description:"经典的左侧导航布局",icon:"i-mdi:page-layout-sidebar-left"},{mode:"top",label:"顶部菜单",description:"顶部水平导航布局",icon:"i-mdi:page-layout-header"},{mode:"mix",label:"混合菜单",description:"顶部 + 侧边混合布局",icon:"i-mdi:page-layout-header-sidebar-left"},{mode:"mix-top",label:"顶部混合",description:"侧边优先的混合布局",icon:"i-mdi:page-layout-sidebar-left-header"},{mode:"reverse-horizontal-mix",label:"反转混合",description:"反转的水平混合布局",icon:"i-mdi:page-layout-header-footer"},{mode:"card-layout",label:"卡片布局",description:"卡片式布局风格",icon:"i-mdi:card-outline"}],oe={small:"4px",medium:"6px",large:"8px"},ne={fade:"fade-transform",slide:"fade-slide",zoom:"fade-zoom",none:""},x={themeMode:"light",primaryColor:"#409eff",borderRadius:"medium",transitionType:"slide",enableTransition:!0,layoutMode:"side",collapsed:!1,fixedHeader:!0,showBreadcrumb:!0,showBreadcrumbIcon:!0,showTagsView:!0,tagsViewHeight:44,tagsViewStyle:"default",showFooter:!0,sidebarWidth:220,sidebarCollapsedWidth:64,headerHeight:56,enableHotkeys:!0,version:"2.0.2"},le=ee.map(v=>v.value);function P(v,l){const h=parseInt(v.replace("#",""),16),o=Math.min(255,Math.max(0,(h>>16)+l)),m=Math.min(255,Math.max(0,(h>>8&255)+l)),i=Math.min(255,Math.max(0,(h&255)+l));return`#${(o<<16|m<<8|i).toString(16).padStart(6,"0")}`}function j(v={}){const{defaults:l={},onThemeModeChange:h}=v,o={...x,...l};return se.defineStore("settings",()=>{const m=e.ref(o.themeMode),i=e.ref(o.primaryColor),n=e.ref(o.borderRadius),s=e.ref(o.transitionType),r=e.ref(o.enableTransition),g=e.ref(o.layoutMode),u=e.ref(o.collapsed),c=e.ref(o.fixedHeader),f=e.ref(o.showBreadcrumb),y=e.ref(o.showBreadcrumbIcon),k=e.ref(o.showTagsView),w=e.ref(o.tagsViewHeight),d=e.ref(o.tagsViewStyle),E=e.ref(o.showFooter),N=e.ref(o.sidebarWidth),_=e.ref(o.sidebarCollapsedWidth),M=e.ref(o.headerHeight),b=e.ref(o.enableHotkeys),B=e.ref(o.version),T=e.computed(()=>oe[n.value]),C=e.computed(()=>ne[s.value]),t=e.computed(()=>r.value&&s.value!=="none"),a=e.computed(()=>({themeMode:m.value,primaryColor:i.value,borderRadius:n.value,transitionType:s.value,enableTransition:r.value,layoutMode:g.value,collapsed:u.value,fixedHeader:c.value,showBreadcrumb:f.value,showBreadcrumbIcon:y.value,showTagsView:k.value,tagsViewHeight:w.value,tagsViewStyle:d.value,showFooter:E.value,sidebarWidth:N.value,sidebarCollapsedWidth:_.value,headerHeight:M.value,enableHotkeys:b.value,version:B.value})),$=()=>{if(typeof document>"u")return;const V=document.documentElement;V.style.setProperty("--primary-color",i.value),V.style.setProperty("--primary-color-hover",P(i.value,10)),V.style.setProperty("--primary-color-pressed",P(i.value,-10)),V.style.setProperty("--border-radius",T.value),V.style.setProperty("--sidebar-width",`${N.value}px`),V.style.setProperty("--sidebar-collapsed-width",`${_.value}px`),V.style.setProperty("--header-height",`${M.value}px`),V.style.setProperty("--tags-view-height",`${w.value}px`)},S=async V=>{i.value=V.primaryColor,V.settings&&(V.settings.borderRadius&&(n.value=V.settings.borderRadius),V.settings.transitionType&&(s.value=V.settings.transitionType),V.settings.showBreadcrumb!==void 0&&(f.value=V.settings.showBreadcrumb),V.settings.showTagsView!==void 0&&(k.value=V.settings.showTagsView),V.settings.tagsViewStyle&&(d.value=V.settings.tagsViewStyle))},A=()=>{m.value=o.themeMode,i.value=o.primaryColor,n.value=o.borderRadius,s.value=o.transitionType,r.value=o.enableTransition,g.value=o.layoutMode,u.value=o.collapsed,c.value=o.fixedHeader,f.value=o.showBreadcrumb,y.value=o.showBreadcrumbIcon,k.value=o.showTagsView,w.value=o.tagsViewHeight,d.value=o.tagsViewStyle,E.value=o.showFooter,N.value=o.sidebarWidth,_.value=o.sidebarCollapsedWidth,M.value=o.headerHeight,b.value=o.enableHotkeys},H=async V=>{m.value=V,h&&await h(V)},F=()=>{u.value=!u.value};return e.watch([i,T,N,_,M,w],()=>{$()},{immediate:!0}),{themeMode:m,primaryColor:i,borderRadius:n,transitionType:s,enableTransition:r,layoutMode:g,collapsed:u,fixedHeader:c,showBreadcrumb:f,showBreadcrumbIcon:y,showTagsView:k,tagsViewHeight:w,tagsViewStyle:d,showFooter:E,sidebarWidth:N,sidebarCollapsedWidth:_,headerHeight:M,enableHotkeys:b,version:B,borderRadiusValue:T,transitionName:C,shouldEnableTransition:t,settingsState:a,syncCSSVariables:$,applyPreset:S,resetSettings:A,updateThemeMode:H,toggleCollapse:F}})}const K=j(),ae=Symbol("layout-context"),Y=Symbol("drawer-handlers");function D(){const v=e.inject(ae);if(!v)throw new Error("[Layout] LayoutContext not provided. 请在上层组件中使用 provide(LAYOUT_CONTEXT_KEY, ...) 注入布局数据。");return v}const z={name:"Admin",subtitle:"",logoSrc:"",logoType:"image",logoSize:36,homePath:"/home",copyright:""};function I(v={}){const{maxCacheCount:l=20,enableDevLog:h=!0,exposeToWindow:o=!0}=v,m=R.useRoute(),i=e.ref([]),n=e.ref(l),s=c=>!c||typeof c!="string"?!1:m.meta?.keepAlive===!0,r=c=>{!i.value.includes(c)&&s(c)&&(i.value.push(c),i.value.length>n.value&&i.value.shift())},g=c=>{const f=i.value.indexOf(c);f>-1&&i.value.splice(f,1)},u=()=>{i.value=[]};return e.watch(()=>m.name,c=>{c&&typeof c=="string"&&r(c)},{immediate:!0}),{cachedViews:i,maxCacheCount:n,addCache:r,removeCache:g,clearAllCache:u}}const G=e.defineComponent({name:"SideLayout",__name:"index",props:{collapsed:{type:Boolean,default:!1}},emits:["update:collapsed"],setup(v,{expose:l,emit:h}){const o=v,m=h,i=D(),{cachedViews:n,maxCacheCount:s}=I(),r=e.ref(o.collapsed);e.watch(()=>o.collapsed,f=>{r.value=f});const g=e.computed(()=>r.value),u=f=>{r.value=f,m("update:collapsed",f)};return l({collapsed:g,toggleCollapse:()=>{const f=!r.value;r.value=f,m("update:collapsed",f)}}),(f,y)=>{const k=e.resolveComponent("RouterView");return e.openBlock(),e.createBlock(e.unref(p.NLayout),{"has-sider":""},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutSider),{bordered:"","collapse-mode":"width","collapsed-width":e.unref(i).sidebarCollapsedWidth.value,width:e.unref(i).sidebarWidth.value,"native-scrollbar":!1,collapsed:g.value,"onUpdate:collapsed":u,class:e.normalizeClass(["layout-sider","no-horizontal-scroll",e.unref(i).isDark.value?"dark-theme":"light-theme"])},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"logo"),e.renderSlot(f.$slots,"menu",{collapsed:g.value})]),_:3},8,["collapsed-width","width","collapsed","class"]),e.createVNode(e.unref(p.NLayout),null,{default:e.withCtx(()=>[e.renderSlot(f.$slots,"header"),e.createVNode(e.unref(p.NLayoutContent),{class:"content-with-header p16px app-content"},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(({Component:w,route:d})=>[e.createVNode(e.Transition,{name:e.unref(i).transitionName.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(n),max:e.unref(s)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:d.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})]),_:1}),e.renderSlot(f.$slots,"footer")]),_:3})]),_:3})}}}),ie={ref:"visibleRef",class:"responsive-menu__visible"},ce={class:"responsive-menu__more"},de=e.defineComponent({name:"ResponsiveMenu",__name:"index",props:{data:{}},setup(v){const l=v,h=R.useRoute(),o=R.useRouter(),m=D(),i=e.computed(()=>l.data||[]),n=e.computed(()=>h.path),s=m.isDark,r={itemTextColor:"rgba(51, 65, 85, 0.85)",itemTextColorHover:"rgba(30, 64, 175, 0.95)",itemTextColorActive:"rgba(30, 64, 175, 1)",itemTextColorActiveHover:"rgba(30, 64, 175, 1)",itemTextColorChildActive:"rgba(30, 64, 175, 1)",itemIconColor:"rgba(51, 65, 85, 0.7)",itemIconColorHover:"rgba(30, 64, 175, 0.85)",itemIconColorActive:"rgba(30, 64, 175, 1)",itemIconColorActiveHover:"rgba(30, 64, 175, 1)",itemIconColorChildActive:"rgba(30, 64, 175, 1)",itemColorHover:"rgba(30, 64, 175, 0.06)",itemColorActive:"rgba(30, 64, 175, 0.1)",itemColorActiveHover:"rgba(30, 64, 175, 0.12)",itemColorActiveCollapsed:"rgba(30, 64, 175, 0.1)",arrowColor:"rgba(51, 65, 85, 0.6)",arrowColorHover:"rgba(30, 64, 175, 0.8)",arrowColorActive:"rgba(30, 64, 175, 1)",arrowColorChildActive:"rgba(30, 64, 175, 1)",itemHeight:"42px",itemPadding:"0 18px",itemBorderRadius:"10px",groupTextColor:"rgba(51, 65, 85, 0.65)"},g={itemTextColor:"rgba(226, 232, 240, 0.85)",itemTextColorHover:"rgba(255, 255, 255, 0.95)",itemTextColorActive:"rgba(147, 197, 253, 1)",itemTextColorActiveHover:"rgba(147, 197, 253, 1)",itemTextColorChildActive:"rgba(147, 197, 253, 1)",itemIconColor:"rgba(226, 232, 240, 0.7)",itemIconColorHover:"rgba(255, 255, 255, 0.85)",itemIconColorActive:"rgba(147, 197, 253, 1)",itemIconColorActiveHover:"rgba(147, 197, 253, 1)",itemIconColorChildActive:"rgba(147, 197, 253, 1)",itemColorHover:"rgba(59, 130, 246, 0.1)",itemColorActive:"rgba(59, 130, 246, 0.15)",itemColorActiveHover:"rgba(59, 130, 246, 0.18)",itemColorActiveCollapsed:"rgba(59, 130, 246, 0.15)",arrowColor:"rgba(226, 232, 240, 0.5)",arrowColorHover:"rgba(255, 255, 255, 0.7)",arrowColorActive:"rgba(147, 197, 253, 1)",arrowColorChildActive:"rgba(147, 197, 253, 1)",itemHeight:"42px",itemPadding:"0 18px",itemBorderRadius:"10px",groupTextColor:"rgba(226, 232, 240, 0.6)"},u=e.computed(()=>s.value?g:r),c=(t,a=18)=>m.iconComponent?()=>e.h(m.iconComponent,{name:t,size:a}):()=>e.h("i",{class:t,style:{fontSize:`${a}px`,display:"inline-flex",alignItems:"center"}}),f=t=>({key:t.path||"",label:t.meta?.title||t.name||"",icon:t.meta?.icon?c(t.meta.icon,18):void 0,children:t.children?.length?t.children.map(f):void 0}),y=e.ref(),k=e.ref([]),w=e.ref([]),d=e.computed(()=>k.value.map(f)),E=e.computed(()=>w.value.map(t=>({key:t.path||"",label:t.meta?.title||t.name||"",icon:t.meta?.icon?c(t.meta.icon,16):void 0,children:t.children?.length?t.children.map(a=>({key:a.path||"",label:a.meta?.title||a.name||"",icon:a.meta?.icon?c(a.meta.icon,16):void 0})):void 0}))),N=t=>{t&&o.push(t)},_=t=>{const V=(t.meta?.title||t.name||"").length*12,O=t.meta?.icon?26:0;return V+O+36+8+5},M=t=>{if(!i.value.length)return 0;const a=80,$=15;let S=0;for(const V of i.value)S+=_(V);if(S+$<=t)return i.value.length;let A=0,H=0;const F=t-a-$;for(const V of i.value){const O=_(V);if(A+O<=F)A+=O,H++;else break}return Math.max(H,1)},b=()=>{if(!y.value||!i.value.length)return;const t=y.value.offsetWidth;if(t===0){e.nextTick(()=>b());return}const a=M(t);k.value=i.value.slice(0,a),w.value=i.value.slice(a)};let B=null;const T=()=>{B&&clearTimeout(B),B=window.setTimeout(()=>b(),100)};let C=null;return e.onMounted(()=>{e.nextTick(()=>b()),y.value&&(C=new ResizeObserver(()=>T()),C.observe(y.value))}),e.onUnmounted(()=>{C?.disconnect(),B&&clearTimeout(B)}),e.watch(()=>l.data,()=>e.nextTick(()=>b()),{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:y,class:"responsive-menu"},[e.createElementVNode("div",ie,[d.value.length>0?(e.openBlock(),e.createBlock(e.unref(p.NMenu),{key:0,mode:"horizontal",value:n.value,options:d.value,"theme-overrides":u.value,"onUpdate:value":N},null,8,["value","options","theme-overrides"])):e.createCommentVNode("",!0)],512),w.value.length>0?(e.openBlock(),e.createBlock(e.unref(p.NDropdown),{key:0,options:E.value,placement:"bottom-end",trigger:"hover",onSelect:N},{default:e.withCtx(()=>[e.createElementVNode("div",ce,[e.createVNode(e.unref(p.NButton),{text:"",class:"responsive-menu__more-btn"},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createElementVNode("span",{class:"i-mdi:dots-horizontal",style:{"font-size":"20px"}},null,-1)])]),_:1})])]),_:1},8,["options"])):e.createCommentVNode("",!0)],512))}}),L=(v,l)=>{const h=v.__vccOpts||v;for(const[o,m]of l)h[o]=m;return h},U=L(de,[["__scopeId","data-v-92216781"]]),ue={class:"top-layout-container"},me={class:"navbar-left"},ve={class:"logo-container"},pe=["src","width","height"],he=["src","width","height"],fe={class:"brand-name"},ge={class:"brand-title"},ke={class:"brand-subtitle"},ye={class:"navbar-center"},Ce={class:"page-content"},X=e.defineComponent({name:"TopLayout",__name:"index",setup(v){const l=D(),{cachedViews:h,maxCacheCount:o}=I(),m=l.isDark,i=e.computed(()=>l.menus.value),n=e.computed(()=>l.showTagsView.value),s=e.computed(()=>l.tagsViewHeight.value),r=e.computed(()=>l.showFooter.value),g=e.computed(()=>l.transitionName.value),u={...z,...l.brand};return(c,f)=>{const y=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",{class:e.normalizeClass(["top-navbar",[e.unref(m)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",me,[e.renderSlot(c.$slots,"logo",{},()=>[e.createElementVNode("div",ve,[f[0]||(f[0]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),u.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:u.logoSrc,width:u.logoSize||36,height:u.logoSize||36,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,pe)):(e.openBlock(),e.createElementBlock("img",{key:1,src:u.logoSrc,width:u.logoSize||36,height:u.logoSize||36,class:"logo-video"},null,8,he))]),e.createElementVNode("div",fe,[e.createElementVNode("span",ge,e.toDisplayString(u.name),1),e.createElementVNode("span",ke,e.toDisplayString(u.subtitle),1)]),f[1]||(f[1]=e.createElementVNode("div",{class:"navbar-divider"},null,-1))])]),e.createElementVNode("div",ye,[e.renderSlot(c.$slots,"menu",{},()=>[e.createVNode(U,{data:i.value},null,8,["data"])])]),e.renderSlot(c.$slots,"header-extra")],2),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tags-view-container",style:e.normalizeStyle({height:`${s.value}px`})},[e.renderSlot(c.$slots,"tags-view")],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(p.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"main-content"},{default:e.withCtx(()=>[e.createElementVNode("div",Ce,[e.createVNode(y,null,{default:e.withCtx(({Component:k,route:w})=>[e.createVNode(e.Transition,{name:g.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(h),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k),{key:w.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})])]),_:1}),r.value?e.renderSlot(c.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3})])}}});function W(v){const{menus:l,floatingSecondMenu:h=!1}=v,o=R.useRoute(),m=R.useRouter(),i=e.ref(""),n=e.ref(null),s=e.ref(!1),r=d=>d.startsWith("/")?d:`/${d}`,g=d=>{if(!d)return!1;const E=o.path;if(E===d)return!0;const N=r(d),_=r(E);return _===N?!0:_.includes(`/${d}`)},u=d=>{for(const E of d)if(g(E.path)||E.children?.length&&u(E.children))return E;return null},c=e.computed(()=>l.value.find(d=>d.path===i.value)),f=e.computed(()=>c.value?.children||[]),y=d=>{i.value=d.path||"",e.toValue(h)?d.children&&d.children.length>0?s.value&&n.value?.path===d.path?(s.value=!1,n.value=null):(n.value=d,s.value=!0):(s.value=!1,n.value=null,d.path&&m.push(d.path)):(!d.children||d.children.length===0)&&d.path&&m.push(d.path)},k=d=>{d.path&&m.push(d.path)},w=()=>{const d=l.value,E=u(d);E?i.value=E.path||"":d.length>0&&!i.value&&(i.value=d[0].path||"")};return e.watch(()=>o.path,()=>w(),{immediate:!0}),e.watch(l,d=>{d&&d.length>0&&w()},{immediate:!0}),e.onMounted(()=>w()),{activeFirstMenu:i,activeFirstMenuItem:c,currentSecondMenus:f,hoveredMenuItem:n,showSecondMenu:s,handleFirstMenuClick:y,handleSecondMenuClick:k,isMenuItemActive:g}}const Ne={class:"mix-layout-container"},we={class:"logo-container"},_e=["src","width","height"],Ve=["src","width","height"],Ee={class:"first-menu-list"},Be=["onClick","onMouseenter"],be={class:"menu-item-content"},xe={key:1,class:"menu-item-text"},$e={class:"menu-item-label"},Se={class:"second-menu-header"},Te={class:"menu-title"},De={class:"second-menu-list"},Me=["onClick"],ze={class:"menu-item-label"},Le={class:"main-layout"},q=e.defineComponent({name:"MixLayout",__name:"index",setup(v){const l=D(),{cachedViews:h,maxCacheCount:o}=I(),m=l.isDark,i=e.computed(()=>l.menus.value),n=e.computed(()=>l.showFooter.value),s=e.computed(()=>l.transitionName.value),r={...z,...l.brand},g=W({menus:l.menus,floatingSecondMenu:e.computed(()=>!0)}),u=l.iconComponent??e.defineComponent({name:"LayoutIcon",props:{name:String,size:{type:Number,default:18}},setup(c){return()=>e.h("i",{class:c.name,style:{fontSize:`${c.size}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}})}});return(c,f)=>{const y=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Ne,[e.createElementVNode("div",{class:e.normalizeClass(["first-level-menu",[e.unref(m)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",we,[e.renderSlot(c.$slots,"logo",{},()=>[f[1]||(f[1]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),r.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:r.logoSrc,width:r.logoSize||40,height:r.logoSize||40,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,_e)):(e.openBlock(),e.createElementBlock("img",{key:1,src:r.logoSrc,width:r.logoSize||40,height:r.logoSize||40,class:"logo-video"},null,8,Ve))])]),e.createElementVNode("div",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,k=>(e.openBlock(),e.createElementBlock("div",{key:k.path,class:e.normalizeClass(["first-menu-item",{active:e.unref(g).activeFirstMenu.value===k.path}]),onClick:w=>e.unref(g).handleFirstMenuClick(k),onMouseenter:w=>e.unref(g).hoveredMenuItem.value=k},[e.createElementVNode("div",be,[k.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{key:0,name:k.meta.icon,size:22},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",xe,e.toDisplayString((k.meta?.title||"")[0]),1))]),e.createElementVNode("span",$e,e.toDisplayString(k.meta?.title),1)],42,Be))),128))])],2),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.unref(g).showSecondMenu.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["second-level-menu-popup",[e.unref(m)?"dark-theme":"light-theme"]]),onMouseleave:f[0]||(f[0]=k=>e.unref(g).hoveredMenuItem.value=null)},[e.createElementVNode("div",Se,[e.unref(g).hoveredMenuItem.value?.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{key:0,name:e.unref(g).hoveredMenuItem.value.meta.icon,size:20},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Te,e.toDisplayString(e.unref(g).hoveredMenuItem.value?.meta?.title),1)]),e.createElementVNode("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g).hoveredMenuItem.value?.children||[],k=>(e.openBlock(),e.createElementBlock("div",{key:k.path,class:e.normalizeClass(["second-menu-item",{active:e.unref(g).isMenuItemActive(k.path)}]),onClick:w=>e.unref(g).handleSecondMenuClick(k)},[k.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{key:0,name:k.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",ze,e.toDisplayString(k.meta?.title),1)],10,Me))),128))])],34)):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Le,[e.renderSlot(c.$slots,"header"),e.createVNode(e.unref(p.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"content-with-header p16px app-content"},{default:e.withCtx(()=>[e.createVNode(y,null,{default:e.withCtx(({Component:k,route:w})=>[e.createVNode(e.Transition,{name:s.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(h),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k),{key:w.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})]),_:1}),n.value?e.renderSlot(c.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3})])])}}}),Re={class:"mix-top-layout-container"},Ie={class:"logo-container"},Ae=["src","width","height"],He=["src","width","height"],Fe={class:"first-menu-list"},Oe=["onClick"],Ue={class:"menu-item-content"},We={key:1,class:"menu-item-text"},Pe={class:"menu-item-label"},je={class:"main-area"},Ke={class:"navbar-left"},Ye={class:"brand-name"},Ge={class:"brand-title"},Xe={class:"brand-subtitle"},qe={class:"navbar-center"},Je={class:"page-content"},J=e.defineComponent({name:"MixTopLayout",__name:"index",setup(v){const l=D(),{cachedViews:h,maxCacheCount:o}=I(),m=l.isDark,i=e.computed(()=>l.menus.value),n=e.computed(()=>l.showTagsView.value),s=e.computed(()=>l.tagsViewHeight.value),r=e.computed(()=>l.showFooter.value),g=e.computed(()=>l.transitionName.value),u={...z,...l.brand},c=W({menus:l.menus,floatingSecondMenu:e.computed(()=>!1)}),f=l.iconComponent??e.defineComponent({name:"LayoutIcon",props:{name:String,size:{type:Number,default:18}},setup(y){return()=>e.h("i",{class:y.name,style:{fontSize:`${y.size}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}})}});return(y,k)=>{const w=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",{class:e.normalizeClass(["first-level-sidebar",[e.unref(m)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Ie,[e.renderSlot(y.$slots,"logo",{},()=>[k[0]||(k[0]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),u.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:u.logoSrc,width:u.logoSize||40,height:u.logoSize||40,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,Ae)):(e.openBlock(),e.createElementBlock("img",{key:1,src:u.logoSrc,width:u.logoSize||40,height:u.logoSize||40,class:"logo-video"},null,8,He))])]),e.createElementVNode("div",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.path,class:e.normalizeClass(["first-menu-item",{active:e.unref(c).activeFirstMenu.value===d.path}]),onClick:E=>e.unref(c).handleFirstMenuClick(d)},[e.createElementVNode("div",Ue,[d.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),{key:0,name:d.meta.icon,size:22},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",We,e.toDisplayString((d.meta?.title||"")[0]),1))]),e.createElementVNode("span",Pe,e.toDisplayString(d.meta?.title),1)],10,Oe))),128))])],2),e.createElementVNode("div",je,[e.createElementVNode("div",{class:e.normalizeClass(["top-navbar",[e.unref(m)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Ke,[e.renderSlot(y.$slots,"brand",{},()=>[e.createElementVNode("div",Ye,[e.createElementVNode("span",Ge,e.toDisplayString(u.name),1),e.createElementVNode("span",Xe,e.toDisplayString(u.subtitle),1)]),k[1]||(k[1]=e.createElementVNode("div",{class:"navbar-divider"},null,-1))])]),e.createElementVNode("div",qe,[e.renderSlot(y.$slots,"top-menu",{},()=>[e.unref(c).currentSecondMenus.value.length>0?(e.openBlock(),e.createBlock(U,{key:0,data:e.unref(c).currentSecondMenus.value},null,8,["data"])):e.createCommentVNode("",!0)])]),e.renderSlot(y.$slots,"header-extra")],2),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tags-view-container",style:e.normalizeStyle({height:`${s.value}px`})},[e.renderSlot(y.$slots,"tags-view")],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(p.NLayout),{class:"content-layout"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"main-content"},{default:e.withCtx(()=>[e.createElementVNode("div",Je,[e.createVNode(w,null,{default:e.withCtx(({Component:d,route:E})=>[e.createVNode(e.Transition,{name:g.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(h),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d),{key:E.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})])]),_:1}),r.value?e.renderSlot(y.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3})])])}}}),Ze={class:"reverse-horizontal-mix-layout-container"},Qe={class:"navbar-left"},et={class:"logo-container"},tt=["src","width","height"],ot=["src","width","height"],nt={class:"brand-name"},lt={class:"brand-title"},at={class:"brand-subtitle"},st={class:"navbar-center"},rt={class:"main-area"},it={class:"page-content"},ct={class:"sidebar-content"},dt={class:"header-icon"},ut={class:"header-title"},mt={class:"sidebar-menu-list"},vt={key:0,class:"menu-group"},pt={class:"group-title"},ht=["onClick"],ft={class:"item-title"},gt=["onClick"],kt={class:"item-title"},Z=e.defineComponent({name:"ReverseHorizontalMixLayout",__name:"index",setup(v){const l=D(),{cachedViews:h,maxCacheCount:o}=I(),m=l.isDark,i=e.computed(()=>l.menus.value),n=e.computed(()=>l.showTagsView.value),s=e.computed(()=>l.tagsViewHeight.value),r=e.computed(()=>l.showFooter.value),g=e.computed(()=>l.transitionName.value),u={...z,...l.brand},c=W({menus:l.menus,floatingSecondMenu:e.computed(()=>!1)}),f=e.ref(!1),y=()=>{f.value=!f.value},k=l.iconComponent??e.defineComponent({name:"LayoutIcon",props:{name:String,size:{type:Number,default:18}},setup(w){return()=>e.h("i",{class:w.name,style:{fontSize:`${w.size}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}})}});return(w,d)=>{const E=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("div",{class:e.normalizeClass(["top-navbar",[e.unref(m)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Qe,[e.renderSlot(w.$slots,"logo",{},()=>[e.createElementVNode("div",et,[d[0]||(d[0]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),u.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:u.logoSrc,width:u.logoSize||36,height:u.logoSize||36,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,tt)):(e.openBlock(),e.createElementBlock("img",{key:1,src:u.logoSrc,width:u.logoSize||36,height:u.logoSize||36,class:"logo-video"},null,8,ot))]),e.createElementVNode("div",nt,[e.createElementVNode("span",lt,e.toDisplayString(u.name),1),e.createElementVNode("span",at,e.toDisplayString(u.subtitle),1)]),d[1]||(d[1]=e.createElementVNode("div",{class:"navbar-divider"},null,-1))])]),e.createElementVNode("div",st,[e.renderSlot(w.$slots,"top-menu",{},()=>[e.createVNode(U,{data:i.value},null,8,["data"])])]),e.renderSlot(w.$slots,"header-extra")],2),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tags-view-container",style:e.normalizeStyle({height:`${s.value}px`})},[e.renderSlot(w.$slots,"tags-view")],4)):e.createCommentVNode("",!0),e.createElementVNode("div",rt,[e.createVNode(e.unref(p.NLayout),{class:"content-layout"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"main-content"},{default:e.withCtx(()=>[e.createElementVNode("div",it,[e.createVNode(E,null,{default:e.withCtx(({Component:N,route:_})=>[e.createVNode(e.Transition,{name:g.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(h),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N),{key:_.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})])]),_:1}),r.value?e.renderSlot(w.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3}),e.unref(c).currentSecondMenus.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["right-sidebar",[e.unref(m)?"dark-theme":"light-theme",{collapsed:f.value}]])},[e.createElementVNode("div",{class:"collapse-trigger",onClick:y},[e.createElementVNode("i",{class:e.normalizeClass(["transition-all duration-300 ease-in-out",f.value?"i-ri:menu-fold-4-fill":"i-ri:menu-fold-3-fill"])},null,2)]),e.withDirectives(e.createElementVNode("div",ct,[e.createElementVNode("div",{class:e.normalizeClass(["sidebar-header",[e.unref(m)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",dt,[e.unref(c).activeFirstMenuItem.value?.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(k)),{key:0,name:e.unref(c).activeFirstMenuItem.value.meta.icon,size:20},null,8,["name"])):e.createCommentVNode("",!0)]),e.createElementVNode("span",ut,e.toDisplayString(e.unref(c).activeFirstMenuItem.value?.meta?.title||"菜单"),1)],2),e.createElementVNode("div",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).currentSecondMenus.value,N=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:N.path},[N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",vt,[e.createElementVNode("div",pt,[N.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(k)),{key:0,name:N.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(N.meta?.title),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.children,_=>(e.openBlock(),e.createElementBlock("div",{key:_.path,class:e.normalizeClass(["menu-item sub-item",{active:e.unref(c).isMenuItemActive(_.path)}]),onClick:M=>e.unref(c).handleSecondMenuClick(_)},[_.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(k)),{key:0,name:_.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",ft,e.toDisplayString(_.meta?.title),1)],10,ht))),128))])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["menu-item",{active:e.unref(c).isMenuItemActive(N.path)}]),onClick:_=>e.unref(c).handleSecondMenuClick(N)},[N.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(k)),{key:0,name:N.meta.icon,size:18},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",kt,e.toDisplayString(N.meta?.title),1)],10,gt))],64))),128))])],512),[[e.vShow,!f.value]])],2)):e.createCommentVNode("",!0)])])}}}),yt={class:"card-layout-container"},Ct={class:"navbar-left"},Nt={class:"logo-container"},wt=["src","width","height"],_t=["src","width","height"],Vt={class:"brand-name"},Et={class:"brand-title"},Bt={class:"brand-subtitle"},bt={class:"drawer-content"},xt={class:"menu-grid"},$t=["onClick"],St={key:0,class:"category-items"},Tt=["onClick"],Dt={class:"item-title"},Mt={key:0,class:"submenu-items"},zt={class:"submenu-title"},Lt=["onClick"],Rt={class:"item-title"},It={class:"main-content-area"},At={class:"page-content"},Q=e.defineComponent({name:"CardLayout",__name:"index",setup(v){const l=D(),{cachedViews:h,maxCacheCount:o}=I(),m=R.useRouter(),i=l.isDark,n=e.computed(()=>l.menus.value),s=e.computed(()=>l.showTagsView.value),r=e.computed(()=>l.tagsViewHeight.value),g=e.computed(()=>l.showFooter.value),u=e.computed(()=>l.transitionName.value),c={...z,...l.brand},f=e.ref(!1),y=e.ref(null),k=()=>{y.value&&clearTimeout(y.value),y.value=setTimeout(()=>{f.value=!1},300)},w=()=>{y.value&&(clearTimeout(y.value),y.value=null),f.value=!0},d=N=>{N.path&&(m.push(N.path),f.value=!1)},E=l.iconComponent??e.defineComponent({name:"LayoutIcon",props:{name:String,size:{type:Number,default:18}},setup(N){return()=>e.h("i",{class:N.name,style:{fontSize:`${N.size}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}})}});return e.onUnmounted(()=>{y.value&&clearTimeout(y.value)}),(N,_)=>{const M=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",yt,[e.createElementVNode("div",{class:e.normalizeClass(["top-navbar",[e.unref(i)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Ct,[e.createElementVNode("div",{class:"hover-trigger-area",onMouseenter:w,onMouseleave:k},[e.renderSlot(N.$slots,"menu-trigger",{},()=>[_[0]||(_[0]=e.createElementVNode("div",{class:"menu-indicator"},[e.createElementVNode("i",{class:"i-ri:menu-3-line"})],-1))])],32),e.renderSlot(N.$slots,"logo",{},()=>[e.createElementVNode("div",Nt,[_[1]||(_[1]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),c.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:c.logoSrc,width:c.logoSize||36,height:c.logoSize||36,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,wt)):(e.openBlock(),e.createElementBlock("img",{key:1,src:c.logoSrc,width:c.logoSize||36,height:c.logoSize||36,class:"logo-video"},null,8,_t))]),e.createElementVNode("div",Vt,[e.createElementVNode("span",Et,e.toDisplayString(c.name),1),e.createElementVNode("span",Bt,e.toDisplayString(c.subtitle),1)]),_[2]||(_[2]=e.createElementVNode("div",{class:"navbar-divider"},null,-1))])]),e.renderSlot(N.$slots,"header-extra")],2),s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tags-view-container",style:e.normalizeStyle({height:`${r.value}px`})},[e.renderSlot(N.$slots,"tags-view")],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["drawer-menu",[e.unref(i)?"dark-theme":"light-theme",{visible:f.value}]]),onMouseenter:w,onMouseleave:k},[e.renderSlot(N.$slots,"drawer-menu",{},()=>[_[3]||(_[3]=e.createElementVNode("div",{class:"drawer-header"},[e.createElementVNode("div",{class:"drawer-title"},[e.createElementVNode("i",{class:"i-ri:apps-2-line"}),e.createElementVNode("span",null,"功能导航")])],-1)),e.createElementVNode("div",bt,[e.createElementVNode("div",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,b=>(e.openBlock(),e.createElementBlock("div",{key:b.path,class:"menu-category"},[e.createElementVNode("div",{class:"category-header",onClick:B=>d(b)},[b.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(E)),{key:0,name:b.meta.icon,size:18},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(b.meta?.title),1)],8,$t),b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.children,B=>(e.openBlock(),e.createElementBlock("div",{key:B.path,class:"menu-item",onClick:T=>d(B)},[B.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(E)),{key:0,name:B.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Dt,e.toDisplayString(B.meta?.title),1)],8,Tt))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.children,B=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"sub-"+B.path},[B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",Mt,[e.createElementVNode("div",zt,e.toDisplayString(B.meta?.title),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.children,T=>(e.openBlock(),e.createElementBlock("div",{key:T.path,class:"menu-item submenu-item",onClick:C=>d(T)},[T.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(E)),{key:0,name:T.meta.icon,size:14},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Rt,e.toDisplayString(T.meta?.title),1)],8,Lt))),128))])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)]))),128))])])])],34),e.createElementVNode("div",It,[e.createVNode(e.unref(p.NLayout),{class:"content-layout"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"main-content p16px app-content"},{default:e.withCtx(()=>[e.createElementVNode("div",At,[e.createVNode(M,null,{default:e.withCtx(({Component:b,route:B})=>[e.createVNode(e.Transition,{name:u.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(h),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b),{key:B.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})])]),_:1}),g.value?e.renderSlot(N.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3})])])}}}),Ht={key:6,class:"layout-coming-soon"},Ft=e.defineComponent({name:"C_LayoutContainer",__name:"index",setup(v){const l=K(),h=D(),o=e.computed(()=>l.layoutMode),m=h.isDark,i=e.ref(!1);return e.provide("menuCollapse",{isCollapsed:i,handleCollapsedChange:n=>{i.value=n}}),(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout-container",e.unref(m)?"dark-mode":"light-mode"])},[o.value==="side"?(e.openBlock(),e.createBlock(G,{key:0,collapsed:i.value,"onUpdate:collapsed":s[0]||(s[0]=r=>i.value=r)},e.createSlots({menu:e.withCtx(()=>[e.renderSlot(n.$slots,"menu",{collapsed:i.value})]),header:e.withCtx(()=>[e.renderSlot(n.$slots,"header")]),footer:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0]),1032,["collapsed"])):o.value==="top"?(e.openBlock(),e.createBlock(X,{key:1},e.createSlots({_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0,n.$slots["top-menu"]?{name:"menu",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"top-menu")]),key:"1"}:void 0,n.$slots["header-extra"]?{name:"header-extra",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"header-extra")]),key:"2"}:void 0,n.$slots["tags-view"]?{name:"tags-view",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"tags-view")]),key:"3"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"4"}:void 0]),1024)):o.value==="mix"?(e.openBlock(),e.createBlock(q,{key:2},e.createSlots({header:e.withCtx(()=>[e.renderSlot(n.$slots,"header")]),_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"1"}:void 0]),1024)):o.value==="mix-top"?(e.openBlock(),e.createBlock(J,{key:3},e.createSlots({_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0,n.$slots.brand?{name:"brand",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"brand")]),key:"1"}:void 0,n.$slots["top-menu"]?{name:"top-menu",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"top-menu")]),key:"2"}:void 0,n.$slots["header-extra"]?{name:"header-extra",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"header-extra")]),key:"3"}:void 0,n.$slots["tags-view"]?{name:"tags-view",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"tags-view")]),key:"4"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"5"}:void 0]),1024)):o.value==="reverse-horizontal-mix"?(e.openBlock(),e.createBlock(Z,{key:4},e.createSlots({_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0,n.$slots["top-menu"]?{name:"top-menu",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"top-menu")]),key:"1"}:void 0,n.$slots["header-extra"]?{name:"header-extra",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"header-extra")]),key:"2"}:void 0,n.$slots["tags-view"]?{name:"tags-view",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"tags-view")]),key:"3"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"4"}:void 0]),1024)):o.value==="card-layout"?(e.openBlock(),e.createBlock(Q,{key:5},e.createSlots({_:2},[n.$slots["menu-trigger"]?{name:"menu-trigger",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"menu-trigger")]),key:"0"}:void 0,n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"1"}:void 0,n.$slots["header-extra"]?{name:"header-extra",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"header-extra")]),key:"2"}:void 0,n.$slots["tags-view"]?{name:"tags-view",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"tags-view")]),key:"3"}:void 0,n.$slots["drawer-menu"]?{name:"drawer-menu",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"drawer-menu")]),key:"4"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"5"}:void 0]),1024)):(e.openBlock(),e.createElementBlock("div",Ht,[...s[1]||(s[1]=[e.createElementVNode("div",{class:"coming-soon-content"},[e.createElementVNode("div",{class:"coming-soon-icon"},"🚧"),e.createElementVNode("div",{class:"coming-soon-title"},"布局开发中")],-1)])]))],2))}}),Ot=[{label:"左侧菜单(默认)",value:"side",disabled:!1,svg:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),re=require("pinia"),p=require("naive-ui"),A=require("vue-router"),te=[{name:"拂晓蓝",value:"#409eff"},{name:"薄暮红",value:"#f5222d"},{name:"火山橙",value:"#fa541c"},{name:"日暮黄",value:"#faad14"},{name:"极光绿",value:"#52c41a"},{name:"明青",value:"#13c2c2"},{name:"极客蓝",value:"#2f54eb"},{name:"酱紫",value:"#722ed1"}],oe=[{name:"科技蓝",icon:"💙",primaryColor:"#409eff"},{name:"清新绿",icon:"💚",primaryColor:"#52c41a"},{name:"商务灰",icon:"🖤",primaryColor:"#595959"},{name:"活力橙",icon:"🧡",primaryColor:"#fa8c16"},{name:"优雅紫",icon:"💜",primaryColor:"#722ed1"},{name:"经典红",icon:"❤️",primaryColor:"#f5222d"}],ie=[{mode:"side",label:"左侧菜单",description:"经典的左侧导航布局",icon:"i-mdi:page-layout-sidebar-left"},{mode:"top",label:"顶部菜单",description:"顶部水平导航布局",icon:"i-mdi:page-layout-header"},{mode:"mix",label:"混合菜单",description:"顶部 + 侧边混合布局",icon:"i-mdi:page-layout-header-sidebar-left"},{mode:"mix-top",label:"顶部混合",description:"侧边优先的混合布局",icon:"i-mdi:page-layout-sidebar-left-header"},{mode:"reverse-horizontal-mix",label:"反转混合",description:"反转的水平混合布局",icon:"i-mdi:page-layout-header-footer"},{mode:"card-layout",label:"卡片布局",description:"卡片式布局风格",icon:"i-mdi:card-outline"}],ne={small:"4px",medium:"6px",large:"8px"},le={fade:"fade-transform",slide:"fade-slide",zoom:"fade-zoom",none:""},x={themeMode:"light",primaryColor:"#409eff",borderRadius:"medium",transitionType:"slide",enableTransition:!0,layoutMode:"side",collapsed:!1,fixedHeader:!0,showBreadcrumb:!0,showBreadcrumbIcon:!0,showTagsView:!0,tagsViewHeight:44,tagsViewStyle:"default",showFooter:!0,sidebarWidth:220,sidebarCollapsedWidth:64,headerHeight:56,enableHotkeys:!0,version:"2.0.2"},ae=te.map(m=>m.value);function j(m,l){const v=parseInt(m.replace("#",""),16),o=Math.min(255,Math.max(0,(v>>16)+l)),d=Math.min(255,Math.max(0,(v>>8&255)+l)),i=Math.min(255,Math.max(0,(v&255)+l));return`#${(o<<16|d<<8|i).toString(16).padStart(6,"0")}`}function K(m={}){const{defaults:l={},onThemeModeChange:v}=m,o={...x,...l};return re.defineStore("settings",()=>{const d=e.ref(o.themeMode),i=e.ref(o.primaryColor),n=e.ref(o.borderRadius),s=e.ref(o.transitionType),r=e.ref(o.enableTransition),k=e.ref(o.layoutMode),u=e.ref(o.collapsed),c=e.ref(o.fixedHeader),h=e.ref(o.showBreadcrumb),C=e.ref(o.showBreadcrumbIcon),y=e.ref(o.showTagsView),w=e.ref(o.tagsViewHeight),V=e.ref(o.tagsViewStyle),f=e.ref(o.showFooter),g=e.ref(o.sidebarWidth),_=e.ref(o.sidebarCollapsedWidth),S=e.ref(o.headerHeight),b=e.ref(o.enableHotkeys),B=e.ref(o.version),D=e.computed(()=>ne[n.value]),N=e.computed(()=>le[s.value]),t=e.computed(()=>r.value&&s.value!=="none"),a=e.computed(()=>({themeMode:d.value,primaryColor:i.value,borderRadius:n.value,transitionType:s.value,enableTransition:r.value,layoutMode:k.value,collapsed:u.value,fixedHeader:c.value,showBreadcrumb:h.value,showBreadcrumbIcon:C.value,showTagsView:y.value,tagsViewHeight:w.value,tagsViewStyle:V.value,showFooter:f.value,sidebarWidth:g.value,sidebarCollapsedWidth:_.value,headerHeight:S.value,enableHotkeys:b.value,version:B.value})),$=()=>{if(typeof document>"u")return;const E=document.documentElement;E.style.setProperty("--primary-color",i.value),E.style.setProperty("--primary-color-hover",j(i.value,10)),E.style.setProperty("--primary-color-pressed",j(i.value,-10)),E.style.setProperty("--border-radius",D.value),E.style.setProperty("--sidebar-width",`${g.value}px`),E.style.setProperty("--sidebar-collapsed-width",`${_.value}px`),E.style.setProperty("--header-height",`${S.value}px`),E.style.setProperty("--tags-view-height",`${w.value}px`)},T=async E=>{i.value=E.primaryColor,E.settings&&(E.settings.borderRadius&&(n.value=E.settings.borderRadius),E.settings.transitionType&&(s.value=E.settings.transitionType),E.settings.showBreadcrumb!==void 0&&(h.value=E.settings.showBreadcrumb),E.settings.showTagsView!==void 0&&(y.value=E.settings.showTagsView),E.settings.tagsViewStyle&&(V.value=E.settings.tagsViewStyle))},O=()=>{d.value=o.themeMode,i.value=o.primaryColor,n.value=o.borderRadius,s.value=o.transitionType,r.value=o.enableTransition,k.value=o.layoutMode,u.value=o.collapsed,c.value=o.fixedHeader,h.value=o.showBreadcrumb,C.value=o.showBreadcrumbIcon,y.value=o.showTagsView,w.value=o.tagsViewHeight,V.value=o.tagsViewStyle,f.value=o.showFooter,g.value=o.sidebarWidth,_.value=o.sidebarCollapsedWidth,S.value=o.headerHeight,b.value=o.enableHotkeys},F=async E=>{d.value=E,v&&await v(E)},I=()=>{u.value=!u.value};return e.watch([i,D,g,_,S,w],()=>{$()},{immediate:!0}),{themeMode:d,primaryColor:i,borderRadius:n,transitionType:s,enableTransition:r,layoutMode:k,collapsed:u,fixedHeader:c,showBreadcrumb:h,showBreadcrumbIcon:C,showTagsView:y,tagsViewHeight:w,tagsViewStyle:V,showFooter:f,sidebarWidth:g,sidebarCollapsedWidth:_,headerHeight:S,enableHotkeys:b,version:B,borderRadiusValue:D,transitionName:N,shouldEnableTransition:t,settingsState:a,syncCSSVariables:$,applyPreset:T,resetSettings:O,updateThemeMode:F,toggleCollapse:I}})}const Y=K(),se=Symbol("layout-context"),G=Symbol("drawer-handlers");function M(){const m=e.inject(se);if(!m)throw new Error("[Layout] LayoutContext not provided. 请在上层组件中使用 provide(LAYOUT_CONTEXT_KEY, ...) 注入布局数据。");return m}const R={name:"Admin",subtitle:"",logoSrc:"",logoType:"image",logoSize:36,homePath:"/home",copyright:""};function H(m={}){const{maxCacheCount:l=20,enableDevLog:v=!0,exposeToWindow:o=!0}=m,d=A.useRoute(),i=e.ref([]),n=e.ref(l),s=c=>!c||typeof c!="string"?!1:d.meta?.keepAlive===!0,r=c=>{!i.value.includes(c)&&s(c)&&(i.value.push(c),i.value.length>n.value&&i.value.shift())},k=c=>{const h=i.value.indexOf(c);h>-1&&i.value.splice(h,1)},u=()=>{i.value=[]};return e.watch(()=>d.name,c=>{c&&typeof c=="string"&&r(c)},{immediate:!0}),{cachedViews:i,maxCacheCount:n,addCache:r,removeCache:k,clearAllCache:u}}const X=e.defineComponent({name:"SideLayout",__name:"index",props:{collapsed:{type:Boolean,default:!1}},emits:["update:collapsed"],setup(m,{expose:l,emit:v}){const o=m,d=v,i=M(),{cachedViews:n,maxCacheCount:s}=H(),r=e.ref(o.collapsed);e.watch(()=>o.collapsed,h=>{r.value=h});const k=e.computed(()=>r.value),u=h=>{r.value=h,d("update:collapsed",h)};return l({collapsed:k,toggleCollapse:()=>{const h=!r.value;r.value=h,d("update:collapsed",h)}}),(h,C)=>{const y=e.resolveComponent("RouterView");return e.openBlock(),e.createBlock(e.unref(p.NLayout),{"has-sider":""},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutSider),{bordered:"","collapse-mode":"width","collapsed-width":e.unref(i).sidebarCollapsedWidth.value,width:e.unref(i).sidebarWidth.value,"native-scrollbar":!1,collapsed:k.value,"onUpdate:collapsed":u,class:e.normalizeClass(["layout-sider","no-horizontal-scroll",e.unref(i).isDark.value?"dark-theme":"light-theme"])},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"logo"),e.renderSlot(h.$slots,"menu",{collapsed:k.value})]),_:3},8,["collapsed-width","width","collapsed","class"]),e.createVNode(e.unref(p.NLayout),null,{default:e.withCtx(()=>[e.renderSlot(h.$slots,"header"),e.createVNode(e.unref(p.NLayoutContent),{class:"content-with-header p16px app-content"},{default:e.withCtx(()=>[e.createVNode(y,null,{default:e.withCtx(({Component:w,route:V})=>[e.createVNode(e.Transition,{name:e.unref(i).transitionName.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(n),max:e.unref(s)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:V.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})]),_:1}),e.renderSlot(h.$slots,"footer")]),_:3})]),_:3})}}}),ce={ref:"visibleRef",class:"responsive-menu__visible"},de={class:"responsive-menu__more"},ue=e.defineComponent({name:"ResponsiveMenu",__name:"index",props:{data:{}},setup(m){const l=m,v=A.useRoute(),o=A.useRouter(),d=M(),i=e.computed(()=>l.data||[]),n=e.computed(()=>v.path),s=d.isDark,r={itemTextColor:"rgba(51, 65, 85, 0.85)",itemTextColorHover:"rgba(30, 64, 175, 0.95)",itemTextColorActive:"rgba(30, 64, 175, 1)",itemTextColorActiveHover:"rgba(30, 64, 175, 1)",itemTextColorChildActive:"rgba(30, 64, 175, 1)",itemIconColor:"rgba(51, 65, 85, 0.7)",itemIconColorHover:"rgba(30, 64, 175, 0.85)",itemIconColorActive:"rgba(30, 64, 175, 1)",itemIconColorActiveHover:"rgba(30, 64, 175, 1)",itemIconColorChildActive:"rgba(30, 64, 175, 1)",itemColorHover:"rgba(30, 64, 175, 0.06)",itemColorActive:"rgba(30, 64, 175, 0.1)",itemColorActiveHover:"rgba(30, 64, 175, 0.12)",itemColorActiveCollapsed:"rgba(30, 64, 175, 0.1)",arrowColor:"rgba(51, 65, 85, 0.6)",arrowColorHover:"rgba(30, 64, 175, 0.8)",arrowColorActive:"rgba(30, 64, 175, 1)",arrowColorChildActive:"rgba(30, 64, 175, 1)",itemHeight:"42px",itemPadding:"0 18px",itemBorderRadius:"10px",groupTextColor:"rgba(51, 65, 85, 0.65)"},k={itemTextColor:"rgba(226, 232, 240, 0.85)",itemTextColorHover:"rgba(255, 255, 255, 0.95)",itemTextColorActive:"rgba(147, 197, 253, 1)",itemTextColorActiveHover:"rgba(147, 197, 253, 1)",itemTextColorChildActive:"rgba(147, 197, 253, 1)",itemIconColor:"rgba(226, 232, 240, 0.7)",itemIconColorHover:"rgba(255, 255, 255, 0.85)",itemIconColorActive:"rgba(147, 197, 253, 1)",itemIconColorActiveHover:"rgba(147, 197, 253, 1)",itemIconColorChildActive:"rgba(147, 197, 253, 1)",itemColorHover:"rgba(59, 130, 246, 0.1)",itemColorActive:"rgba(59, 130, 246, 0.15)",itemColorActiveHover:"rgba(59, 130, 246, 0.18)",itemColorActiveCollapsed:"rgba(59, 130, 246, 0.15)",arrowColor:"rgba(226, 232, 240, 0.5)",arrowColorHover:"rgba(255, 255, 255, 0.7)",arrowColorActive:"rgba(147, 197, 253, 1)",arrowColorChildActive:"rgba(147, 197, 253, 1)",itemHeight:"42px",itemPadding:"0 18px",itemBorderRadius:"10px",groupTextColor:"rgba(226, 232, 240, 0.6)"},u=e.computed(()=>s.value?k:r),c=(t,a=18)=>d.iconComponent?()=>e.h(d.iconComponent,{name:t,size:a}):()=>e.h("i",{class:t,style:{fontSize:`${a}px`,display:"inline-flex",alignItems:"center"}}),h=t=>({key:t.path||"",label:t.meta?.title||t.name||"",icon:t.meta?.icon?c(t.meta.icon,18):void 0,children:t.children?.length?t.children.map(h):void 0}),C=e.ref(),y=e.ref([]),w=e.ref([]),V=e.computed(()=>y.value.map(h)),f=e.computed(()=>w.value.map(t=>({key:t.path||"",label:t.meta?.title||t.name||"",icon:t.meta?.icon?c(t.meta.icon,16):void 0,children:t.children?.length?t.children.map(a=>({key:a.path||"",label:a.meta?.title||a.name||"",icon:a.meta?.icon?c(a.meta.icon,16):void 0})):void 0}))),g=t=>{t&&o.push(t)},_=t=>{const F=t.meta?.title||t.name||"";let I=0;for(const U of F){const z=U.charCodeAt(0);z>=19968&&z<=40959||z>=13312&&z<=19903||z>=12288&&z<=12351||z>=65280&&z<=65519||z>=12352&&z<=12447||z>=12448&&z<=12543?I+=15:I+=8}const E=t.meta?.icon?26:0;return I+E+36+8+8},S=t=>{if(!i.value.length)return 0;const a=80,$=15;let T=0;for(const E of i.value)T+=_(E);if(T+$<=t)return i.value.length;let O=0,F=0;const I=t-a-$;for(const E of i.value){const U=_(E);if(O+U<=I)O+=U,F++;else break}return Math.max(F,1)},b=()=>{if(!C.value||!i.value.length)return;const t=C.value.offsetWidth;if(t===0){e.nextTick(()=>b());return}const a=S(t);y.value=i.value.slice(0,a),w.value=i.value.slice(a)};let B=null;const D=()=>{B&&clearTimeout(B),B=window.setTimeout(()=>b(),100)};let N=null;return e.onMounted(()=>{e.nextTick(()=>b()),C.value&&(N=new ResizeObserver(()=>D()),N.observe(C.value))}),e.onUnmounted(()=>{N?.disconnect(),B&&clearTimeout(B)}),e.watch(()=>l.data,()=>e.nextTick(()=>b()),{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:C,class:"responsive-menu"},[e.createElementVNode("div",ce,[V.value.length>0?(e.openBlock(),e.createBlock(e.unref(p.NMenu),{key:0,mode:"horizontal",value:n.value,options:V.value,"theme-overrides":u.value,"onUpdate:value":g},null,8,["value","options","theme-overrides"])):e.createCommentVNode("",!0)],512),w.value.length>0?(e.openBlock(),e.createBlock(e.unref(p.NDropdown),{key:0,options:f.value,placement:"bottom-end",trigger:"hover",onSelect:g},{default:e.withCtx(()=>[e.createElementVNode("div",de,[e.createVNode(e.unref(p.NButton),{text:"",class:"responsive-menu__more-btn"},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createElementVNode("span",{class:"dots-icon"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")],-1)])]),_:1})])]),_:1},8,["options"])):e.createCommentVNode("",!0)],512))}}),L=(m,l)=>{const v=m.__vccOpts||m;for(const[o,d]of l)v[o]=d;return v},W=L(ue,[["__scopeId","data-v-d329131b"]]),me={class:"top-layout-container"},pe={class:"navbar-left"},ve={class:"logo-container"},he=["src","width","height"],fe=["src","width","height"],ge={class:"brand-name"},ke={class:"brand-title"},ye={class:"brand-subtitle"},Ce={class:"navbar-center"},Ne={class:"page-content"},q=e.defineComponent({name:"TopLayout",__name:"index",setup(m){const l=M(),{cachedViews:v,maxCacheCount:o}=H(),d=l.isDark,i=e.computed(()=>l.menus.value),n=e.computed(()=>l.showTagsView.value),s=e.computed(()=>l.tagsViewHeight.value),r=e.computed(()=>l.showFooter.value),k=e.computed(()=>l.transitionName.value),u={...R,...l.brand};return(c,h)=>{const C=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",{class:e.normalizeClass(["top-navbar",[e.unref(d)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",pe,[e.renderSlot(c.$slots,"logo",{},()=>[e.createElementVNode("div",ve,[h[0]||(h[0]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),u.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:u.logoSrc,width:u.logoSize||36,height:u.logoSize||36,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,he)):(e.openBlock(),e.createElementBlock("img",{key:1,src:u.logoSrc,width:u.logoSize||36,height:u.logoSize||36,class:"logo-video"},null,8,fe))]),e.createElementVNode("div",ge,[e.createElementVNode("span",ke,e.toDisplayString(u.name),1),e.createElementVNode("span",ye,e.toDisplayString(u.subtitle),1)]),h[1]||(h[1]=e.createElementVNode("div",{class:"navbar-divider"},null,-1))])]),e.createElementVNode("div",Ce,[e.renderSlot(c.$slots,"menu",{},()=>[e.createVNode(W,{data:i.value},null,8,["data"])])]),e.renderSlot(c.$slots,"header-extra")],2),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tags-view-container",style:e.normalizeStyle({height:`${s.value}px`})},[e.renderSlot(c.$slots,"tags-view")],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(p.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"main-content"},{default:e.withCtx(()=>[e.createElementVNode("div",Ne,[e.createVNode(C,null,{default:e.withCtx(({Component:y,route:w})=>[e.createVNode(e.Transition,{name:k.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(v),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y),{key:w.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})])]),_:1}),r.value?e.renderSlot(c.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3})])}}});function P(m){const{menus:l,floatingSecondMenu:v=!1}=m,o=A.useRoute(),d=A.useRouter(),i=e.ref(""),n=e.ref(null),s=e.ref(!1),r=e.computed(()=>n.value||h.value||null),k=f=>f.startsWith("/")?f:`/${f}`,u=f=>{if(!f)return!1;const g=o.path;if(g===f)return!0;const _=k(f),S=k(g);return S===_?!0:S.includes(`/${f}`)},c=f=>{for(const g of f)if(u(g.path)||g.children?.length&&c(g.children))return g;return null},h=e.computed(()=>l.value.find(f=>f.path===i.value)),C=e.computed(()=>h.value?.children||[]),y=f=>{e.toValue(v)?f.children&&f.children.length>0?s.value&&i.value===f.path?s.value=!1:(i.value=f.path||"",s.value=!0):(i.value=f.path||"",s.value=!1,f.path&&d.push(f.path)):(!f.children||f.children.length===0)&&f.path&&d.push(f.path)},w=f=>{f.path&&d.push(f.path)},V=()=>{const f=l.value,g=c(f);g?(i.value=g.path||"",e.toValue(v)&&g.children?.length&&(s.value=!0)):f.length>0&&!i.value&&(i.value=f[0].path||"")};return e.watch(()=>o.path,()=>V(),{immediate:!0}),e.watch(l,f=>{f&&f.length>0&&V()},{immediate:!0}),e.onMounted(()=>V()),{activeFirstMenu:i,activeFirstMenuItem:h,currentSecondMenus:C,hoveredMenuItem:n,displayMenuItem:r,showSecondMenu:s,handleFirstMenuClick:y,handleSecondMenuClick:w,isMenuItemActive:u}}const Ve={class:"mix-layout-container"},we={class:"logo-container"},_e=["src","width","height"],Ee=["src","width","height"],Be={class:"first-menu-list"},be=["onClick"],xe={class:"menu-item-content"},Se={key:1,class:"menu-item-text"},$e={class:"menu-item-label"},Te={class:"second-menu-header"},De={class:"menu-title"},Me={class:"second-menu-list"},ze=["onClick"],Le={class:"menu-item-label"},Re={class:"main-layout"},J=e.defineComponent({name:"MixLayout",__name:"index",setup(m){const l=M(),{cachedViews:v,maxCacheCount:o}=H(),d=l.isDark,i=e.computed(()=>l.menus.value),n=e.computed(()=>l.showFooter.value),s=e.computed(()=>l.transitionName.value),r={...R,...l.brand},k=P({menus:l.menus,floatingSecondMenu:e.computed(()=>!0)}),u=l.iconComponent??e.defineComponent({name:"LayoutIcon",props:{name:String,size:{type:Number,default:18}},setup(c){return()=>e.h("i",{class:c.name,style:{fontSize:`${c.size}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}})}});return(c,h)=>{const C=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",{class:e.normalizeClass(["first-level-menu",[e.unref(d)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",we,[e.renderSlot(c.$slots,"logo",{},()=>[h[0]||(h[0]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),r.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:r.logoSrc,width:r.logoSize||40,height:r.logoSize||40,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,_e)):(e.openBlock(),e.createElementBlock("img",{key:1,src:r.logoSrc,width:r.logoSize||40,height:r.logoSize||40,class:"logo-video"},null,8,Ee))])]),e.createElementVNode("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.path,class:e.normalizeClass(["first-menu-item",{active:e.unref(k).activeFirstMenu.value===y.path}]),onClick:w=>e.unref(k).handleFirstMenuClick(y)},[e.createElementVNode("div",xe,[y.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{key:0,name:y.meta.icon,size:22},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",Se,e.toDisplayString((y.meta?.title||"")[0]),1))]),e.createElementVNode("span",$e,e.toDisplayString(y.meta?.title),1)],10,be))),128))])],2),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.unref(k).showSecondMenu.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["second-level-menu-popup",[e.unref(d)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Te,[e.unref(k).displayMenuItem.value?.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{key:0,name:e.unref(k).displayMenuItem.value.meta.icon,size:20},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",De,e.toDisplayString(e.unref(k).displayMenuItem.value?.meta?.title),1)]),e.createElementVNode("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k).displayMenuItem.value?.children||[],y=>(e.openBlock(),e.createElementBlock("div",{key:y.path,class:e.normalizeClass(["second-menu-item",{active:e.unref(k).isMenuItemActive(y.path)}]),onClick:w=>e.unref(k).handleSecondMenuClick(y)},[y.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{key:0,name:y.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Le,e.toDisplayString(y.meta?.title),1)],10,ze))),128))])],2)):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Re,[e.renderSlot(c.$slots,"header"),e.createVNode(e.unref(p.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"content-with-header p16px app-content"},{default:e.withCtx(()=>[e.createVNode(C,null,{default:e.withCtx(({Component:y,route:w})=>[e.createVNode(e.Transition,{name:s.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(v),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y),{key:w.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})]),_:1}),n.value?e.renderSlot(c.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3})])])}}}),Ie={class:"mix-top-layout-container"},Ae={class:"logo-container"},He=["src","width","height"],Fe=["src","width","height"],Oe={class:"first-menu-list"},Ue=["onClick"],We={class:"menu-item-content"},Pe={key:1,class:"menu-item-text"},je={class:"menu-item-label"},Ke={class:"main-area"},Ye={class:"navbar-left"},Ge={class:"brand-name"},Xe={class:"brand-title"},qe={class:"brand-subtitle"},Je={class:"navbar-center"},Ze={class:"page-content"},Z=e.defineComponent({name:"MixTopLayout",__name:"index",setup(m){const l=M(),{cachedViews:v,maxCacheCount:o}=H(),d=l.isDark,i=e.computed(()=>l.menus.value),n=e.computed(()=>l.showTagsView.value),s=e.computed(()=>l.tagsViewHeight.value),r=e.computed(()=>l.showFooter.value),k=e.computed(()=>l.transitionName.value),u={...R,...l.brand},c=P({menus:l.menus,floatingSecondMenu:e.computed(()=>!1)}),h=l.iconComponent??e.defineComponent({name:"LayoutIcon",props:{name:String,size:{type:Number,default:18}},setup(C){return()=>e.h("i",{class:C.name,style:{fontSize:`${C.size}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}})}});return(C,y)=>{const w=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",{class:e.normalizeClass(["first-level-sidebar",[e.unref(d)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Ae,[e.renderSlot(C.$slots,"logo",{},()=>[y[0]||(y[0]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),u.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:u.logoSrc,width:u.logoSize||40,height:u.logoSize||40,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,He)):(e.openBlock(),e.createElementBlock("img",{key:1,src:u.logoSrc,width:u.logoSize||40,height:u.logoSize||40,class:"logo-video"},null,8,Fe))])]),e.createElementVNode("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,V=>(e.openBlock(),e.createElementBlock("div",{key:V.path,class:e.normalizeClass(["first-menu-item",{active:e.unref(c).activeFirstMenu.value===V.path}]),onClick:f=>e.unref(c).handleFirstMenuClick(V)},[e.createElementVNode("div",We,[V.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(h)),{key:0,name:V.meta.icon,size:22},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",Pe,e.toDisplayString((V.meta?.title||"")[0]),1))]),e.createElementVNode("span",je,e.toDisplayString(V.meta?.title),1)],10,Ue))),128))])],2),e.createElementVNode("div",Ke,[e.createElementVNode("div",{class:e.normalizeClass(["top-navbar",[e.unref(d)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Ye,[e.renderSlot(C.$slots,"brand",{},()=>[e.createElementVNode("div",Ge,[e.createElementVNode("span",Xe,e.toDisplayString(u.name),1),e.createElementVNode("span",qe,e.toDisplayString(u.subtitle),1)]),y[1]||(y[1]=e.createElementVNode("div",{class:"navbar-divider"},null,-1))])]),e.createElementVNode("div",Je,[e.renderSlot(C.$slots,"top-menu",{},()=>[e.unref(c).currentSecondMenus.value.length>0?(e.openBlock(),e.createBlock(W,{key:0,data:e.unref(c).currentSecondMenus.value},null,8,["data"])):e.createCommentVNode("",!0)])]),e.renderSlot(C.$slots,"header-extra")],2),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tags-view-container",style:e.normalizeStyle({height:`${s.value}px`})},[e.renderSlot(C.$slots,"tags-view")],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(p.NLayout),{class:"content-layout"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"main-content"},{default:e.withCtx(()=>[e.createElementVNode("div",Ze,[e.createVNode(w,null,{default:e.withCtx(({Component:V,route:f})=>[e.createVNode(e.Transition,{name:k.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(v),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V),{key:f.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})])]),_:1}),r.value?e.renderSlot(C.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3})])])}}}),Qe={class:"reverse-horizontal-mix-layout-container"},et={class:"navbar-left"},tt={class:"logo-container"},ot=["src","width","height"],nt=["src","width","height"],lt={class:"brand-name"},at={class:"brand-title"},st={class:"brand-subtitle"},rt={class:"navbar-center"},it={class:"main-area"},ct={class:"page-content"},dt={class:"header-icon"},ut={class:"header-title"},mt={class:"sidebar-menu-list"},pt={key:0,class:"menu-group"},vt={class:"group-title"},ht=["onClick"],ft={class:"item-title"},gt=["onClick"],kt={class:"item-title"},Q=e.defineComponent({name:"ReverseHorizontalMixLayout",__name:"index",setup(m){const l=M(),{cachedViews:v,maxCacheCount:o}=H(),d=l.isDark,i=e.computed(()=>l.menus.value),n=e.computed(()=>l.showTagsView.value),s=e.computed(()=>l.tagsViewHeight.value),r=e.computed(()=>l.showFooter.value),k=e.computed(()=>l.transitionName.value),u={...R,...l.brand},c=P({menus:l.menus,floatingSecondMenu:e.computed(()=>!1)}),h=e.ref(!1),C=()=>{h.value=!h.value},y=l.iconComponent??e.defineComponent({name:"LayoutIcon",props:{name:String,size:{type:Number,default:18}},setup(w){return()=>e.h("i",{class:w.name,style:{fontSize:`${w.size}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}})}});return(w,V)=>{const f=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Qe,[e.createElementVNode("div",{class:e.normalizeClass(["top-navbar",[e.unref(d)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",et,[e.renderSlot(w.$slots,"logo",{},()=>[e.createElementVNode("div",tt,[V[0]||(V[0]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),u.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:u.logoSrc,width:u.logoSize||36,height:u.logoSize||36,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,ot)):(e.openBlock(),e.createElementBlock("img",{key:1,src:u.logoSrc,width:u.logoSize||36,height:u.logoSize||36,class:"logo-video"},null,8,nt))]),e.createElementVNode("div",lt,[e.createElementVNode("span",at,e.toDisplayString(u.name),1),e.createElementVNode("span",st,e.toDisplayString(u.subtitle),1)]),V[1]||(V[1]=e.createElementVNode("div",{class:"navbar-divider"},null,-1))])]),e.createElementVNode("div",rt,[e.renderSlot(w.$slots,"top-menu",{},()=>[e.createVNode(W,{data:i.value},null,8,["data"])])]),e.renderSlot(w.$slots,"header-extra")],2),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tags-view-container",style:e.normalizeStyle({height:`${s.value}px`})},[e.renderSlot(w.$slots,"tags-view")],4)):e.createCommentVNode("",!0),e.createElementVNode("div",it,[e.createVNode(e.unref(p.NLayout),{class:"content-layout"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"main-content"},{default:e.withCtx(()=>[e.createElementVNode("div",ct,[e.createVNode(f,null,{default:e.withCtx(({Component:g,route:_})=>[e.createVNode(e.Transition,{name:k.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(v),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g),{key:_.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})])]),_:1}),r.value?e.renderSlot(w.$slots,"footer",{key:0}):e.createCommentVNode("",!0)]),_:3}),e.unref(c).currentSecondMenus.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["sidebar-toggle",[e.unref(d)?"dark-theme":"light-theme",{active:!h.value}]]),onClick:C},[e.createElementVNode("span",{class:e.normalizeClass(["collapse-arrow","toggle-icon",h.value?"collapsed":"expanded"])},[...V[2]||(V[2]=[e.createElementVNode("span",{class:"arrow-line"},null,-1),e.createElementVNode("span",{class:"arrow-line"},null,-1)])],2)],2)):e.createCommentVNode("",!0),e.unref(c).currentSecondMenus.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["right-sidebar-wrapper",{collapsed:h.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["right-sidebar",[e.unref(d)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",{class:e.normalizeClass(["sidebar-header",[e.unref(d)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",dt,[e.unref(c).activeFirstMenuItem.value?.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),{key:0,name:e.unref(c).activeFirstMenuItem.value.meta.icon,size:20},null,8,["name"])):e.createCommentVNode("",!0)]),e.createElementVNode("span",ut,e.toDisplayString(e.unref(c).activeFirstMenuItem.value?.meta?.title||"菜单"),1)],2),e.createElementVNode("div",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).currentSecondMenus.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g.path},[g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",pt,[e.createElementVNode("div",vt,[g.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),{key:0,name:g.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(g.meta?.title),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.children,_=>(e.openBlock(),e.createElementBlock("div",{key:_.path,class:e.normalizeClass(["menu-item sub-item",{active:e.unref(c).isMenuItemActive(_.path)}]),onClick:S=>e.unref(c).handleSecondMenuClick(_)},[_.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),{key:0,name:_.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",ft,e.toDisplayString(_.meta?.title),1)],10,ht))),128))])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["menu-item",{active:e.unref(c).isMenuItemActive(g.path)}]),onClick:_=>e.unref(c).handleSecondMenuClick(g)},[g.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),{key:0,name:g.meta.icon,size:18},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",kt,e.toDisplayString(g.meta?.title),1)],10,gt))],64))),128))])],2)],2)):e.createCommentVNode("",!0)])])}}}),yt={class:"card-layout-container"},Ct={class:"navbar-left"},Nt={class:"logo-container"},Vt=["src","width","height"],wt=["src","width","height"],_t={class:"brand-name"},Et={class:"brand-title"},Bt={class:"brand-subtitle"},bt={class:"drawer-content"},xt={class:"menu-grid"},St=["onClick"],$t={key:0,class:"category-items"},Tt=["onClick"],Dt={class:"item-title"},Mt={key:0,class:"submenu-items"},zt={class:"submenu-title"},Lt=["onClick"],Rt={class:"item-title"},It={class:"main-content-area"},At={class:"page-content"},Ht=e.defineComponent({name:"CardLayout",__name:"index",setup(m){const l=M(),{cachedViews:v,maxCacheCount:o}=H(),d=A.useRouter(),i=l.isDark,n=e.computed(()=>l.menus.value),s=e.computed(()=>l.showTagsView.value),r=e.computed(()=>l.tagsViewHeight.value),k=e.computed(()=>l.showFooter.value),u=e.computed(()=>l.transitionName.value),c={...R,...l.brand},h=e.ref(!1),C=e.ref(null),y=()=>{C.value&&clearTimeout(C.value),C.value=setTimeout(()=>{h.value=!1},300)},w=()=>{C.value&&(clearTimeout(C.value),C.value=null),h.value=!0},V=g=>{g.path&&(d.push(g.path),h.value=!1)},f=l.iconComponent??e.defineComponent({name:"LayoutIcon",props:{name:String,size:{type:Number,default:18}},setup(g){return()=>e.h("i",{class:g.name,style:{fontSize:`${g.size}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}})}});return e.onUnmounted(()=>{C.value&&clearTimeout(C.value)}),(g,_)=>{const S=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",yt,[e.createElementVNode("div",{class:e.normalizeClass(["top-navbar",[e.unref(i)?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Ct,[e.createElementVNode("div",{class:"hover-trigger-area",onMouseenter:w,onMouseleave:y},[e.renderSlot(g.$slots,"menu-trigger",{},()=>[_[0]||(_[0]=e.createElementVNode("div",{class:"menu-indicator"},[e.createElementVNode("span",{class:"hamburger-icon"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")])],-1))],!0)],32),e.renderSlot(g.$slots,"logo",{},()=>[e.createElementVNode("div",Nt,[_[1]||(_[1]=e.createElementVNode("div",{class:"logo-glow"},null,-1)),c.logoType==="video"?(e.openBlock(),e.createElementBlock("video",{key:0,src:c.logoSrc,width:c.logoSize||36,height:c.logoSize||36,autoplay:"",loop:"",muted:"",playsinline:"",class:"logo-video"}," 您的浏览器不支持 video 标签。 ",8,Vt)):(e.openBlock(),e.createElementBlock("img",{key:1,src:c.logoSrc,width:c.logoSize||36,height:c.logoSize||36,class:"logo-video"},null,8,wt))]),e.createElementVNode("div",_t,[e.createElementVNode("span",Et,e.toDisplayString(c.name),1),e.createElementVNode("span",Bt,e.toDisplayString(c.subtitle),1)]),_[2]||(_[2]=e.createElementVNode("div",{class:"navbar-divider"},null,-1))],!0)]),e.renderSlot(g.$slots,"header-extra",{},void 0,!0)],2),s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tags-view-container",style:e.normalizeStyle({height:`${r.value}px`})},[e.renderSlot(g.$slots,"tags-view",{},void 0,!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["drawer-menu",[e.unref(i)?"dark-theme":"light-theme",{visible:h.value}]]),onMouseenter:w,onMouseleave:y},[e.renderSlot(g.$slots,"drawer-menu",{},()=>[_[3]||(_[3]=e.createElementVNode("div",{class:"drawer-header"},[e.createElementVNode("div",{class:"drawer-title"},[e.createElementVNode("span",{class:"grid-icon"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")]),e.createElementVNode("span",null,"功能导航")])],-1)),e.createElementVNode("div",bt,[e.createElementVNode("div",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,b=>(e.openBlock(),e.createElementBlock("div",{key:b.path,class:"menu-category"},[e.createElementVNode("div",{class:"category-header",onClick:B=>V(b)},[b.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),{key:0,name:b.meta.icon,size:18},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(b.meta?.title),1)],8,St),b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.children,B=>(e.openBlock(),e.createElementBlock("div",{key:B.path,class:"menu-item",onClick:D=>V(B)},[B.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),{key:0,name:B.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Dt,e.toDisplayString(B.meta?.title),1)],8,Tt))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.children,B=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"sub-"+B.path},[B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",Mt,[e.createElementVNode("div",zt,e.toDisplayString(B.meta?.title),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.children,D=>(e.openBlock(),e.createElementBlock("div",{key:D.path,class:"menu-item submenu-item",onClick:N=>V(D)},[D.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),{key:0,name:D.meta.icon,size:14},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Rt,e.toDisplayString(D.meta?.title),1)],8,Lt))),128))])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)]))),128))])])],!0)],34),e.createElementVNode("div",It,[e.createVNode(e.unref(p.NLayout),{class:"content-layout"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NLayoutContent),{class:"main-content p16px app-content"},{default:e.withCtx(()=>[e.createElementVNode("div",At,[e.createVNode(S,null,{default:e.withCtx(({Component:b,route:B})=>[e.createVNode(e.Transition,{name:u.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:e.unref(v),max:e.unref(o)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b),{key:B.path}))],1032,["include","max"]))]),_:2},1032,["name"])]),_:1})])]),_:1}),k.value?e.renderSlot(g.$slots,"footer",{key:0},void 0,!0):e.createCommentVNode("",!0)]),_:3})])])}}}),ee=L(Ht,[["__scopeId","data-v-3e4915c5"]]),Ft={key:6,class:"layout-coming-soon"},Ot=e.defineComponent({name:"C_LayoutContainer",__name:"index",setup(m){const l=Y(),v=M(),o=e.computed(()=>l.layoutMode),d=v.isDark,i=e.ref(!1);return e.provide("menuCollapse",{isCollapsed:i,handleCollapsedChange:n=>{i.value=n}}),(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout-container",e.unref(d)?"dark-mode":"light-mode"])},[o.value==="side"?(e.openBlock(),e.createBlock(X,{key:0,collapsed:i.value,"onUpdate:collapsed":s[0]||(s[0]=r=>i.value=r)},e.createSlots({menu:e.withCtx(()=>[e.renderSlot(n.$slots,"menu",{collapsed:i.value})]),header:e.withCtx(()=>[e.renderSlot(n.$slots,"header")]),footer:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0]),1032,["collapsed"])):o.value==="top"?(e.openBlock(),e.createBlock(q,{key:1},e.createSlots({_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0,n.$slots["top-menu"]?{name:"menu",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"top-menu")]),key:"1"}:void 0,n.$slots["header-extra"]?{name:"header-extra",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"header-extra")]),key:"2"}:void 0,n.$slots["tags-view"]?{name:"tags-view",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"tags-view")]),key:"3"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"4"}:void 0]),1024)):o.value==="mix"?(e.openBlock(),e.createBlock(J,{key:2},e.createSlots({header:e.withCtx(()=>[e.renderSlot(n.$slots,"header")]),_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"1"}:void 0]),1024)):o.value==="mix-top"?(e.openBlock(),e.createBlock(Z,{key:3},e.createSlots({_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0,n.$slots.brand?{name:"brand",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"brand")]),key:"1"}:void 0,n.$slots["top-menu"]?{name:"top-menu",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"top-menu")]),key:"2"}:void 0,n.$slots["header-extra"]?{name:"header-extra",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"header-extra")]),key:"3"}:void 0,n.$slots["tags-view"]?{name:"tags-view",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"tags-view")]),key:"4"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"5"}:void 0]),1024)):o.value==="reverse-horizontal-mix"?(e.openBlock(),e.createBlock(Q,{key:4},e.createSlots({_:2},[n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"0"}:void 0,n.$slots["top-menu"]?{name:"top-menu",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"top-menu")]),key:"1"}:void 0,n.$slots["header-extra"]?{name:"header-extra",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"header-extra")]),key:"2"}:void 0,n.$slots["tags-view"]?{name:"tags-view",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"tags-view")]),key:"3"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"4"}:void 0]),1024)):o.value==="card-layout"?(e.openBlock(),e.createBlock(ee,{key:5},e.createSlots({_:2},[n.$slots["menu-trigger"]?{name:"menu-trigger",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"menu-trigger")]),key:"0"}:void 0,n.$slots.logo?{name:"logo",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),key:"1"}:void 0,n.$slots["header-extra"]?{name:"header-extra",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"header-extra")]),key:"2"}:void 0,n.$slots["tags-view"]?{name:"tags-view",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"tags-view")]),key:"3"}:void 0,n.$slots["drawer-menu"]?{name:"drawer-menu",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"drawer-menu")]),key:"4"}:void 0,n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")]),key:"5"}:void 0]),1024)):(e.openBlock(),e.createElementBlock("div",Ft,[...s[1]||(s[1]=[e.createElementVNode("div",{class:"coming-soon-content"},[e.createElementVNode("div",{class:"coming-soon-icon"},"🚧"),e.createElementVNode("div",{class:"coming-soon-title"},"布局开发中")],-1)])]))],2))}}),Ut=[{label:"左侧菜单(默认)",value:"side",disabled:!1,svg:`
|
|
2
2
|
<rect x="0" y="0" width="16" height="48" rx="1" fill="currentColor" fill-opacity="0.9"/>
|
|
3
3
|
<rect x="18" y="0" width="38" height="10" rx="1" fill="currentColor" fill-opacity="0.7"/>
|
|
4
4
|
<rect x="18" y="12" width="38" height="34" rx="1" fill="currentColor" fill-opacity="0.4"/>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<rect x="32" y="0" width="24" height="20" rx="2" fill="currentColor" fill-opacity="0.7"/>
|
|
25
25
|
<rect x="0" y="24" width="24" height="20" rx="2" fill="currentColor" fill-opacity="0.6"/>
|
|
26
26
|
<rect x="32" y="24" width="24" height="20" rx="2" fill="currentColor" fill-opacity="0.4"/>
|
|
27
|
-
`}],
|
|
27
|
+
`}],Wt={class:"settings-section"},Pt={class:"preset-grid"},jt=["onClick"],Kt={class:"preset-icon"},Yt={class:"preset-name"},Gt={class:"preset-color"},Xt={class:"settings-section"},qt={class:"settings-section"},Jt={class:"color-picker-wrapper"},Zt={class:"color-value"},Qt={class:"settings-section"},eo={class:"settings-section"},to={class:"flex items-center justify-between mb-2"},oo={class:"settings-section"},no={class:"settings-section"},lo={class:"layout-grid"},ao=["onClick"],so={class:"layout-screenshot"},ro={class:"layout-svg",viewBox:"0 0 56 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},io=["innerHTML"],co={class:"layout-label"},uo={key:0,class:"badge-soon"},mo={class:"settings-section"},po={class:"setting-item"},vo={class:"setting-item"},ho={class:"setting-item"},fo={class:"setting-item"},go={class:"settings-section"},ko={class:"slider-item"},yo={class:"slider-label"},Co={class:"slider-value"},No={class:"slider-item"},Vo={class:"slider-label"},wo={class:"slider-value"},_o={class:"settings-section"},Eo={class:"settings-section"},Bo={class:"action-buttons-grid"},bo={class:"settings-section"},xo={class:"action-buttons-grid"},So={class:"settings-section"},$o={class:"setting-item"},To={class:"setting-item"},Do={class:"settings-section"},Mo={class:"setting-item"},zo={key:0,class:"mt-2"},Lo={class:"settings-section"},Ro={class:"system-info"},Io={class:"info-item"},Ao={class:"info-value"},Ho={class:"info-item"},Fo={class:"info-value"},Oo={class:"info-item"},Uo={class:"info-value"},Wo={class:"info-item"},Po={class:"info-value"},jo={class:"info-item"},Ko={class:"info-value"},Yo={class:"info-item"},Go={class:"info-value"},Xo=e.defineComponent({__name:"index",props:{show:{type:Boolean,default:!1},showModifiers:{}},emits:["update:show"],setup(m){const l=p.useMessage(),v=p.useDialog(),o=Y(),d=e.useModel(m,"show"),i=e.ref("appearance"),n=e.ref(!1),s=e.ref(!1),r=e.ref(!1),k=e.ref("Robot Admin");let u=null;const c=N=>{u&&(document.body.removeChild(u),u=null);const t=document.createElement("canvas"),a=t.getContext("2d");t.width=200,t.height=150,a.font="14px Microsoft JhengHei",a.fillStyle="rgba(120, 120, 120, 0.15)",a.rotate(-20*Math.PI/180),a.fillText(N,0,80),u=document.createElement("div"),u.style.cssText=`
|
|
28
28
|
position: fixed;
|
|
29
29
|
top: 0;
|
|
30
30
|
left: 0;
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
background-repeat: repeat;
|
|
36
36
|
z-index: 9999;
|
|
37
37
|
user-select: none;
|
|
38
|
-
`,document.body.appendChild(u)},f=()=>{u&&(document.body.removeChild(u),u=null)};e.watch(n,C=>{document.documentElement.classList.toggle("gray-mode",C)}),e.watch(s,C=>{document.documentElement.classList.toggle("color-weak-mode",C)}),e.watch(r,C=>{C?c(g.value):f()}),e.watch(g,C=>{r.value&&c(C)});const y=e.computed(()=>{const C=navigator.userAgent;let t="Unknown",a="Unknown";return C.includes("Chrome")?t="Chrome":C.includes("Firefox")?t="Firefox":C.includes("Safari")?t="Safari":C.includes("Edge")&&(t="Edge"),C.includes("Windows")?a="Windows":C.includes("Mac")?a="macOS":C.includes("Linux")?a="Linux":C.includes("Android")?a="Android":C.includes("iOS")&&(a="iOS"),{browser:t,os:a,resolution:`${window.screen.width} × ${window.screen.height}`,pixelRatio:window.devicePixelRatio+"x",language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}});e.onUnmounted(()=>{f()});const k=(C,t)=>{t||(o.layoutMode=C)},w=C=>o.primaryColor===C.primaryColor,d=C=>{o.applyPreset(C),l.success(`已应用「${C.name}」主题方案`)},E=()=>{o.themeMode=x.themeMode,o.primaryColor=x.primaryColor,o.borderRadius=x.borderRadius,o.transitionType=x.transitionType,o.enableTransition=x.enableTransition,l.success("已恢复外观默认设置")},N=()=>{o.layoutMode=x.layoutMode,o.fixedHeader=x.fixedHeader,o.showBreadcrumb=x.showBreadcrumb,o.showBreadcrumbIcon=x.showBreadcrumbIcon,o.showTagsView=x.showTagsView,o.tagsViewHeight=x.tagsViewHeight,o.tagsViewStyle=x.tagsViewStyle,o.showFooter=x.showFooter,o.sidebarWidth=x.sidebarWidth,o.sidebarCollapsedWidth=x.sidebarCollapsedWidth,o.headerHeight=x.headerHeight,l.success("已恢复布局默认设置")},_=()=>{h.warning({title:"确认重置",content:"确定要恢复默认配置吗?此操作不可撤销。",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>{o.resetSettings(),l.success("已恢复默认配置")}})},M=()=>{h.warning({title:"确认清除",content:"确定要清除浏览器缓存吗?",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>{const C=["theme-mode","robot-admin-settings"];Object.keys(localStorage).forEach(a=>{C.includes(a)||localStorage.removeItem(a)}),sessionStorage.clear(),l.success("缓存已清除")}})},b=()=>{location.reload()},B=()=>{const C={settings:o.settingsState,gray:n.value,colorWeak:s.value,watermark:{enabled:r.value,text:g.value},exportTime:new Date().toISOString()},t=new Blob([JSON.stringify(C,null,2)],{type:"application/json"}),a=URL.createObjectURL(t),$=document.createElement("a");$.href=a,$.download=`robot-admin-config-${Date.now()}.json`,$.click(),URL.revokeObjectURL(a),l.success("配置已导出")},T=()=>{const C=document.createElement("input");C.type="file",C.accept="application/json",C.onchange=async t=>{const a=t.target.files?.[0];if(a)try{const $=await a.text(),S=JSON.parse($);S.settings&&o.$patch(S.settings),S.gray!==void 0&&(n.value=S.gray),S.colorWeak!==void 0&&(s.value=S.colorWeak),S.watermark&&(r.value=S.watermark.enabled,g.value=S.watermark.text),l.success("配置已导入")}catch{l.error("配置文件格式错误")}},C.click()};return(C,t)=>(e.openBlock(),e.createBlock(e.unref(p.NDrawer),{show:m.value,"onUpdate:show":t[16]||(t[16]=a=>m.value=a),width:380,placement:"right","trap-focus":!1,"block-scroll":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NDrawerContent),{title:"⚙️ 布局配置",closable:""},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NTabs),{value:i.value,"onUpdate:value":t[15]||(t[15]=a=>i.value=a),animated:"",class:"settings-tabs"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NTabPane),{name:"appearance",tab:"🎨 外观"},{default:e.withCtx(()=>[e.createElementVNode("div",Ut,[e.createElementVNode("div",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),a=>(e.openBlock(),e.createElementBlock("div",{key:a.name,class:e.normalizeClass(["preset-card",{active:w(a)}]),onClick:$=>d(a)},[e.createElementVNode("div",jt,e.toDisplayString(a.icon),1),e.createElementVNode("div",Kt,e.toDisplayString(a.name),1),e.createElementVNode("div",Yt,[e.createElementVNode("span",{class:"color-dot",style:e.normalizeStyle({backgroundColor:a.primaryColor})},null,4)])],10,Pt))),128))])]),e.createElementVNode("div",Gt,[t[20]||(t[20]=e.createElementVNode("div",{class:"section-title"},"主题模式",-1)),e.createVNode(e.unref(p.NRadioGroup),{value:e.unref(o).themeMode,"onUpdate:value":t[0]||(t[0]=a=>e.unref(o).themeMode=a),class:"mode-group"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NRadioButton),{value:"light"},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createElementVNode("span",{class:"i-mdi:white-balance-sunny mr-1"},null,-1),e.createTextVNode(" 浅色 ",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"dark"},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createElementVNode("span",{class:"i-mdi:moon-waning-crescent mr-1"},null,-1),e.createTextVNode(" 深色 ",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"auto"},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createElementVNode("span",{class:"i-mdi:theme-light-dark mr-1"},null,-1),e.createTextVNode(" 自动 ",-1)])]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",Xt,[t[21]||(t[21]=e.createElementVNode("div",{class:"section-title"},"主题色",-1)),e.createElementVNode("div",qt,[e.createVNode(e.unref(p.NColorPicker),{value:e.unref(o).primaryColor,"onUpdate:value":t[1]||(t[1]=a=>e.unref(o).primaryColor=a),"show-alpha":!1,swatches:e.unref(le),actions:["confirm"]},null,8,["value","swatches"]),e.createElementVNode("span",Jt,e.toDisplayString(e.unref(o).primaryColor),1)])]),e.createElementVNode("div",Zt,[t[25]||(t[25]=e.createElementVNode("div",{class:"section-title"},"圆角大小",-1)),e.createVNode(e.unref(p.NRadioGroup),{value:e.unref(o).borderRadius,"onUpdate:value":t[2]||(t[2]=a=>e.unref(o).borderRadius=a),class:"radius-group"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NRadioButton),{value:"small"},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createTextVNode("小 (4px)",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"medium"},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("中 (6px)",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"large"},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("大 (8px)",-1)])]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",Qt,[t[31]||(t[31]=e.createElementVNode("div",{class:"section-title"},"页面动画",-1)),e.createElementVNode("div",eo,[t[26]||(t[26]=e.createElementVNode("span",{class:"text-sm"},"启用动画",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).enableTransition,"onUpdate:value":t[3]||(t[3]=a=>e.unref(o).enableTransition=a)},null,8,["value"])]),e.createVNode(e.unref(p.NRadioGroup),{value:e.unref(o).transitionType,"onUpdate:value":t[4]||(t[4]=a=>e.unref(o).transitionType=a),disabled:!e.unref(o).enableTransition,class:"transition-group"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NRadioButton),{value:"fade"},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("淡入",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"slide"},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("滑动",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"zoom"},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("缩放",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"none"},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode("无",-1)])]),_:1})]),_:1},8,["value","disabled"])]),e.createElementVNode("div",to,[e.createVNode(e.unref(p.NButton),{block:"",secondary:"",onClick:E},{icon:e.withCtx(()=>[...t[32]||(t[32]=[e.createElementVNode("span",{class:"i-mdi:restore"},null,-1)])]),default:e.withCtx(()=>[t[33]||(t[33]=e.createTextVNode(" 恢复外观默认设置 ",-1))]),_:1})])]),_:1}),e.createVNode(e.unref(p.NTabPane),{name:"layout",tab:"📐 布局"},{default:e.withCtx(()=>[e.createElementVNode("div",oo,[t[34]||(t[34]=e.createElementVNode("div",{class:"section-title"},"布局模式",-1)),e.createElementVNode("div",no,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Ot),a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["layout-item",{active:e.unref(o).layoutMode===a.value,disabled:a.disabled}]),onClick:e.withModifiers($=>k(a.value,a.disabled),["stop"])},[e.createElementVNode("div",ao,[(e.openBlock(),e.createElementBlock("svg",so,[e.createElementVNode("g",{innerHTML:a.svg},null,8,ro)]))]),e.createElementVNode("div",io,[e.createTextVNode(e.toDisplayString(a.label)+" ",1),a.disabled?(e.openBlock(),e.createElementBlock("span",co,"敬请期待")):e.createCommentVNode("",!0)])],10,lo))),128))])]),e.createElementVNode("div",uo,[t[39]||(t[39]=e.createElementVNode("div",{class:"section-title"},"界面元素",-1)),e.createElementVNode("div",mo,[t[35]||(t[35]=e.createElementVNode("span",null,"显示面包屑",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).showBreadcrumb,"onUpdate:value":t[5]||(t[5]=a=>e.unref(o).showBreadcrumb=a)},null,8,["value"])]),e.createElementVNode("div",vo,[t[36]||(t[36]=e.createElementVNode("span",null,"显示面包屑图标",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).showBreadcrumbIcon,"onUpdate:value":t[6]||(t[6]=a=>e.unref(o).showBreadcrumbIcon=a),disabled:!e.unref(o).showBreadcrumb},null,8,["value","disabled"])]),e.createElementVNode("div",po,[t[37]||(t[37]=e.createElementVNode("span",null,"显示标签页",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).showTagsView,"onUpdate:value":t[7]||(t[7]=a=>e.unref(o).showTagsView=a)},null,8,["value"])]),e.createElementVNode("div",ho,[t[38]||(t[38]=e.createElementVNode("span",null,"显示页脚",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).showFooter,"onUpdate:value":t[8]||(t[8]=a=>e.unref(o).showFooter=a)},null,8,["value"])])]),e.createElementVNode("div",fo,[t[42]||(t[42]=e.createElementVNode("div",{class:"section-title"},"尺寸调整",-1)),e.createElementVNode("div",go,[e.createElementVNode("div",ko,[t[40]||(t[40]=e.createElementVNode("span",null,"侧边栏宽度",-1)),e.createElementVNode("span",yo,e.toDisplayString(e.unref(o).sidebarWidth)+"px",1)]),e.createVNode(e.unref(p.NSlider),{value:e.unref(o).sidebarWidth,"onUpdate:value":t[9]||(t[9]=a=>e.unref(o).sidebarWidth=a),min:180,max:280,step:10,marks:{180:"180",220:"220",280:"280"}},null,8,["value"])]),e.createElementVNode("div",Co,[e.createElementVNode("div",No,[t[41]||(t[41]=e.createElementVNode("span",null,"头部高度",-1)),e.createElementVNode("span",wo,e.toDisplayString(e.unref(o).headerHeight)+"px",1)]),e.createVNode(e.unref(p.NSlider),{value:e.unref(o).headerHeight,"onUpdate:value":t[10]||(t[10]=a=>e.unref(o).headerHeight=a),min:48,max:64,step:4,marks:{48:"48",56:"56",64:"64"}},null,8,["value"])])]),e.createElementVNode("div",_o,[e.createVNode(e.unref(p.NButton),{block:"",secondary:"",onClick:N},{icon:e.withCtx(()=>[...t[43]||(t[43]=[e.createElementVNode("span",{class:"i-mdi:restore"},null,-1)])]),default:e.withCtx(()=>[t[44]||(t[44]=e.createTextVNode(" 恢复布局默认设置 ",-1))]),_:1})])]),_:1}),e.createVNode(e.unref(p.NTabPane),{name:"features",tab:"🔧 功能"},{default:e.withCtx(()=>[e.createElementVNode("div",Vo,[t[49]||(t[49]=e.createElementVNode("div",{class:"section-title"},"缓存管理",-1)),e.createElementVNode("div",Eo,[e.createVNode(e.unref(p.NButton),{secondary:"",onClick:M},{icon:e.withCtx(()=>[...t[45]||(t[45]=[e.createElementVNode("span",{class:"i-mdi:delete-sweep"},null,-1)])]),default:e.withCtx(()=>[t[46]||(t[46]=e.createTextVNode(" 清除缓存 ",-1))]),_:1}),e.createVNode(e.unref(p.NButton),{secondary:"",onClick:b},{icon:e.withCtx(()=>[...t[47]||(t[47]=[e.createElementVNode("span",{class:"i-mdi:refresh"},null,-1)])]),default:e.withCtx(()=>[t[48]||(t[48]=e.createTextVNode(" 重新加载 ",-1))]),_:1})])]),e.createElementVNode("div",Bo,[t[56]||(t[56]=e.createElementVNode("div",{class:"section-title"},"配置管理",-1)),e.createElementVNode("div",bo,[e.createVNode(e.unref(p.NButton),{secondary:"",onClick:B},{icon:e.withCtx(()=>[...t[50]||(t[50]=[e.createElementVNode("span",{class:"i-mdi:download"},null,-1)])]),default:e.withCtx(()=>[t[51]||(t[51]=e.createTextVNode(" 导出配置 ",-1))]),_:1}),e.createVNode(e.unref(p.NButton),{secondary:"",onClick:T},{icon:e.withCtx(()=>[...t[52]||(t[52]=[e.createElementVNode("span",{class:"i-mdi:upload"},null,-1)])]),default:e.withCtx(()=>[t[53]||(t[53]=e.createTextVNode(" 导入配置 ",-1))]),_:1})]),e.createVNode(e.unref(p.NButton),{block:"",type:"error",secondary:"",class:"mt-2",onClick:_},{icon:e.withCtx(()=>[...t[54]||(t[54]=[e.createElementVNode("span",{class:"i-mdi:restore"},null,-1)])]),default:e.withCtx(()=>[t[55]||(t[55]=e.createTextVNode(" 重置所有配置 ",-1))]),_:1})]),e.createElementVNode("div",xo,[t[59]||(t[59]=e.createElementVNode("div",{class:"section-title"},"系统模式",-1)),e.createElementVNode("div",$o,[t[57]||(t[57]=e.createElementVNode("div",{class:"setting-label"},[e.createElementVNode("span",null,"灰色模式"),e.createElementVNode("span",{class:"setting-desc"},"用于哀悼日场景")],-1)),e.createVNode(e.unref(p.NSwitch),{value:n.value,"onUpdate:value":t[11]||(t[11]=a=>n.value=a)},null,8,["value"])]),e.createElementVNode("div",So,[t[58]||(t[58]=e.createElementVNode("div",{class:"setting-label"},[e.createElementVNode("span",null,"色弱模式"),e.createElementVNode("span",{class:"setting-desc"},"提供无障碍访问支持")],-1)),e.createVNode(e.unref(p.NSwitch),{value:s.value,"onUpdate:value":t[12]||(t[12]=a=>s.value=a)},null,8,["value"])])]),e.createElementVNode("div",To,[t[61]||(t[61]=e.createElementVNode("div",{class:"section-title"},"水印设置",-1)),e.createElementVNode("div",Do,[t[60]||(t[60]=e.createElementVNode("span",null,"启用水印",-1)),e.createVNode(e.unref(p.NSwitch),{value:r.value,"onUpdate:value":t[13]||(t[13]=a=>r.value=a)},null,8,["value"])]),r.value?(e.openBlock(),e.createElementBlock("div",Mo,[e.createVNode(e.unref(p.NInput),{value:g.value,"onUpdate:value":t[14]||(t[14]=a=>g.value=a),placeholder:"请输入水印内容",size:"small"},null,8,["value"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",zo,[t[68]||(t[68]=e.createElementVNode("div",{class:"section-title"},"系统信息",-1)),e.createElementVNode("div",Lo,[e.createElementVNode("div",Ro,[t[62]||(t[62]=e.createElementVNode("span",{class:"info-label"},"浏览器",-1)),e.createElementVNode("span",Io,e.toDisplayString(y.value.browser),1)]),e.createElementVNode("div",Ao,[t[63]||(t[63]=e.createElementVNode("span",{class:"info-label"},"操作系统",-1)),e.createElementVNode("span",Ho,e.toDisplayString(y.value.os),1)]),e.createElementVNode("div",Fo,[t[64]||(t[64]=e.createElementVNode("span",{class:"info-label"},"屏幕分辨率",-1)),e.createElementVNode("span",Oo,e.toDisplayString(y.value.resolution),1)]),e.createElementVNode("div",Uo,[t[65]||(t[65]=e.createElementVNode("span",{class:"info-label"},"设备像素比",-1)),e.createElementVNode("span",Wo,e.toDisplayString(y.value.pixelRatio),1)]),e.createElementVNode("div",Po,[t[66]||(t[66]=e.createElementVNode("span",{class:"info-label"},"语言",-1)),e.createElementVNode("span",jo,e.toDisplayString(y.value.language),1)]),e.createElementVNode("div",Ko,[t[67]||(t[67]=e.createElementVNode("span",{class:"info-label"},"时区",-1)),e.createElementVNode("span",Yo,e.toDisplayString(y.value.timezone),1)])])])]),_:1})]),_:1},8,["value"])]),_:1})]),_:1},8,["show"]))}}),Xo=L(Go,[["__scopeId","data-v-f98d8946"]]),qo={class:"brand-logo__icon"},Jo=["src","width","height"],Zo=["src","width","height"],Qo={class:"brand-logo__name"},en={class:"brand-logo__title"},tn={key:0,class:"brand-logo__subtitle"},on={key:0,class:"brand-logo__divider"},nn=e.defineComponent({name:"BrandLogo",__name:"index",props:{showName:{type:Boolean,default:!1},showDivider:{type:Boolean,default:!1},size:{default:36},collapsed:{type:Boolean,default:!1},variant:{default:"horizontal"}},setup(v){const l=D(),h={...z,...l.brand};return(o,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["brand-logo",{"brand-logo--collapsed":v.collapsed,"brand-logo--horizontal":v.variant==="horizontal"}])},[e.createElementVNode("div",qo,[m[0]||(m[0]=e.createElementVNode("div",{class:"brand-logo__glow"},null,-1)),h.logoType==="video"&&h.logoSrc?(e.openBlock(),e.createElementBlock("video",{key:0,src:h.logoSrc,width:v.size,height:v.size,autoplay:"",loop:"",muted:"",playsinline:"",class:"brand-logo__media"},null,8,Jo)):h.logoSrc?(e.openBlock(),e.createElementBlock("img",{key:1,src:h.logoSrc,width:v.size,height:v.size,class:"brand-logo__media",alt:"Logo"},null,8,Zo)):e.createCommentVNode("",!0)]),v.showName&&!v.collapsed?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Qo,[e.createElementVNode("span",en,e.toDisplayString(h.name),1),h.subtitle?(e.openBlock(),e.createElementBlock("span",tn,e.toDisplayString(h.subtitle),1)):e.createCommentVNode("",!0)]),v.showDivider?(e.openBlock(),e.createElementBlock("div",on)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2))}}),ln=L(nn,[["__scopeId","data-v-fd1c2eec"]]),an={class:"icon-menu"},sn=["onClick"],rn={class:"icon-menu__icon"},cn={key:1,class:"icon-menu__fallback"},dn={class:"icon-menu__label"},un=e.defineComponent({name:"IconMenu",__name:"index",props:{menus:{},active:{}},emits:["click"],setup(v,{emit:l}){const h=l,o=D();return(m,i)=>(e.openBlock(),e.createElementBlock("div",an,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.menus,n=>(e.openBlock(),e.createElementBlock("div",{key:n.path,class:e.normalizeClass(["icon-menu__item",{"icon-menu__item--active":v.active===n.path}]),onClick:s=>h("click",n)},[e.createElementVNode("div",rn,[e.unref(o).iconComponent&&n.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:n.meta.icon,size:20},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",cn,e.toDisplayString(n.meta?.title?.charAt(0)||"?"),1))]),e.createElementVNode("div",dn,e.toDisplayString(n.meta?.title),1)],10,sn))),128))]))}}),mn=L(un,[["__scopeId","data-v-f985d475"]]),vn={class:"floating-menu__header"},pn={class:"floating-menu__brand"},hn={class:"floating-menu__brand-title"},fn={class:"floating-menu__brand-subtitle"},gn={class:"floating-menu__list"},kn={key:0,class:"floating-menu__group"},yn={class:"floating-menu__group-title"},Cn=["onClick"],Nn={class:"floating-menu__item-text"},wn=["onClick"],_n={class:"floating-menu__item-text"},Vn=e.defineComponent({name:"FloatingMenu",__name:"index",props:{show:{type:Boolean},menuItem:{},isActive:{type:Function}},emits:["click"],setup(v,{emit:l}){const h=l,o=D(),m={...z,...o.brand};return(i,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[v.show&&v.menuItem?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["floating-menu",[e.unref(o).isDark.value?"dark-theme":"light-theme"]])},[e.createElementVNode("div",vn,[e.createElementVNode("div",pn,[e.createElementVNode("span",hn,e.toDisplayString(m.name),1),e.createElementVNode("span",fn,e.toDisplayString(m.subtitle),1)])]),e.createElementVNode("div",gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.menuItem.children,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.path},[s.children&&s.children.length>0?(e.openBlock(),e.createElementBlock("div",kn,[e.createElementVNode("div",yn,[e.unref(o).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:s.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(s.meta?.title),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,r=>(e.openBlock(),e.createElementBlock("div",{key:r.path,class:e.normalizeClass(["floating-menu__item floating-menu__item--sub",{active:v.isActive?.(r.path)}]),onClick:g=>h("click",r)},[e.unref(o).iconComponent&&r.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:r.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Nn,e.toDisplayString(r.meta?.title),1)],10,Cn))),128))])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["floating-menu__item",{active:v.isActive?.(s.path)}]),onClick:r=>h("click",s)},[e.unref(o).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:s.meta.icon,size:18},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",_n,e.toDisplayString(s.meta?.title),1)],10,wn))],64))),128))])],2)):e.createCommentVNode("",!0)]),_:1}))}}),En=L(Vn,[["__scopeId","data-v-0588c318"]]),Bn={class:"side-menu__header"},bn={class:"side-menu__header-icon"},xn={class:"side-menu__header-title"},$n={class:"side-menu__list"},Sn={key:0,class:"side-menu__group"},Tn={class:"side-menu__group-label"},Dn=["onClick"],Mn={class:"side-menu__item-text"},zn=["onClick"],Ln={class:"side-menu__item-text"},Rn=e.defineComponent({name:"SideMenu",__name:"index",props:{menus:{},activeItem:{},isActive:{type:Function}},emits:["click"],setup(v,{emit:l}){const h=l,o=D(),m=e.ref(!1);return(i,n)=>v.menus.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass(["side-menu-toggle",[e.unref(o).isDark.value?"dark-theme":"light-theme",{active:!m.value}]]),onClick:n[0]||(n[0]=s=>m.value=!m.value)},[e.createElementVNode("i",{class:e.normalizeClass(["toggle-icon",m.value?"i-ri:side-bar-line":"i-ri:arrow-right-s-line"])},null,2)],2),e.createVNode(e.Transition,{name:"glass-slide"},{default:e.withCtx(()=>[m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["side-menu",[e.unref(o).isDark.value?"dark-theme":"light-theme"]])},[e.createElementVNode("div",Bn,[e.createElementVNode("div",bn,[e.unref(o).iconComponent&&v.activeItem?.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:v.activeItem.meta.icon,size:17},null,8,["name"])):e.createCommentVNode("",!0)]),e.createElementVNode("span",xn,e.toDisplayString(v.activeItem?.meta?.title||"菜单"),1)]),e.createElementVNode("div",$n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.menus,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.path},[s.children&&s.children.length>0?(e.openBlock(),e.createElementBlock("div",Sn,[e.createElementVNode("div",Tn,[e.unref(o).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:s.meta.icon,size:14},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(s.meta?.title),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,r=>(e.openBlock(),e.createElementBlock("div",{key:r.path,class:e.normalizeClass(["side-menu__item",{active:v.isActive?.(r.path)}]),onClick:g=>h("click",r)},[e.unref(o).iconComponent&&r.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:r.meta.icon,size:15},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Mn,e.toDisplayString(r.meta?.title),1)],10,Dn))),128))])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["side-menu__item",{active:v.isActive?.(s.path)}]),onClick:r=>h("click",s)},[e.unref(o).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:s.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ln,e.toDisplayString(s.meta?.title),1)],10,zn))],64))),128))])],2))]),_:1})],64)):e.createCommentVNode("",!0)}}),In=L(Rn,[["__scopeId","data-v-1909f229"]]),An={class:"drawer-menu__content"},Hn={class:"drawer-menu__grid"},Fn=["onClick"],On={key:0,class:"drawer-menu__items"},Un=["onClick"],Wn={class:"drawer-menu__item-text"},Pn={key:0,class:"drawer-menu__sub-items"},jn={class:"drawer-menu__sub-title"},Kn=["onClick"],Yn={class:"drawer-menu__item-text"},Gn=e.defineComponent({name:"DrawerMenu",__name:"index",props:{menus:{},show:{type:Boolean}},setup(v){const l=D(),h=R.useRouter(),o=e.inject(Y,{show:()=>{},startHide:()=>{},hide:()=>{}}),m=i=>{i.path&&(h.push(i.path),o.hide())};return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["drawer-menu",[e.unref(l).isDark.value?"dark-theme":"light-theme",{visible:v.show}]]),onMouseenter:n[0]||(n[0]=s=>e.unref(o).show()),onMouseleave:n[1]||(n[1]=s=>e.unref(o).startHide())},[n[2]||(n[2]=e.createElementVNode("div",{class:"drawer-menu__header"},[e.createElementVNode("div",{class:"drawer-menu__title"},[e.createElementVNode("i",{class:"i-ri:apps-2-line"}),e.createElementVNode("span",null,"功能导航")])],-1)),e.createElementVNode("div",An,[e.createElementVNode("div",Hn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.menus,s=>(e.openBlock(),e.createElementBlock("div",{key:s.path,class:"drawer-menu__category"},[e.createElementVNode("div",{class:"drawer-menu__category-header",onClick:r=>m(s)},[e.unref(l).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).iconComponent),{key:0,name:s.meta.icon,size:18},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(s.meta?.title),1)],8,Fn),s.children&&s.children.length>0?(e.openBlock(),e.createElementBlock("div",On,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,r=>(e.openBlock(),e.createElementBlock("div",{key:r.path,class:"drawer-menu__item",onClick:g=>m(r)},[e.unref(l).iconComponent&&r.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).iconComponent),{key:0,name:r.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Wn,e.toDisplayString(r.meta?.title),1)],8,Un))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.path},[r.children&&r.children.length>0?(e.openBlock(),e.createElementBlock("div",Pn,[e.createElementVNode("div",jn,e.toDisplayString(r.meta?.title),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.children,g=>(e.openBlock(),e.createElementBlock("div",{key:g.path,class:"drawer-menu__item drawer-menu__item--sub",onClick:u=>m(g)},[e.unref(l).iconComponent&&g.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).iconComponent),{key:0,name:g.meta.icon,size:14},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Yn,e.toDisplayString(g.meta?.title),1)],8,Kn))),128))])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)]))),128))])])],34))}}),Xn=L(Gn,[["__scopeId","data-v-9aae9bfd"]]),qn=e.defineComponent({name:"MenuTrigger",__name:"index",props:{show:{type:Boolean}},setup(v){const l=e.inject(Y,{show:()=>{},startHide:()=>{},hide:()=>{}});return(h,o)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-trigger",onMouseenter:o[0]||(o[0]=m=>e.unref(l).show()),onMouseleave:o[1]||(o[1]=m=>e.unref(l).startHide())},[...o[2]||(o[2]=[e.createElementVNode("div",{class:"menu-trigger__indicator"},[e.createElementVNode("i",{class:"i-ri:menu-3-line"})],-1)])],32))}}),Jn=L(qn,[["__scopeId","data-v-8e722471"]]);function Zn(v,l={}){const h=j(l);return h().syncCSSVariables(),h}exports.BORDER_RADIUS_MAP=oe;exports.BrandLogo=ln;exports.COLOR_SWATCHES=le;exports.C_CardLayout=Q;exports.C_LayoutContainer=Ft;exports.C_MixLayout=q;exports.C_MixTopLayout=J;exports.C_ReverseHorizontalMixLayout=Z;exports.C_SideLayout=G;exports.C_TopLayout=X;exports.CardLayout=Q;exports.DEFAULT_BRAND_CONFIG=z;exports.DEFAULT_SETTINGS=x;exports.DRAWER_HANDLER_KEY=Y;exports.DrawerMenu=Xn;exports.FloatingMenu=En;exports.IconMenu=mn;exports.LAYOUT_CONTEXT_KEY=ae;exports.LAYOUT_MODES=re;exports.MenuTrigger=Jn;exports.MixLayout=q;exports.MixTopLayout=J;exports.PRESET_COLORS=ee;exports.ResponsiveMenu=U;exports.ReverseHorizontalMixLayout=Z;exports.SettingsDrawer=Xo;exports.SideLayout=G;exports.SideMenu=In;exports.THEME_PRESETS=te;exports.TRANSITION_MAP=ne;exports.TopLayout=X;exports.adjustColor=P;exports.createSettingsStore=j;exports.setupLayout=Zn;exports.useLayoutCache=I;exports.useLayoutContext=D;exports.useMenuSplit=W;exports.useSettingsStore=K;
|
|
38
|
+
`,document.body.appendChild(u)},h=()=>{u&&(document.body.removeChild(u),u=null)};e.watch(n,N=>{document.documentElement.classList.toggle("gray-mode",N)}),e.watch(s,N=>{document.documentElement.classList.toggle("color-weak-mode",N)}),e.watch(r,N=>{N?c(k.value):h()}),e.watch(k,N=>{r.value&&c(N)});const C=e.computed(()=>{const N=navigator.userAgent;let t="Unknown",a="Unknown";return N.includes("Chrome")?t="Chrome":N.includes("Firefox")?t="Firefox":N.includes("Safari")?t="Safari":N.includes("Edge")&&(t="Edge"),N.includes("Windows")?a="Windows":N.includes("Mac")?a="macOS":N.includes("Linux")?a="Linux":N.includes("Android")?a="Android":N.includes("iOS")&&(a="iOS"),{browser:t,os:a,resolution:`${window.screen.width} × ${window.screen.height}`,pixelRatio:window.devicePixelRatio+"x",language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}});e.onUnmounted(()=>{h()});const y=(N,t)=>{t||(o.layoutMode=N)},w=N=>o.primaryColor===N.primaryColor,V=N=>{o.applyPreset(N),l.success(`已应用「${N.name}」主题方案`)},f=()=>{o.themeMode=x.themeMode,o.primaryColor=x.primaryColor,o.borderRadius=x.borderRadius,o.transitionType=x.transitionType,o.enableTransition=x.enableTransition,l.success("已恢复外观默认设置")},g=()=>{o.layoutMode=x.layoutMode,o.fixedHeader=x.fixedHeader,o.showBreadcrumb=x.showBreadcrumb,o.showBreadcrumbIcon=x.showBreadcrumbIcon,o.showTagsView=x.showTagsView,o.tagsViewHeight=x.tagsViewHeight,o.tagsViewStyle=x.tagsViewStyle,o.showFooter=x.showFooter,o.sidebarWidth=x.sidebarWidth,o.sidebarCollapsedWidth=x.sidebarCollapsedWidth,o.headerHeight=x.headerHeight,l.success("已恢复布局默认设置")},_=()=>{v.warning({title:"确认重置",content:"确定要恢复默认配置吗?此操作不可撤销。",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>{o.resetSettings(),l.success("已恢复默认配置")}})},S=()=>{v.warning({title:"确认清除",content:"确定要清除浏览器缓存吗?",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>{const N=["theme-mode","robot-admin-settings"];Object.keys(localStorage).forEach(a=>{N.includes(a)||localStorage.removeItem(a)}),sessionStorage.clear(),l.success("缓存已清除")}})},b=()=>{location.reload()},B=()=>{const N={settings:o.settingsState,gray:n.value,colorWeak:s.value,watermark:{enabled:r.value,text:k.value},exportTime:new Date().toISOString()},t=new Blob([JSON.stringify(N,null,2)],{type:"application/json"}),a=URL.createObjectURL(t),$=document.createElement("a");$.href=a,$.download=`robot-admin-config-${Date.now()}.json`,$.click(),URL.revokeObjectURL(a),l.success("配置已导出")},D=()=>{const N=document.createElement("input");N.type="file",N.accept="application/json",N.onchange=async t=>{const a=t.target.files?.[0];if(a)try{const $=await a.text(),T=JSON.parse($);T.settings&&o.$patch(T.settings),T.gray!==void 0&&(n.value=T.gray),T.colorWeak!==void 0&&(s.value=T.colorWeak),T.watermark&&(r.value=T.watermark.enabled,k.value=T.watermark.text),l.success("配置已导入")}catch{l.error("配置文件格式错误")}},N.click()};return(N,t)=>(e.openBlock(),e.createBlock(e.unref(p.NDrawer),{show:d.value,"onUpdate:show":t[16]||(t[16]=a=>d.value=a),width:380,placement:"right","trap-focus":!1,"block-scroll":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NDrawerContent),{title:"⚙️ 布局配置",closable:""},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NTabs),{value:i.value,"onUpdate:value":t[15]||(t[15]=a=>i.value=a),animated:"",class:"settings-tabs"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NTabPane),{name:"appearance",tab:"🎨 外观"},{default:e.withCtx(()=>[e.createElementVNode("div",Wt,[e.createElementVNode("div",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(oe),a=>(e.openBlock(),e.createElementBlock("div",{key:a.name,class:e.normalizeClass(["preset-card",{active:w(a)}]),onClick:$=>V(a)},[e.createElementVNode("div",Kt,e.toDisplayString(a.icon),1),e.createElementVNode("div",Yt,e.toDisplayString(a.name),1),e.createElementVNode("div",Gt,[e.createElementVNode("span",{class:"color-dot",style:e.normalizeStyle({backgroundColor:a.primaryColor})},null,4)])],10,jt))),128))])]),e.createElementVNode("div",Xt,[t[20]||(t[20]=e.createElementVNode("div",{class:"section-title"},"主题模式",-1)),e.createVNode(e.unref(p.NRadioGroup),{value:e.unref(o).themeMode,"onUpdate:value":t[0]||(t[0]=a=>e.unref(o).themeMode=a),class:"mode-group"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NRadioButton),{value:"light"},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createElementVNode("span",{class:"i-mdi:white-balance-sunny mr-1"},null,-1),e.createTextVNode(" 浅色 ",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"dark"},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createElementVNode("span",{class:"i-mdi:moon-waning-crescent mr-1"},null,-1),e.createTextVNode(" 深色 ",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"auto"},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createElementVNode("span",{class:"i-mdi:theme-light-dark mr-1"},null,-1),e.createTextVNode(" 自动 ",-1)])]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",qt,[t[21]||(t[21]=e.createElementVNode("div",{class:"section-title"},"主题色",-1)),e.createElementVNode("div",Jt,[e.createVNode(e.unref(p.NColorPicker),{value:e.unref(o).primaryColor,"onUpdate:value":t[1]||(t[1]=a=>e.unref(o).primaryColor=a),"show-alpha":!1,swatches:e.unref(ae),actions:["confirm"]},null,8,["value","swatches"]),e.createElementVNode("span",Zt,e.toDisplayString(e.unref(o).primaryColor),1)])]),e.createElementVNode("div",Qt,[t[25]||(t[25]=e.createElementVNode("div",{class:"section-title"},"圆角大小",-1)),e.createVNode(e.unref(p.NRadioGroup),{value:e.unref(o).borderRadius,"onUpdate:value":t[2]||(t[2]=a=>e.unref(o).borderRadius=a),class:"radius-group"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NRadioButton),{value:"small"},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createTextVNode("小 (4px)",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"medium"},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("中 (6px)",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"large"},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("大 (8px)",-1)])]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",eo,[t[31]||(t[31]=e.createElementVNode("div",{class:"section-title"},"页面动画",-1)),e.createElementVNode("div",to,[t[26]||(t[26]=e.createElementVNode("span",{class:"text-sm"},"启用动画",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).enableTransition,"onUpdate:value":t[3]||(t[3]=a=>e.unref(o).enableTransition=a)},null,8,["value"])]),e.createVNode(e.unref(p.NRadioGroup),{value:e.unref(o).transitionType,"onUpdate:value":t[4]||(t[4]=a=>e.unref(o).transitionType=a),disabled:!e.unref(o).enableTransition,class:"transition-group"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.NRadioButton),{value:"fade"},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("淡入",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"slide"},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("滑动",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"zoom"},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("缩放",-1)])]),_:1}),e.createVNode(e.unref(p.NRadioButton),{value:"none"},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode("无",-1)])]),_:1})]),_:1},8,["value","disabled"])]),e.createElementVNode("div",oo,[e.createVNode(e.unref(p.NButton),{block:"",secondary:"",onClick:f},{icon:e.withCtx(()=>[...t[32]||(t[32]=[e.createElementVNode("span",{class:"i-mdi:restore"},null,-1)])]),default:e.withCtx(()=>[t[33]||(t[33]=e.createTextVNode(" 恢复外观默认设置 ",-1))]),_:1})])]),_:1}),e.createVNode(e.unref(p.NTabPane),{name:"layout",tab:"📐 布局"},{default:e.withCtx(()=>[e.createElementVNode("div",no,[t[34]||(t[34]=e.createElementVNode("div",{class:"section-title"},"布局模式",-1)),e.createElementVNode("div",lo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Ut),a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["layout-item",{active:e.unref(o).layoutMode===a.value,disabled:a.disabled}]),onClick:e.withModifiers($=>y(a.value,a.disabled),["stop"])},[e.createElementVNode("div",so,[(e.openBlock(),e.createElementBlock("svg",ro,[e.createElementVNode("g",{innerHTML:a.svg},null,8,io)]))]),e.createElementVNode("div",co,[e.createTextVNode(e.toDisplayString(a.label)+" ",1),a.disabled?(e.openBlock(),e.createElementBlock("span",uo,"敬请期待")):e.createCommentVNode("",!0)])],10,ao))),128))])]),e.createElementVNode("div",mo,[t[39]||(t[39]=e.createElementVNode("div",{class:"section-title"},"界面元素",-1)),e.createElementVNode("div",po,[t[35]||(t[35]=e.createElementVNode("span",null,"显示面包屑",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).showBreadcrumb,"onUpdate:value":t[5]||(t[5]=a=>e.unref(o).showBreadcrumb=a)},null,8,["value"])]),e.createElementVNode("div",vo,[t[36]||(t[36]=e.createElementVNode("span",null,"显示面包屑图标",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).showBreadcrumbIcon,"onUpdate:value":t[6]||(t[6]=a=>e.unref(o).showBreadcrumbIcon=a),disabled:!e.unref(o).showBreadcrumb},null,8,["value","disabled"])]),e.createElementVNode("div",ho,[t[37]||(t[37]=e.createElementVNode("span",null,"显示标签页",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).showTagsView,"onUpdate:value":t[7]||(t[7]=a=>e.unref(o).showTagsView=a)},null,8,["value"])]),e.createElementVNode("div",fo,[t[38]||(t[38]=e.createElementVNode("span",null,"显示页脚",-1)),e.createVNode(e.unref(p.NSwitch),{value:e.unref(o).showFooter,"onUpdate:value":t[8]||(t[8]=a=>e.unref(o).showFooter=a)},null,8,["value"])])]),e.createElementVNode("div",go,[t[42]||(t[42]=e.createElementVNode("div",{class:"section-title"},"尺寸调整",-1)),e.createElementVNode("div",ko,[e.createElementVNode("div",yo,[t[40]||(t[40]=e.createElementVNode("span",null,"侧边栏宽度",-1)),e.createElementVNode("span",Co,e.toDisplayString(e.unref(o).sidebarWidth)+"px",1)]),e.createVNode(e.unref(p.NSlider),{value:e.unref(o).sidebarWidth,"onUpdate:value":t[9]||(t[9]=a=>e.unref(o).sidebarWidth=a),min:180,max:280,step:10,marks:{180:"180",220:"220",280:"280"}},null,8,["value"])]),e.createElementVNode("div",No,[e.createElementVNode("div",Vo,[t[41]||(t[41]=e.createElementVNode("span",null,"头部高度",-1)),e.createElementVNode("span",wo,e.toDisplayString(e.unref(o).headerHeight)+"px",1)]),e.createVNode(e.unref(p.NSlider),{value:e.unref(o).headerHeight,"onUpdate:value":t[10]||(t[10]=a=>e.unref(o).headerHeight=a),min:48,max:64,step:4,marks:{48:"48",56:"56",64:"64"}},null,8,["value"])])]),e.createElementVNode("div",_o,[e.createVNode(e.unref(p.NButton),{block:"",secondary:"",onClick:g},{icon:e.withCtx(()=>[...t[43]||(t[43]=[e.createElementVNode("span",{class:"i-mdi:restore"},null,-1)])]),default:e.withCtx(()=>[t[44]||(t[44]=e.createTextVNode(" 恢复布局默认设置 ",-1))]),_:1})])]),_:1}),e.createVNode(e.unref(p.NTabPane),{name:"features",tab:"🔧 功能"},{default:e.withCtx(()=>[e.createElementVNode("div",Eo,[t[49]||(t[49]=e.createElementVNode("div",{class:"section-title"},"缓存管理",-1)),e.createElementVNode("div",Bo,[e.createVNode(e.unref(p.NButton),{secondary:"",onClick:S},{icon:e.withCtx(()=>[...t[45]||(t[45]=[e.createElementVNode("span",{class:"i-mdi:delete-sweep"},null,-1)])]),default:e.withCtx(()=>[t[46]||(t[46]=e.createTextVNode(" 清除缓存 ",-1))]),_:1}),e.createVNode(e.unref(p.NButton),{secondary:"",onClick:b},{icon:e.withCtx(()=>[...t[47]||(t[47]=[e.createElementVNode("span",{class:"i-mdi:refresh"},null,-1)])]),default:e.withCtx(()=>[t[48]||(t[48]=e.createTextVNode(" 重新加载 ",-1))]),_:1})])]),e.createElementVNode("div",bo,[t[56]||(t[56]=e.createElementVNode("div",{class:"section-title"},"配置管理",-1)),e.createElementVNode("div",xo,[e.createVNode(e.unref(p.NButton),{secondary:"",onClick:B},{icon:e.withCtx(()=>[...t[50]||(t[50]=[e.createElementVNode("span",{class:"i-mdi:download"},null,-1)])]),default:e.withCtx(()=>[t[51]||(t[51]=e.createTextVNode(" 导出配置 ",-1))]),_:1}),e.createVNode(e.unref(p.NButton),{secondary:"",onClick:D},{icon:e.withCtx(()=>[...t[52]||(t[52]=[e.createElementVNode("span",{class:"i-mdi:upload"},null,-1)])]),default:e.withCtx(()=>[t[53]||(t[53]=e.createTextVNode(" 导入配置 ",-1))]),_:1})]),e.createVNode(e.unref(p.NButton),{block:"",type:"error",secondary:"",class:"mt-2",onClick:_},{icon:e.withCtx(()=>[...t[54]||(t[54]=[e.createElementVNode("span",{class:"i-mdi:restore"},null,-1)])]),default:e.withCtx(()=>[t[55]||(t[55]=e.createTextVNode(" 重置所有配置 ",-1))]),_:1})]),e.createElementVNode("div",So,[t[59]||(t[59]=e.createElementVNode("div",{class:"section-title"},"系统模式",-1)),e.createElementVNode("div",$o,[t[57]||(t[57]=e.createElementVNode("div",{class:"setting-label"},[e.createElementVNode("span",null,"灰色模式"),e.createElementVNode("span",{class:"setting-desc"},"用于哀悼日场景")],-1)),e.createVNode(e.unref(p.NSwitch),{value:n.value,"onUpdate:value":t[11]||(t[11]=a=>n.value=a)},null,8,["value"])]),e.createElementVNode("div",To,[t[58]||(t[58]=e.createElementVNode("div",{class:"setting-label"},[e.createElementVNode("span",null,"色弱模式"),e.createElementVNode("span",{class:"setting-desc"},"提供无障碍访问支持")],-1)),e.createVNode(e.unref(p.NSwitch),{value:s.value,"onUpdate:value":t[12]||(t[12]=a=>s.value=a)},null,8,["value"])])]),e.createElementVNode("div",Do,[t[61]||(t[61]=e.createElementVNode("div",{class:"section-title"},"水印设置",-1)),e.createElementVNode("div",Mo,[t[60]||(t[60]=e.createElementVNode("span",null,"启用水印",-1)),e.createVNode(e.unref(p.NSwitch),{value:r.value,"onUpdate:value":t[13]||(t[13]=a=>r.value=a)},null,8,["value"])]),r.value?(e.openBlock(),e.createElementBlock("div",zo,[e.createVNode(e.unref(p.NInput),{value:k.value,"onUpdate:value":t[14]||(t[14]=a=>k.value=a),placeholder:"请输入水印内容",size:"small"},null,8,["value"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Lo,[t[68]||(t[68]=e.createElementVNode("div",{class:"section-title"},"系统信息",-1)),e.createElementVNode("div",Ro,[e.createElementVNode("div",Io,[t[62]||(t[62]=e.createElementVNode("span",{class:"info-label"},"浏览器",-1)),e.createElementVNode("span",Ao,e.toDisplayString(C.value.browser),1)]),e.createElementVNode("div",Ho,[t[63]||(t[63]=e.createElementVNode("span",{class:"info-label"},"操作系统",-1)),e.createElementVNode("span",Fo,e.toDisplayString(C.value.os),1)]),e.createElementVNode("div",Oo,[t[64]||(t[64]=e.createElementVNode("span",{class:"info-label"},"屏幕分辨率",-1)),e.createElementVNode("span",Uo,e.toDisplayString(C.value.resolution),1)]),e.createElementVNode("div",Wo,[t[65]||(t[65]=e.createElementVNode("span",{class:"info-label"},"设备像素比",-1)),e.createElementVNode("span",Po,e.toDisplayString(C.value.pixelRatio),1)]),e.createElementVNode("div",jo,[t[66]||(t[66]=e.createElementVNode("span",{class:"info-label"},"语言",-1)),e.createElementVNode("span",Ko,e.toDisplayString(C.value.language),1)]),e.createElementVNode("div",Yo,[t[67]||(t[67]=e.createElementVNode("span",{class:"info-label"},"时区",-1)),e.createElementVNode("span",Go,e.toDisplayString(C.value.timezone),1)])])])]),_:1})]),_:1},8,["value"])]),_:1})]),_:1},8,["show"]))}}),qo=L(Xo,[["__scopeId","data-v-f98d8946"]]),Jo={class:"brand-logo__icon"},Zo=["src","width","height"],Qo=["src","width","height"],en={class:"brand-logo__name"},tn={class:"brand-logo__title"},on={key:0,class:"brand-logo__subtitle"},nn={key:0,class:"brand-logo__divider"},ln=e.defineComponent({name:"BrandLogo",__name:"index",props:{showName:{type:Boolean,default:!1},showDivider:{type:Boolean,default:!1},size:{default:36},collapsed:{type:Boolean,default:!1},variant:{default:"horizontal"}},setup(m){const l=M(),v={...R,...l.brand};return(o,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["brand-logo",{"brand-logo--collapsed":m.collapsed,"brand-logo--horizontal":m.variant==="horizontal"}])},[e.createElementVNode("div",Jo,[d[0]||(d[0]=e.createElementVNode("div",{class:"brand-logo__glow"},null,-1)),v.logoType==="video"&&v.logoSrc?(e.openBlock(),e.createElementBlock("video",{key:0,src:v.logoSrc,width:m.size,height:m.size,autoplay:"",loop:"",muted:"",playsinline:"",class:"brand-logo__media"},null,8,Zo)):v.logoSrc?(e.openBlock(),e.createElementBlock("img",{key:1,src:v.logoSrc,width:m.size,height:m.size,class:"brand-logo__media",alt:"Logo"},null,8,Qo)):e.createCommentVNode("",!0)]),m.showName&&!m.collapsed?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",en,[e.createElementVNode("span",tn,e.toDisplayString(v.name),1),v.subtitle?(e.openBlock(),e.createElementBlock("span",on,e.toDisplayString(v.subtitle),1)):e.createCommentVNode("",!0)]),m.showDivider?(e.openBlock(),e.createElementBlock("div",nn)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2))}}),an=L(ln,[["__scopeId","data-v-fd1c2eec"]]),sn={class:"icon-menu"},rn=["onClick"],cn={class:"icon-menu__icon"},dn={key:1,class:"icon-menu__fallback"},un={class:"icon-menu__label"},mn=e.defineComponent({name:"IconMenu",__name:"index",props:{menus:{},active:{}},emits:["click"],setup(m,{emit:l}){const v=l,o=M();return(d,i)=>(e.openBlock(),e.createElementBlock("div",sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.menus,n=>(e.openBlock(),e.createElementBlock("div",{key:n.path,class:e.normalizeClass(["icon-menu__item",{"icon-menu__item--active":m.active===n.path}]),onClick:s=>v("click",n)},[e.createElementVNode("div",cn,[e.unref(o).iconComponent&&n.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:n.meta.icon,size:20},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",dn,e.toDisplayString(n.meta?.title?.charAt(0)||"?"),1))]),e.createElementVNode("div",un,e.toDisplayString(n.meta?.title),1)],10,rn))),128))]))}}),pn=L(mn,[["__scopeId","data-v-f985d475"]]),vn={class:"floating-menu__header"},hn={class:"floating-menu__brand"},fn={class:"floating-menu__brand-title"},gn={class:"floating-menu__brand-subtitle"},kn={class:"floating-menu__list"},yn={key:0,class:"floating-menu__group"},Cn={class:"floating-menu__group-title"},Nn=["onClick"],Vn={class:"floating-menu__item-text"},wn=["onClick"],_n={class:"floating-menu__item-text"},En=e.defineComponent({name:"FloatingMenu",__name:"index",props:{show:{type:Boolean},menuItem:{},isActive:{type:Function}},emits:["click"],setup(m,{emit:l}){const v=l,o=M(),d={...R,...o.brand};return(i,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[m.show&&m.menuItem?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["floating-menu",[e.unref(o).isDark.value?"dark-theme":"light-theme"]])},[e.createElementVNode("div",vn,[e.createElementVNode("div",hn,[e.createElementVNode("span",fn,e.toDisplayString(d.name),1),e.createElementVNode("span",gn,e.toDisplayString(d.subtitle),1)])]),e.createElementVNode("div",kn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.menuItem.children,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.path},[s.children&&s.children.length>0?(e.openBlock(),e.createElementBlock("div",yn,[e.createElementVNode("div",Cn,[e.unref(o).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:s.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(s.meta?.title),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,r=>(e.openBlock(),e.createElementBlock("div",{key:r.path,class:e.normalizeClass(["floating-menu__item floating-menu__item--sub",{active:m.isActive?.(r.path)}]),onClick:k=>v("click",r)},[e.unref(o).iconComponent&&r.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:r.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Vn,e.toDisplayString(r.meta?.title),1)],10,Nn))),128))])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["floating-menu__item",{active:m.isActive?.(s.path)}]),onClick:r=>v("click",s)},[e.unref(o).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:s.meta.icon,size:18},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",_n,e.toDisplayString(s.meta?.title),1)],10,wn))],64))),128))])],2)):e.createCommentVNode("",!0)]),_:1}))}}),Bn=L(En,[["__scopeId","data-v-0588c318"]]),bn={class:"side-menu__header"},xn={class:"side-menu__header-icon"},Sn={class:"side-menu__header-title"},$n={class:"side-menu__list"},Tn={key:0,class:"side-menu__group"},Dn={class:"side-menu__group-label"},Mn=["onClick"],zn={class:"side-menu__item-text"},Ln=["onClick"],Rn={class:"side-menu__item-text"},In=e.defineComponent({name:"SideMenu",__name:"index",props:{menus:{},activeItem:{},isActive:{type:Function}},emits:["click"],setup(m,{emit:l}){const v=l,o=M(),d=e.ref(!1);return(i,n)=>m.menus.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass(["side-menu-toggle",[e.unref(o).isDark.value?"dark-theme":"light-theme",{active:!d.value}]]),onClick:n[0]||(n[0]=s=>d.value=!d.value)},[e.createElementVNode("i",{class:e.normalizeClass(["toggle-icon",d.value?"i-ri:side-bar-line":"i-ri:arrow-right-s-line"])},null,2)],2),e.createVNode(e.Transition,{name:"glass-slide"},{default:e.withCtx(()=>[d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["side-menu",[e.unref(o).isDark.value?"dark-theme":"light-theme"]])},[e.createElementVNode("div",bn,[e.createElementVNode("div",xn,[e.unref(o).iconComponent&&m.activeItem?.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:m.activeItem.meta.icon,size:17},null,8,["name"])):e.createCommentVNode("",!0)]),e.createElementVNode("span",Sn,e.toDisplayString(m.activeItem?.meta?.title||"菜单"),1)]),e.createElementVNode("div",$n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.menus,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.path},[s.children&&s.children.length>0?(e.openBlock(),e.createElementBlock("div",Tn,[e.createElementVNode("div",Dn,[e.unref(o).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:s.meta.icon,size:14},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(s.meta?.title),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,r=>(e.openBlock(),e.createElementBlock("div",{key:r.path,class:e.normalizeClass(["side-menu__item",{active:m.isActive?.(r.path)}]),onClick:k=>v("click",r)},[e.unref(o).iconComponent&&r.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:r.meta.icon,size:15},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",zn,e.toDisplayString(r.meta?.title),1)],10,Mn))),128))])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["side-menu__item",{active:m.isActive?.(s.path)}]),onClick:r=>v("click",s)},[e.unref(o).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).iconComponent),{key:0,name:s.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Rn,e.toDisplayString(s.meta?.title),1)],10,Ln))],64))),128))])],2))]),_:1})],64)):e.createCommentVNode("",!0)}}),An=L(In,[["__scopeId","data-v-1909f229"]]),Hn={class:"drawer-menu__content"},Fn={class:"drawer-menu__grid"},On=["onClick"],Un={key:0,class:"drawer-menu__items"},Wn=["onClick"],Pn={class:"drawer-menu__item-text"},jn={key:0,class:"drawer-menu__sub-items"},Kn={class:"drawer-menu__sub-title"},Yn=["onClick"],Gn={class:"drawer-menu__item-text"},Xn=e.defineComponent({name:"DrawerMenu",__name:"index",props:{menus:{},show:{type:Boolean}},setup(m){const l=M(),v=A.useRouter(),o=e.inject(G,{show:()=>{},startHide:()=>{},hide:()=>{}}),d=i=>{i.path&&(v.push(i.path),o.hide())};return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["drawer-menu",[e.unref(l).isDark.value?"dark-theme":"light-theme",{visible:m.show}]]),onMouseenter:n[0]||(n[0]=s=>e.unref(o).show()),onMouseleave:n[1]||(n[1]=s=>e.unref(o).startHide())},[n[2]||(n[2]=e.createElementVNode("div",{class:"drawer-menu__header"},[e.createElementVNode("div",{class:"drawer-menu__title"},[e.createElementVNode("span",{class:"grid-icon"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")]),e.createElementVNode("span",null,"功能导航")])],-1)),e.createElementVNode("div",Hn,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.menus,s=>(e.openBlock(),e.createElementBlock("div",{key:s.path,class:"drawer-menu__category"},[e.createElementVNode("div",{class:"drawer-menu__category-header",onClick:r=>d(s)},[e.unref(l).iconComponent&&s.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).iconComponent),{key:0,name:s.meta.icon,size:18},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(s.meta?.title),1)],8,On),s.children&&s.children.length>0?(e.openBlock(),e.createElementBlock("div",Un,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,r=>(e.openBlock(),e.createElementBlock("div",{key:r.path,class:"drawer-menu__item",onClick:k=>d(r)},[e.unref(l).iconComponent&&r.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).iconComponent),{key:0,name:r.meta.icon,size:16},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Pn,e.toDisplayString(r.meta?.title),1)],8,Wn))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.path},[r.children&&r.children.length>0?(e.openBlock(),e.createElementBlock("div",jn,[e.createElementVNode("div",Kn,e.toDisplayString(r.meta?.title),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.children,k=>(e.openBlock(),e.createElementBlock("div",{key:k.path,class:"drawer-menu__item drawer-menu__item--sub",onClick:u=>d(k)},[e.unref(l).iconComponent&&k.meta?.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).iconComponent),{key:0,name:k.meta.icon,size:14},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",Gn,e.toDisplayString(k.meta?.title),1)],8,Yn))),128))])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)]))),128))])])],34))}}),qn=L(Xn,[["__scopeId","data-v-b0d3e73b"]]),Jn=e.defineComponent({name:"MenuTrigger",__name:"index",props:{show:{type:Boolean}},setup(m){const l=e.inject(G,{show:()=>{},startHide:()=>{},hide:()=>{}});return(v,o)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-trigger",onMouseenter:o[0]||(o[0]=d=>e.unref(l).show()),onMouseleave:o[1]||(o[1]=d=>e.unref(l).startHide())},[...o[2]||(o[2]=[e.createElementVNode("div",{class:"menu-trigger__indicator"},[e.createElementVNode("span",{class:"hamburger-icon"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")])],-1)])],32))}}),Zn=L(Jn,[["__scopeId","data-v-2c20af78"]]);function Qn(m,l={}){const v=K(l);return v().syncCSSVariables(),v}exports.BORDER_RADIUS_MAP=ne;exports.BrandLogo=an;exports.COLOR_SWATCHES=ae;exports.C_CardLayout=ee;exports.C_LayoutContainer=Ot;exports.C_MixLayout=J;exports.C_MixTopLayout=Z;exports.C_ReverseHorizontalMixLayout=Q;exports.C_SideLayout=X;exports.C_TopLayout=q;exports.CardLayout=ee;exports.DEFAULT_BRAND_CONFIG=R;exports.DEFAULT_SETTINGS=x;exports.DRAWER_HANDLER_KEY=G;exports.DrawerMenu=qn;exports.FloatingMenu=Bn;exports.IconMenu=pn;exports.LAYOUT_CONTEXT_KEY=se;exports.LAYOUT_MODES=ie;exports.MenuTrigger=Zn;exports.MixLayout=J;exports.MixTopLayout=Z;exports.PRESET_COLORS=te;exports.ResponsiveMenu=W;exports.ReverseHorizontalMixLayout=Q;exports.SettingsDrawer=qo;exports.SideLayout=X;exports.SideMenu=An;exports.THEME_PRESETS=oe;exports.TRANSITION_MAP=le;exports.TopLayout=q;exports.adjustColor=j;exports.createSettingsStore=K;exports.setupLayout=Qn;exports.useLayoutCache=H;exports.useLayoutContext=M;exports.useMenuSplit=P;exports.useSettingsStore=Y;
|
|
39
39
|
//# sourceMappingURL=index.cjs.map
|