fix: not reload page after upgrading a plugin (#3781)

#### What type of PR is this?

/kind bug
/area console
/milestone 2.5.x

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

修复升级插件之后没有自动刷新页面的问题,一般情况来说,升级插件之后需要重载插件 Console 部分的资源。

#### Special notes for your reviewer:

测试方式:

1. 以 deployment 模式启动 Halo
2. 测试升级插件之后是否有正常刷新页面

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

```release-note
修复 Console 端升级插件之后没有自动刷新页面的问题。
```
pull/3822/head
Ryan Wang 2023-04-23 11:37:39 +08:00 committed by GitHub
parent eec1d0758e
commit c6f0ac7e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,8 @@ const endpoint = computed(() => {
const onUploaded = async (response: SuccessResponse) => {
if (props.upgradePlugin) {
handleVisibleChange(false);
Toast.success(t("core.common.toast.upgrade_success"));
window.location.reload();
return;
}