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

小程序运行时如何在console中查看globalData #761

Closed
yiliangxiajiao opened this issue Jan 12, 2018 · 4 comments
Closed

小程序运行时如何在console中查看globalData #761

yiliangxiajiao opened this issue Jan 12, 2018 · 4 comments

Comments

@yiliangxiajiao
Copy link

现在有一个调试需求,在globalData中绑定的值想要在console中实时打印他的值。wepy似乎把globalData留在了wepyApp的实例里,wxApp实例里没有这个量。而wepyApp目前不知道怎样在console中索引到。

有什么优雅的方式解决这个问题?

@Gcaufy
Copy link
Collaborator

Gcaufy commented Jan 13, 2018

this.$parent.globalData

globalData 只是一个自己定义的变量你想定义在wepy.app实例或者 wx App 实例都行。。

@Gcaufy Gcaufy closed this as completed Jan 13, 2018
@yiliangxiajiao
Copy link
Author

@Gcaufy

如果要定义在wxApp里的话就牵扯到定义wepyApp时如何拿到wxApp实例,我在 #753 提过这个问题

@Gcaufy
Copy link
Collaborator

Gcaufy commented Jan 14, 2018

已经fix了#753

@gzlboy
Copy link

gzlboy commented Aug 23, 2018

@Gcaufy 没解决呀?刚试了下不行

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

3 participants