2 lines
1.1 KiB
Java
2 lines
1.1 KiB
Java
var u=(e,s,t)=>new Promise((o,a)=>{var r=n=>{try{p(t.next(n))}catch(c){a(c)}},i=n=>{try{p(t.throw(n))}catch(c){a(c)}},p=n=>n.done?o(n.value):Promise.resolve(n.value).then(r,i);p((t=t.apply(e,s)).next())});import{useScript as l}from"./useScript-C72wCufT.js";import{e as m,o as d,r as f,n as h,u as w,C as B,z as _,T as M}from"./vue-vendor-DNhG1Cve.js";import{au as g}from"./index-X7Y8jykP.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";const y="https://api.map.baidu.com/getscript?v=3.0&ak=OaBvYmKX3pjF7YFUFeeBCeGdy9Zp7xB2&services=&t=20210201100830&s=1",v=m({name:"BaiduMap",props:{width:{type:String,default:"100%"},height:{type:String,default:"calc(100vh - 78px)"}},setup(){const e=f(null),{toPromise:s}=l({src:y});function t(){return u(this,null,function*(){yield s(),yield h();const o=w(e);if(!o)return;const a=window.BMap,r=new a.Map(o),i=new a.Point(116.404,39.915);r.centerAndZoom(i,15),r.enableScrollWheelZoom(!0)})}return d(()=>{t()}),{wrapRef:e}}});function S(e,s,t,o,a,r){return _(),B("div",{ref:"wrapRef",style:M({height:e.height,width:e.width})},null,4)}const F=g(v,[["render",S]]);export{F as default};
|