From c9a21957cd42ef7b5897b4928c2ae0b4bfa903a1 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 27 Jul 2022 17:45:26 +0800 Subject: [PATCH] refactor: isStarted variable on the plugin detail page Signed-off-by: Ryan Wang --- src/modules/system/plugins/PluginDetail.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/modules/system/plugins/PluginDetail.vue b/src/modules/system/plugins/PluginDetail.vue index e493ad7b..7dc4fde2 100644 --- a/src/modules/system/plugins/PluginDetail.vue +++ b/src/modules/system/plugins/PluginDetail.vue @@ -9,11 +9,7 @@ import { rbacAnnotations } from "@/constants/annotations"; import { usePluginLifeCycle } from "./composables/use-plugin"; const plugin = inject>("plugin", ref({} as Plugin)); -const { changeStatus } = usePluginLifeCycle(plugin); - -const isStarted = computed(() => { - return plugin.value.status?.phase === "STARTED" && plugin.value.spec.enabled; -}); +const { changeStatus, isStarted } = usePluginLifeCycle(plugin); // TODO 临时解决方案 interface RoleTemplateGroup {