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