Vue-cli returns data asynchronously in index.js and cannot get it on another page.

the vue-cli, used by the project is asynchronously returned to the logged-in user"s information in index.js and stored in this.$store.status,

index.js
clipboard.png

mountedundefined

clipboard.png
what to do at this time

Mar.24,2021

get


loginUser is placed in computed to receive user information


because the requirement is expanded to save information after refresh, so use localStorage to access data

Menu