mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 00:18:51 +08:00
2 lines
4.7 KiB
JavaScript
2 lines
4.7 KiB
JavaScript
import{ae as Y,fW as K,fX as O,a7 as W,av as x,p as a,aV as T,fY as l,fP as X,fC as q,fL as G,aa as y,fU as C,fH as J,fZ as Q,R as tt,ac as et,n as nt,Y as ot,f as w,k as z,g as i}from"./index-5zWoanhF.js";import{e as H}from"./mitt-E5P-NQ8u.js";import{u as at}from"./user-DNtD0Fqa.js";import{u as rt}from"./app-D9gTemMj.js";import{u as st}from"./epTheme-MfPlAjdw.js";const Mt={width:24,height:24,body:'<path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16ZM11 7h2v2h-2V7Zm0 4h2v6h-2v-6Z"/>'},lt="The current routing configuration is incorrect, please check the configuration";function it(){var M,S;const o=rt(),n=Y().options.routes,{isFullscreen:p,toggle:u}=K(),{wholeMenus:r}=O(W()),v=(S=(M=x())==null?void 0:M.TooltipEffect)!=null?S:"light",c=a(()=>({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",overflow:"hidden"})),m=a(()=>{var t,e;return T((t=l())==null?void 0:t.avatar)?at:(e=l())==null?void 0:e.avatar}),h=a(()=>{var t,e,s;return T((t=l())==null?void 0:t.nickname)?(e=l())==null?void 0:e.username:(s=l())==null?void 0:s.nickname}),g=a(()=>(t,e)=>({background:t===e?st().epThemeColor:"",color:t===e?"#f4f4f5":"#000"})),f=a(()=>(t,e)=>t===e?"":"dark:hover:!text-primary"),$=a(()=>h.value?{marginRight:"10px"}:""),B=a(()=>!o.getSidebarStatus),b=a(()=>o.getDevice),{$storage:d,$config:A}=X(),I=a(()=>{var t;return(t=d==null?void 0:d.layout)==null?void 0:t.layout}),R=a(()=>A.Title);function L(t){const e=x().Title;e?document.title=`${y(t.title)} | ${e}`:document.title=y(t.title)}function E(){l().logOut()}function P(){var t;C.push((t=J())==null?void 0:t.path)}function _(){H.emit("openPanel")}function Z(){C.push({name:"AccountSettings"})}function D(){o.toggleSideBar()}function F(t){t==null||t.handleResize()}function V(t){var k;if(!t.children)return console.error(lt);const e=/^http(s?):\/\//,s=(k=t.children[0])==null?void 0:k.path;return e.test(s)?t.path+"/"+s:s}function U(t){r.value.length===0||j(t)||H.emit("changLayoutRoute",t)}function j(t){return Q.includes(t)}function N(){return new URL("/vue-pure-admin/logo.svg",import.meta.url).href}return{title:R,device:b,layout:I,logout:E,routers:n,$storage:d,isFullscreen:p,Fullscreen:q,ExitFullscreen:G,toggle:u,backTopMenu:P,onPanel:_,getDivStyle:c,changeTitle:L,toggleSideBar:D,menuSelect:U,handleResize:F,resolvePath:V,getLogo:N,isCollapse:B,pureApp:o,username:h,userAvatar:m,avatarsStyle:$,tooltipEffect:v,toAccountSettings:Z,getDropdownItemStyle:g,getDropdownItemClass:f}}function St(o){const{$storage:n,changeTitle:p,handleResize:u}=it(),{locale:r,t:v}=tt(),c=et();function m(){n.locale={locale:"zh"},r.value="zh",o&&u(o.value)}function h(){n.locale={locale:"en"},r.value="en",o&&u(o.value)}return nt(()=>r.value,()=>{p(c.meta)}),ot(()=>{var g,f;r.value=(f=(g=n.locale)==null?void 0:g.locale)!=null?f:"zh"}),{t:v,route:c,locale:r,translationCh:m,translationEn:h}}const ut={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-hidden":"true",class:"globalization",viewBox:"0 0 512 512"};function ct(o,n){return w(),z("svg",ut,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 kt={render:ct},ht={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"};function gt(o,n){return w(),z("svg",ht,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 xt={render:gt},ft={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"};function dt(o,n){return w(),z("svg",ft,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 Tt={render:dt};export{St as a,xt as b,Tt as c,Mt as d,kt as g,it as u};
|