fix: login in safari browser has no effect (#804)

#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

修复在 Safari 浏览器登录之后无反应的问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3002

#### Special notes for your reviewer:

测试方式:

1. 在 Safari 浏览器上测试登录之后是否有跳转到仪表盘即可。

#### Does this PR introduce a user-facing change?

```release-note
修复 Console 端在 Safari 浏览器登录之后无反应的问题
```
pull/805/head^2
Ryan Wang 2022-12-29 21:28:33 +08:00 committed by GitHub
parent a7341df0b5
commit 4cb3a72f51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -12,12 +12,16 @@ onBeforeMount(() => {
router.push({ name: "Dashboard" }); router.push({ name: "Dashboard" });
} }
}); });
function onLoginSucceed() {
window.location.reload();
}
</script> </script>
<template> <template>
<div class="flex h-screen flex-col items-center justify-center"> <div class="flex h-screen flex-col items-center justify-center">
<IconLogo class="mb-8" /> <IconLogo class="mb-8" />
<div class="login-form flex w-72 flex-col"> <div class="login-form flex w-72 flex-col">
<LoginForm @succeed="router.go(0)" /> <LoginForm @succeed="onLoginSucceed" />
</div> </div>
</div> </div>
</template> </template>