fix(translate): 为OCR处理消息添加无限持续时间

防止OCR处理过程中消息自动消失,确保用户明确知道处理状态
This commit is contained in:
icarus 2025-08-22 18:42:41 +08:00
parent 377d75366e
commit 97435c9294

View File

@ -440,7 +440,7 @@ const TranslatePage: FC = () => {
try {
const [file] = await onSelectFile({ multipleSelections: false })
if (isSupportedOcrFile(file)) {
window.message.loading({ content: t('ocr.processing'), key: 'translate_ocr_processing' })
window.message.loading({ content: t('ocr.processing'), key: 'translate_ocr_processing', duration: 0 })
const ocrResult = await ocr(file)
setText(ocrResult.text)
} else {