import{c as v,b,a as A}from"./index-0f3e2c06-1779868775780v=1.0.0.js";import{u as T,a as g}from"./tabs-e9b8af2b-1779868775780v=1.0.0.js";import{E as l}from"./eleVendor-dbf96bf3-1779868775780v=1.0.0.js";import{e as S,a as i}from"./vendor-98154105-1779868775780v=1.0.0.js";const K=()=>{const f=v(),m=S(()=>f.companyAreaId),t=i(!1),d=i(),o=b(),p=A(),u=T(),c=g();return{BaseCompanyAreaId:m,closeCurrent:(e,r)=>{if(e){u.removeTabs(e),c.removeKeepAliveName(r);return}o.meta.isAffix||(u.removeTabs(o.fullPath),c.removeKeepAliveName(o.name),p.back())},ruleFormRef:d,setTitle:e=>{u.setTabsTitle(e)},addMethod:(e,r,n="\u65B0\u589E\u6210\u529F")=>{if(!t.value)return new Promise(async a=>{let s=await e(r);s.code==200?(l.success(n),a({flag:!0,...s})):a({flag:!1,...s}),t.value=!1})},updateMethod:(e,r,n="\u66F4\u65B0\u6210\u529F")=>{if(!t.value)return new Promise(async a=>{let s=await e(r);s.code==200?(l.success(n),a({flag:!0,...s})):a({flag:!1,...s}),t.value=!1})},loading:t}};export{K as u};
