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} />