types.99de89d9.js 678 B

1
  1. import{E as e,aC as v,C,F as S,H as T,G as h,u as A}from"./index.1417328f.js";function R(n,o){const a=e({}),p=v(),i=e(null),d=e(!1),r=e(""),f=C().emit,g=()=>A(i).$el.getBoundingClientRect().y;async function y(){const{api:t,prop:c,value:s}=n,{code:u,message:m,data:l}=await t({[c]:Array.isArray(s)?s[0]:s});p({code:u,message:m,handler:()=>{a.value=l,r.value=String(u),o&&o(l)}})}return S(()=>{if(n.api)return y()}),T(()=>a.value,()=>setTimeout(()=>{const t={top:g()-134,title:n.title};h(()=>f("map-offset-top",t))},1e3)),{defaultRef:i,hidden:d,code:r,data:a}}const w={api:{type:Function},prop:{type:String},value:{type:[String,Array]},title:{type:String}};export{w as d,R as u};