mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-08-17 10:44:47 +08:00
2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{ah as O,ex as Q,ey as Y,a8 as q,av as S,p as r,ez as l,a$ as T,eo as G,ek as J,ec as W,et as y,ab as H,eg as X,eA as Z,Q as ee,n as te,Y as ne,ad as oe,k as w,e as z,g as i}from"./index-DL_RpRaM.js";import{e as A}from"./mitt-E5P-NQ8u.js";import{u as re}from"./user-DNtD0Fqa.js";import{u as ae}from"./app-BCX6Z_Wm.js";import{u as se}from"./epTheme-Wef1DiQR.js";const le="The current routing configuration is incorrect, please check the configuration";function ie(){var k,M;const o=ae(),n=O().options.routes,{isFullscreen:f,toggle:u}=Q(),{wholeMenus:a}=Y(q()),m=(M=(k=S())==null?void 0:k.TooltipEffect)!=null?M:"light",c=r(()=>({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",overflow:"hidden"})),v=r(()=>{var e,t;return T((e=l())==null?void 0:e.avatar)?re:(t=l())==null?void 0:t.avatar}),h=r(()=>{var e,t,s;return T((e=l())==null?void 0:e.nickname)?(t=l())==null?void 0:t.username:(s=l())==null?void 0:s.nickname}),g=r(()=>(e,t)=>({background:e===t?se().epThemeColor:"",color:e===t?"#f4f4f5":"#000"})),p=r(()=>(e,t)=>e===t?"":"dark:hover:text-primary!"),B=r(()=>h.value?{marginRight:"10px"}:""),C=r(()=>!o.getSidebarStatus),$=r(()=>o.getDevice),{$storage:d,$config:b}=G(),I=r(()=>{var e;return(e=d==null?void 0:d.layout)==null?void 0:e.layout}),R=r(()=>b.Title);function E(e){const t=S().Title;t?document.title=`${H(e.title)} | ${t}`:document.title=H(e.title)}function L(){l().logOut()}function _(){var e;y.push((e=X())==null?void 0:e.path)}function P(){A.emit("openPanel")}function D(){y.push({name:"AccountSettings"})}function F(){o.toggleSideBar()}function N(e){e==null||e.handleResize()}function U(e){var x;if(!e.children)return console.error(le);const t=/^http(s?):\/\//,s=(x=e.children[0])==null?void 0:x.path;return t.test(s)?e.path+"/"+s:s}function V(e){a.value.length===0||j(e)||A.emit("changLayoutRoute",e)}function j(e){return Z.includes(e)}function K(){return new URL("/vue-pure-admin/logo.svg",import.meta.url).href}return{title:R,device:$,layout:I,logout:L,routers:n,$storage:d,isFullscreen:f,Fullscreen:W,ExitFullscreen:J,toggle:u,backTopMenu:_,onPanel:P,getDivStyle:c,changeTitle:E,toggleSideBar:F,menuSelect:V,handleResize:N,resolvePath:U,getLogo:K,isCollapse:C,pureApp:o,username:h,userAvatar:v,avatarsStyle:B,tooltipEffect:m,toAccountSettings:D,getDropdownItemStyle:g,getDropdownItemClass:p}}function ke(o){const{$storage:n,changeTitle:f,handleResize:u}=ie(),{locale:a,t:m}=ee(),c=oe();function v(){n.locale={locale:"zh"},a.value="zh",o&&u(o.value)}function h(){n.locale={locale:"en"},a.value="en",o&&u(o.value)}return te(()=>a.value,()=>{f(c.meta)}),ne(()=>{var g,p;a.value=(p=(g=n.locale)==null?void 0:g.locale)!=null?p:"zh"}),{t:m,route:c,locale:a,translationCh:v,translationEn:h}}const ue={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",class:"globalization",viewBox:"0 0 512 512"};function ce(o,n){return z(),w("svg",ue,n[0]||(n[0]=[i("path",{fill:"currentColor",d:"m478.33 433.6-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362 368 281.65 401.17 362zm-66.99-19.08a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73 39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93.92 1.19 1.83 2.35 2.74 3.51-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59 22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z"},null,-1)]))}const Me={render:ce},he={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"};function ge(o,n){return z(),w("svg",he,n[0]||(n[0]=[i("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),i("path",{d:"M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12M11 1h2v3h-2zm0 19h2v3h-2zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414zm2.121-14.85 1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414zM23 11v2h-3v-2zM4 11v2H1v-2z"},null,-1)]))}const xe={render:ge},pe={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"};function de(o,n){return z(),w("svg",pe,n[0]||(n[0]=[i("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),i("path",{d:"M11.38 2.019a7.5 7.5 0 1 0 10.6 10.6C21.662 17.854 17.316 22 12.001 22 6.477 22 2 17.523 2 12c0-5.315 4.146-9.661 9.38-9.981"},null,-1)]))}const Se={render:de};export{ke as a,Se as b,xe as d,Me as g,ie as u};
|