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 {