When you use el-menu router to jump to a secondary menu, the whole menu will be refreshed.

<template>
  <div id="app-aside" style="width: 20%;float: left;" >
        <el-menu
          router
          :default-active="$route.path"
          class="el-menu-vertical-demo"
          @select="getIndex">
          <el-menu-item index="/">
            <i class="el-icon-document"></i>
            <span slot="title"></span>
          </el-menu-item>

          <el-menu-item index="/currentfilter">
            <i class="el-icon-menu"></i>
            <span slot="title"></span>
          </el-menu-item>

          <el-submenu index="3" @click="openSpreadMenu">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span></span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/bwlistfilter"></el-menu-item>
              <el-menu-item index="3-2"></el-menu-item>
              <el-menu-item index="/intentiondetection"></el-menu-item>
              <el-menu-item index="3-3"></el-menu-item>
              <el-menu-item index="3-4"></el-menu-item>
              <el-menu-item index="3-5"></el-menu-item>
            </el-menu-item-group>
          </el-submenu>

          <el-menu-item index="4">
            <i class="el-icon-setting"></i>
            <span slot="title"></span>
          </el-menu-item>
        </el-menu>
  </div>
</template>

clipboard.png

Mar.05,2021

A rookie at the front end of the pit encountered this problem in 2020, and finally browsed the solution. It should be written in one of your parents < router-view >: key=''key' and this key is based on routing changes. Just remove
but remove some of your dependent routing changes. You may have to re-solve


no, no. Do not quite understand what you mean


put < router-view > < / router-view > on the right side, refresh the page according to router's path, not the whole page refresh


left side can use element-ui menu, right side use router-view display, you can only refresh part. That's what the official element-ui website does. http://element.eleme.io/-sharp/zh-.


how do you solve it? I have also encountered this problem


seeking the answer to the question for a long time


your routing nesting


Hello, have you solved the problem? can you share it

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