Gaode.d152406f.js 958 B

1
  1. var c=(e,r,t)=>new Promise((n,o)=>{var p=a=>{try{s(t.next(a))}catch(i){o(i)}},f=a=>{try{s(t.throw(a))}catch(i){o(i)}},s=a=>a.done?n(a.value):Promise.resolve(a.value).then(p,f);s((t=t.apply(e,r)).next())});import{u as d}from"./useScript.26bc894c.js";import{aw as l,a as u,s as m,N as w,o as h,h as M,bk as _,al as y,i as b}from"./index.7e08ba81.js";const g="https://webapi.amap.com/maps?v=2.0&key=d7bb98e7185300250dd5f918c12f484b",k=u({name:"AMap",props:{width:{type:String,default:"100%"},height:{type:String,default:"calc(100vh - 78px)"}},setup(){const e=m(null),{toPromise:r}=d({src:g});function t(){return c(this,null,function*(){yield r(),yield y();const n=b(e);if(!n)return;const o=window.AMap;new o.Map(n,{zoom:11,center:[116.397428,39.90923],viewMode:"3D"})})}return w(()=>{t()}),{wrapRef:e}}});function v(e,r,t,n,o,p){return h(),M("div",{ref:"wrapRef",style:_({height:e.height,width:e.width})},null,4)}var x=l(k,[["render",v]]);export{x as default};