qidian-vue-ui 2.0.53 → 2.0.54
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/upload/file-flow-file-list-display/index.css +1 -1
- package/dist/components/upload/file-flow-file-list-display/index.vue.mjs +1 -1
- package/dist/components/upload/file-flow-file-list-display/index.vue2.mjs +1 -1
- package/dist/components/upload/image-flow-file-list-display/index.vue.mjs +1 -1
- package/dist/components/upload/index.css +37 -34
- package/dist/components/upload/index.vue.mjs +1 -1
- package/dist/components/upload/index.vue2.mjs +23 -4
- package/package.json +1 -1
|
@@ -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 QdUploadFileFlowFileListDisplay = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdUploadFileFlowFileListDisplay = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-27becaca"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdUploadFileFlowFileListDisplay as default
|
|
8
8
|
};
|
|
@@ -126,7 +126,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
126
126
|
}, toDisplayString(getStatusText(file)), 3)
|
|
127
127
|
])
|
|
128
128
|
]),
|
|
129
|
-
!__props.disabled && (!__props.isBatchUpload || !allSuccess.value || index === 0) ? (openBlock(), createElementBlock("td", {
|
|
129
|
+
!__props.disabled && file.status !== "progress" && (!__props.isBatchUpload || !allSuccess.value || index === 0) ? (openBlock(), createElementBlock("td", {
|
|
130
130
|
key: 0,
|
|
131
131
|
rowspan: __props.isBatchUpload && allSuccess.value ? __props.files.length : void 0
|
|
132
132
|
}, [
|
|
@@ -113,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
113
113
|
onRemove: props.onRemove,
|
|
114
114
|
disabled: __props.disabled
|
|
115
115
|
}),
|
|
116
|
-
!__props.disabled ? (openBlock(), createElementBlock("span", {
|
|
116
|
+
!__props.disabled && file.status !== "progress" ? (openBlock(), createElementBlock("span", {
|
|
117
117
|
key: 1,
|
|
118
118
|
class: "t-upload__card-mask-item t-upload__delete",
|
|
119
119
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
@@ -1,100 +1,103 @@
|
|
|
1
|
-
.qd-upload[data-v-
|
|
1
|
+
.qd-upload[data-v-afd4a5dd] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
outline: none;
|
|
4
4
|
}
|
|
5
|
-
.qd-upload[data-v-
|
|
5
|
+
.qd-upload[data-v-afd4a5dd] .t-image-viewer__trigger {
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
8
|
-
.qd-upload[data-v-
|
|
8
|
+
.qd-upload[data-v-afd4a5dd] .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-afd4a5dd] .t-upload__dragger-btns > .t-size-s {
|
|
15
15
|
display: inline-flex;
|
|
16
16
|
}
|
|
17
|
-
.qd-upload[data-v-
|
|
17
|
+
.qd-upload[data-v-afd4a5dd] .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-afd4a5dd] .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-afd4a5dd] .t-upload__flow-card-area,
|
|
27
|
+
.qd-upload[data-v-afd4a5dd] .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-afd4a5dd] .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-afd4a5dd] .t-upload__file-name-text {
|
|
35
35
|
cursor: pointer;
|
|
36
36
|
}
|
|
37
|
-
.qd-upload[data-v-
|
|
37
|
+
.qd-upload[data-v-afd4a5dd] .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-afd4a5dd] .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-afd4a5dd] .t-image-viewer__trigger {
|
|
46
46
|
display: none;
|
|
47
47
|
}
|
|
48
|
-
.qd-upload__popup-upload[data-v-
|
|
48
|
+
.qd-upload__popup-upload[data-v-afd4a5dd] .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-afd4a5dd] .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-afd4a5dd] .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-afd4a5dd] .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-afd4a5dd] .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-afd4a5dd] .t-upload__flow-table th:last-child,
|
|
67
|
+
.qd-upload__popup-upload--disabled[data-v-afd4a5dd] .t-upload__flow-table td:last-child {
|
|
68
68
|
display: none;
|
|
69
69
|
}
|
|
70
|
-
.qd-upload[data-v-
|
|
71
|
-
.qd-upload[data-v-
|
|
70
|
+
.qd-upload[data-v-afd4a5dd]:focus .t-upload__flow-card-area,
|
|
71
|
+
.qd-upload[data-v-afd4a5dd]:focus .t-upload__flow-table {
|
|
72
72
|
border-color: var(--td-brand-color);
|
|
73
73
|
}
|
|
74
|
-
.qd-upload--only-view[data-v-
|
|
75
|
-
.qd-upload--only-view[data-v-
|
|
74
|
+
.qd-upload--only-view[data-v-afd4a5dd] .t-upload__flow-empty,
|
|
75
|
+
.qd-upload--only-view[data-v-afd4a5dd] .t-upload__card-mask-item-divider {
|
|
76
76
|
display: none;
|
|
77
77
|
}
|
|
78
|
-
.qd-upload--only-view[data-v-
|
|
78
|
+
.qd-upload--only-view[data-v-afd4a5dd] .t-upload__flow-card-area {
|
|
79
79
|
border-color: var(--td-component-border);
|
|
80
80
|
}
|
|
81
|
-
.qd-upload--only-view[data-v-
|
|
82
|
-
.qd-upload--only-view[data-v-
|
|
83
|
-
.qd-upload--only-view[data-v-
|
|
81
|
+
.qd-upload--only-view[data-v-afd4a5dd]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-op,
|
|
82
|
+
.qd-upload--only-view[data-v-afd4a5dd]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__trigger,
|
|
83
|
+
.qd-upload--only-view[data-v-afd4a5dd]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-bottom {
|
|
84
84
|
display: none;
|
|
85
85
|
}
|
|
86
|
-
.qd-upload--only-view[data-v-
|
|
87
|
-
.qd-upload--only-view[data-v-
|
|
86
|
+
.qd-upload--only-view[data-v-afd4a5dd]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-table,
|
|
87
|
+
.qd-upload--only-view[data-v-afd4a5dd]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-card-area {
|
|
88
88
|
margin-top: 0;
|
|
89
89
|
}
|
|
90
|
-
.qd-upload--
|
|
90
|
+
.qd-upload--uploading[data-v-afd4a5dd] .t-upload__single-input-clear {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
.qd-upload--hide-manual-upload[data-v-afd4a5dd] .t-upload__flow-bottom {
|
|
91
94
|
display: none;
|
|
92
95
|
margin-top: 0;
|
|
93
96
|
}
|
|
94
|
-
.qd-upload--hide-progress[data-v-
|
|
95
|
-
.qd-upload--hide-progress[data-v-
|
|
97
|
+
.qd-upload--hide-progress[data-v-afd4a5dd] .t-upload__flow-table th:last-child,
|
|
98
|
+
.qd-upload--hide-progress[data-v-afd4a5dd] .t-upload__flow-table td:last-child {
|
|
96
99
|
display: none;
|
|
97
100
|
}
|
|
98
|
-
.qd-upload--disabled[data-v-
|
|
101
|
+
.qd-upload--disabled[data-v-afd4a5dd] .t-upload__flow-card-area {
|
|
99
102
|
border-color: var(--td-component-border);
|
|
100
103
|
}
|
|
@@ -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-afd4a5dd"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdUpload as default
|
|
8
8
|
};
|
|
@@ -144,14 +144,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
144
144
|
let isSyncingUploadModelValue = false;
|
|
145
145
|
let isSyncingFiles = false;
|
|
146
146
|
const tempUrlMap = /* @__PURE__ */ new WeakMap();
|
|
147
|
+
const removedUploadingFileValues = /* @__PURE__ */ new Set();
|
|
147
148
|
const tempModelValueSet = /* @__PURE__ */ new Set();
|
|
148
149
|
const ossListAbortReason = /* @__PURE__ */ Symbol("abort");
|
|
149
150
|
let ossListAbort;
|
|
150
151
|
const delList = ref([]);
|
|
152
|
+
const isUploading = computed(() => getDisplayFiles().some((file) => file.status === "progress"));
|
|
151
153
|
const popupFileList = computed({
|
|
152
|
-
get: () => [...
|
|
154
|
+
get: () => [...getDisplayFiles()],
|
|
153
155
|
set: (files) => {
|
|
154
|
-
|
|
156
|
+
if (!props.autoUpload) {
|
|
157
|
+
fileList.value = files;
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const waitingFiles = waitingUploadFiles.value;
|
|
161
|
+
fileList.value = files.filter((file) => !waitingFiles.includes(file));
|
|
162
|
+
waitingUploadFiles.value = waitingFiles.filter((file) => files.includes(file));
|
|
155
163
|
}
|
|
156
164
|
});
|
|
157
165
|
const popupVisible = ref(false);
|
|
@@ -307,11 +315,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
307
315
|
}
|
|
308
316
|
};
|
|
309
317
|
const reOnSuccess = (context) => {
|
|
318
|
+
const nextFileList = fileList.value.filter((file) => {
|
|
319
|
+
const fileValue = file.response?.[reProps.value.valueMode];
|
|
320
|
+
return typeof fileValue !== "string" || !removedUploadingFileValues.has(fileValue);
|
|
321
|
+
});
|
|
322
|
+
if (nextFileList.length !== fileList.value.length) fileList.value = nextFileList;
|
|
310
323
|
onSuccess?.(context);
|
|
311
324
|
revokeTempUrl(context.file);
|
|
312
325
|
updateTempModelValue(fileList.value);
|
|
313
326
|
};
|
|
314
327
|
const reOnRemove = (context) => {
|
|
328
|
+
const fileValue = context.file?.response?.[reProps.value.valueMode];
|
|
329
|
+
if (isUploading.value && typeof fileValue === "string") {
|
|
330
|
+
removedUploadingFileValues.add(fileValue);
|
|
331
|
+
}
|
|
315
332
|
onRemove?.(context);
|
|
316
333
|
revokeTempUrl(context.file);
|
|
317
334
|
const { ossId } = context.file?.response || {};
|
|
@@ -582,6 +599,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
582
599
|
}
|
|
583
600
|
function clear() {
|
|
584
601
|
revokeAllTempUrls();
|
|
602
|
+
removedUploadingFileValues.clear();
|
|
585
603
|
reModelValue.value = [];
|
|
586
604
|
fileList.value = [];
|
|
587
605
|
waitingUploadFiles.value = [];
|
|
@@ -693,6 +711,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
693
711
|
class: [
|
|
694
712
|
"qd-upload",
|
|
695
713
|
`qd-upload--${reProps.value.theme}`,
|
|
714
|
+
isUploading.value ? "qd-upload--uploading" : "",
|
|
696
715
|
reProps.value.onlyView ? "qd-upload--only-view" : "",
|
|
697
716
|
!reProps.value.uploadOptions.showUploadProgress && reProps.value.onlyView ? "qd-upload--hide-progress" : "",
|
|
698
717
|
!reProps.value.uploadOptions.autoUpload && reProps.value.showManualButton ? "" : "qd-upload--hide-manual-upload",
|
|
@@ -722,7 +741,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
722
741
|
]),
|
|
723
742
|
_: 1
|
|
724
743
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
725
|
-
|
|
744
|
+
popupFileList.value.length ? (openBlock(), createBlock(unref(Popup), {
|
|
726
745
|
key: 1,
|
|
727
746
|
visible: popupVisible.value,
|
|
728
747
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => popupVisible.value = $event),
|
|
@@ -794,7 +813,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
794
813
|
]),
|
|
795
814
|
default: withCtx(() => [
|
|
796
815
|
createVNode(unref(Badge), {
|
|
797
|
-
count:
|
|
816
|
+
count: popupFileList.value.length,
|
|
798
817
|
size: "small",
|
|
799
818
|
offset: [2, 2],
|
|
800
819
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|