第一次openInfoWindow后,总是报Cannot find element: #test,之后即使vue component destroyed再mounted都不会出现这种情况。页面刷新会。
setTimeout(function() {
var com = new Vue({
el: '#TestTips',
template: '<test-tips></test-tips>',
components: {
TestTips
}
})
}, 0)
用setTimeout的话,新增的内容不能撑开div高度
通过设置openInfoWindow高度可以解决,但怎么让高度自适应