From 57f4f2226ff72843b8a063eb6b0eb206a09025c8 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 19 Dec 2022 11:26:10 +0800 Subject: [PATCH] perf: merge plugin uninstallation options button (#779) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: 合并卸载插件的选项。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2978 #### Screenshots: before: ![image](https://user-images.githubusercontent.com/21301288/208060524-fa9de196-ccd2-43dc-82e7-21eefddec44b.png) after: image #### Special notes for your reviewer: 测试方式: 1. 测试插件卸载的两种选项是否功能正常。 #### Does this PR introduce a user-facing change? ```release-note 优化 Console 端的插件卸载选项布局 ``` --- .../plugins/components/PluginListItem.vue | 31 +++++++++++++++---- .../system/plugins/composables/use-plugin.ts | 4 ++- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/modules/system/plugins/components/PluginListItem.vue b/src/modules/system/plugins/components/PluginListItem.vue index 6f2a7c7a..2522ecc3 100644 --- a/src/modules/system/plugins/components/PluginListItem.vue +++ b/src/modules/system/plugins/components/PluginListItem.vue @@ -132,12 +132,31 @@ const onUpgradeModalClose = () => { > 升级 - - 卸载 - - - 卸载并删除配置 - + + 卸载 + + diff --git a/src/modules/system/plugins/composables/use-plugin.ts b/src/modules/system/plugins/composables/use-plugin.ts index ba5316d0..9f1325df 100644 --- a/src/modules/system/plugins/composables/use-plugin.ts +++ b/src/modules/system/plugins/composables/use-plugin.ts @@ -55,7 +55,9 @@ export function usePluginLifeCycle( : "确定要卸载该插件吗?" }`, description: `${ - enabled ? "当前插件还在启用状态,将在停止运行后卸载。" : "" + enabled + ? "当前插件还在启用状态,将在停止运行后卸载,该操作不可恢复。" + : "该操作不可恢复。" }`, confirmType: "danger", confirmText: `${enabled ? "停止运行并卸载" : "卸载"}`,