0
Imはnuxtに新しく、外部ソース(この場合はgoogle api)を使用しようとしています。参照の後:https://nuxtjs.org/faq/私はスクリプトが私のindex.htmlの先頭に追加されていることがわかります。しかし、私はそれをどのように使うのですか?Nuxt外部ソース
mounted: function() {
const element = document.getElementById(this.mapName)
const options = {
zoom: 14,
center: new google.maps.LatLng(51.501527, -0.1921837)
}
const map = new google.maps.Map(element, options)
}
しかし、私はエラーを取得する:
現在、私はマウントされた場合にこれを持って
'google' is not defined
感謝を!