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.942f3b33.js";import{av as u,a as l,s as m,M as h,o as w,h as M,bk as _,ak as k,i as v}from"./index.f9240906.js";const y="https://webapi.amap.com/maps?v=2.0&key=d7bb98e7185300250dd5f918c12f484b",b=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:y});function t(){return c(this,null,function*(){yield r(),yield k();const n=v(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 g(e,r,t,n,o,p){return w(),M("div",{ref:"wrapRef",style:_({height:e.height,width:e.width})},null,4)}var x=u(b,[["render",g]]);export{x as default};
|