解决办法:修改router-view,在app.vue页面给标签加key,当key不同时,就会刷新。
<script setup lang="ts">
import { RouterView, useRoute } from "vue-router"
const route = useRoute()
</script>
<template>
<RouterView :key="route.path" />
</template>
<style></style>
解决办法:修改router-view,在app.vue页面给标签加key,当key不同时,就会刷新。
<script setup lang="ts">
import { RouterView, useRoute } from "vue-router"
const route = useRoute()
</script>
<template>
<RouterView :key="route.path" />
</template>
<style></style>