소스 검색

Fix: EsLint Problem of index.tsx (#8710)

'handleOk' was used before it was
defined.eslint@typescript-eslint/no-use-before-define

### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.20.0
Fee He 3 달 전
부모
커밋
30065e2f43
No account linked to committer's email address
1개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  1. 7
    6
      web/src/pages/user-setting/setting-model/ollama-modal/index.tsx

+ 7
- 6
web/src/pages/user-setting/setting-model/ollama-modal/index.tsx 파일 보기

@@ -50,12 +50,6 @@ const OllamaModal = ({

const { t } = useTranslate('setting');

const handleKeyDown = async (e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
await handleOk();
}
};

const handleOk = async () => {
const values = await form.validateFields();
const modelType =
@@ -73,6 +67,13 @@ const OllamaModal = ({

onOk?.(data);
};

const handleKeyDown = async (e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
await handleOk();
}
};
const url =
llmFactoryToUrlMap[llmFactory as LlmFactory] ||
'https://github.com/infiniflow/ragflow/blob/main/docs/guides/models/deploy_local_llm.mdx';

Loading…
취소
저장