qidian-vue-ui 2.8.19 → 2.8.21
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/components/file-viewer/index.css +7 -7
- package/dist/components/file-viewer/index.vue.mjs +1 -1
- package/dist/components/file-viewer/index.vue2.mjs +25 -21
- package/dist/components/multi-file-viewer/index.vue.mjs +7 -2
- package/dist/components/service-select/index.css +1 -1
- package/dist/components/service-select/index.vue.d.ts +1 -1
- package/dist/components/service-select/index.vue.mjs +1 -1
- package/dist/components/service-select/index.vue2.mjs +3 -3
- package/dist/components/upload/index.css +45 -45
- package/dist/components/upload/index.vue.mjs +1 -1
- package/dist/components/upload/index.vue2.mjs +15 -8
- package/dist/components/upload/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.qd-file-viewer[data-v-
|
|
2
|
-
.qd-file-viewer__content[data-v-
|
|
1
|
+
.qd-file-viewer[data-v-83dea2a3],
|
|
2
|
+
.qd-file-viewer__content[data-v-83dea2a3] {
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
|
5
5
|
}
|
|
6
|
-
.qd-file-viewer--image[data-v-
|
|
6
|
+
.qd-file-viewer--image[data-v-83dea2a3] {
|
|
7
7
|
transform: translate3d(0, 0, 0);
|
|
8
8
|
}
|
|
9
|
-
.qd-file-viewer--image[data-v-
|
|
9
|
+
.qd-file-viewer--image[data-v-83dea2a3] .t-image-viewer__trigger {
|
|
10
10
|
display: none;
|
|
11
11
|
}
|
|
12
|
-
.qd-file-viewer--image[data-v-
|
|
13
|
-
.qd-file-viewer--image[data-v-
|
|
12
|
+
.qd-file-viewer--image[data-v-83dea2a3] .t-image-viewer__modal-box,
|
|
13
|
+
.qd-file-viewer--image[data-v-83dea2a3] .t-image-viewer-preview-image {
|
|
14
14
|
animation: none;
|
|
15
15
|
}
|
|
16
|
-
.qd-file-viewer--image[data-v-
|
|
16
|
+
.qd-file-viewer--image[data-v-83dea2a3] .t-image-viewer__modal-mask {
|
|
17
17
|
transition: none;
|
|
18
18
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdFileViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdFileViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-83dea2a3"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdFileViewer as default
|
|
8
8
|
};
|
|
@@ -5,8 +5,8 @@ import { FileViewer } from "@file-viewer/vue3";
|
|
|
5
5
|
import { ImageViewer } from "tdesign-vue-next";
|
|
6
6
|
import { isImage, reAttach } from "../../utils/tools.mjs";
|
|
7
7
|
import { useTheme } from "../../hooks/useTheme.mjs";
|
|
8
|
-
import QdOfficePdf from "../office/pdf/index.vue.mjs";
|
|
9
8
|
import merge from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
9
|
+
import QdOfficePdf from "../office/pdf/index.vue.mjs";
|
|
10
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
11
|
...{ name: "QdFileViewer" },
|
|
12
12
|
__name: "index",
|
|
@@ -60,6 +60,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
60
|
return src || "";
|
|
61
61
|
});
|
|
62
62
|
const isImageFile = computed(() => isImage(fileType.value));
|
|
63
|
+
const mergedOptions = computed(
|
|
64
|
+
() => merge(
|
|
65
|
+
{
|
|
66
|
+
theme: tdTheme.value,
|
|
67
|
+
toolbar: {
|
|
68
|
+
download: false,
|
|
69
|
+
exportHtml: false,
|
|
70
|
+
print: false
|
|
71
|
+
},
|
|
72
|
+
pdf: {
|
|
73
|
+
defaultNavigationVisible: false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
props.options,
|
|
77
|
+
{
|
|
78
|
+
builtinRenderers: "none",
|
|
79
|
+
renderers: allRenderers
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
);
|
|
63
83
|
const imageViewerSource = computed(() => {
|
|
64
84
|
const { file, src } = props;
|
|
65
85
|
if (typeof File !== "undefined" && file instanceof File) return file;
|
|
@@ -69,10 +89,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
89
|
const imageViewerImages = computed(() => {
|
|
70
90
|
const source = imageViewerSource.value;
|
|
71
91
|
if (!source) return [];
|
|
92
|
+
const download = mergedOptions.value.toolbar?.download ?? true;
|
|
72
93
|
if (isSvg.value) {
|
|
73
|
-
return svgReady.value ? [{ mainImage: source, thumbnail: source, isSvg: true }] : [SVG_PLACEHOLDER_PNG];
|
|
94
|
+
return svgReady.value ? [{ mainImage: source, thumbnail: source, isSvg: true, download }] : [{ mainImage: SVG_PLACEHOLDER_PNG, thumbnail: SVG_PLACEHOLDER_PNG, download }];
|
|
74
95
|
}
|
|
75
|
-
return [source];
|
|
96
|
+
return [{ mainImage: source, thumbnail: source, download }];
|
|
76
97
|
});
|
|
77
98
|
const useImageViewer = computed(() => isImageFile.value && !!imageViewerSource.value);
|
|
78
99
|
const resolvedAttach = computed(
|
|
@@ -121,24 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
121
142
|
class: "qd-file-viewer__content",
|
|
122
143
|
file: __props.file,
|
|
123
144
|
url: __props.src,
|
|
124
|
-
options:
|
|
125
|
-
{
|
|
126
|
-
theme: unref(tdTheme),
|
|
127
|
-
toolbar: {
|
|
128
|
-
download: false,
|
|
129
|
-
exportHtml: false,
|
|
130
|
-
print: false
|
|
131
|
-
},
|
|
132
|
-
pdf: {
|
|
133
|
-
defaultNavigationVisible: false
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
__props.options,
|
|
137
|
-
{
|
|
138
|
-
builtinRenderers: "none",
|
|
139
|
-
renderers: unref(allRenderers)
|
|
140
|
-
}
|
|
141
|
-
)
|
|
145
|
+
options: mergedOptions.value
|
|
142
146
|
}, null, 8, ["file", "url", "options"]))
|
|
143
147
|
], 2);
|
|
144
148
|
};
|
|
@@ -77,10 +77,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
77
|
const imageViewerImages = computed(
|
|
78
78
|
() => (mergedProps.value.files ?? []).map((item) => {
|
|
79
79
|
const source = resolveImageViewerSource(item);
|
|
80
|
+
const download = merge(
|
|
81
|
+
{ toolbar: { download: mergedProps.value.wrapper !== false ? true : false } },
|
|
82
|
+
mergedProps.value.options,
|
|
83
|
+
item.options
|
|
84
|
+
).toolbar?.download ?? true;
|
|
80
85
|
if (isSvgItem(item) && source) {
|
|
81
|
-
return svgReady.value ? { mainImage: source, thumbnail: source, isSvg: true } : SVG_PLACEHOLDER_PNG;
|
|
86
|
+
return svgReady.value ? { mainImage: source, thumbnail: source, isSvg: true, download } : { mainImage: SVG_PLACEHOLDER_PNG, thumbnail: SVG_PLACEHOLDER_PNG, download };
|
|
82
87
|
}
|
|
83
|
-
return source ?? "";
|
|
88
|
+
return { mainImage: source ?? "", thumbnail: source ?? "", download };
|
|
84
89
|
})
|
|
85
90
|
);
|
|
86
91
|
const imageViewerDisplayVisible = computed(() => imageViewerVisible.value && activated.value);
|
|
@@ -12,7 +12,7 @@ declare const _default: <D extends SelectOption = SelectOption, R = unknown, P =
|
|
|
12
12
|
expose(exposed: import("vue").ShallowUnwrapRef<QdServiceSelectInstanceFunctions<D, R, P, TP, Pag>>): void;
|
|
13
13
|
attrs: any;
|
|
14
14
|
slots: {
|
|
15
|
-
[x:
|
|
15
|
+
[x: string]: ((props: any) => any) | undefined;
|
|
16
16
|
} & {
|
|
17
17
|
'panel-bottom-content'?: (props: {}) => any;
|
|
18
18
|
} & {
|
|
@@ -4,7 +4,7 @@ import _sfc_main from "./index.vue2.mjs";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
7
|
-
const QdServiceSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const QdServiceSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c29c6081"]]);
|
|
8
8
|
export {
|
|
9
9
|
QdServiceSelect as default
|
|
10
10
|
};
|
|
@@ -2,7 +2,7 @@ import './index2.css'
|
|
|
2
2
|
import './index.css'
|
|
3
3
|
import { defineComponent, mergeDefaults, computed, ref, unref, watch, onMounted, onActivated, onDeactivated, createBlock, openBlock, mergeProps, isRef, createSlots, withCtx, renderSlot, createCommentVNode, renderList, normalizeProps, guardReactiveProps } from "vue";
|
|
4
4
|
import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
5
|
-
import { isEmpty, toArr, useServiceLoadMore,
|
|
5
|
+
import { isEmpty, toArr, useServiceLoadMore, filterSlots, checkSameObject } from "qidian-shared";
|
|
6
6
|
import { Select, Loading } from "tdesign-vue-next";
|
|
7
7
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
8
8
|
import { qdDictConvStrSeparator } from "../dict/tag/props.mjs";
|
|
@@ -496,11 +496,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
496
496
|
]),
|
|
497
497
|
_: 2
|
|
498
498
|
}, [
|
|
499
|
-
renderList(unref(
|
|
499
|
+
renderList(unref(filterSlots)(_ctx.$slots, ["default", "panel-bottom-content"]), (name) => {
|
|
500
500
|
return {
|
|
501
501
|
name,
|
|
502
502
|
fn: withCtx((slotProps) => [
|
|
503
|
-
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)), void 0, true)
|
|
503
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps ?? {})), void 0, true)
|
|
504
504
|
])
|
|
505
505
|
};
|
|
506
506
|
})
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
.qd-upload[data-v-
|
|
1
|
+
.qd-upload[data-v-6746c585] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
outline: none;
|
|
4
4
|
}
|
|
5
|
-
.qd-upload[data-v-
|
|
5
|
+
.qd-upload[data-v-6746c585] .t-image-viewer__trigger {
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
8
|
-
.qd-upload[data-v-
|
|
8
|
+
.qd-upload[data-v-6746c585] .t-upload__dragger {
|
|
9
9
|
min-width: auto;
|
|
10
10
|
min-height: 144px;
|
|
11
11
|
width: 100%;
|
|
12
12
|
height: 100%;
|
|
13
13
|
}
|
|
14
|
-
.qd-upload[data-v-
|
|
14
|
+
.qd-upload[data-v-6746c585] .t-upload__dragger-btns > .t-size-s {
|
|
15
15
|
display: inline-flex;
|
|
16
16
|
}
|
|
17
|
-
.qd-upload[data-v-
|
|
17
|
+
.qd-upload[data-v-6746c585] .t-upload__flow {
|
|
18
18
|
width: 100%;
|
|
19
19
|
min-width: auto;
|
|
20
20
|
max-width: 100%;
|
|
21
21
|
}
|
|
22
|
-
.qd-upload[data-v-
|
|
22
|
+
.qd-upload[data-v-6746c585] .t-upload__flow-empty {
|
|
23
23
|
height: auto;
|
|
24
24
|
min-height: 144px;
|
|
25
25
|
}
|
|
26
|
-
.qd-upload[data-v-
|
|
27
|
-
.qd-upload[data-v-
|
|
26
|
+
.qd-upload[data-v-6746c585] .t-upload__flow-card-area,
|
|
27
|
+
.qd-upload[data-v-6746c585] .t-upload__flow-table {
|
|
28
28
|
margin-top: var(--td-comp-margin-s);
|
|
29
29
|
}
|
|
30
|
-
.qd-upload[data-v-
|
|
30
|
+
.qd-upload[data-v-6746c585] .t-upload__file-name__container {
|
|
31
31
|
display: flex;
|
|
32
32
|
align-items: center;
|
|
33
33
|
}
|
|
34
|
-
.qd-upload[data-v-
|
|
34
|
+
.qd-upload[data-v-6746c585] .t-upload__file-name-text {
|
|
35
35
|
cursor: pointer;
|
|
36
36
|
}
|
|
37
|
-
.qd-upload[data-v-
|
|
37
|
+
.qd-upload[data-v-6746c585] .t-upload__file-thumbnail {
|
|
38
38
|
width: var(--td-comp-size-m);
|
|
39
39
|
height: var(--td-comp-size-m);
|
|
40
40
|
}
|
|
41
|
-
.qd-upload[data-v-
|
|
41
|
+
.qd-upload[data-v-6746c585] .t-upload__card-image {
|
|
42
42
|
width: 100%;
|
|
43
43
|
height: 100%;
|
|
44
44
|
}
|
|
45
|
-
.qd-upload__popup-upload[data-v-
|
|
45
|
+
.qd-upload__popup-upload[data-v-6746c585] .t-image-viewer__trigger {
|
|
46
46
|
display: none;
|
|
47
47
|
}
|
|
48
|
-
.qd-upload__popup-upload[data-v-
|
|
48
|
+
.qd-upload__popup-upload[data-v-6746c585] .t-upload__flow-table {
|
|
49
49
|
margin-top: 0;
|
|
50
50
|
}
|
|
51
|
-
.qd-upload__popup-upload[data-v-
|
|
51
|
+
.qd-upload__popup-upload[data-v-6746c585] .t-upload__file-name__container {
|
|
52
52
|
display: flex;
|
|
53
53
|
align-items: center;
|
|
54
54
|
}
|
|
55
|
-
.qd-upload__popup-upload[data-v-
|
|
55
|
+
.qd-upload__popup-upload[data-v-6746c585] .t-upload__file-name-text {
|
|
56
56
|
cursor: pointer;
|
|
57
57
|
}
|
|
58
|
-
.qd-upload__popup-upload[data-v-
|
|
58
|
+
.qd-upload__popup-upload[data-v-6746c585] .t-upload__file-thumbnail {
|
|
59
59
|
width: var(--td-comp-size-m);
|
|
60
60
|
height: var(--td-comp-size-m);
|
|
61
61
|
}
|
|
62
|
-
.qd-upload__popup-upload[data-v-
|
|
62
|
+
.qd-upload__popup-upload[data-v-6746c585] .t-upload__card-image {
|
|
63
63
|
width: 100%;
|
|
64
64
|
height: 100%;
|
|
65
65
|
}
|
|
66
|
-
.qd-upload__popup-upload--disabled[data-v-
|
|
67
|
-
.qd-upload__popup-upload--disabled[data-v-
|
|
66
|
+
.qd-upload__popup-upload--disabled[data-v-6746c585] .t-upload__flow-table th:last-child,
|
|
67
|
+
.qd-upload__popup-upload--disabled[data-v-6746c585] .t-upload__flow-table td:last-child {
|
|
68
68
|
display: none;
|
|
69
69
|
}
|
|
70
|
-
.qd-upload__popup-actions[data-v-
|
|
70
|
+
.qd-upload__popup-actions[data-v-6746c585] {
|
|
71
71
|
display: inline-flex;
|
|
72
72
|
}
|
|
73
|
-
.qd-upload__popup-drag-text[data-v-
|
|
73
|
+
.qd-upload__popup-drag-text[data-v-6746c585] {
|
|
74
74
|
display: flex;
|
|
75
75
|
align-items: center;
|
|
76
76
|
justify-content: center;
|
|
@@ -78,18 +78,18 @@
|
|
|
78
78
|
height: 100%;
|
|
79
79
|
color: var(--td-text-color-placeholder);
|
|
80
80
|
}
|
|
81
|
-
.qd-upload[data-v-
|
|
82
|
-
.qd-upload[data-v-
|
|
81
|
+
.qd-upload[data-v-6746c585]:focus .t-upload__flow-card-area,
|
|
82
|
+
.qd-upload[data-v-6746c585]:focus .t-upload__flow-table {
|
|
83
83
|
border-color: var(--td-brand-color);
|
|
84
84
|
}
|
|
85
|
-
.qd-upload--btn-image-popup[data-v-
|
|
86
|
-
.qd-upload--btn-file-popup[data-v-
|
|
85
|
+
.qd-upload--btn-image-popup[data-v-6746c585],
|
|
86
|
+
.qd-upload--btn-file-popup[data-v-6746c585] {
|
|
87
87
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
|
88
88
|
border: 1px dashed var(--td-component-border);
|
|
89
89
|
transition: border 0.2s linear;
|
|
90
90
|
}
|
|
91
|
-
.qd-upload--btn-image-popup[data-v-
|
|
92
|
-
.qd-upload--btn-file-popup[data-v-
|
|
91
|
+
.qd-upload--btn-image-popup[data-v-6746c585] .t-upload__dragger,
|
|
92
|
+
.qd-upload--btn-file-popup[data-v-6746c585] .t-upload__dragger {
|
|
93
93
|
min-height: auto;
|
|
94
94
|
padding: 0;
|
|
95
95
|
border: 0;
|
|
@@ -98,42 +98,42 @@
|
|
|
98
98
|
align-items: flex-start;
|
|
99
99
|
cursor: default;
|
|
100
100
|
}
|
|
101
|
-
.qd-upload--btn-image-popup[data-v-
|
|
102
|
-
.qd-upload--btn-file-popup[data-v-
|
|
101
|
+
.qd-upload--btn-image-popup[data-v-6746c585] .t-upload__dragger > .t-upload__trigger,
|
|
102
|
+
.qd-upload--btn-file-popup[data-v-6746c585] .t-upload__dragger > .t-upload__trigger {
|
|
103
103
|
width: 100%;
|
|
104
104
|
height: 100%;
|
|
105
105
|
}
|
|
106
|
-
.qd-upload--btn-image-popup[data-v-
|
|
107
|
-
.qd-upload--btn-file-popup[data-v-
|
|
106
|
+
.qd-upload--btn-image-popup[data-v-6746c585]:focus-within,
|
|
107
|
+
.qd-upload--btn-file-popup[data-v-6746c585]:focus-within {
|
|
108
108
|
border-color: var(--td-brand-color);
|
|
109
109
|
}
|
|
110
|
-
.qd-upload--only-view[data-v-
|
|
111
|
-
.qd-upload--only-view[data-v-
|
|
110
|
+
.qd-upload--only-view[data-v-6746c585] .t-upload__flow-empty,
|
|
111
|
+
.qd-upload--only-view[data-v-6746c585] .t-upload__card-mask-item-divider {
|
|
112
112
|
display: none;
|
|
113
113
|
}
|
|
114
|
-
.qd-upload--only-view[data-v-
|
|
114
|
+
.qd-upload--only-view[data-v-6746c585] .t-upload__flow-card-area {
|
|
115
115
|
border-color: var(--td-component-border);
|
|
116
116
|
}
|
|
117
|
-
.qd-upload--only-view[data-v-
|
|
118
|
-
.qd-upload--only-view[data-v-
|
|
119
|
-
.qd-upload--only-view[data-v-
|
|
117
|
+
.qd-upload--only-view[data-v-6746c585]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-op,
|
|
118
|
+
.qd-upload--only-view[data-v-6746c585]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__trigger,
|
|
119
|
+
.qd-upload--only-view[data-v-6746c585]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-bottom {
|
|
120
120
|
display: none;
|
|
121
121
|
}
|
|
122
|
-
.qd-upload--only-view[data-v-
|
|
123
|
-
.qd-upload--only-view[data-v-
|
|
122
|
+
.qd-upload--only-view[data-v-6746c585]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-table,
|
|
123
|
+
.qd-upload--only-view[data-v-6746c585]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-card-area {
|
|
124
124
|
margin-top: 0;
|
|
125
125
|
}
|
|
126
|
-
.qd-upload--uploading[data-v-
|
|
126
|
+
.qd-upload--uploading[data-v-6746c585] .t-upload__single-input-clear {
|
|
127
127
|
display: none;
|
|
128
128
|
}
|
|
129
|
-
.qd-upload--hide-manual-upload[data-v-
|
|
129
|
+
.qd-upload--hide-manual-upload[data-v-6746c585] .t-upload__flow-bottom {
|
|
130
130
|
display: none;
|
|
131
131
|
margin-top: 0;
|
|
132
132
|
}
|
|
133
|
-
.qd-upload--hide-progress[data-v-
|
|
134
|
-
.qd-upload--hide-progress[data-v-
|
|
133
|
+
.qd-upload--hide-progress[data-v-6746c585] .t-upload__flow-table th:last-child,
|
|
134
|
+
.qd-upload--hide-progress[data-v-6746c585] .t-upload__flow-table td:last-child {
|
|
135
135
|
display: none;
|
|
136
136
|
}
|
|
137
|
-
.qd-upload--disabled[data-v-
|
|
137
|
+
.qd-upload--disabled[data-v-6746c585] .t-upload__flow-card-area {
|
|
138
138
|
border-color: var(--td-component-border);
|
|
139
139
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6746c585"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdUpload as default
|
|
8
8
|
};
|
|
@@ -39,6 +39,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
theme: {},
|
|
40
40
|
accept: {},
|
|
41
41
|
onlyView: { type: Boolean },
|
|
42
|
+
viewerOptions: {},
|
|
42
43
|
showManualButton: { type: Boolean },
|
|
43
44
|
listOssByIds: {},
|
|
44
45
|
listOssByUrls: {},
|
|
@@ -218,6 +219,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
218
219
|
showManualButton,
|
|
219
220
|
onPreview,
|
|
220
221
|
imageViewerProps,
|
|
222
|
+
viewerOptions,
|
|
221
223
|
...uploadOptions
|
|
222
224
|
} = props;
|
|
223
225
|
const globalUploadPropsV = globalUploadProps.value;
|
|
@@ -408,6 +410,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
408
410
|
accept,
|
|
409
411
|
handlePopupRemove,
|
|
410
412
|
onlyView,
|
|
413
|
+
viewerOptions,
|
|
411
414
|
listOssByIds: {
|
|
412
415
|
...globalUploadPropsV?.listOssByIds,
|
|
413
416
|
...listOssByIds
|
|
@@ -842,8 +845,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
842
845
|
}, null, 8, ["locale", "files", "show-thumbnail", "show-upload-progress", "abridge-name", "is-batch-upload", "disabled", "drag-events", "on-preview", "on-remove"])),
|
|
843
846
|
createVNode(unref(_sfc_main$2), {
|
|
844
847
|
ref: "multiFileViewer",
|
|
845
|
-
files: viewerFiles.value
|
|
846
|
-
|
|
848
|
+
files: viewerFiles.value,
|
|
849
|
+
options: reProps.value.viewerOptions
|
|
850
|
+
}, null, 8, ["files", "options"])
|
|
847
851
|
]),
|
|
848
852
|
_: 1
|
|
849
853
|
}, 8, ["class", "files", "theme", "multiple", "disabled", "on-remove", "on-preview", "show-thumbnail", "show-image-file-name", "show-upload-progress"])
|
|
@@ -902,8 +906,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
902
906
|
]), 1032, ["locale", "files", "show-upload-progress", "show-image-file-name", "disabled", "on-preview", "on-remove"]),
|
|
903
907
|
createVNode(unref(_sfc_main$2), {
|
|
904
908
|
ref: "multiFileViewer",
|
|
905
|
-
files: viewerFiles.value
|
|
906
|
-
|
|
909
|
+
files: viewerFiles.value,
|
|
910
|
+
options: reProps.value.viewerOptions
|
|
911
|
+
}, null, 8, ["files", "options"])
|
|
907
912
|
]),
|
|
908
913
|
key: "2"
|
|
909
914
|
} : __props.theme === "file-flow" ? {
|
|
@@ -932,8 +937,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
932
937
|
]), 1032, ["locale", "files", "show-thumbnail", "show-upload-progress", "abridge-name", "is-batch-upload", "disabled", "drag-events", "on-preview", "on-remove"]),
|
|
933
938
|
createVNode(unref(_sfc_main$2), {
|
|
934
939
|
ref: "multiFileViewer",
|
|
935
|
-
files: viewerFiles.value
|
|
936
|
-
|
|
940
|
+
files: viewerFiles.value,
|
|
941
|
+
options: reProps.value.viewerOptions
|
|
942
|
+
}, null, 8, ["files", "options"])
|
|
937
943
|
]),
|
|
938
944
|
key: "3"
|
|
939
945
|
} : __props.theme === "image" ? {
|
|
@@ -964,8 +970,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
964
970
|
]), 1032, ["locale", "files", "show-upload-progress", "show-image-file-name", "abridge-name", "disabled", "trigger", "max", "multiple", "trigger-upload", "on-preview", "on-remove"]),
|
|
965
971
|
createVNode(unref(_sfc_main$2), {
|
|
966
972
|
ref: "multiFileViewer",
|
|
967
|
-
files: viewerFiles.value
|
|
968
|
-
|
|
973
|
+
files: viewerFiles.value,
|
|
974
|
+
options: reProps.value.viewerOptions
|
|
975
|
+
}, null, 8, ["files", "options"])
|
|
969
976
|
]),
|
|
970
977
|
key: "4"
|
|
971
978
|
} : void 0,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TdUploadProps, UploadFile, UploadInstanceFunctions } from 'tdesign-vue-next';
|
|
2
|
+
import type { QdMultiFileViewerProps } from '../multi-file-viewer';
|
|
2
3
|
export type QdUploadListOssByIdsResult = {
|
|
3
4
|
url: string;
|
|
4
5
|
ossId: string;
|
|
@@ -21,6 +22,7 @@ export interface QdUploadProps<F extends UploadFile = UploadFile, OR = unknown,
|
|
|
21
22
|
theme?: TdUploadProps['theme'] | 'btn-file-popup' | 'btn-image-popup';
|
|
22
23
|
accept?: string[] | '*';
|
|
23
24
|
onlyView?: boolean;
|
|
25
|
+
viewerOptions?: QdMultiFileViewerProps['options'];
|
|
24
26
|
showManualButton?: boolean;
|
|
25
27
|
listOssByIds?: {
|
|
26
28
|
service: (url: TOP) => Promise<OR>;
|