【发布时间】:2018-04-29 16:41:51
【问题描述】:
我正在尝试渲染一个简单的 vue js 组件 -
var infowindow_content = "<google-map-infowindow ";
infowindow_content += "content='Hello World'";
infowindow_content += "></google-map-infowindow>";
通过将其传递到标记的信息窗口
this.current_infowindow = new google.maps.InfoWindow({
content: infowindow_content,
});
this.current_infowindow.open(context.mapObject, marker);
vueJS 组件是 -
<template>
<div>
{{content}}
</div>
</template>
<script>
module.exports = {
name: 'google-map-infowindow',
props: [
'content',
],
}
</script>
但是,这不起作用,窗口是空白的。
【问题讨论】:
标签: javascript google-maps vue.js vuejs2