SoFunction
Updated on 2025-04-05

Use vuex to store user information to localStorage instance

1. Create a new store folder, create a new index.js, and introduce vue and vuex. The code is as follows:

2. Store other status information in the same way.

3. Introduce store in main.js,

4. In the login component, as shown in the code:

5. First, you need to install vuex