【发布时间】:2018-08-29 01:51:43
【问题描述】:
在我的项目中使用 laravel elixir 来混合 JavaScript 文件。
在表单中,我必须使用主 Vue.js 元素来创建表单。另外我必须在父 Vue.js 元素中使用 vue-google-map 模板,但它显示错误?
window.VueGoogleMaps = require('vue2-google-maps');
var app = new Vue({
el: '#participantLocationListApp',
});
HTML:
<div class="panel panel-default card-view panel-refresh" id="participantLocationListApp">
<template>
<gmap-map:center="center" :zoom="1" style="width: 100%; height: 400px"> </gmap-map>
</template>
</div>
错误:
[Vue 警告]:未知的自定义元素:
<gmap-map>- 您是否正确注册了组件?对于递归组件,请确保提供“名称”选项。[Vue 警告]:未知的自定义元素:
<gmap-info-window>- 您是否正确注册了组件?对于递归组件,请确保提供“名称”选项。
【问题讨论】:
-
你的代码怎么样?
-
JS:
window.VueGoogleMaps = require('vue2-google-maps'); var app = new Vue({ el: '#participantLocationListApp',})HTML:<div class="panel panel-default card-view panel-refresh" id="participantLocationListApp"><template > <gmap-map:center="center" :zoom="1" style="width: 100%; height: 400px"> </gmap-map></template></div> -
@OshosanyaMichael
标签: vue.js vuejs2 laravel-5.4 vue-component laravel-elixir