The difference between watch and computer in vue, the problem of getting the value when the route is redirected.

The following tree directory is used in the

project, each using the same route at the same level, and rendering different pages according to the routing parameters.

in the tree directory, clicking on each node will commit the current node information to the currentNode of vuex. Now I update the current node information in the component to get the id; of node.
there is a problem that I can"t figure out:
is going to use

at the beginning.
    watch: {
         $route(val, newval){
          //URLnodeId
        }
    }

but watch works when you click on nodes at the same level to jump, but watch does not take effect when you click on nodes at different levels.

then use the computer calculation property in the component to obtain the id; in real time through the global node information of Vuex.

computed: {
        currentNode(){
            return this.$store.state.currentNode
        }
    }

excuse me, why is this?

Oct.13,2021
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-1b3e07a-347a8.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-1b3e07a-347a8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?