fix: login in safari browser has no effect (halo-dev/console#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/3445/head
Ryan Wang 2022-12-29 21:28:33 +08:00 committed by GitHub
parent 69ab794b6d
commit 955d5bf27b
1 changed files with 5 additions and 1 deletions

View File

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