2017-10-16 61 views
0

我使用vue2谷歌地圖組件在Vue他們是workng罰款。 但如果我嘗試在數據返回谷歌創建對象或計算像ReferenceError:谷歌沒有定義VUE

new google.maps.Point(20,40) 

ReferenceError: google is not defined
at VueComponent.data (app.js:sourcemap:69896)
at getData (app.js:sourcemap:6550)
at initData (app.js:sourcemap:6509)
at initState (app.js:sourcemap:6440)
at VueComponent.Vue._init (app.js:sourcemap:7611)
at new VueComponent (app.js:sourcemap:7783)
at createComponentInstanceForVnode (app.js:sourcemap:7060)
at init (app.js:sourcemap:6877)
at createComponent (app.js:sourcemap:8532)
at createElm (app.js:sourcemap:8475)

+0

這錯誤意味着'google'對象並不在你訪問它的範圍限定。你在哪裏以及如何定義「谷歌」?你正在使用'

相關問題