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

getApp() 小程序中拿不到App.vue里面写的函数 #665

Closed
cccisbug opened this issue Aug 13, 2019 · 3 comments
Closed

getApp() 小程序中拿不到App.vue里面写的函数 #665

cccisbug opened this issue Aug 13, 2019 · 3 comments
Assignees

Comments

@cccisbug
Copy link

问题描述
小程序中getApp() 除了globalData,还有函数公用。原生小程序getApp()可以拿到自定义的函数。uni中拿不到App.vue里面写的函数

复现步骤
[复现问题的步骤]

  1. 启动 '...'
  2. 点击 '....'
  3. 查看

[或者可以直接贴源代码]

预期结果
getApp()可以拿到自定义的函数,或者是不应该写在App.vue里面么?

实际结果
拿不到

系统信息:

  • 发行平台: [微信小程序]
  • 操作系统 [iOS 12.1.2]
  • HBuilderX版本 [2.1.3.20190723]
  • uni-app版本 [如使用Vue-cli创建/运行项目,则提供npm run info的运行结果]
  • 设备信息 [如 iPhone8 Plus]

补充信息
[可选]
[根据你的分析,出现这个问题的原因可能在哪里?]

@liuxiaoyucc
Copy link

我也遇到这个情况,请问您有解决吗?

@zhangdaren
Copy link

最新版支持了(其实可以通过this.globalData()的方式)

@AlvinLeeX
Copy link

刚遇到这个bug就修复了爽的一批

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

6 participants