@koi-br/ocr-web-sdk 1.0.11 → 1.0.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koi-br/ocr-web-sdk",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "一个支持多种Office文件格式预览的Vue3组件SDK,包括PDF、Word、Excel、图片、OFD、TIF等格式",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -8,10 +8,9 @@
8
8
  <p class="preview-loading-title">正在加载文档...</p>
9
9
  </div>
10
10
  <!-- 工具栏 -->
11
- <div class="preview-toolbar preview-toolbar-right">
11
+ <div class="preview-toolbar preview-toolbar-right" v-if="isDownload">
12
12
  <div class="toolbar-group">
13
13
  <ATooltip
14
- v-if="isDownload"
15
14
  mini
16
15
  position="bottom"
17
16
  content="下载"
@@ -208,10 +207,3 @@ defineExpose({
208
207
  rotate
209
208
  });
210
209
  </script>
211
-
212
- <style lang="less" scoped>
213
- // 样式已统一到公共样式文件,这里只保留组件特定样式
214
- :deep(.docx-wrapper) {
215
- background-color: #fff;
216
- }
217
- </style>
package/preview/index.vue CHANGED
@@ -322,6 +322,7 @@ const preview = async (file, fileName, options = {}) => {
322
322
 
323
323
  fileType.value = type;
324
324
  fileUrl.value = URL.createObjectURL(file);
325
+ downloadUrl.value = fileUrl.value; // 设置下载 URL,用于下载功能
325
326
  downloading.value = false;
326
327
  progress.value = 100;
327
328
  return;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="preview-container">
3
3
  <!-- 工具栏 -->
4
- <div v-if="props.isDownload" class="preview-toolbar preview-toolbar-right">
4
+ <div class="preview-toolbar preview-toolbar-right" v-if="isDownload">
5
5
  <div class="toolbar-group">
6
6
  <ATooltip
7
7
  mini