import { useRouter } from "vue-router";
...
const router = useRouter();
const routeHistory = history.length - 1;
if (routeHistory > 1) {
router.go(-routeHistory);
}
vue3.0清空历史记录history
于 2023-08-03 17:15:35 首次发布
import { useRouter } from "vue-router";
...
const router = useRouter();
const routeHistory = history.length - 1;
if (routeHistory > 1) {
router.go(-routeHistory);
}