1 |
- import{d as D,Z as I,r as V,o as d,x as w,a as o,P as O,a0 as L,a2 as y,d8 as j,_ as b,dp as u,dq as S,O as x,dr as q,ds as A,ah as M,bh as R,L as C,w as p,g as T,c as $,v as F,n as N,t as U,F as Z,q as B,__tla as G}from"./index-3fb48822.js";import{u as z,__tla as H}from"./useIcon-5a78f32b.js";import{b as J,E as K,a as Q,__tla as W}from"./el-dropdown-item-169eb0cc.js";let P,k,X=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return W}catch{}})()]).then(async()=>{let i,v;i="var(--el-color-black)",k=b(D({name:"ThemeSwitch",__name:"ThemeSwitch",setup(l){const{getPrefixCls:s}=y(),c=s("theme-switch"),a=z({icon:"emojione-monotone:sun",color:"#fde047"}),n=z({icon:"emojione-monotone:crescent-moon",color:"#fde047"}),m=I(),t=V(m.getIsDark),e=r=>{m.setIsDark(r)};return(r,_)=>{const g=j;return d(),w(g,{modelValue:o(t),"onUpdate:modelValue":_[0]||(_[0]=f=>O(t)?t.value=f:null),"active-color":i,"active-icon":o(a),"border-color":i,class:L(o(c)),"inactive-color":i,"inactive-icon":o(n),"inline-prompt":"",onChange:e},null,8,["modelValue","active-icon","class","inactive-icon"])}}}),[["__scopeId","data-v-78cd11f1"],["__file","D:/zx/mall-newfeifan-zx-admin/src/layout/components/ThemeSwitch/src/ThemeSwitch.vue"]]),v=()=>({changeLocale:async l=>{const s=u.global,c=await S(Object.assign({"../../locales/en.ts":()=>x(()=>import("./en-706ee4dd.js"),[]),"../../locales/zh-CN.ts":()=>x(()=>import("./zh-CN-3441a76e.js"),[])}),`../../locales/${l}.ts`);s.setLocaleMessage(l,c.default),(a=>{const n=q();u.mode==="legacy"?u.global.locale=a:u.global.locale.value=a,n.setCurrentLocale({lang:a}),A(a)})(l)}}),P=b(D({name:"LocaleDropdown",__name:"LocaleDropdown",props:{color:M.string.def("")},setup(l){const{getPrefixCls:s}=y(),c=s("locale-dropdown"),a=R(),n=C(()=>a.getLocaleMap),m=C(()=>a.getCurrentLocale),t=e=>{if(e===o(m).lang)return;window.location.reload(),a.setCurrentLocale({lang:e});const{changeLocale:r}=v();r(e)};return(e,r)=>{const _=B,g=K,f=Q,E=J;return d(),w(E,{class:L(o(c)),trigger:"click",onCommand:t},{dropdown:p(()=>[T(f,null,{default:p(()=>[(d(!0),$(Z,null,F(o(n),h=>(d(),w(g,{key:h.lang,command:h.lang},{default:p(()=>[N(U(h.name),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:p(()=>[T(_,{class:L([e.$attrs.class,"cursor-pointer !p-0"]),color:l.color,size:18,icon:"ion:language-sharp"},null,8,["class","color"])]),_:1},8,["class"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/layout/components/LocaleDropdown/src/LocaleDropdown.vue"]])});export{P as L,k as T,X as __tla};
|