Advanced use of Vue and localStorage
If you refresh, you will find that it has changed back to the original. We need to fix this bug.
- Because the project has to be taken apart in the enterprise. Two are defined, one for state and one for mutation
- state.js, localStorage is used here to determine whether there is a change.
- mutation.js
- Advanced usage, so that our shared data does not have to be so troublesome. Don’t use it. The
original is like this.
It can also be used like this. The
above is as follows