You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.1 KiB
2 lines
1.1 KiB
var l=(e,s,t)=>new Promise((a,o)=>{var r=n=>{try{p(t.next(n))}catch(c){o(c)}},i=n=>{try{p(t.throw(n))}catch(c){o(c)}},p=n=>n.done?a(n.value):Promise.resolve(n.value).then(r,i);p((t=t.apply(e,s)).next())});import{useScript as u}from"./useScript-a219c7df.js";import{d,r as f,P as _,J as m,u as h,aT as w,o as g,g as B,a9 as M}from"./index-f4658ae7.js";const y="https://api.map.baidu.com/getscript?v=3.0&ak=OaBvYmKX3pjF7YFUFeeBCeGdy9Zp7xB2&services=&t=20210201100830&s=1",v=d({name:"BaiduMap",props:{width:{type:String,default:"100%"},height:{type:String,default:"calc(100vh - 78px)"}},setup(){const e=f(null),{toPromise:s}=u({src:y});function t(){return l(this,null,function*(){yield s(),yield m();const a=h(e);if(!a)return;const o=window.BMap,r=new o.Map(a),i=new o.Point(116.404,39.915);r.centerAndZoom(i,15),r.enableScrollWheelZoom(!0)})}return _(()=>{t()}),{wrapRef:e}}});function S(e,s,t,a,o,r){return g(),B("div",{ref:"wrapRef",style:M({height:e.height,width:e.width})},null,4)}const b=w(v,[["render",S]]),$=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"}));export{$ as _};
|