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