javascript - When does vue request data to save global variables?
某草草
某草草 2017-05-16 13:42:18
0
3
687

The business needs to request the dictionary in the background data and save it as a global variable first.
I initially thought that app.vue should be created first, and then the component, so when I put the request data in created in the app, I found that the dictionary data in the component was still in the initial state. I found that their rendering order is that the component is rendered first and then app.vue
How can I get this dictionary in each component? I don’t want to request each component again

某草草
某草草

reply all(3)
伊谢尔伦

Actually, I just want to persist a piece of data. vuex is an option, and localstorage can also be used.

淡淡烟草味

Is vuex useful?

世界只因有你

Integrate vuex

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!