2 lines
1.1 KiB
Java
2 lines
1.1 KiB
Java
var d=(t,s,e)=>new Promise((o,n)=>{var r=a=>{try{p(e.next(a))}catch(c){n(c)}},i=a=>{try{p(e.throw(a))}catch(c){n(c)}},p=a=>a.done?o(a.value):Promise.resolve(a.value).then(r,i);p((e=e.apply(t,s)).next())});import{d as m,o as u,f,n as l,u as h,ar as w,as as B,aB as _}from"./vue-vendor-C7Zq48Yl.js";import{useScript as M}from"./useScript-DHPKH1A9.js";import{d as g}from"./index-BI6CMai0.js";import"./antd-vue-vendor-BPnV8VqP.js";import"./vxe-table-vendor-B88kchpX.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 t=f(null),{toPromise:s}=M({src:y});function e(){return d(this,null,function*(){yield s(),yield l();const o=h(t);if(!o)return;const n=window.BMap,r=new n.Map(o),i=new n.Point(116.404,39.915);r.centerAndZoom(i,15),r.enableScrollWheelZoom(!0)})}return u(()=>{e()}),{wrapRef:t}}});function S(t,s,e,o,n,r){return B(),w("div",{ref:"wrapRef",style:_({height:t.height,width:t.width})},null,4)}const R=g(v,[["render",S]]);export{R as default};
|