From f96aa5152618049141de79c7e92d9cf713fa0ab3 Mon Sep 17 00:00:00 2001 From: zhouhaibin Date: Wed, 25 Jun 2025 10:48:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AC=AC=E4=BA=8C=E6=AC=A1?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E5=AD=97=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UniversalResultDrawer.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/UniversalResultDrawer.vue b/src/components/UniversalResultDrawer.vue index a75f5cd..fb69e9d 100644 --- a/src/components/UniversalResultDrawer.vue +++ b/src/components/UniversalResultDrawer.vue @@ -889,14 +889,14 @@ checkForPageModal(); }, 300); // 等待弹窗显示 } catch (error) { - console.error('完整文本定位失败,尝试使用前10个字符定位:', error); + console.error('完整文本定位失败,尝试使用前20个字符定位:', error); // 如果完整文本定位失败,尝试用前10个字符再次定位 - const shortText = text.trim().substring(0, 10); + const shortText = text.trim().substring(0,25); if (shortText && shortText !== text.trim()) { try { - console.log('使用前10个字符进行定位:', shortText); - message.warning('完整文本定位失败,尝试使用前10个字符定位'); + console.log('使用前25个字符进行定位:', shortText); + message.warning('完整文本定位失败,尝试使用前25个字符定位'); await pdfContainerRef.value.locateByText(shortText, pdfSource); // 延迟检查是否出现了页面选择弹窗 @@ -904,7 +904,7 @@ checkForPageModal(); }, 300); // 等待弹窗显示 } catch (shortError) { - console.error('前10个字符定位也失败:', shortError); + console.error('前25个字符定位也失败:', shortError); message.warning('文本定位失败,该内容可能不在PDF中'); } } else {