From c6f0ac7e7123a5481a895d30b7fd7885c0c2a310 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Sun, 23 Apr 2023 11:37:39 +0800 Subject: [PATCH] fix: not reload page after upgrading a plugin (#3781) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### 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 端升级插件之后没有自动刷新页面的问题。 ``` --- .../modules/system/plugins/components/PluginUploadModal.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/console/src/modules/system/plugins/components/PluginUploadModal.vue b/console/src/modules/system/plugins/components/PluginUploadModal.vue index 06f368233..85c0407b7 100644 --- a/console/src/modules/system/plugins/components/PluginUploadModal.vue +++ b/console/src/modules/system/plugins/components/PluginUploadModal.vue @@ -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; }