@koi-br/ocr-web-sdk 1.0.26 → 1.0.27
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/dist/{index-CqSyQjJ2.mjs → index-5LNwsgpW.mjs} +843 -832
- package/dist/{index-BHtQ-val.js → index-j1qGOVkF.js} +35 -35
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{tiff.min-D0RfnjXu.js → tiff.min-KfzRTYak.js} +1 -1
- package/dist/{tiff.min-q16GulNm.mjs → tiff.min-vkppgIK-.mjs} +1 -1
- package/package.json +1 -1
- package/preview/index.vue +15 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getAugmentedNamespace, a as getDefaultExportFromCjs } from "./index-
|
|
1
|
+
import { g as getAugmentedNamespace, a as getDefaultExportFromCjs } from "./index-5LNwsgpW.mjs";
|
|
2
2
|
function _mergeNamespaces(U, W) {
|
|
3
3
|
for (var Z = 0; Z < W.length; Z++) {
|
|
4
4
|
const s0 = W[Z];
|
package/package.json
CHANGED
package/preview/index.vue
CHANGED
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
</template>
|
|
132
132
|
|
|
133
133
|
<script setup>
|
|
134
|
-
import { ref, onBeforeUnmount, computed } from 'vue';
|
|
134
|
+
import { ref, onBeforeUnmount, computed, watch } from 'vue';
|
|
135
135
|
import { Message, Button as AButton } from '@arco-design/web-vue';
|
|
136
136
|
import ImagePreview from './ImagePreview.vue';
|
|
137
137
|
import PdfPreview from './PdfPreview.vue';
|
|
@@ -212,6 +212,20 @@ const imagePreviewUrl = computed(() => {
|
|
|
212
212
|
return fileUrl.value;
|
|
213
213
|
});
|
|
214
214
|
|
|
215
|
+
// 监听 imageProps 的变化,自动设置 fileType
|
|
216
|
+
watch(
|
|
217
|
+
() => props.imageProps?.url || props.imageProps?.urls,
|
|
218
|
+
(newUrl) => {
|
|
219
|
+
if (newUrl) {
|
|
220
|
+
// 如果传入了图片URL,自动设置fileType为image
|
|
221
|
+
if (fileType.value !== 'image') {
|
|
222
|
+
fileType.value = 'image';
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{ immediate: true }
|
|
227
|
+
);
|
|
228
|
+
|
|
215
229
|
// 添加 AbortController 的引用
|
|
216
230
|
const abortController = ref(null);
|
|
217
231
|
|