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

如何在单文件js中响应式的获取数据 #572

Open
leehave opened this issue Sep 24, 2020 · 2 comments
Open

如何在单文件js中响应式的获取数据 #572

leehave opened this issue Sep 24, 2020 · 2 comments

Comments

@leehave
Copy link

leehave commented Sep 24, 2020

比如我封装了一个http请求库,授权登陆后将token发布全局并存储起来,这个时期在http.js中并没有相应式的获取到

@dntzhang
Copy link
Collaborator

可以把 store import 到 http.js 里去?

@leehave
Copy link
Author

leehave commented Sep 25, 2020

可以把 store import 到 http.js 里去?

可以啊,在js文件中可以获取到store.data里的数据

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