Vue-router Positioning to Anchor Point problem

the scrollBehavior implementation of vue-router is used in the project to navigate to the anchor point, which is already used under history mode. The address bar is already localhost:8080/home/basicInfo-sharpvideo, but it is not immediately located but needs to be refreshed to locate the location of the video. No, no, no.
the configuration of scrollBehavior is official: https://github.com/vuejs/vue-.

roughly speaking, there is a parent menu in the parent component to toggle the content displayed in the router-view, while the child menu is to locate the component in the router-view

Mar.03,2021

according to ide/advanced/scroll-behavior.html-sharp%E6%BB%9A%E5%8A%A8%E8%A1%8C%E4%B8%BA" rel=" nofollow noreferrer "> Vue Router scrolling behavior and example :

const scrollBehavior = function (to, from, savedPosition) {
  if (to.hash) {
    return {
      //  to.hash 
      selector: to.hash
    }
  }
}
const router = new Router({
  routes: routers,
  mode: 'history',
  base: '/',
  scrollBehavior
})

in the menu of the parent component:

<router-link :to="/xxx-sharp0">00000</router-link>
<router-link :to="/xxx-sharp1">00000</router-link>

in the corresponding module of the subcomponent:

<div class="moudle" id="0"></div>
<div class="moudle" id="1"></div>

this enables anchor positioning in history mode.

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