diff --git a/ui/src/views/knowledge-detail/context.ts b/ui/src/views/knowledge-detail/context.ts index 95800233965..56c9063c07e 100644 --- a/ui/src/views/knowledge-detail/context.ts +++ b/ui/src/views/knowledge-detail/context.ts @@ -239,7 +239,7 @@ export function provideKnowledgeDetailContext(state: KnowledgeDetailState) { return context } -/** 根据消费方声明的范围,从现有完整 API 对象推导类型,不补造方法。 */ +/** 根据声明的范围,从现有完整 API 对象推导类型,不补造方法。 */ type ScopedResourceApi = { readonly [Module in keyof KnowledgeResourceApi]: Scope extends ResourceScope ? Module extends keyof (typeof resourceConfigs)[Scope]['resourceApi'] diff --git a/ui/src/views/knowledge-detail/library/document/import-document/WorkflowImportDocumentDrawer.vue b/ui/src/views/knowledge-detail/library/document/import-document/WorkflowImportDocumentDrawer.vue index 2a641370c9e..1ba35c72a26 100644 --- a/ui/src/views/knowledge-detail/library/document/import-document/WorkflowImportDocumentDrawer.vue +++ b/ui/src/views/knowledge-detail/library/document/import-document/WorkflowImportDocumentDrawer.vue @@ -60,7 +60,6 @@ const userInputTitle = computed(() => knowledgeBaseNode.value?.properties?.user_ const showNext = computed(() => hasKnowledgeBaseInput.value && active.value === 'data_source') const showPrev = computed(() => hasKnowledgeBaseInput.value && active.value === 'knowledge_base') const showImport = computed(() => (hasKnowledgeBaseInput.value ? active.value === 'knowledge_base' : active.value === 'data_source')) -const busy = computed(() => loading.value || uploadingCount.value > 0) function open(workflow?: LogicFlow.GraphConfigData) { currentWorkflow.value = workflow ?? null visible.value = true @@ -80,7 +79,7 @@ function getActionData() { return data } function handleNext() { - if (busy.value) return + if (loading.value || uploadingCount.value > 0) return return actionRef.value ?.validate() .then(() => { @@ -94,12 +93,12 @@ function handleNext() { }) } function handlePrevious() { - if (busy.value) return + if (loading.value || uploadingCount.value > 0) return formPayload.value.knowledge_base = actionRef.value?.getData() ?? {} active.value = 'data_source' } function handleSubmit() { - if (busy.value || active.value === 'result' || !actionRef.value) return + if (loading.value || uploadingCount.value > 0 || active.value === 'result' || !actionRef.value) return const step = active.value loading.value = true return actionRef.value @@ -122,7 +121,7 @@ function handleSubmit() { }) } function handleContinueImport() { - if (busy.value) return + if (loading.value || uploadingCount.value > 0) return formPayload.value = { data_source: {}, knowledge_base: {} } actionId.value = undefined actionKey.value += 1 @@ -160,13 +159,13 @@ defineExpose({ open })