1. This is the tag code " < div id=" cellMap "> < / div >
2 for me to render Baidu map, and this is the code for me to click the button to display the modal box: `
handleCreate () {
console.log(1232);
this.centerDialogVisible = true;
//console.log(document.getElementById("cellMap"));
this.cellMap()
//setInterval(this.cellInfMap(),2000);
},`
3. This is how I render Baidu map: `
cellMap () {
// API
var map = new BMap.Map("cellMap");
var point = new BMap.Point(116.404, 39.915);
map.centerAndZoom(point, 15);
var marker = new BMap.Marker(point); //
map.addOverlay(marker); //
},`
4, my problem now is to click the button twice to render Baidu map, declare the modal box when mounting, and there is no Baidu map in the method of calling Baidu map in mounted (). Which god can tell me how to solve it?