diff --git a/src/modules/system/plugins/composables/use-plugin.ts b/src/modules/system/plugins/composables/use-plugin.ts index 523e6190..373d7ce8 100644 --- a/src/modules/system/plugins/composables/use-plugin.ts +++ b/src/modules/system/plugins/composables/use-plugin.ts @@ -1,11 +1,19 @@ -import type { Ref } from "vue"; +import type { ComputedRef, Ref } from "vue"; import { computed } from "vue"; import type { Plugin } from "@halo-dev/api-client"; import cloneDeep from "lodash.clonedeep"; import { apiClient } from "@halo-dev/admin-shared"; import { useDialog } from "@halo-dev/components"; -export function usePluginLifeCycle(plugin: Ref) { +interface usePluginLifeCycleReturn { + isStarted: ComputedRef; + changeStatus: () => void; + uninstall: () => void; +} + +export function usePluginLifeCycle( + plugin: Ref +): usePluginLifeCycleReturn { const dialog = useDialog(); const isStarted = computed(() => {