Baidu-50ee6813.js 1.14 KB
var d=(e,s,t)=>new Promise((n,o)=>{var r=a=>{try{p(t.next(a))}catch(c){o(c)}},i=a=>{try{p(t.throw(a))}catch(c){o(c)}},p=a=>a.done?n(a.value):Promise.resolve(a.value).then(r,i);p((t=t.apply(e,s)).next())});import{d as u,k as l,o as m,q as f,u as h,_ as w,$ as _,ag as B}from"./vue-5a35c3f5.js";import{u as g}from"./useScript-d37a3874.js";import{_ as v}from"./index.js";import"./antd-6b087f69.js";const M="https://api.map.baidu.com/getscript?v=3.0&ak=OaBvYmKX3pjF7YFUFeeBCeGdy9Zp7xB2&services=&t=20210201100830&s=1",y=u({name:"BaiduMap",props:{width:{type:String,default:"100%"},height:{type:String,default:"calc(100vh - 78px)"}},setup(){const e=l(null),{toPromise:s}=g({src:M});function t(){return d(this,null,function*(){yield s(),yield f();const n=h(e);if(!n)return;const o=window.BMap,r=new o.Map(n),i=new o.Point(116.404,39.915);r.centerAndZoom(i,15),r.enableScrollWheelZoom(!0)})}return m(()=>{t()}),{wrapRef:e}}});function k(e,s,t,n,o,r){return w(),_("div",{ref:"wrapRef",style:B({height:e.height,width:e.width})},null,4)}const F=v(y,[["render",k],["__file","E:/allcode/erp/test7901/order-erp-front/src/views/demo/charts/map/Baidu.vue"]]);export{F as default};