geekplus-digital-ui 0.1.18 → 0.1.19
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/components/icon/src/icon.css +1 -1
- package/components/icon/src/icon.vue.js +3 -3
- package/components/upload/index.d.ts +6 -8
- package/components/upload/src/upload.css +1 -1
- package/components/upload/src/upload.vue.d.ts +6 -8
- package/components/upload/src/upload.vue.js +212 -217
- package/package.json +31 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
.d-icon[data-v-
|
|
1
|
+
.d-icon[data-v-29c845ca]{display:inline-flex}.d-icon[data-v-29c845ca] svg{box-sizing:content-box;display:inline-block;height:1em;overflow:visible;vertical-align:-.125em;width:1.25em}
|
|
@@ -5,12 +5,12 @@ const r = { class: "d-icon" }, s = /* @__PURE__ */ Object.assign({
|
|
|
5
5
|
name: "DIcon"
|
|
6
6
|
}, {
|
|
7
7
|
__name: "icon",
|
|
8
|
-
setup(
|
|
9
|
-
return (e,
|
|
8
|
+
setup(a) {
|
|
9
|
+
return (e, _) => (o(), t("i", r, [
|
|
10
10
|
c(e.$slots, "default", {}, void 0, !0)
|
|
11
11
|
]));
|
|
12
12
|
}
|
|
13
|
-
}), m = /* @__PURE__ */ n(s, [["__scopeId", "data-v-
|
|
13
|
+
}), m = /* @__PURE__ */ n(s, [["__scopeId", "data-v-29c845ca"]]);
|
|
14
14
|
export {
|
|
15
15
|
m as default
|
|
16
16
|
};
|
|
@@ -13,7 +13,6 @@ export const DUpload: import('vue').DefineComponent<{}, {
|
|
|
13
13
|
showTip: boolean;
|
|
14
14
|
pasteable: boolean;
|
|
15
15
|
showDownloadAll: boolean;
|
|
16
|
-
beforeUpload?: Function;
|
|
17
16
|
docType?: string;
|
|
18
17
|
scrollHeight?: string;
|
|
19
18
|
downloadAllMethod?: Function;
|
|
@@ -31,7 +30,6 @@ export const DUpload: import('vue').DefineComponent<{}, {
|
|
|
31
30
|
readonly showTip?: boolean;
|
|
32
31
|
readonly pasteable?: boolean;
|
|
33
32
|
readonly showDownloadAll?: boolean;
|
|
34
|
-
readonly beforeUpload?: Function;
|
|
35
33
|
readonly docType?: string;
|
|
36
34
|
readonly scrollHeight?: string;
|
|
37
35
|
readonly downloadAllMethod?: Function;
|
|
@@ -128,13 +126,13 @@ export const DUpload: import('vue').DefineComponent<{}, {
|
|
|
128
126
|
type: import('vue').PropType<boolean>;
|
|
129
127
|
default: undefined;
|
|
130
128
|
};
|
|
129
|
+
crossorigin: {
|
|
130
|
+
type: import('vue').PropType<import('element-plus').Crossorigin>;
|
|
131
|
+
};
|
|
131
132
|
beforeUpload: {
|
|
132
133
|
type: import('vue').PropType<(rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>>;
|
|
133
134
|
default: () => void;
|
|
134
135
|
};
|
|
135
|
-
crossorigin: {
|
|
136
|
-
type: import('vue').PropType<import('element-plus').Crossorigin>;
|
|
137
|
-
};
|
|
138
136
|
beforeRemove: {
|
|
139
137
|
type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => import('element-plus/es/utils/typescript.mjs').Awaitable<boolean>>;
|
|
140
138
|
};
|
|
@@ -295,13 +293,13 @@ export const DUpload: import('vue').DefineComponent<{}, {
|
|
|
295
293
|
type: import('vue').PropType<boolean>;
|
|
296
294
|
default: undefined;
|
|
297
295
|
};
|
|
296
|
+
crossorigin: {
|
|
297
|
+
type: import('vue').PropType<import('element-plus').Crossorigin>;
|
|
298
|
+
};
|
|
298
299
|
beforeUpload: {
|
|
299
300
|
type: import('vue').PropType<(rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>>;
|
|
300
301
|
default: () => void;
|
|
301
302
|
};
|
|
302
|
-
crossorigin: {
|
|
303
|
-
type: import('vue').PropType<import('element-plus').Crossorigin>;
|
|
304
|
-
};
|
|
305
303
|
beforeRemove: {
|
|
306
304
|
type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => import('element-plus/es/utils/typescript.mjs').Awaitable<boolean>>;
|
|
307
305
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.d-upload[data-v-
|
|
1
|
+
.d-upload[data-v-bdfedf5a]{line-height:normal}.d-upload.is-list[data-v-bdfedf5a],.d-upload.is-list .list[data-v-bdfedf5a]{display:flex;flex-direction:column;gap:8px}.d-upload.is-list .list .list-item .file-row[data-v-bdfedf5a]{position:relative;display:flex;align-items:center;gap:10px}.d-upload.is-list .list .list-item .file-row[data-v-bdfedf5a] .el-link{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.d-upload.is-list .list .list-item .file-row[data-v-bdfedf5a] .el-link .el-link__inner{display:inline}.d-upload.is-list .list .list-item .file-row .remove-icon[data-v-bdfedf5a]{cursor:pointer;display:none;color:var(--el-text-color-secondary)}.d-upload.is-list .list .list-item .file-row:hover .remove-icon[data-v-bdfedf5a]{display:block}.d-upload.is-card[data-v-bdfedf5a],.d-upload.is-card .card[data-v-bdfedf5a]{display:flex;flex-wrap:wrap;gap:8px}.d-upload.is-card .card .card-item[data-v-bdfedf5a]{display:flex;justify-content:center;align-items:center;font-size:16px;border:1px solid var(--el-border-color);border-radius:4px;overflow:hidden;position:relative;cursor:pointer}.d-upload.is-card .card .card-item .card-cover[data-v-bdfedf5a]{display:flex;justify-content:center;align-items:center;gap:10px;position:absolute;top:0;left:0;width:100%;height:100%;background:var(--el-overlay-color);opacity:0}.d-upload.is-card .card .card-item .card-cover .d-icon[data-v-bdfedf5a]{color:var(--el-color-white)}.d-upload.is-card .card .card-item .card-cover[data-v-bdfedf5a]:hover{opacity:1}.d-upload.is-card .card .el-image[data-v-bdfedf5a]{width:100%;height:100%}.d-upload .expand-toggle[data-v-bdfedf5a]{width:100%}.d-upload .expand-toggle[data-v-bdfedf5a] .el-link__inner{gap:5px}.d-upload .tip[data-v-bdfedf5a]{width:100%;font-size:12px;margin:0;color:var(--el-text-color-regular)}
|
|
@@ -13,7 +13,6 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
13
13
|
showTip: boolean;
|
|
14
14
|
pasteable: boolean;
|
|
15
15
|
showDownloadAll: boolean;
|
|
16
|
-
beforeUpload?: Function;
|
|
17
16
|
docType?: string;
|
|
18
17
|
scrollHeight?: string;
|
|
19
18
|
downloadAllMethod?: Function;
|
|
@@ -31,7 +30,6 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
31
30
|
readonly showTip?: boolean;
|
|
32
31
|
readonly pasteable?: boolean;
|
|
33
32
|
readonly showDownloadAll?: boolean;
|
|
34
|
-
readonly beforeUpload?: Function;
|
|
35
33
|
readonly docType?: string;
|
|
36
34
|
readonly scrollHeight?: string;
|
|
37
35
|
readonly downloadAllMethod?: Function;
|
|
@@ -128,13 +126,13 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
128
126
|
type: import('vue').PropType<boolean>;
|
|
129
127
|
default: undefined;
|
|
130
128
|
};
|
|
129
|
+
crossorigin: {
|
|
130
|
+
type: import('vue').PropType<import('element-plus').Crossorigin>;
|
|
131
|
+
};
|
|
131
132
|
beforeUpload: {
|
|
132
133
|
type: import('vue').PropType<(rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>>;
|
|
133
134
|
default: () => void;
|
|
134
135
|
};
|
|
135
|
-
crossorigin: {
|
|
136
|
-
type: import('vue').PropType<import('element-plus').Crossorigin>;
|
|
137
|
-
};
|
|
138
136
|
beforeRemove: {
|
|
139
137
|
type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => import('element-plus/es/utils/typescript.mjs').Awaitable<boolean>>;
|
|
140
138
|
};
|
|
@@ -295,13 +293,13 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
295
293
|
type: import('vue').PropType<boolean>;
|
|
296
294
|
default: undefined;
|
|
297
295
|
};
|
|
296
|
+
crossorigin: {
|
|
297
|
+
type: import('vue').PropType<import('element-plus').Crossorigin>;
|
|
298
|
+
};
|
|
298
299
|
beforeUpload: {
|
|
299
300
|
type: import('vue').PropType<(rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>>;
|
|
300
301
|
default: () => void;
|
|
301
302
|
};
|
|
302
|
-
crossorigin: {
|
|
303
|
-
type: import('vue').PropType<import('element-plus').Crossorigin>;
|
|
304
|
-
};
|
|
305
303
|
beforeRemove: {
|
|
306
304
|
type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => import('element-plus/es/utils/typescript.mjs').Awaitable<boolean>>;
|
|
307
305
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { useModel as
|
|
1
|
+
import { useModel as fe, ref as y, computed as m, reactive as Ue, watch as Ve, onMounted as De, onBeforeUnmount as Ee, openBlock as o, createElementBlock as f, normalizeClass as Ie, createVNode as d, unref as n, createBlock as c, createCommentVNode as p, withCtx as r, createElementVNode as _, createTextVNode as C, toDisplayString as k, normalizeStyle as M, Fragment as j, renderList as me, withModifiers as ve, mergeModels as ye } from "vue";
|
|
2
2
|
import "../../../hooks/index.js";
|
|
3
|
-
import { useFormItem as
|
|
3
|
+
import { useFormItem as Ne, ElMessageBox as Be, ElMessage as R, ElUpload as $e, ElImageViewer as Pe, ElDialog as je, ElButton as F, ElImage as Re, ElProgress as he, ElLink as H } from "element-plus";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
import {
|
|
6
|
-
import { saveAs as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
5
|
+
import { isFunction as He } from "lodash-es";
|
|
6
|
+
import { saveAs as qe } from "file-saver";
|
|
7
|
+
import Oe from "../../icons/angle-down-light.vue.js";
|
|
8
|
+
import Ke from "../../icons/angle-up-light.vue.js";
|
|
9
|
+
import Xe from "../../icons/circle-play-light.vue.js";
|
|
10
|
+
import Ge from "../../icons/circle-xmark-light.vue.js";
|
|
11
|
+
import Je from "../../icons/download-light.vue.js";
|
|
12
|
+
import Qe from "../../icons/eye-light.vue.js";
|
|
13
|
+
import We from "../../icons/file-light.vue.js";
|
|
14
|
+
import Ye from "../../icons/plus-light.vue.js";
|
|
15
|
+
import Ze from "../../icons/trash-light.vue.js";
|
|
16
16
|
import './upload2.css';import './upload.css';/* empty css */
|
|
17
17
|
/* empty css */
|
|
18
|
-
import
|
|
19
|
-
import { useLocale as
|
|
20
|
-
import { useActivated as
|
|
18
|
+
import et from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
19
|
+
import { useLocale as tt } from "../../../hooks/use-locale/index.js";
|
|
20
|
+
import { useActivated as lt } from "../../../hooks/use-activated/index.js";
|
|
21
21
|
import { DIcon as h } from "../../icon/index.js";
|
|
22
|
-
const
|
|
22
|
+
const at = { class: "d-upload__preview" }, ot = ["src"], nt = { key: 2 }, st = {
|
|
23
23
|
key: 0,
|
|
24
24
|
style: { width: "100%" }
|
|
25
|
-
},
|
|
25
|
+
}, it = ["onClick"], rt = { class: "card-cover" }, ut = ["innerHTML"], dt = { class: "file-row" }, ct = {
|
|
26
26
|
key: 6,
|
|
27
27
|
class: "expand-toggle"
|
|
28
|
-
},
|
|
28
|
+
}, pt = /* @__PURE__ */ Object.assign({
|
|
29
29
|
name: "DUpload"
|
|
30
30
|
}, {
|
|
31
31
|
__name: "upload",
|
|
32
|
-
props: /* @__PURE__ */
|
|
32
|
+
props: /* @__PURE__ */ ye({
|
|
33
33
|
domain: {
|
|
34
34
|
type: String,
|
|
35
35
|
required: !0
|
|
@@ -66,9 +66,6 @@ const ot = { class: "d-upload__preview" }, nt = ["src"], st = { key: 2 }, it = {
|
|
|
66
66
|
type: String,
|
|
67
67
|
default: "card"
|
|
68
68
|
},
|
|
69
|
-
beforeUpload: {
|
|
70
|
-
type: Function
|
|
71
|
-
},
|
|
72
69
|
docType: {
|
|
73
70
|
type: String
|
|
74
71
|
},
|
|
@@ -106,383 +103,381 @@ const ot = { class: "d-upload__preview" }, nt = ["src"], st = { key: 2 }, it = {
|
|
|
106
103
|
},
|
|
107
104
|
uploadingCountModifiers: {}
|
|
108
105
|
}),
|
|
109
|
-
emits: /* @__PURE__ */
|
|
110
|
-
setup(g, { emit:
|
|
111
|
-
const
|
|
112
|
-
width:
|
|
113
|
-
height:
|
|
114
|
-
})),
|
|
115
|
-
maxHeight:
|
|
106
|
+
emits: /* @__PURE__ */ ye(["change", "success"], ["update:modelValue", "update:uploadingCount"]),
|
|
107
|
+
setup(g, { emit: ge }) {
|
|
108
|
+
const a = g, q = ge, O = fe(g, "modelValue"), K = fe(g, "uploadingCount"), X = ["jpg", "jpeg", "png", "gif"], ke = ["mp4"], s = y([]), z = y(!1), w = y(!1), U = y(0), V = y([]), L = y(""), x = y(!1), G = y(null), J = y(null), { t: u } = tt(), we = lt(), { formItem: xe } = Ne(), D = m(() => x.value ? s.value : s.value.slice(0, a.maxShow)), E = m(() => s.value.length > 0), I = m(() => !a.disabled && !Q.value), b = m(() => a.showType === "list"), Q = m(() => s.value.length >= a.maxNumber), Se = m(() => b.value ? "is-list" : "is-card"), W = m(() => a.format.length ? a.format.map((t) => t.toUpperCase()) : []), Y = m(() => ({
|
|
109
|
+
width: a.size,
|
|
110
|
+
height: a.size
|
|
111
|
+
})), _e = m(() => a.format.map((t) => `.${t}`).join(",")), Z = m(() => ({
|
|
112
|
+
maxHeight: a.scrollHeight,
|
|
116
113
|
overflow: "auto"
|
|
117
|
-
})),
|
|
118
|
-
const t =
|
|
119
|
-
return
|
|
120
|
-
}),
|
|
114
|
+
})), Ce = m(() => {
|
|
115
|
+
const t = a.format.length && a.format.every((e) => X.includes(e)), l = [];
|
|
116
|
+
return a.maxSize && !t && l.push(u("d.upload.lessThan", { size: a.maxSize })), a.format.length && l.push(u("d.upload.format", { format: a.format.join("/") })), a.pasteable && l.push(u("d.upload.pasteable")), l.join(u("d.upload.comma"));
|
|
117
|
+
}), Le = (t) => {
|
|
121
118
|
s.value.some((e) => e.uploadStatus === "processing") || (s.value = t?.map((e) => ({
|
|
122
119
|
id: e.id,
|
|
123
120
|
name: e.name || e.docName,
|
|
124
121
|
docName: e.name || e.docName,
|
|
125
122
|
url: e.url || e.docUrl,
|
|
126
123
|
docUrl: e.url || e.docUrl,
|
|
127
|
-
type:
|
|
128
|
-
docType:
|
|
124
|
+
type: a.docType || e.type || e.docType,
|
|
125
|
+
docType: a.docType || e.type || e.docType,
|
|
129
126
|
uploadStatus: "finished"
|
|
130
127
|
})) || []);
|
|
131
|
-
},
|
|
128
|
+
}, N = (t) => {
|
|
132
129
|
if (t) {
|
|
133
|
-
const
|
|
134
|
-
return
|
|
130
|
+
const l = t.split(".");
|
|
131
|
+
return l[l.length - 1].toLowerCase();
|
|
135
132
|
}
|
|
136
133
|
return "";
|
|
137
|
-
}, S = (t) =>
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
if (
|
|
141
|
-
const
|
|
142
|
-
|
|
134
|
+
}, S = (t) => X.includes(N(t.name)), T = (t) => ke.includes(N(t.name)), A = (t) => t?.uploadStatus === "finished", ee = (t) => !a.disabled && A(t), te = () => {
|
|
135
|
+
G.value?.$el.querySelector("input")?.click();
|
|
136
|
+
}, be = (t) => {
|
|
137
|
+
if (U.value = 0, V.value = [], L.value = "", S(t)) {
|
|
138
|
+
const l = s.value.filter((e) => S(e));
|
|
139
|
+
U.value = l.findIndex((e) => e.url === t.url), V.value = l.map((e) => e.url), z.value = !0;
|
|
143
140
|
}
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
|
|
141
|
+
T(t) && (L.value = t.url, w.value = !0);
|
|
142
|
+
}, le = () => {
|
|
143
|
+
J.value?.pause(), w.value = !1;
|
|
144
|
+
}, ae = (t) => {
|
|
145
|
+
const l = () => {
|
|
146
|
+
const i = s.value.indexOf(t);
|
|
147
|
+
i !== -1 && (s.value.splice(i, 1), oe(t));
|
|
151
148
|
}, e = async () => {
|
|
152
149
|
if (!A(t)) {
|
|
153
|
-
|
|
150
|
+
l();
|
|
154
151
|
return;
|
|
155
152
|
}
|
|
156
|
-
|
|
153
|
+
l();
|
|
157
154
|
};
|
|
158
|
-
|
|
155
|
+
Be.confirm(u("d.upload.deleteConfirm"), u("d.upload.tip"), {
|
|
159
156
|
type: "warning"
|
|
160
157
|
}).then(async () => {
|
|
161
158
|
await e();
|
|
162
159
|
}).catch(() => {
|
|
163
160
|
});
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}, Fe = (t, a) => {
|
|
169
|
-
const e = P(t.name);
|
|
161
|
+
}, Te = (t, l) => {
|
|
162
|
+
R.success(u("d.upload.fileSuccess", { file: t.name })), q("success", t, l, s.value);
|
|
163
|
+
}, Ae = (t, l) => {
|
|
164
|
+
const e = N(t.name);
|
|
170
165
|
if (e) {
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
return
|
|
166
|
+
const i = e.toUpperCase();
|
|
167
|
+
if (W.value.length && !W.value.includes(i))
|
|
168
|
+
return l || R.error(u("d.upload.fileFormat", { file: t.name, format: a.format.join("/") })), !1;
|
|
174
169
|
}
|
|
175
170
|
return !0;
|
|
176
|
-
}, Me = (t) => t.size >
|
|
177
|
-
if (!
|
|
171
|
+
}, Me = (t) => t.size > a.maxSize * 1024 * 1024 ? (R.error(u("d.upload.fileLessThan", { file: t.name, size: a.maxSize })), !1) : !0, Fe = (t, l) => {
|
|
172
|
+
if (!l)
|
|
178
173
|
return;
|
|
179
|
-
const { loaded: e = 0, total:
|
|
180
|
-
|
|
181
|
-
},
|
|
182
|
-
|
|
174
|
+
const { loaded: e = 0, total: i = 0 } = t || {};
|
|
175
|
+
i > 0 && (l.percentage = Math.floor(e / i * 100));
|
|
176
|
+
}, oe = (t) => {
|
|
177
|
+
O.value = s.value, q("change", t, s.value), xe?.validate("change");
|
|
178
|
+
}, ne = (t, l) => (Ae(t, l) && Me(t) && ze(t), !1), ze = async (t) => {
|
|
179
|
+
if (Q.value)
|
|
183
180
|
return !1;
|
|
184
|
-
x.value ||
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
const e =
|
|
181
|
+
x.value || B();
|
|
182
|
+
const l = new FormData();
|
|
183
|
+
l.append("file", t);
|
|
184
|
+
const e = Ue({
|
|
188
185
|
uploadStatus: "processing",
|
|
189
186
|
percentage: 0,
|
|
190
187
|
name: t.name
|
|
191
188
|
});
|
|
192
|
-
s.value.push(e)
|
|
193
|
-
const
|
|
194
|
-
X.value++;
|
|
195
|
-
const m = () => s.value.indexOf(e);
|
|
189
|
+
s.value.push(e), K.value++;
|
|
190
|
+
const i = () => s.value.indexOf(e);
|
|
196
191
|
try {
|
|
197
|
-
const { data:
|
|
198
|
-
url:
|
|
192
|
+
const { data: v } = await a.axios({
|
|
193
|
+
url: a.url,
|
|
199
194
|
method: "post",
|
|
200
|
-
data:
|
|
201
|
-
onUploadProgress: (
|
|
202
|
-
}),
|
|
203
|
-
if (
|
|
195
|
+
data: l,
|
|
196
|
+
onUploadProgress: (P) => Fe(P, e)
|
|
197
|
+
}), $ = v?.data || v;
|
|
198
|
+
if ($ && i() !== -1) {
|
|
204
199
|
const {
|
|
205
|
-
id:
|
|
206
|
-
name:
|
|
207
|
-
url:
|
|
208
|
-
type:
|
|
209
|
-
} =
|
|
200
|
+
id: P,
|
|
201
|
+
name: de,
|
|
202
|
+
url: ce,
|
|
203
|
+
type: pe
|
|
204
|
+
} = $;
|
|
210
205
|
Object.assign(e, {
|
|
211
|
-
id:
|
|
212
|
-
name:
|
|
213
|
-
docName:
|
|
214
|
-
url:
|
|
215
|
-
docUrl:
|
|
216
|
-
type:
|
|
217
|
-
docType:
|
|
206
|
+
id: P,
|
|
207
|
+
name: de,
|
|
208
|
+
docName: de,
|
|
209
|
+
url: a.domain + ce,
|
|
210
|
+
docUrl: a.domain + ce,
|
|
211
|
+
type: a.docType || pe,
|
|
212
|
+
docType: a.docType || pe,
|
|
218
213
|
uploadStatus: "finished"
|
|
219
|
-
}),
|
|
220
|
-
} else
|
|
214
|
+
}), Te($, e);
|
|
215
|
+
} else i() !== -1 && s.value.splice(i(), 1);
|
|
221
216
|
} catch {
|
|
222
|
-
|
|
217
|
+
i() !== -1 && s.value.splice(i(), 1);
|
|
223
218
|
} finally {
|
|
224
|
-
|
|
219
|
+
K.value--, oe(e);
|
|
225
220
|
}
|
|
226
|
-
},
|
|
227
|
-
t?.url &&
|
|
228
|
-
},
|
|
221
|
+
}, se = (t) => {
|
|
222
|
+
t?.url && qe(t.url, t.name);
|
|
223
|
+
}, B = () => {
|
|
229
224
|
x.value = !x.value;
|
|
230
|
-
},
|
|
231
|
-
if (!
|
|
225
|
+
}, ie = (t) => {
|
|
226
|
+
if (!a.pasteable || a.disabled || !we.value)
|
|
232
227
|
return;
|
|
233
|
-
const
|
|
234
|
-
for (let e = 0; e <
|
|
235
|
-
const
|
|
236
|
-
|
|
228
|
+
const l = t.clipboardData?.items || [];
|
|
229
|
+
for (let e = 0; e < l.length; e++) {
|
|
230
|
+
const v = l[e].getAsFile();
|
|
231
|
+
v && ne(v, !0);
|
|
237
232
|
}
|
|
238
|
-
},
|
|
239
|
-
!
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
}, re = (t) => {
|
|
234
|
+
!E.value || !t?.url || (S(t) || T(t) ? be(t) : se(t));
|
|
235
|
+
}, ue = () => {
|
|
236
|
+
He(a.downloadAllMethod) ? a.downloadAllMethod(s.value) : s.value.forEach((t) => {
|
|
237
|
+
se(t);
|
|
243
238
|
});
|
|
244
239
|
};
|
|
245
240
|
return Ve(
|
|
246
|
-
|
|
241
|
+
O,
|
|
247
242
|
(t) => {
|
|
248
|
-
|
|
243
|
+
Le(t);
|
|
249
244
|
},
|
|
250
245
|
{ immediate: !0 }
|
|
251
|
-
),
|
|
252
|
-
document.addEventListener("paste",
|
|
253
|
-
}),
|
|
254
|
-
document.removeEventListener("paste",
|
|
255
|
-
}), (t,
|
|
256
|
-
class:
|
|
246
|
+
), De(() => {
|
|
247
|
+
document.addEventListener("paste", ie);
|
|
248
|
+
}), Ee(() => {
|
|
249
|
+
document.removeEventListener("paste", ie);
|
|
250
|
+
}), (t, l) => (o(), f("div", {
|
|
251
|
+
class: Ie(["d-upload", Se.value])
|
|
257
252
|
}, [
|
|
258
|
-
d(n(
|
|
253
|
+
d(n($e), {
|
|
259
254
|
ref_key: "uploadRef",
|
|
260
|
-
ref:
|
|
255
|
+
ref: G,
|
|
261
256
|
style: { display: "none" },
|
|
262
257
|
"show-file-list": !1,
|
|
263
258
|
"file-list": s.value,
|
|
264
|
-
accept:
|
|
265
|
-
"before-upload":
|
|
259
|
+
accept: _e.value,
|
|
260
|
+
"before-upload": ne,
|
|
266
261
|
"with-credentials": "",
|
|
267
262
|
multiple: "",
|
|
268
263
|
action: "/"
|
|
269
264
|
}, null, 8, ["file-list", "accept"]),
|
|
270
|
-
|
|
265
|
+
z.value ? (o(), c(n(Pe), {
|
|
271
266
|
key: 0,
|
|
272
|
-
"url-list":
|
|
273
|
-
"initial-index":
|
|
267
|
+
"url-list": V.value,
|
|
268
|
+
"initial-index": U.value,
|
|
274
269
|
"hide-on-click-modal": "",
|
|
275
270
|
teleported: "",
|
|
276
|
-
onClose:
|
|
271
|
+
onClose: l[0] || (l[0] = (e) => z.value = !1)
|
|
277
272
|
}, null, 8, ["url-list", "initial-index"])) : p("", !0),
|
|
278
|
-
w.value ? (o(), c(n(
|
|
273
|
+
w.value ? (o(), c(n(je), {
|
|
279
274
|
key: 1,
|
|
280
275
|
modelValue: w.value,
|
|
281
|
-
"onUpdate:modelValue":
|
|
282
|
-
title: n(
|
|
276
|
+
"onUpdate:modelValue": l[1] || (l[1] = (e) => w.value = e),
|
|
277
|
+
title: n(u)("d.upload.preview"),
|
|
283
278
|
width: "1200px",
|
|
284
279
|
"align-center": "",
|
|
285
|
-
"before-close":
|
|
280
|
+
"before-close": le,
|
|
286
281
|
"append-to-body": ""
|
|
287
282
|
}, {
|
|
288
|
-
footer:
|
|
289
|
-
d(n(
|
|
290
|
-
default:
|
|
291
|
-
C(k(n(
|
|
283
|
+
footer: r(() => [
|
|
284
|
+
d(n(F), { onClick: le }, {
|
|
285
|
+
default: r(() => [
|
|
286
|
+
C(k(n(u)("d.upload.close")), 1)
|
|
292
287
|
]),
|
|
293
288
|
_: 1
|
|
294
289
|
})
|
|
295
290
|
]),
|
|
296
|
-
default:
|
|
297
|
-
_("div",
|
|
291
|
+
default: r(() => [
|
|
292
|
+
_("div", at, [
|
|
298
293
|
L.value ? (o(), f("video", {
|
|
299
294
|
key: 0,
|
|
300
295
|
ref_key: "videoRef",
|
|
301
|
-
ref:
|
|
296
|
+
ref: J,
|
|
302
297
|
src: L.value,
|
|
303
298
|
controls: "",
|
|
304
299
|
class: "preview-video"
|
|
305
|
-
}, null, 8,
|
|
300
|
+
}, null, 8, ot)) : p("", !0)
|
|
306
301
|
])
|
|
307
302
|
]),
|
|
308
303
|
_: 1
|
|
309
304
|
}, 8, ["modelValue", "title"])) : p("", !0),
|
|
310
|
-
|
|
311
|
-
|
|
305
|
+
b.value ? (o(), f("div", nt, [
|
|
306
|
+
I.value ? (o(), c(n(F), {
|
|
312
307
|
key: 0,
|
|
313
|
-
onClick:
|
|
308
|
+
onClick: te
|
|
314
309
|
}, {
|
|
315
|
-
default:
|
|
316
|
-
C(k(n(
|
|
310
|
+
default: r(() => [
|
|
311
|
+
C(k(n(u)("d.upload.upload")), 1)
|
|
317
312
|
]),
|
|
318
313
|
_: 1
|
|
319
314
|
})) : p("", !0),
|
|
320
|
-
g.showDownloadAll &&
|
|
315
|
+
g.showDownloadAll && E.value ? (o(), c(n(F), {
|
|
321
316
|
key: 1,
|
|
322
317
|
type: "primary",
|
|
323
318
|
link: "",
|
|
324
|
-
onClick:
|
|
319
|
+
onClick: ue
|
|
325
320
|
}, {
|
|
326
|
-
default:
|
|
327
|
-
C(k(n(
|
|
321
|
+
default: r(() => [
|
|
322
|
+
C(k(n(u)("d.upload.downloadAll")), 1)
|
|
328
323
|
]),
|
|
329
324
|
_: 1
|
|
330
325
|
})) : p("", !0)
|
|
331
326
|
])) : p("", !0),
|
|
332
|
-
|
|
327
|
+
b.value ? p("", !0) : (o(), f("div", {
|
|
333
328
|
key: 3,
|
|
334
329
|
class: "card",
|
|
335
|
-
style:
|
|
330
|
+
style: M(Z.value)
|
|
336
331
|
}, [
|
|
337
|
-
g.showDownloadAll &&
|
|
338
|
-
d(n(
|
|
332
|
+
g.showDownloadAll && E.value ? (o(), f("div", st, [
|
|
333
|
+
d(n(F), {
|
|
339
334
|
type: "primary",
|
|
340
335
|
link: "",
|
|
341
|
-
onClick:
|
|
336
|
+
onClick: ue
|
|
342
337
|
}, {
|
|
343
|
-
default:
|
|
344
|
-
C(k(n(
|
|
338
|
+
default: r(() => [
|
|
339
|
+
C(k(n(u)("d.upload.downloadAll")), 1)
|
|
345
340
|
]),
|
|
346
341
|
_: 1
|
|
347
342
|
})
|
|
348
343
|
])) : p("", !0),
|
|
349
|
-
(o(!0), f(
|
|
350
|
-
key: e.id || `${e.name}-${
|
|
344
|
+
(o(!0), f(j, null, me(D.value, (e, i) => (o(), f("div", {
|
|
345
|
+
key: e.id || `${e.name}-${i}`,
|
|
351
346
|
class: "card-item",
|
|
352
|
-
style:
|
|
353
|
-
onClick: (
|
|
347
|
+
style: M(Y.value),
|
|
348
|
+
onClick: (v) => re(e)
|
|
354
349
|
}, [
|
|
355
|
-
A(e) ? (o(), f(
|
|
356
|
-
S(e) ? (o(), c(n(
|
|
350
|
+
A(e) ? (o(), f(j, { key: 0 }, [
|
|
351
|
+
S(e) ? (o(), c(n(Re), {
|
|
357
352
|
key: 0,
|
|
358
353
|
src: e.url,
|
|
359
354
|
fit: "cover"
|
|
360
|
-
}, null, 8, ["src"])) :
|
|
361
|
-
default:
|
|
362
|
-
d(
|
|
355
|
+
}, null, 8, ["src"])) : T(e) ? (o(), c(n(h), { key: 1 }, {
|
|
356
|
+
default: r(() => [
|
|
357
|
+
d(Xe)
|
|
363
358
|
]),
|
|
364
359
|
_: 1
|
|
365
360
|
})) : (o(), c(n(h), { key: 2 }, {
|
|
366
|
-
default:
|
|
367
|
-
d(
|
|
361
|
+
default: r(() => [
|
|
362
|
+
d(We)
|
|
368
363
|
]),
|
|
369
364
|
_: 1
|
|
370
365
|
})),
|
|
371
|
-
_("div",
|
|
372
|
-
S(e) ||
|
|
373
|
-
default:
|
|
374
|
-
d(
|
|
366
|
+
_("div", rt, [
|
|
367
|
+
S(e) || T(e) ? (o(), c(n(h), { key: 0 }, {
|
|
368
|
+
default: r(() => [
|
|
369
|
+
d(Qe)
|
|
375
370
|
]),
|
|
376
371
|
_: 1
|
|
377
372
|
})) : (o(), c(n(h), { key: 1 }, {
|
|
378
|
-
default:
|
|
379
|
-
d(
|
|
373
|
+
default: r(() => [
|
|
374
|
+
d(Je)
|
|
380
375
|
]),
|
|
381
376
|
_: 1
|
|
382
377
|
})),
|
|
383
|
-
|
|
378
|
+
ee(e) ? (o(), c(n(h), {
|
|
384
379
|
key: 2,
|
|
385
|
-
onClick:
|
|
380
|
+
onClick: ve((v) => ae(e), ["stop"])
|
|
386
381
|
}, {
|
|
387
|
-
default:
|
|
388
|
-
d(
|
|
382
|
+
default: r(() => [
|
|
383
|
+
d(Ze)
|
|
389
384
|
]),
|
|
390
385
|
_: 1
|
|
391
386
|
}, 8, ["onClick"])) : p("", !0)
|
|
392
387
|
])
|
|
393
|
-
], 64)) : (o(), c(n(
|
|
388
|
+
], 64)) : (o(), c(n(he), {
|
|
394
389
|
key: 1,
|
|
395
390
|
style: { width: "80%" },
|
|
396
391
|
percentage: e.percentage,
|
|
397
392
|
"stroke-width": 5,
|
|
398
393
|
"show-text": !1
|
|
399
394
|
}, null, 8, ["percentage"]))
|
|
400
|
-
], 12,
|
|
401
|
-
|
|
395
|
+
], 12, it))), 128)),
|
|
396
|
+
I.value ? (o(), f("div", {
|
|
402
397
|
key: 1,
|
|
403
398
|
class: "card-item",
|
|
404
|
-
style:
|
|
405
|
-
onClick:
|
|
399
|
+
style: M(Y.value),
|
|
400
|
+
onClick: te
|
|
406
401
|
}, [
|
|
407
402
|
d(n(h), null, {
|
|
408
|
-
default:
|
|
409
|
-
d(
|
|
403
|
+
default: r(() => [
|
|
404
|
+
d(Ye)
|
|
410
405
|
]),
|
|
411
406
|
_: 1
|
|
412
407
|
})
|
|
413
408
|
], 4)) : p("", !0)
|
|
414
409
|
], 4)),
|
|
415
|
-
|
|
410
|
+
I.value && g.showTip ? (o(), f("p", {
|
|
416
411
|
key: 4,
|
|
417
412
|
class: "tip",
|
|
418
|
-
innerHTML:
|
|
419
|
-
}, null, 8,
|
|
420
|
-
|
|
413
|
+
innerHTML: Ce.value
|
|
414
|
+
}, null, 8, ut)) : p("", !0),
|
|
415
|
+
b.value && D.value.length ? (o(), f("div", {
|
|
421
416
|
key: 5,
|
|
422
|
-
style:
|
|
417
|
+
style: M(Z.value),
|
|
423
418
|
class: "list"
|
|
424
419
|
}, [
|
|
425
|
-
(o(!0), f(
|
|
426
|
-
key: e.id || `${e.name}-${
|
|
420
|
+
(o(!0), f(j, null, me(D.value, (e, i) => (o(), f("div", {
|
|
421
|
+
key: e.id || `${e.name}-${i}`,
|
|
427
422
|
class: "list-item"
|
|
428
423
|
}, [
|
|
429
|
-
_("div",
|
|
430
|
-
d(n(
|
|
424
|
+
_("div", dt, [
|
|
425
|
+
d(n(H), {
|
|
431
426
|
type: "primary",
|
|
432
427
|
underline: "never",
|
|
433
|
-
onClick: (
|
|
428
|
+
onClick: (v) => re(e)
|
|
434
429
|
}, {
|
|
435
|
-
default:
|
|
430
|
+
default: r(() => [
|
|
436
431
|
C(k(e.name), 1)
|
|
437
432
|
]),
|
|
438
433
|
_: 2
|
|
439
434
|
}, 1032, ["onClick"]),
|
|
440
|
-
|
|
435
|
+
ee(e) ? (o(), c(n(h), {
|
|
441
436
|
key: 0,
|
|
442
437
|
class: "remove-icon",
|
|
443
|
-
onClick:
|
|
438
|
+
onClick: ve((v) => ae(e), ["stop"])
|
|
444
439
|
}, {
|
|
445
|
-
default:
|
|
446
|
-
d(
|
|
440
|
+
default: r(() => [
|
|
441
|
+
d(Ge)
|
|
447
442
|
]),
|
|
448
443
|
_: 1
|
|
449
444
|
}, 8, ["onClick"])) : p("", !0)
|
|
450
445
|
]),
|
|
451
|
-
A(e) ? p("", !0) : (o(), c(n(
|
|
446
|
+
A(e) ? p("", !0) : (o(), c(n(he), {
|
|
452
447
|
key: 0,
|
|
453
448
|
percentage: e.percentage,
|
|
454
449
|
"stroke-width": 8
|
|
455
450
|
}, null, 8, ["percentage"]))
|
|
456
451
|
]))), 128))
|
|
457
452
|
], 4)) : p("", !0),
|
|
458
|
-
s.value.length > g.maxShow ? (o(), f("div",
|
|
459
|
-
x.value ? (o(), c(n(
|
|
453
|
+
s.value.length > g.maxShow ? (o(), f("div", ct, [
|
|
454
|
+
x.value ? (o(), c(n(H), {
|
|
460
455
|
key: 0,
|
|
461
456
|
type: "primary",
|
|
462
457
|
underline: "never",
|
|
463
|
-
onClick:
|
|
458
|
+
onClick: B
|
|
464
459
|
}, {
|
|
465
|
-
default:
|
|
466
|
-
_("span", null, k(n(
|
|
460
|
+
default: r(() => [
|
|
461
|
+
_("span", null, k(n(u)("d.upload.collapse")), 1),
|
|
467
462
|
d(n(h), null, {
|
|
468
|
-
default:
|
|
469
|
-
d(
|
|
463
|
+
default: r(() => [
|
|
464
|
+
d(Ke)
|
|
470
465
|
]),
|
|
471
466
|
_: 1
|
|
472
467
|
})
|
|
473
468
|
]),
|
|
474
469
|
_: 1
|
|
475
|
-
})) : (o(), c(n(
|
|
470
|
+
})) : (o(), c(n(H), {
|
|
476
471
|
key: 1,
|
|
477
472
|
type: "primary",
|
|
478
473
|
underline: "never",
|
|
479
|
-
onClick:
|
|
474
|
+
onClick: B
|
|
480
475
|
}, {
|
|
481
|
-
default:
|
|
482
|
-
_("span", null, k(n(
|
|
476
|
+
default: r(() => [
|
|
477
|
+
_("span", null, k(n(u)("d.upload.expand")), 1),
|
|
483
478
|
d(n(h), null, {
|
|
484
|
-
default:
|
|
485
|
-
d(
|
|
479
|
+
default: r(() => [
|
|
480
|
+
d(Oe)
|
|
486
481
|
]),
|
|
487
482
|
_: 1
|
|
488
483
|
})
|
|
@@ -492,7 +487,7 @@ const ot = { class: "d-upload__preview" }, nt = ["src"], st = { key: 2 }, it = {
|
|
|
492
487
|
])) : p("", !0)
|
|
493
488
|
], 2));
|
|
494
489
|
}
|
|
495
|
-
}),
|
|
490
|
+
}), Dt = /* @__PURE__ */ et(pt, [["__scopeId", "data-v-bdfedf5a"]]);
|
|
496
491
|
export {
|
|
497
|
-
|
|
492
|
+
Dt as default
|
|
498
493
|
};
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "geekplus-digital-ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"module": "index.js",
|
|
7
|
-
"types": "index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./index.d.ts",
|
|
11
|
-
"import": "./index.js"
|
|
12
|
-
},
|
|
13
|
-
"./*": {
|
|
14
|
-
"types": "./*.d.ts",
|
|
15
|
-
"import": "./*.js"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"sideEffects": [
|
|
19
|
-
"**/*.css"
|
|
20
|
-
],
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@vueuse/core": "^14.2.1",
|
|
23
|
-
"file-saver": "^2.0.5",
|
|
24
|
-
"lodash-es": "^4.17.23",
|
|
25
|
-
"vue-i18n": "^11.2.8"
|
|
26
|
-
},
|
|
27
|
-
"peerDependencies": {
|
|
28
|
-
"element-plus": "^2.13.2",
|
|
29
|
-
"vue": "^3.5.27"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "geekplus-digital-ui",
|
|
3
|
+
"version": "0.1.19",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"module": "index.js",
|
|
7
|
+
"types": "index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"import": "./index.js"
|
|
12
|
+
},
|
|
13
|
+
"./*": {
|
|
14
|
+
"types": "./*.d.ts",
|
|
15
|
+
"import": "./*.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": [
|
|
19
|
+
"**/*.css"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@vueuse/core": "^14.2.1",
|
|
23
|
+
"file-saver": "^2.0.5",
|
|
24
|
+
"lodash-es": "^4.17.23",
|
|
25
|
+
"vue-i18n": "^11.2.8"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"element-plus": "^2.13.2",
|
|
29
|
+
"vue": "^3.5.27"
|
|
30
|
+
}
|
|
31
|
+
}
|