How to initialize switching routing data in vuex

topic description

A single-page application for vue family buckets, using vuex for the first time. The problem now is that on page A, one state of moduleA is 1, and now I change 1 to 2;
when I switch to page B and back to page A, the state is still 2. Is there any way to make state 1

every time you enter the A page?
Mar.28,2021

store all the data in the store of vuex. After the interview, first take out the data of store to initialize, and then render


1. Do you want to enter page 1 or render 1
2 for the first time? If entering the page is 1, you should judge the route in the beforeEach of router, and then deal with
3. If it is 1 when rendering, then commit it and change state to 1 in created

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b6c0-2c29c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b6c0-2c29c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?