import{r as i,q as d,v,E as c}from"./index-8184dd63-1780045603901v=1.0.0.js";import{T as p,K as T}from"./tabs-7d324d56-1780045603901v=1.0.0.js";const w=()=>{const s=i(!1),f=i(),o=d(),m=v(),u=p(),n=T();return{closeCurrent:(e,r)=>{if(e){u.removeTabs(e),n.removeKeepAliveName(r);return}o.meta.isAffix||(u.removeTabs(o.fullPath),n.removeKeepAliveName(o.name),m.back())},ruleFormRef:f,setTitle:e=>{u.setTabsTitle(e)},addMethod:(e,r,l="\u65B0\u589E\u6210\u529F")=>{if(!s.value)return new Promise(async a=>{let t=await e(r);t.code==200?(c.success(l),a({flag:!0,...t})):a({flag:!1,...t}),s.value=!1})},updateMethod:(e,r,l="\u66F4\u65B0\u6210\u529F")=>{if(!s.value)return new Promise(async a=>{let t=await e(r);t.code==200?(c.success(l),a({flag:!0,...t})):a({flag:!1,...t}),s.value=!1})},loading:s}};export{w as u};
