Problem description:
If you use F5 to press F5 to brush the Vue single page, the data will be restored to the initial stage. How can this be broken?
Solution:
((mutation, state) => { ('mobileState', (state)); }) if (('mobileState')) { state = (('mobileState')); } else { state = stateOrg; }
ps: Let's take a look at the reason why the parent component of Vue cannot receive the $emit event of the child component
There are usually two situations:
1. Event names are not all lowercase. Event names require all lowercase.
2. Not a father-son relationship. The father-son relationship here is a strict father-son relationship, and the grandparent-grandson relationship is not good either. It can only be triggered layer by layer, which can easily fall into the pit when writing tree components.