Vue routing this.$router.push to jump to the same page does not refresh

I don't know if you have encountered repeated router.push to enter the same page, although the parameters passed by the url are different, the page will not refresh.

<template>
  <el-container>
      <header></header>
    <el-main >
        <router-view :key="$route.fullPath"></router-view>
    </el-main>
      <footer></footer>
  </el-container>
</template>

Within parent components may <router-view>label (node view) binding a key, to make a unique identifier to each node, this update DOM

Guess you like

Origin blog.csdn.net/weixin_44383354/article/details/107498529