In vue3, when the route is the same, but the parameter quary is different, the jump will not be refreshed
When the path of the route is the same, but the quary is different, methods such as onMounted will not be executed during the jump, and the page will not be refreshed.
method:
Modify the router-view and add a key to the label on the app.vue page. When the key is different, it will be refreshed.
The complete code snippet is as follows
<template>
<router-view :key="route.fullPath"></router-view>
</template>
<script setup>
import { useRoute } from 'vue-router'
const route = useRoute()
</script>