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