2 lines
917 B
Java
2 lines
917 B
Java
var f=(a,t,r)=>new Promise((s,o)=>{var c=e=>{try{l(r.next(e))}catch(h){o(h)}},u=e=>{try{l(r.throw(e))}catch(h){o(h)}},l=e=>e.done?s(e.value):Promise.resolve(e.value).then(c,u);l((r=r.apply(a,t)).next())});import{ad as n,s as C,u as m,ax as y,ay as d,D as i,az as p}from"./index-X7Y8jykP.js";import{r as D,q as A}from"./dict.api-DWwarPXx.js";import{r as I}from"./vue-vendor-DNhG1Cve.js";function _(){const{t:a}=n(),{createMessage:t}=C(),r=m(),s=I(!1);function o(){return f(this,null,function*(){if(!s.value){s.value=!0;try{const c=yield D();if(yield y(),c.success){const u=yield A();d(i),p(i,u.result),t.success(a("layout.header.refreshCacheComplete")),r.setAllDictItems(u.result)}else t.error(a("layout.header.refreshCacheFailure"))}catch(c){t.error(a("layout.header.refreshCacheFailure"))}finally{s.value=!1}}})}return{loading:s,clearCache:o,tooltipTitle:a("layout.header.dropdownItemRefreshCache")}}export{_ as u};
|