path 를 "/abc/:id" 와 같은 식으로 정의하고, "/abc/1" 페이지에서 "/abc/2" 페이지를 호출하려는 경우에 페이지가 리로드되지 않는다. 이런 경우, 아래와 같이 해주면 해결될 것이다.

 

<template>
  <router-view :key="route.fullPath" />
</template>

<script setup>
import { useRoute } from "vue-router";
const route = useRoute();
</script>

 

+ Recent posts