From 69ef07989245d60301dd3aacc8eebd4fd3ba429d Mon Sep 17 00:00:00 2001 From: TianTan Date: Wed, 23 Oct 2024 14:45:34 +0800 Subject: [PATCH] fix(entities-gateway-services): switch enable status fix (#1740) * fix(entities-gateway-services): switch enable status fix * fix(entities-plugins): switch enable status fix --- .../src/components/GatewayServiceList.vue | 5 ++--- .../entities/entities-plugins/src/components/PluginList.vue | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue b/packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue index bb7bafa531..e32b6557c7 100644 --- a/packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue +++ b/packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue @@ -416,12 +416,11 @@ const confirmSwitchEnablement = async () => { : await axiosInstance.patch(url, { ...switchEnablementTarget.value, enabled }) // Emit the success event for the host app emit('toggle:success', data) + // Update switchEnablementTarget + switchEnablementTarget.value.enabled = enabled } catch (e: any) { emit('error', e) } - - // Update switchEnablementTarget - switchEnablementTarget.value.enabled = enabled } /** diff --git a/packages/entities/entities-plugins/src/components/PluginList.vue b/packages/entities/entities-plugins/src/components/PluginList.vue index 7b8ea225ff..5dd3c78d73 100644 --- a/packages/entities/entities-plugins/src/components/PluginList.vue +++ b/packages/entities/entities-plugins/src/components/PluginList.vue @@ -574,12 +574,11 @@ const confirmSwitchEnablement = async () => { : await axiosInstance.patch(url, { ...switchEnablementTarget.value, enabled }, { timeout: 120000 }) // Emit the success event for the host app emit('toggle-enabled', enabled, data) + // Update switchEnablementTarget + switchEnablementTarget.value.enabled = enabled } catch (e: any) { emit('error', e) } - - // Update switchEnablementTarget - switchEnablementTarget.value.enabled = enabled } /**