How element implements the code jump menu.

I put a button here, how to click this button to jump to the corresponding menu item, or change the focus of the current menu

<template>
  <div id="app">
    <button @click="change()">3</button>
    <el-container>
      <el-aside>
        <el-row>
          <el-col>
            <el-menu default-active="1" class="el-menu-vertical-demo" background-color="-sharp545c64" text-color="-sharpfff" active-text-color="-sharpffd04b" router="true">
              <el-menu-item index="1" route="/">
                <i class="el-icon-location"></i>
                <span slot="title"></span>
              </el-menu-item>
              <el-menu-item index="2" route="/about">
                <i class="el-icon-menu"></i>
                <span slot="title">API</span>
              </el-menu-item>
              <el-menu-item index="3" :route="{name: "api"}">
                <i class="el-icon-document"></i>
                <span slot="title"></span>
              </el-menu-item>
              <el-menu-item index="4" :route="{name: "test"}">
                <i class="el-icon-setting"></i>
                <span slot="title"></span>
              </el-menu-item>
              <el-menu-item index="5" :route="{name: "todo"}">
                <i class="el-icon-setting"></i>
                <span slot="title">todo</span>
              </el-menu-item>
            </el-menu>
          </el-col>
        </el-row>
      </el-aside>
      <!--  -->
      <el-main>
        <router-view />
      </el-main>
    </el-container>

  </div>
</template>

<script>
export default {
  methods: {
    change() {
      console.log("");
    }
  }
};
</script>


<style>
</style>

Picture

Aug.01,2021

Hello, landlord! Try this.$router.push ({name: 'api'}) . If helpful, click to adopt ~

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