Gaode.75ee5707.js 957 B

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