@koi-br/ocr-web-sdk 1.0.27 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/preview/index.vue CHANGED
@@ -488,9 +488,9 @@ defineExpose({
488
488
  if (fileType.value === 'pdf' && pdfPreviewRef.value) {
489
489
  return pdfPreviewRef.value.jumpToPosition(pageNum, bbox, emitEvent);
490
490
  }
491
- // 图片预览的定位方法(不需要 pageNum)
491
+ // 图片预览的定位方法(现在也支持 pageNum)
492
492
  if (fileType.value === 'image' && imagePreviewRef.value) {
493
- return imagePreviewRef.value.jumpToPosition(bbox, emitEvent);
493
+ return imagePreviewRef.value.jumpToPosition(pageNum, bbox, emitEvent);
494
494
  }
495
495
  },
496
496
  getCurrentPage: () => pdfPreviewRef.value?.getCurrentPage(),
@@ -498,8 +498,8 @@ defineExpose({
498
498
  // 图片预览的代理方法
499
499
  resetImage: () => imagePreviewRef.value?.reset(),
500
500
  resetTif: () => tifPreviewRef.value?.reset(),
501
- // 图片预览的定位方法(直接调用,不需要 pageNum)
502
- jumpToImagePosition: (bbox, emitEvent) => imagePreviewRef.value?.jumpToPosition(bbox, emitEvent),
501
+ // 图片预览的定位方法(已废弃,请使用 jumpToPosition,需要传入 pageNum)
502
+ jumpToImagePosition: (pageNum, bbox, emitEvent) => imagePreviewRef.value?.jumpToPosition(pageNum, bbox, emitEvent),
503
503
  });
504
504
 
505
505
  // 组件销毁时清理资源