在element對話框中使用地圖插件時,會出現首次不會加載成功,這時使用$nextTick初始化地圖插件即可
new_data() {
this.centerDialogVisible =true
// 在這裏使用$nextTick初始化地圖插件即可
this.$nextTick(() => {
this.init()
});
},