2 lines
1.0 KiB
Java
2 lines
1.0 KiB
Java
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{useScript as d}from"./useScript-C72wCufT.js";import{e as m,o as u,r as l,n as w,u as h,C as M,z as _,T as y}from"./vue-vendor-DNhG1Cve.js";import{au as g}from"./index-X7Y8jykP.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";const A="https://webapi.amap.com/maps?v=2.0&key=06313eb9c6563b674a8fd789db0692c3",b=m({name:"AMap",props:{width:{type:String,default:"100%"},height:{type:String,default:"calc(100vh - 78px)"}},setup(){const e=l(null),{toPromise:r}=d({src:A});function t(){return c(this,null,function*(){yield r(),yield w();const n=h(e);if(!n)return;const o=window.AMap;new o.Map(n,{zoom:11,center:[116.397428,39.90923],viewMode:"3D"})})}return u(()=>{t()}),{wrapRef:e}}});function k(e,r,t,n,o,i){return _(),M("div",{ref:"wrapRef",style:y({height:e.height,width:e.width})},null,4)}const R=g(b,[["render",k]]);export{R as default};
|