Vue routing configuration

is there anything wrong with me to configure routing like this? Why does clicking on page1 page2 not change the sub-route but jump the whole page?

Mar.29,2021

you try adding the name attribute to the child route, and then jump there and directly : to= {name: 'xxxx'} try this


because I wrote a VFF answer Alive.However, it is assumed in the route that the child node will inherit the attribute of the parent node


after adding a new page vue, to components, import the corresponding vue, under index.js of router and configure it in routes

 routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/demo1',
      name: 'Demo1',
      component: Demo1
    }
  ]

then make a route jump on the specified page.

<button
          target="_blank"
          @click="sendDemo1"
        >
          
        </button>

its corresponding route jump method

sendDemo1(){
      this.$router.push({
        path:'/demo1',
        name:'Demo1'
      })
    }
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-1e4c578-44eaf.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-1e4c578-44eaf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?