Files
yusheng-admin/dist/static/js/dark-DdIoJ4ZY.js

2 lines
18 KiB
JavaScript
Raw Normal View History

2025-10-23 11:06:41 +08:00
var E=(t,e,a)=>new Promise((o,i)=>{var m=r=>{try{h(a.next(r))}catch(d){i(d)}},g=r=>{try{h(a.throw(r))}catch(d){i(d)}},h=r=>r.done?o(r.value):Promise.resolve(r.value).then(m,g);h((a=a.apply(t,e)).next())});import{ad as H,q as C,aB as I,F as X,s as _,l as $,N as T,p as R,m as S,a8 as ee,n as M,aC as te,B as x,aD as K,aE as oe,aF as ae,aG as se,y as le,i as ne,aH as re,aI as ie,G as ue,v as ce,$ as he,Y as N,ax as A,aA as de,E as pe,aJ as me,o as Y,c as V,e as Q}from"./index-CRmU-Qpi.js";import{u as z}from"./epTheme-Dbh1KLs6.js";function ke(){const{$storage:t,$config:e}=H(),a=()=>{var m,g,h,r,d,f,b,w,k,F,l,n,c,p,u;I().multiTagsCache&&(!t.tags||t.tags.length===0)&&(t.tags=X),t.layout||(t.layout={layout:(m=e==null?void 0:e.Layout)!=null?m:"vertical",theme:(g=e==null?void 0:e.Theme)!=null?g:"light",darkMode:(h=e==null?void 0:e.DarkMode)!=null?h:!1,sidebarStatus:(r=e==null?void 0:e.SidebarStatus)!=null?r:!0,epThemeColor:(d=e==null?void 0:e.EpThemeColor)!=null?d:"#409EFF",themeColor:(f=e==null?void 0:e.Theme)!=null?f:"light",overallStyle:(b=e==null?void 0:e.OverallStyle)!=null?b:"light"}),t.configure||(t.configure={grey:(w=e==null?void 0:e.Grey)!=null?w:!1,weak:(k=e==null?void 0:e.Weak)!=null?k:!1,hideTabs:(F=e==null?void 0:e.HideTabs)!=null?F:!1,hideFooter:(l=e.HideFooter)!=null?l:!0,showLogo:(n=e==null?void 0:e.ShowLogo)!=null?n:!0,showModel:(c=e==null?void 0:e.ShowModel)!=null?c:"smart",multiTagsCache:(p=e==null?void 0:e.MultiTagsCache)!=null?p:!1,stretch:(u=e==null?void 0:e.Stretch)!=null?u:!1})},o=C(()=>t==null?void 0:t.layout.layout),i=C(()=>t.layout);return{layout:o,layoutTheme:i,initStorage:a}}const ve=$({id:"pure-app",state:()=>{var t,e,a,o;return{sidebar:{opened:(e=(t=T().getItem(`${R()}layout`))==null?void 0:t.sidebarStatus)!=null?e:S().SidebarStatus,withoutAnimation:!1,isClickCollapse:!1},layout:(o=(a=T().getItem(`${R()}layout`))==null?void 0:a.layout)!=null?o:S().Layout,device:ee()?"mobile":"desktop",viewportSize:{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}}},getters:{getSidebarStatus(t){return t.sidebar.opened},getDevice(t){return t.device},getViewportWidth(t){return t.viewportSize.width},getViewportHeight(t){return t.viewportSize.height}},actions:{TOGGLE_SIDEBAR(t,e){const a=T().getItem(`${R()}layout`);t&&e?(this.sidebar.withoutAnimation=!0,this.sidebar.opened=!0,a.sidebarStatus=!0):!t&&e?(this.sidebar.withoutAnimation=!0,this.sidebar.opened=!1,a.sidebarStatus=!1):!t&&!e&&(this.sidebar.withoutAnimation=!1,this.sidebar.opened=!this.sidebar.opened,this.sidebar.isClickCollapse=!this.sidebar.opened,a.sidebarStatus=this.sidebar.opened),T().setItem(`${R()}layout`,a)},toggleSideBar(t,e){return E(this,null,function*(){yield this.TOGGLE_SIDEBAR(t,e)})},toggleDevice(t){this.device=t},setLayout(t){this.layout=t},setViewportSize(t){this.viewportSize=t},setSortSwap(t){this.sortSwap=t}}});function L(){return ve(_)}function We(){var k,F;const{layoutTheme:t,layout:e}=ke(),a=M([{color:"#ffffff",themeColor:"light"},{color:"#1b2a47",themeColor:"default"},{color:"#722ed1",themeColor:"saucePurple"},{color:"#eb2f96",themeColor:"pink"},{color:"#f5222d",themeColor:"dusk"},{color:"#fa541c",themeColor:"volcano"},{color:"#13c2c2",themeColor:"mingQing"},{color:"#52c41a",themeColor:"auroraGreen"}]),{$storage:o}=H(),i=M((k=o==null?void 0:o.layout)==null?void 0:k.darkMode),m=M((F=o==null?void 0:o.layout)==null?void 0:F.overallStyle),g=document.documentElement;function h(l,n,c){const p=c||document.body;let{className:u}=p;u=u.replace(n,"").trim(),p.className=l?`${u} ${n}`:u}function r(l=(c=>(c=S().Theme)!=null?c:"light")(),n=!0){var u,W;t.value.theme=l,document.documentElement.setAttribute("data-theme",l);const p=o.layout.themeColor;if(o.layout={layout:e.value,theme:l,darkMode:i.value,sidebarStatus:(u=o.layout)==null?void 0:u.sidebarStatus,epThemeColor:(W=o.layout)==null?void 0:W.epThemeColor,themeColor:n?l:p,overallStyle:m.value},l==="default"||l==="light")f(S().EpThemeColor);else{const O=a.value.find(B=>B.themeColor===l);f(O.color)}}function d(l,n,c){document.documentElement.style.setProperty(`--el-