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
伊谢尔伦2017-05-16 13:44:18
Actually, I just want to persist a piece of data. vuex is an option, and localstorage can also be used.