Block created execution of router-view

  1. Click a menu on the left
  2. when judging that there is a certain sessionStorage value in the beforeCreate of index.vue
  3. if not, the route jumps to a selection page

(due to the complexity of the project, router interception cannot be written in the overall project, but can only be judged in the subitem destination index.vue)

all the above steps have been implemented, but there is a problem: the created of the menu page that
enters for the first time is executed, and there is the logic of API request, which is equivalent to sending multiple requests
asking: how to prevent the execution of created in the router-view of the page

Mar.28,2021

In-Component Guards

ide/advanced/navigation-guards.html-sharpper-route-guard" rel=" nofollow noreferrer "> beforeRouteEnter


has been solved. The direction is wrong. In dom, v-if directly controls router-view not to render before it has a value.

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-1b3e858-2b968.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-1b3e858-2b968.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?