Ver código fonte

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 meses atrás
pai
commit
30065e2f43
Nenhuma conta vinculada ao e-mail do autor do commit

+ 7
- 6
web/src/pages/user-setting/setting-model/ollama-modal/index.tsx Ver arquivo

@@ -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';

Carregando…
Cancelar
Salvar