Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vue warn]: Property or method "amap" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. #77

Closed
zpyas opened this issue Mar 28, 2017 · 1 comment

Comments

@zpyas
Copy link

zpyas commented Mar 28, 2017

Hi,
我是用vue init出来的项目,按照官方文档上修改了main.js文件
mainjs

还有Map的文件
amap

编译的时候没有问题,打开页面后出现了
[Vue warn]: Property or method "amap" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
这个提示

版本如下:
"vue": "^2.2.2",
"vue-amap": "^0.2.3",
"vue-router": "^2.2.0"

想问一下,是我哪个地方设置不正确么?
谢谢

@cottom
Copy link
Contributor

cottom commented Mar 28, 2017

@zpyas 你在组件上设置了属性amap-vue(变量其实也不能这样写,所以识别到 amap),在props或者 data并没有该属性, 去看下vue的 v-bind指令的使用

@cottom cottom closed this as completed Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants