我使用 webpack 和 vue.js 2 和 vue-google-maps 。
我有一个问题,我需要通过prop
呈现vue-template
传递到谷歌地图组件。
e.g。
<gmap-info-window
:options="infoOptions"
:position="infoWindowPos"
:opened="infoWinOpen"
:content="infoContent"
@closeclick="infoWinOpen=false">
</gmap-info-window>
我需要传递给:content
道具。类似的东西:
<p>
Some Name
<a :href="some.url" target="_blank" @click="myFunction('param1', $route.name, param2)">some link</a>
<p>
基本上我需要infoContent
成为上面的vue编译版本。我可以获得模板,例如通过做:
this.infoContent = myTemplate;
但是,如果我添加.render()
,我只会获得模板的原始未渲染版本,我开始收到有关_vm._self is undefined"
的错误