fix: 修复 useRouterBack 函数以正确使用 router.replace 替代 router.back

This commit is contained in:
2025-12-22 17:19:53 +07:00
parent 3f848de1bc
commit 65ad60d0d2

View File

@@ -2,7 +2,7 @@ import { router } from "@/router";
export function useRouterBack() {
if (window.history.state.back) {
router.back();
router.replace(window.history.state.back);
}
else {
router.replace("/");