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

可以将自定义方法挂载在app实例下面吗 #35

Closed
wiexin opened this issue Nov 19, 2018 · 2 comments
Closed

可以将自定义方法挂载在app实例下面吗 #35

wiexin opened this issue Nov 19, 2018 · 2 comments

Comments

@wiexin
Copy link

wiexin commented Nov 19, 2018

在app的配置中挂载了自定义方法,页面中getApp后,没有该自定义方法。改用vue的mixins吗

@elcarim5efil
Copy link
Member

App 的注册已经由框架去管理了,应该采用 Vue 的开发模式,把方法放到 methods 中。你所需要的方法,是一定要挂载到 app 实例上吗?

@wiexin
Copy link
Author

wiexin commented Nov 19, 2018

@elcarim5efil 不是一定要挂在下面 只是觉得getapp一下去调用公共方法比引入方便

@wiexin wiexin closed this as completed Nov 19, 2018
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