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,?