From 6b15766be92d1323180395a22f7da7d5cf3de5e9 Mon Sep 17 00:00:00 2001 From: billchen Date: Mon, 25 Mar 2024 14:33:11 +0800 Subject: [PATCH] feat: remove disabled from ChunkMethodModal --- .../knowledge-file/chunk-method-modal.tsx | 14 ++------------ .../components/knowledge-file/index.tsx | 1 - 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/web/src/pages/add-knowledge/components/knowledge-file/chunk-method-modal.tsx b/web/src/pages/add-knowledge/components/knowledge-file/chunk-method-modal.tsx index 10a3092519..0d9a5275b4 100644 --- a/web/src/pages/add-knowledge/components/knowledge-file/chunk-method-modal.tsx +++ b/web/src/pages/add-knowledge/components/knowledge-file/chunk-method-modal.tsx @@ -36,7 +36,6 @@ interface IProps extends Omit { parserId: string; parserConfig: IKnowledgeFileParserConfig; documentType: string; - disabled: boolean; } const hidePagesChunkMethods = ['qa', 'table', 'picture', 'resume', 'one']; @@ -46,7 +45,6 @@ const ChunkMethodModal: React.FC = ({ onOk, hideModal, visible, - disabled, documentType, parserConfig, }) => { @@ -96,7 +94,6 @@ const ChunkMethodModal: React.FC = ({ onOk={handleOk} onCancel={hideModal} afterClose={afterClose} - okButtonProps={{ disabled }} >
@@ -106,9 +103,7 @@ const ChunkMethodModal: React.FC = ({ key={x.value} checked={selectedTag === x.value} onChange={(checked) => { - if (!disabled) { - handleChange(x.value, checked); - } + handleChange(x.value, checked); }} > {x.label} @@ -120,12 +115,7 @@ const ChunkMethodModal: React.FC = ({ { -
+ {showPages && ( <> diff --git a/web/src/pages/add-knowledge/components/knowledge-file/index.tsx b/web/src/pages/add-knowledge/components/knowledge-file/index.tsx index c3edece59d..18f8475a79 100644 --- a/web/src/pages/add-knowledge/components/knowledge-file/index.tsx +++ b/web/src/pages/add-knowledge/components/knowledge-file/index.tsx @@ -231,7 +231,6 @@ const KnowledgeFile = () => { onOk={onChangeParserOk} visible={changeParserVisible} hideModal={hideChangeParserModal} - disabled={currentRecord.chunk_num > 0} loading={changeParserLoading} />