Invalid vue + el-menu route jump

RT, follows the official website of element, but it is not valid to use index to do the jump. I wonder if there is any solution. I don"t want to jump with router-link or .

<el-row class="tac">
  <el-col :span="12">
    <h5></h5>
    <el-menu
      default-active="$route.path"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span></span>
        </template>
        <el-menu-item-group>
          <template slot="title"></template>
          <el-menu-item index="/test1">1</el-menu-item>
          <el-menu-item index="/test2">2</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group title="2">
          <el-menu-item index="1-3">3</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
    
    </el-menu>
  </el-col>
routes: [
    {
      path: "/test1",
      name:"Test1",
      component: Test1
    },
    {
      path:"/test2",
      name:"Test2",
      component: Test2
    },
    ...

default active and index are as above, but how to do it if you can"t tune test1 and test2,?

Mar.13,2021

add router attribute to el-menu. It is recommended to take a look at the official document


whether router uses vue-router mode. Enabling this mode will route to jump with index as path when navigation is activated

set this property to true

element official website

Menu