@eternalheart/vue-file-preview 1.6.12 → 1.7.0
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/README.md +4 -0
- package/README.zh-CN.md +4 -0
- package/lib/FilePreviewContent.vue.d.ts +25 -6
- package/lib/FilePreviewEmbed.vue.d.ts +17 -6
- package/lib/FilePreviewModal.vue.d.ts +17 -6
- package/lib/chunks/EmptyState.vue_vue_type_script_setup_true_lang--ZOobbGi.mjs +20 -0
- package/lib/chunks/RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs +32 -0
- package/lib/chunks/{avifLoader-CAUzjn-d-CTy7cevh.mjs → avifLoader-CAUzjn-d-CnJpGYJ2.mjs} +1 -1
- package/lib/chunks/{heicLoader-D_9PukkA-DdDu94xL.mjs → heicLoader-D_9PukkA-g_dLrWLP.mjs} +1 -1
- package/lib/chunks/index-6XZXYqbp.mjs +125 -0
- package/lib/chunks/index-BPSzwMOC.mjs +137 -0
- package/lib/chunks/index-BYQ9S7Mk.mjs +104 -0
- package/lib/chunks/{index-De-oaCgN.mjs → index-Bf94DwQu.mjs} +105 -104
- package/lib/chunks/index-BfOWoMpY.mjs +359 -0
- package/lib/chunks/index-Bg8poMIm.mjs +117 -0
- package/lib/chunks/index-BzwJ0VWu.mjs +108 -0
- package/lib/chunks/index-C41YET0_.mjs +51 -0
- package/lib/chunks/{index-DVG1fZAv.mjs → index-C4hIk6pa.mjs} +2023 -2023
- package/lib/chunks/{index-DmEMePjL.mjs → index-C8lyQPe3.mjs} +1018 -1018
- package/lib/chunks/{index-D9z6lQat.mjs → index-CWPdNhoe.mjs} +178 -173
- package/lib/chunks/{index-i-KacQvS.mjs → index-CrVQPnFj.mjs} +112 -112
- package/lib/chunks/{index-CuiEjR23.mjs → index-D5IF9F-D.mjs} +59 -59
- package/lib/chunks/{index-DOAOk6m5.mjs → index-DFeKS8tR.mjs} +123 -123
- package/lib/chunks/index-DM8Dfl-m.mjs +52 -0
- package/lib/chunks/index-DZe0BxAB.mjs +90 -0
- package/lib/chunks/index-GFcSJEwj.mjs +330 -0
- package/lib/chunks/index-LPGxJDnT.mjs +118 -0
- package/lib/chunks/index-aKiIuKKx.mjs +157 -0
- package/lib/chunks/{index-CEk6FKm3.mjs → index-c-pYJEmH.mjs} +1527 -1312
- package/lib/chunks/{index-t9kSzzMg.mjs → index-z9RqL2wI.mjs} +1366 -1368
- package/lib/chunks/index-zLQlyNR2.mjs +383 -0
- package/lib/chunks/{jp2Loader-Dig19xyo-BBR3tcPW.mjs → jp2Loader-Dig19xyo-fCO1knZ0.mjs} +1 -1
- package/lib/chunks/{psdLoader-C0tKUXXl-DGOmJwkQ.mjs → psdLoader-C0tKUXXl-DihMskai.mjs} +1 -1
- package/lib/chunks/{rawLoader-C-tPeFAB-CrCtXMup.mjs → rawLoader-C-tPeFAB-BSfDPl-z.mjs} +5 -5
- package/lib/chunks/{tiffLoader-BlhByX8w-jsxHlbyu.mjs → tiffLoader-BlhByX8w-JY5DaTre.mjs} +1 -1
- package/lib/chunks/{useShikiHighlight-BdhPCj48.mjs → useShikiHighlight-C-ztcJBE.mjs} +1 -1
- package/lib/composables/useAudioPlayer.d.ts +1 -1
- package/lib/composables/usePreviewEvents.d.ts +27 -0
- package/lib/composables/useRequest.d.ts +16 -4
- package/lib/composables/useThemeMode.d.ts +1 -1
- package/lib/composables/useTranslator.d.ts +2 -2
- package/lib/core/events.d.ts +52 -0
- package/lib/core/i18n/index.d.ts +29 -0
- package/lib/core/i18n/messages/en-US.d.ts +5 -0
- package/lib/core/i18n/messages/index.d.ts +9 -0
- package/lib/core/i18n/messages/zh-CN.d.ts +5 -0
- package/lib/core/i18n/types.d.ts +23 -0
- package/lib/core/index.d.ts +34 -0
- package/lib/core/loaders/avifLoader.d.ts +22 -0
- package/lib/core/loaders/heicLoader.d.ts +21 -0
- package/lib/core/loaders/jp2Loader.d.ts +16 -0
- package/lib/core/loaders/jp2Worker.d.ts +1 -0
- package/lib/core/loaders/psdLoader.d.ts +14 -0
- package/lib/core/loaders/rawLoader.d.ts +14 -0
- package/lib/core/loaders/registry.d.ts +32 -0
- package/lib/core/loaders/tiffLoader.d.ts +28 -0
- package/lib/core/loaders/types.d.ts +56 -0
- package/lib/core/types.d.ts +89 -0
- package/lib/core/utils/csvParser.d.ts +31 -0
- package/lib/core/utils/emptyState.d.ts +28 -0
- package/lib/core/utils/excelDataConverter.d.ts +61 -0
- package/lib/core/utils/fileNormalizer.d.ts +21 -0
- package/lib/core/utils/fileType.d.ts +21 -0
- package/lib/core/utils/legacy-office/doc.d.ts +25 -0
- package/lib/core/utils/legacy-office/index.d.ts +8 -0
- package/lib/core/utils/legacy-office/ole.d.ts +8 -0
- package/lib/core/utils/legacy-office/ppt.d.ts +79 -0
- package/lib/core/utils/legacy-office/xls.d.ts +28 -0
- package/lib/core/utils/mimeTypes.d.ts +29 -0
- package/lib/core/utils/ooxml/docx.d.ts +17 -0
- package/lib/core/utils/ooxml/index.d.ts +4 -0
- package/lib/core/utils/ooxml/pptx.d.ts +7 -0
- package/lib/core/utils/ooxml/xml.d.ts +15 -0
- package/lib/core/utils/ooxml/zip.d.ts +3 -0
- package/lib/core/utils/pdfWorker.d.ts +61 -0
- package/lib/core/utils/previewMode.d.ts +7 -0
- package/lib/core/utils/request.d.ts +49 -0
- package/lib/core/utils/subtitleParser.d.ts +44 -0
- package/lib/core/utils/textDecoder.d.ts +30 -0
- package/lib/core/utils/uint8ArrayPolyfill.d.ts +18 -0
- package/lib/core/utils/zipReader.d.ts +51 -0
- package/lib/core/workers/imageDecoder.worker.d.ts +31 -0
- package/lib/core/workers/workerClient.d.ts +14 -0
- package/lib/i18n/localeKey.d.ts +1 -1
- package/lib/index.cjs +63 -63
- package/lib/index.css +1 -1
- package/lib/index.d.ts +11 -9
- package/lib/index.mjs +14 -11
- package/lib/renderers/Audio/index.vue.d.ts +1 -1
- package/lib/renderers/Cad/index.vue.d.ts +1 -1
- package/lib/renderers/Cad/toolbar.d.ts +2 -2
- package/lib/renderers/Csv/index.vue.d.ts +1 -1
- package/lib/renderers/Doc/index.vue.d.ts +1 -1
- package/lib/renderers/Docx/index.vue.d.ts +1 -1
- package/lib/renderers/EmptyState.vue.d.ts +2 -0
- package/lib/renderers/Epub/index.vue.d.ts +1 -1
- package/lib/renderers/Font/index.vue.d.ts +1 -1
- package/lib/renderers/Image/index.vue.d.ts +2 -2
- package/lib/renderers/Json/index.vue.d.ts +6 -1
- package/lib/renderers/Markdown/index.vue.d.ts +1 -1
- package/lib/renderers/Mobi/index.vue.d.ts +1 -1
- package/lib/renderers/Msg/index.vue.d.ts +1 -1
- package/lib/renderers/Pdf/index.vue.d.ts +1 -1
- package/lib/renderers/Ppt/index.vue.d.ts +1 -1
- package/lib/renderers/Pptx/index.vue.d.ts +4 -1
- package/lib/renderers/Subtitle/index.vue.d.ts +1 -1
- package/lib/renderers/Text/index.vue.d.ts +4 -1
- package/lib/renderers/Unsupported/index.vue.d.ts +1 -1
- package/lib/renderers/Video/index.vue.d.ts +1 -1
- package/lib/renderers/Xlsx/index.vue.d.ts +4 -1
- package/lib/renderers/Xml/index.vue.d.ts +1 -1
- package/lib/renderers/Zip/TreeItem.vue.d.ts +1 -1
- package/lib/renderers/Zip/index.vue.d.ts +1 -1
- package/lib/renderers/base.types.d.ts +1 -1
- package/lib/renderers/registry.d.ts +3 -1
- package/lib/types.d.ts +3 -3
- package/package.json +2 -2
- package/lib/chunks/RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs +0 -30
- package/lib/chunks/index-2VQLB2Mi.mjs +0 -133
- package/lib/chunks/index-BPmyF7Wr.mjs +0 -108
- package/lib/chunks/index-Bfg5zM8l.mjs +0 -141
- package/lib/chunks/index-Bmqn45d_.mjs +0 -356
- package/lib/chunks/index-BxmX005K.mjs +0 -90
- package/lib/chunks/index-CLM9sOKN.mjs +0 -383
- package/lib/chunks/index-CM11hSQu.mjs +0 -51
- package/lib/chunks/index-CiGUKdlt.mjs +0 -118
- package/lib/chunks/index-Cud9j9Xy.mjs +0 -322
- package/lib/chunks/index-D4jhvs5m.mjs +0 -113
- package/lib/chunks/index-D6Pjjxi0.mjs +0 -118
- package/lib/chunks/index-D6te_qaB.mjs +0 -104
- package/lib/chunks/index-WcAnJA2t.mjs +0 -52
package/README.md
CHANGED
|
@@ -382,6 +382,7 @@ Differences from `FilePreviewModal`:
|
|
|
382
382
|
| `showClose` | `boolean` | ❌ | Whether to show the close button (default `true` for modal) |
|
|
383
383
|
| `showNavigation` | `boolean` | ❌ | Whether to show file navigation arrows (default `true`) |
|
|
384
384
|
| `loopNavigation` | `boolean` | ❌ | Whether file navigation wraps around (default `false`) |
|
|
385
|
+
| `emptyHint` | `'auto' \| 'always' \| 'never'` | ❌ | Empty-file hint policy: text types stay blank, structured types show hint (default `auto`) |
|
|
385
386
|
|
|
386
387
|
### FilePreviewModal Events
|
|
387
388
|
|
|
@@ -389,6 +390,7 @@ Differences from `FilePreviewModal`:
|
|
|
389
390
|
|-------|---------|-------------|
|
|
390
391
|
| `close` | - | Emitted when the modal should close |
|
|
391
392
|
| `navigate` | `number` | Emitted when navigating to a different file index |
|
|
393
|
+
| `error` | `PreviewErrorPayload` | Emitted when loading or rendering fails (at most once per load) |
|
|
392
394
|
|
|
393
395
|
### FilePreviewEmbed Props
|
|
394
396
|
|
|
@@ -407,12 +409,14 @@ Differences from `FilePreviewModal`:
|
|
|
407
409
|
| `showClose` | `boolean` | ❌ | `false` | Whether to show the close button (default `false` for embed) |
|
|
408
410
|
| `showNavigation` | `boolean` | ❌ | `true` | Whether to show file navigation arrows |
|
|
409
411
|
| `loopNavigation` | `boolean` | ❌ | `false` | Whether file navigation wraps around |
|
|
412
|
+
| `emptyHint` | `'auto' \| 'always' \| 'never'` | ❌ | `'auto'` | Empty-file hint policy: text types stay blank, structured types show hint |
|
|
410
413
|
|
|
411
414
|
### FilePreviewEmbed Events
|
|
412
415
|
|
|
413
416
|
| Event | Payload | Description |
|
|
414
417
|
|-------|---------|-------------|
|
|
415
418
|
| `navigate` | `number` | Emitted when navigating to a different file index |
|
|
419
|
+
| `error` | `PreviewErrorPayload` | Emitted when loading or rendering fails (at most once per load) |
|
|
416
420
|
|
|
417
421
|
### FilePreviewContent (advanced)
|
|
418
422
|
|
package/README.zh-CN.md
CHANGED
|
@@ -382,6 +382,7 @@ const files = [
|
|
|
382
382
|
| `showClose` | `boolean` | ❌ | 是否显示关闭按钮(modal 模式默认 `true`) |
|
|
383
383
|
| `showNavigation` | `boolean` | ❌ | 是否显示文件导航箭头(默认 `true`) |
|
|
384
384
|
| `loopNavigation` | `boolean` | ❌ | 是否循环导航文件(默认 `false`) |
|
|
385
|
+
| `emptyHint` | `'auto' \| 'always' \| 'never'` | ❌ | 空内容提示策略(默认 `auto`):文本类保持空白,结构化类型显示提示 |
|
|
385
386
|
|
|
386
387
|
### FilePreviewModal 事件
|
|
387
388
|
|
|
@@ -389,6 +390,7 @@ const files = [
|
|
|
389
390
|
|------|------|------|
|
|
390
391
|
| `close` | - | 关闭预览时触发 |
|
|
391
392
|
| `navigate` | `number` | 导航到其他文件时触发 |
|
|
393
|
+
| `error` | `PreviewErrorPayload` | 加载或渲染失败时触发(每次加载最多一次) |
|
|
392
394
|
|
|
393
395
|
### FilePreviewEmbed Props
|
|
394
396
|
|
|
@@ -407,12 +409,14 @@ const files = [
|
|
|
407
409
|
| `showClose` | `boolean` | ❌ | `false` | 是否显示关闭按钮(embed 模式默认 `false`) |
|
|
408
410
|
| `showNavigation` | `boolean` | ❌ | `true` | 是否显示文件导航箭头 |
|
|
409
411
|
| `loopNavigation` | `boolean` | ❌ | `false` | 是否循环导航文件 |
|
|
412
|
+
| `emptyHint` | `'auto' \| 'always' \| 'never'` | ❌ | `'auto'` | 空内容提示策略:文本类保持空白,结构化类型显示提示 |
|
|
410
413
|
|
|
411
414
|
### FilePreviewEmbed 事件
|
|
412
415
|
|
|
413
416
|
| 事件 | 参数 | 说明 |
|
|
414
417
|
|------|------|------|
|
|
415
418
|
| `navigate` | `number` | 导航到其他文件时触发 |
|
|
419
|
+
| `error` | `PreviewErrorPayload` | 加载或渲染失败时触发(每次加载最多一次) |
|
|
416
420
|
|
|
417
421
|
### FilePreviewContent(高级用法)
|
|
418
422
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PreviewFile, type PreviewFileInput, type Locale, type Messages, type Theme, type CustomRendererEventPayload, type RequestHandler, type RequestInitFactory, type ShouldFetchAsBlob } from '
|
|
2
|
-
import type { CustomRenderer } from './types';
|
|
1
|
+
import { type PreviewFile, type PreviewFileInput, type Locale, type Messages, type Theme, type CustomRendererEventPayload, type RequestHandler, type RequestInitFactory, type ShouldFetchAsBlob, type FileLoader, type EmptyHintMode, type PreviewErrorPayload } from './core/index.js';
|
|
2
|
+
import type { CustomRenderer } from './types.js';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
5
5
|
currentIndex: number;
|
|
@@ -16,16 +16,23 @@ interface Props {
|
|
|
16
16
|
headless?: boolean;
|
|
17
17
|
/** 主题模式,默认 'dark' */
|
|
18
18
|
theme?: Theme;
|
|
19
|
-
/**
|
|
19
|
+
/** 统一取数入口:鉴权 / 签名场景下由宿主决定文件怎么取 */
|
|
20
|
+
loadFile?: FileLoader;
|
|
21
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
20
22
|
requestInit?: RequestInitFactory;
|
|
21
|
-
/**
|
|
23
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
22
24
|
requestHandler?: RequestHandler;
|
|
23
|
-
/**
|
|
25
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
24
26
|
shouldFetchAsBlob?: ShouldFetchAsBlob;
|
|
25
27
|
/** 自定义下载回调;不传时库内默认通过 fetcher 拉 Blob 触发下载 */
|
|
26
28
|
onDownload?: (file: PreviewFile) => void | Promise<void>;
|
|
27
29
|
/** 关闭回调 */
|
|
28
30
|
onClose?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* 加载/渲染失败回调(与 `@error` 等价)。
|
|
33
|
+
* 每次加载最多触发一次,payload 已由顶层补全 file/index/stage。
|
|
34
|
+
*/
|
|
35
|
+
onError?: (payload: PreviewErrorPayload) => void;
|
|
29
36
|
/** 是否显示关闭按钮,默认根据 mode 决定(modal: true, embed: false) */
|
|
30
37
|
showClose?: boolean;
|
|
31
38
|
/** 是否显示下载按钮,默认 true */
|
|
@@ -34,19 +41,32 @@ interface Props {
|
|
|
34
41
|
showNavigation?: boolean;
|
|
35
42
|
/** 是否循环导航文件,默认 false */
|
|
36
43
|
loopNavigation?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 空内容提示策略,默认 'auto'
|
|
46
|
+
* - 'auto':文本类(text/json)保持原生空白;结构化类型(xlsx/pptx)显示空提示
|
|
47
|
+
* - 'always':全部显示空提示,文案取 `messages['file.empty']`
|
|
48
|
+
* - 'never':一律保持空白
|
|
49
|
+
*/
|
|
50
|
+
emptyHint?: EmptyHintMode;
|
|
37
51
|
}
|
|
38
52
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
53
|
+
error: (payload: PreviewErrorPayload) => any;
|
|
39
54
|
close: () => any;
|
|
40
55
|
navigate: (index: number) => any;
|
|
41
56
|
"custom-event": (payload: CustomRendererEventPayload<unknown>) => any;
|
|
42
57
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
58
|
+
onError?: ((payload: PreviewErrorPayload) => any) | undefined;
|
|
43
59
|
onClose?: (() => any) | undefined;
|
|
44
60
|
onNavigate?: ((index: number) => any) | undefined;
|
|
45
61
|
"onCustom-event"?: ((payload: CustomRendererEventPayload<unknown>) => any) | undefined;
|
|
46
62
|
}>, {
|
|
47
63
|
requestInit: RequestInitFactory;
|
|
48
64
|
requestHandler: RequestHandler;
|
|
65
|
+
shouldFetchAsBlob: ShouldFetchAsBlob;
|
|
66
|
+
loadFile: FileLoader;
|
|
67
|
+
onError: (payload: PreviewErrorPayload) => void;
|
|
49
68
|
mode: "modal" | "embed";
|
|
69
|
+
emptyHint: EmptyHintMode;
|
|
50
70
|
onClose: () => void;
|
|
51
71
|
theme: Theme;
|
|
52
72
|
customRenderers: CustomRenderer[];
|
|
@@ -54,7 +74,6 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
54
74
|
locale: Locale;
|
|
55
75
|
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
56
76
|
headless: boolean;
|
|
57
|
-
shouldFetchAsBlob: ShouldFetchAsBlob;
|
|
58
77
|
onDownload: (file: PreviewFile) => void | Promise<void>;
|
|
59
78
|
showClose: boolean;
|
|
60
79
|
showDownload: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PreviewFile, PreviewFileInput, Locale, Messages, Theme, CustomRendererEventPayload, RequestHandler, RequestInitFactory, ShouldFetchAsBlob } from '
|
|
2
|
-
import type { CustomRenderer } from './types';
|
|
1
|
+
import type { PreviewFile, PreviewFileInput, EmptyHintMode, Locale, Messages, Theme, CustomRendererEventPayload, RequestHandler, RequestInitFactory, ShouldFetchAsBlob, FileLoader, PreviewErrorPayload } from './core/index.js';
|
|
2
|
+
import type { CustomRenderer } from './types.js';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
5
5
|
currentIndex?: number;
|
|
@@ -16,16 +16,20 @@ interface Props {
|
|
|
16
16
|
headless?: boolean;
|
|
17
17
|
/** 主题模式,默认 'dark' */
|
|
18
18
|
theme?: Theme;
|
|
19
|
-
/**
|
|
19
|
+
/** 统一取数入口:鉴权 / 签名场景下由宿主决定文件怎么取 */
|
|
20
|
+
loadFile?: FileLoader;
|
|
21
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
20
22
|
requestInit?: RequestInitFactory;
|
|
21
|
-
/**
|
|
23
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
22
24
|
requestHandler?: RequestHandler;
|
|
23
|
-
/**
|
|
25
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
24
26
|
shouldFetchAsBlob?: ShouldFetchAsBlob;
|
|
25
27
|
/** 自定义下载回调;不传时库内默认通过 fetcher 拉 Blob 触发下载 */
|
|
26
28
|
onDownload?: (file: PreviewFile) => void | Promise<void>;
|
|
27
29
|
/** 关闭回调 */
|
|
28
30
|
onClose?: () => void;
|
|
31
|
+
/** 加载/渲染失败回调(与 `@error` 等价) */
|
|
32
|
+
onError?: (payload: PreviewErrorPayload) => void;
|
|
29
33
|
/** 是否显示关闭按钮,默认根据 mode 决定(embed: false) */
|
|
30
34
|
showClose?: boolean;
|
|
31
35
|
/** 是否显示下载按钮,默认 true */
|
|
@@ -34,20 +38,28 @@ interface Props {
|
|
|
34
38
|
showNavigation?: boolean;
|
|
35
39
|
/** 是否循环导航文件,默认 false */
|
|
36
40
|
loopNavigation?: boolean;
|
|
41
|
+
/** 空内容提示策略,默认 'auto'(文本类空白、结构化类型提示) */
|
|
42
|
+
emptyHint?: EmptyHintMode;
|
|
37
43
|
}
|
|
38
44
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
45
|
+
error: (payload: PreviewErrorPayload) => any;
|
|
39
46
|
close: () => any;
|
|
40
47
|
navigate: (index: number) => any;
|
|
41
48
|
"custom-event": (payload: CustomRendererEventPayload<unknown>) => any;
|
|
42
49
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
50
|
+
onError?: ((payload: PreviewErrorPayload) => any) | undefined;
|
|
43
51
|
onClose?: (() => any) | undefined;
|
|
44
52
|
onNavigate?: ((index: number) => any) | undefined;
|
|
45
53
|
"onCustom-event"?: ((payload: CustomRendererEventPayload<unknown>) => any) | undefined;
|
|
46
54
|
}>, {
|
|
47
55
|
requestInit: RequestInitFactory;
|
|
48
56
|
requestHandler: RequestHandler;
|
|
57
|
+
shouldFetchAsBlob: ShouldFetchAsBlob;
|
|
58
|
+
loadFile: FileLoader;
|
|
59
|
+
onError: (payload: PreviewErrorPayload) => void;
|
|
49
60
|
height: number | string;
|
|
50
61
|
width: number | string;
|
|
62
|
+
emptyHint: EmptyHintMode;
|
|
51
63
|
onClose: () => void;
|
|
52
64
|
theme: Theme;
|
|
53
65
|
currentIndex: number;
|
|
@@ -55,7 +67,6 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
55
67
|
locale: Locale;
|
|
56
68
|
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
57
69
|
headless: boolean;
|
|
58
|
-
shouldFetchAsBlob: ShouldFetchAsBlob;
|
|
59
70
|
onDownload: (file: PreviewFile) => void | Promise<void>;
|
|
60
71
|
showClose: boolean;
|
|
61
72
|
showDownload: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PreviewFile, PreviewFileInput, Locale, Messages, Theme, CustomRendererEventPayload, RequestHandler, RequestInitFactory, ShouldFetchAsBlob } from '
|
|
2
|
-
import type { CustomRenderer } from './types';
|
|
1
|
+
import type { PreviewFile, PreviewFileInput, EmptyHintMode, Locale, Messages, Theme, CustomRendererEventPayload, RequestHandler, RequestInitFactory, ShouldFetchAsBlob, FileLoader, PreviewErrorPayload } from './core/index.js';
|
|
2
|
+
import type { CustomRenderer } from './types.js';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
5
5
|
currentIndex: number;
|
|
@@ -13,11 +13,13 @@ interface Props {
|
|
|
13
13
|
headless?: boolean;
|
|
14
14
|
/** 主题模式,默认 'dark' */
|
|
15
15
|
theme?: Theme;
|
|
16
|
-
/**
|
|
16
|
+
/** 统一取数入口:鉴权 / 签名场景下由宿主决定文件怎么取 */
|
|
17
|
+
loadFile?: FileLoader;
|
|
18
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
17
19
|
requestInit?: RequestInitFactory;
|
|
18
|
-
/**
|
|
20
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
19
21
|
requestHandler?: RequestHandler;
|
|
20
|
-
/**
|
|
22
|
+
/** @deprecated 将在 1.8.0 移除;请改用 `loadFile` */
|
|
21
23
|
shouldFetchAsBlob?: ShouldFetchAsBlob;
|
|
22
24
|
/** 自定义下载回调;不传时库内默认通过 fetcher 拉 Blob 触发下载 */
|
|
23
25
|
onDownload?: (file: PreviewFile) => void | Promise<void>;
|
|
@@ -29,24 +31,33 @@ interface Props {
|
|
|
29
31
|
showNavigation?: boolean;
|
|
30
32
|
/** 是否循环导航文件,默认 false */
|
|
31
33
|
loopNavigation?: boolean;
|
|
34
|
+
/** 空内容提示策略,默认 'auto'(文本类空白、结构化类型提示) */
|
|
35
|
+
emptyHint?: EmptyHintMode;
|
|
36
|
+
/** 加载/渲染失败回调(与 `@error` 等价) */
|
|
37
|
+
onError?: (payload: PreviewErrorPayload) => void;
|
|
32
38
|
}
|
|
33
39
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
40
|
+
error: (payload: PreviewErrorPayload) => any;
|
|
34
41
|
close: () => any;
|
|
35
42
|
navigate: (index: number) => any;
|
|
36
43
|
"custom-event": (payload: CustomRendererEventPayload<unknown>) => any;
|
|
37
44
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
45
|
+
onError?: ((payload: PreviewErrorPayload) => any) | undefined;
|
|
38
46
|
onClose?: (() => any) | undefined;
|
|
39
47
|
onNavigate?: ((index: number) => any) | undefined;
|
|
40
48
|
"onCustom-event"?: ((payload: CustomRendererEventPayload<unknown>) => any) | undefined;
|
|
41
49
|
}>, {
|
|
42
50
|
requestInit: RequestInitFactory;
|
|
43
51
|
requestHandler: RequestHandler;
|
|
52
|
+
shouldFetchAsBlob: ShouldFetchAsBlob;
|
|
53
|
+
loadFile: FileLoader;
|
|
54
|
+
onError: (payload: PreviewErrorPayload) => void;
|
|
55
|
+
emptyHint: EmptyHintMode;
|
|
44
56
|
theme: Theme;
|
|
45
57
|
customRenderers: CustomRenderer[];
|
|
46
58
|
locale: Locale;
|
|
47
59
|
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
48
60
|
headless: boolean;
|
|
49
|
-
shouldFetchAsBlob: ShouldFetchAsBlob;
|
|
50
61
|
onDownload: (file: PreviewFile) => void | Promise<void>;
|
|
51
62
|
showClose: boolean;
|
|
52
63
|
showDownload: boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as s, openBlock as o, createElementBlock as p, createElementVNode as e, createVNode as n, unref as t, toDisplayString as f } from "vue";
|
|
2
|
+
import { FileMinus as c } from "lucide-vue-next";
|
|
3
|
+
import { u as i } from "./index-c-pYJEmH.mjs";
|
|
4
|
+
const a = { class: "vfp-renderer-empty" }, m = { class: "vfp-renderer-empty-content" }, _ = { class: "vfp-w-12 vfp-h-12 vfp-rounded-full vfp-bg-surface-2 vfp-flex vfp-items-center vfp-justify-center" }, l = { class: "vfp-renderer-empty-text" }, g = /* @__PURE__ */ s({
|
|
5
|
+
__name: "EmptyState",
|
|
6
|
+
setup(v) {
|
|
7
|
+
const { t: r } = i();
|
|
8
|
+
return (d, u) => (o(), p("div", a, [
|
|
9
|
+
e("div", m, [
|
|
10
|
+
e("div", _, [
|
|
11
|
+
n(t(c), { class: "vfp-w-6 vfp-h-6 vfp-text-fg-tertiary" })
|
|
12
|
+
]),
|
|
13
|
+
e("p", l, f(t(r)("file.empty")), 1)
|
|
14
|
+
])
|
|
15
|
+
]));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
g as _
|
|
20
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as c, openBlock as r, createElementBlock as t, createElementVNode as o, createVNode as d, unref as l, createCommentVNode as n, toDisplayString as s } from "vue";
|
|
2
|
+
import { AlertCircle as a } from "lucide-vue-next";
|
|
3
|
+
const f = { class: "vfp-renderer-error" }, i = { class: "vfp-renderer-error-content" }, p = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "vfp-w-12 vfp-h-12 vfp-rounded-full vfp-bg-red-500/10 vfp-flex vfp-items-center vfp-justify-center"
|
|
6
|
+
}, v = { class: "vfp-renderer-error-text" }, m = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "vfp-renderer-error-detail"
|
|
9
|
+
}, y = /* @__PURE__ */ c({
|
|
10
|
+
__name: "RendererError",
|
|
11
|
+
props: {
|
|
12
|
+
message: {},
|
|
13
|
+
detail: {},
|
|
14
|
+
showIcon: { type: Boolean, default: !0 }
|
|
15
|
+
},
|
|
16
|
+
setup(e) {
|
|
17
|
+
return (u, _) => (r(), t("div", f, [
|
|
18
|
+
o("div", i, [
|
|
19
|
+
e.showIcon ? (r(), t("div", p, [
|
|
20
|
+
d(l(a), { class: "vfp-w-6 vfp-h-6 vfp-text-red-400" })
|
|
21
|
+
])) : n("", !0),
|
|
22
|
+
o("div", null, [
|
|
23
|
+
o("p", v, s(e.message), 1),
|
|
24
|
+
e.detail ? (r(), t("p", m, s(e.detail), 1)) : n("", !0)
|
|
25
|
+
])
|
|
26
|
+
])
|
|
27
|
+
]));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
y as _
|
|
32
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { defineComponent as z, ref as y, watch as T, computed as v, openBlock as r, createElementBlock as o, createElementVNode as s, toDisplayString as a, unref as n, createBlock as A, normalizeClass as B, Fragment as w, renderList as C, createCommentVNode as E } from "vue";
|
|
2
|
+
import { u as D, a as I, b as M, o as O, W as p, h as P, e as R } from "./index-c-pYJEmH.mjs";
|
|
3
|
+
import { _ as X } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
|
|
4
|
+
const Y = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "vfp-renderer-loading vfp-bg-[#0f0f12]"
|
|
7
|
+
}, $ = { class: "vfp-renderer-loading-content" }, j = { class: "vfp-renderer-loading-text" }, q = { class: "content-scroll" }, H = { class: "timeline" }, J = { class: "cues" }, K = { class: "cue-meta" }, Q = { class: "cue-time" }, U = { class: "cue-time" }, Z = { class: "cue-id" }, ee = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "cue-style"
|
|
10
|
+
}, se = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "cue-words"
|
|
13
|
+
}, te = ["title"], le = { class: "cue-word-time" }, re = { class: "cue-word-text" }, ae = { class: "status-pill" }, oe = /* @__PURE__ */ z({
|
|
14
|
+
__name: "index",
|
|
15
|
+
props: {
|
|
16
|
+
url: {},
|
|
17
|
+
fileName: {}
|
|
18
|
+
},
|
|
19
|
+
setup(F, { expose: N }) {
|
|
20
|
+
const i = F, { t: u } = D(), L = I(), f = M(), m = y(""), _ = y(!0), d = y(null), S = {
|
|
21
|
+
srt: "srt",
|
|
22
|
+
vtt: "vtt",
|
|
23
|
+
lrc: "lrc",
|
|
24
|
+
elrc: "elrc",
|
|
25
|
+
ass: "ass",
|
|
26
|
+
ssa: "ssa",
|
|
27
|
+
ttml: "ttml",
|
|
28
|
+
dfxp: "ttml"
|
|
29
|
+
}, G = (e) => {
|
|
30
|
+
var l;
|
|
31
|
+
const t = ((l = e.split(".").pop()) == null ? void 0 : l.toLowerCase()) || "";
|
|
32
|
+
return S[t];
|
|
33
|
+
};
|
|
34
|
+
T(() => i.url, async () => {
|
|
35
|
+
f.begin(i.url), _.value = !0, d.value = null;
|
|
36
|
+
try {
|
|
37
|
+
m.value = await P(i.url, { fetcher: L.value });
|
|
38
|
+
} catch (e) {
|
|
39
|
+
console.error(e), d.value = u.value("subtitle.load_failed"), f.error(e);
|
|
40
|
+
} finally {
|
|
41
|
+
_.value = !1;
|
|
42
|
+
}
|
|
43
|
+
}, { immediate: !0 });
|
|
44
|
+
const x = v(() => {
|
|
45
|
+
if (!m.value) return { value: null, error: null };
|
|
46
|
+
try {
|
|
47
|
+
return { value: O(m.value, G(i.fileName)), error: null };
|
|
48
|
+
} catch (e) {
|
|
49
|
+
return console.error(e), { value: null, error: e };
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
T(
|
|
53
|
+
() => x.value.error,
|
|
54
|
+
(e) => {
|
|
55
|
+
e && f.error(e);
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
const c = v(() => x.value.value), g = v(() => {
|
|
59
|
+
var e, t;
|
|
60
|
+
return ((e = c.value) == null ? void 0 : e.format) === "lrc" || ((t = c.value) == null ? void 0 : t.format) === "elrc";
|
|
61
|
+
}), b = v(() => {
|
|
62
|
+
var e;
|
|
63
|
+
return ((e = c.value) == null ? void 0 : e.metadata) ?? {};
|
|
64
|
+
}), V = (e) => p(e).slice(3, 8);
|
|
65
|
+
return N({
|
|
66
|
+
getToolbarGroups: () => []
|
|
67
|
+
}), (e, t) => _.value ? (r(), o("div", Y, [
|
|
68
|
+
s("div", $, [
|
|
69
|
+
t[0] || (t[0] = s("div", { class: "vfp-renderer-spinner" }, null, -1)),
|
|
70
|
+
s("span", j, a(n(u)("common.loading")), 1)
|
|
71
|
+
])
|
|
72
|
+
])) : d.value || !c.value ? (r(), A(X, {
|
|
73
|
+
key: 1,
|
|
74
|
+
message: d.value || n(u)("subtitle.parse_failed"),
|
|
75
|
+
class: "vfp-bg-[#0f0f12]"
|
|
76
|
+
}, null, 8, ["message"])) : (r(), o("div", {
|
|
77
|
+
key: 2,
|
|
78
|
+
class: B(["vfp-relative vfp-w-full vfp-h-full vfp-bg-[#0f0f12]", g.value ? "flavor-lyric" : "flavor-subtitle"])
|
|
79
|
+
}, [
|
|
80
|
+
s("div", q, [
|
|
81
|
+
s("div", H, [
|
|
82
|
+
t[3] || (t[3] = s("div", { class: "timeline-line" }, null, -1)),
|
|
83
|
+
s("ol", J, [
|
|
84
|
+
(r(!0), o(w, null, C(c.value.cues, (l, k) => (r(), o("li", {
|
|
85
|
+
key: "cue-" + k,
|
|
86
|
+
class: "cue-row"
|
|
87
|
+
}, [
|
|
88
|
+
t[2] || (t[2] = s("div", { class: "cue-dot" }, null, -1)),
|
|
89
|
+
s("div", K, [
|
|
90
|
+
s("span", Q, a(n(p)(l.start)), 1),
|
|
91
|
+
t[1] || (t[1] = s("span", { class: "cue-arrow" }, "→", -1)),
|
|
92
|
+
s("span", U, a(n(p)(l.end)), 1),
|
|
93
|
+
s("span", Z, "#" + a(l.id ?? k + 1), 1),
|
|
94
|
+
l.style ? (r(), o("span", ee, a(l.style), 1)) : E("", !0)
|
|
95
|
+
]),
|
|
96
|
+
l.words && l.words.length > 0 ? (r(), o("div", se, [
|
|
97
|
+
(r(!0), o(w, null, C(l.words, (h, W) => (r(), o("span", {
|
|
98
|
+
key: "w-" + W,
|
|
99
|
+
class: "cue-word",
|
|
100
|
+
title: n(p)(h.start)
|
|
101
|
+
}, [
|
|
102
|
+
s("span", le, a(V(h.start)), 1),
|
|
103
|
+
s("span", re, a(h.text), 1)
|
|
104
|
+
], 8, te))), 128))
|
|
105
|
+
])) : (r(), o("p", {
|
|
106
|
+
key: 1,
|
|
107
|
+
class: B(["cue-text", { lyric: g.value }])
|
|
108
|
+
}, a(l.text), 3))
|
|
109
|
+
]))), 128))
|
|
110
|
+
])
|
|
111
|
+
])
|
|
112
|
+
]),
|
|
113
|
+
s("div", ae, [
|
|
114
|
+
s("span", null, a(c.value.cues.length) + " " + a(g.value ? n(u)("subtitle.lines") : n(u)("subtitle.cues")), 1),
|
|
115
|
+
b.value.length ? (r(), o(w, { key: 0 }, [
|
|
116
|
+
t[4] || (t[4] = s("span", { class: "dot" }, "·", -1)),
|
|
117
|
+
s("span", null, a(b.value.length), 1)
|
|
118
|
+
], 64)) : E("", !0)
|
|
119
|
+
])
|
|
120
|
+
], 2));
|
|
121
|
+
}
|
|
122
|
+
}), ve = /* @__PURE__ */ R(oe, [["__scopeId", "data-v-4f53a8e5"]]);
|
|
123
|
+
export {
|
|
124
|
+
ve as default
|
|
125
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { defineComponent as W, ref as x, onMounted as L, watch as B, onBeforeUnmount as H, openBlock as d, createElementBlock as h, createElementVNode as g, toDisplayString as z, unref as T, createCommentVNode as _, createVNode as R, normalizeStyle as A } from "vue";
|
|
2
|
+
import { u as C, a as G, b as N, J as v, m as V, t as F, Q as J, E as O, L as Q, k as q, p as I } from "./index-c-pYJEmH.mjs";
|
|
3
|
+
import P from "exceljs";
|
|
4
|
+
import { S as U } from "./index-CyBXARuf.mjs";
|
|
5
|
+
import { _ as X } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
|
|
6
|
+
const $ = { class: "vfp-relative vfp-flex vfp-flex-col vfp-items-center vfp-w-full vfp-h-full" }, j = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "vfp-renderer-overlay vfp-renderer-loading"
|
|
9
|
+
}, K = { class: "vfp-renderer-loading-content" }, Y = { class: "vfp-renderer-loading-text" }, Z = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "vfp-renderer-overlay"
|
|
12
|
+
}, ae = /* @__PURE__ */ W({
|
|
13
|
+
__name: "index",
|
|
14
|
+
props: {
|
|
15
|
+
url: {},
|
|
16
|
+
emptyHint: {}
|
|
17
|
+
},
|
|
18
|
+
setup(E, { expose: D }) {
|
|
19
|
+
async function M(e) {
|
|
20
|
+
try {
|
|
21
|
+
return await new P.Workbook().xlsx.load(e.slice().buffer);
|
|
22
|
+
} catch (t) {
|
|
23
|
+
throw t instanceof TypeError && /sheets/i.test(t.message) ? new v("xlsx.invalid_format") : t;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const m = E, { t: o } = C(), S = G(), y = N(), a = x(!0), n = x(null), l = x(null);
|
|
27
|
+
let i = null, p = 100, f = null, u = null, c = { width: 0, height: 0 };
|
|
28
|
+
const w = () => {
|
|
29
|
+
if (!l.value) return { width: 800, height: 600 };
|
|
30
|
+
const e = l.value.clientWidth, t = l.value.clientHeight, r = e > 100 ? e : 800, s = t > 100 ? t : 600;
|
|
31
|
+
return { width: r, height: s };
|
|
32
|
+
}, b = () => {
|
|
33
|
+
if (!l.value || !i) return;
|
|
34
|
+
l.value.innerHTML = "";
|
|
35
|
+
const { width: e, height: t } = w(), r = e < 640;
|
|
36
|
+
new U(l.value, {
|
|
37
|
+
mode: "read",
|
|
38
|
+
showToolbar: !1,
|
|
39
|
+
showContextmenu: !1,
|
|
40
|
+
showGrid: !0,
|
|
41
|
+
row: {
|
|
42
|
+
len: p,
|
|
43
|
+
height: 25
|
|
44
|
+
},
|
|
45
|
+
col: {
|
|
46
|
+
len: 26,
|
|
47
|
+
width: r ? 80 : 100,
|
|
48
|
+
indexWidth: r ? 40 : 60,
|
|
49
|
+
minWidth: r ? 40 : 60
|
|
50
|
+
},
|
|
51
|
+
view: {
|
|
52
|
+
height: () => t,
|
|
53
|
+
width: () => e
|
|
54
|
+
}
|
|
55
|
+
}).loadData(i);
|
|
56
|
+
}, k = async () => {
|
|
57
|
+
if (y.begin(m.url), !!l.value) {
|
|
58
|
+
a.value = !0, n.value = null;
|
|
59
|
+
try {
|
|
60
|
+
const e = await S.value(m.url, {
|
|
61
|
+
mode: "cors",
|
|
62
|
+
credentials: "omit",
|
|
63
|
+
redirect: "follow"
|
|
64
|
+
});
|
|
65
|
+
if (!e.ok)
|
|
66
|
+
throw e.status === 404 ? new Error(o.value("xlsx.not_found")) : e.status === 403 ? new v("file.forbidden") : new v("file.load_failed_status", { status: e.status });
|
|
67
|
+
const t = V(await e.arrayBuffer());
|
|
68
|
+
let r;
|
|
69
|
+
if (t.byteLength === 0)
|
|
70
|
+
r = [{ name: "Sheet1" }];
|
|
71
|
+
else if (F(t)) {
|
|
72
|
+
const s = J(t);
|
|
73
|
+
if (!s || !Array.isArray(s.sheets))
|
|
74
|
+
throw new v("xlsx.invalid_legacy_data");
|
|
75
|
+
r = O(s);
|
|
76
|
+
} else
|
|
77
|
+
r = Q(
|
|
78
|
+
await M(t)
|
|
79
|
+
);
|
|
80
|
+
i = r.length ? r : [{ name: "Sheet1" }], p = q(r), b(), a.value = !1;
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.error(o.value("xlsx.parse_failed") + ":", e);
|
|
83
|
+
let t = o.value("xlsx.parse_failed");
|
|
84
|
+
e instanceof Error && (t = I(o.value, e)), n.value = t, a.value = !1, y.error(e);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
return L(() => {
|
|
89
|
+
if (!l.value) return;
|
|
90
|
+
let e = !0;
|
|
91
|
+
f = new ResizeObserver(() => {
|
|
92
|
+
if (e) {
|
|
93
|
+
e = !1, c = w();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const t = w(), r = Math.abs(c.width - t.width), s = Math.abs(c.height - t.height);
|
|
97
|
+
r < 10 && s < 10 || (c = t, u !== null && clearTimeout(u), u = window.setTimeout(() => {
|
|
98
|
+
i && b();
|
|
99
|
+
}, 500));
|
|
100
|
+
}), f.observe(l.value), setTimeout(() => {
|
|
101
|
+
requestAnimationFrame(() => k());
|
|
102
|
+
}, 100);
|
|
103
|
+
}), B(
|
|
104
|
+
() => m.url,
|
|
105
|
+
(e) => {
|
|
106
|
+
e && k();
|
|
107
|
+
}
|
|
108
|
+
), H(() => {
|
|
109
|
+
f && f.disconnect(), u !== null && clearTimeout(u), i = null, p = 100, l.value && (l.value.innerHTML = "");
|
|
110
|
+
}), D({
|
|
111
|
+
getToolbarGroups: () => []
|
|
112
|
+
}), (e, t) => (d(), h("div", $, [
|
|
113
|
+
a.value ? (d(), h("div", j, [
|
|
114
|
+
g("div", K, [
|
|
115
|
+
t[0] || (t[0] = g("div", { class: "vfp-renderer-spinner" }, null, -1)),
|
|
116
|
+
g("p", Y, z(T(o)("xlsx.loading")), 1)
|
|
117
|
+
])
|
|
118
|
+
])) : _("", !0),
|
|
119
|
+
n.value && !a.value ? (d(), h("div", Z, [
|
|
120
|
+
R(X, {
|
|
121
|
+
message: T(o)("xlsx.load_failed"),
|
|
122
|
+
detail: n.value
|
|
123
|
+
}, null, 8, ["message", "detail"])
|
|
124
|
+
])) : _("", !0),
|
|
125
|
+
n.value ? _("", !0) : (d(), h("div", {
|
|
126
|
+
key: 2,
|
|
127
|
+
ref_key: "containerRef",
|
|
128
|
+
ref: l,
|
|
129
|
+
class: "xlsx-spreadsheet-container vfp-w-full vfp-h-full",
|
|
130
|
+
style: A({ opacity: a.value ? 0 : 1 })
|
|
131
|
+
}, null, 4))
|
|
132
|
+
]));
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
export {
|
|
136
|
+
ae as default
|
|
137
|
+
};
|