act-plus 1.1.67 → 1.1.69
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/act-plus.js +2 -2
- package/act-plus.umd.cjs +47 -47
- package/lib/{dialogAddField-2bf7099b.js → dialogAddField-50888f78.js} +2 -2
- package/lib/{dialogConfigBtn-e8996e6f.js → dialogConfigBtn-b00c088c.js} +2 -2
- package/lib/{dialogSiteComponentsParams-986817f9.js → dialogSiteComponentsParams-8b3cf16d.js} +1 -1
- package/lib/index-29b2d73c.js +249 -0
- package/lib/{index-15f94311.js → index-2eafd229.js} +1 -1
- package/lib/{index-edf5e609.js → index-39365eec.js} +1 -1
- package/lib/{index-d78ddced.js → index-7e0022be.js} +2224 -2046
- package/lib/{index-b070e0e7.js → index-bf11ca50.js} +1 -1
- package/lib/{index-45ae7ac4.js → index-cad52b3b.js} +1 -1
- package/lib/{index-cdc84eef.js → index-ddd16ee1.js} +1 -1
- package/lib/{index-3f781ab3.js → index-eea3cb2d.js} +2 -2
- package/lib/{index-c3453d46.js → index-fa69ad05.js} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/lib/index-25a3ec3c.js +0 -293
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineAsyncComponent as ne, inject as D, reactive as re, ref as A, watch as de, resolveComponent as V, resolveDirective as se, openBlock as r, createBlock as i, withCtx as a, createElementVNode as L, createVNode as l, unref as p, createTextVNode as v, withDirectives as ie, createElementBlock as c, Fragment as _, renderList as g, createCommentVNode as T, toDisplayString as pe } from "vue";
|
|
2
|
-
import { _ as me, F as fe, k as be, l as ce, S as _e, T as Ve, A as ge, C as ye, m as Ce, U as ve } from "./index-
|
|
2
|
+
import { _ as me, F as fe, k as be, l as ce, S as _e, T as Ve, A as ge, C as ye, m as Ce, U as ve } from "./index-7e0022be.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const Te = { slot: "prepend" }, Se = { class: "dialog-footer" }, Ue = {
|
|
@@ -11,7 +11,7 @@ const Te = { slot: "prepend" }, Se = { class: "dialog-footer" }, Ue = {
|
|
|
11
11
|
},
|
|
12
12
|
emits: ["update:visible", "refresh"],
|
|
13
13
|
setup(M, { emit: Q }) {
|
|
14
|
-
const W = ne(() => import("./dialogSiteComponentsParams-
|
|
14
|
+
const W = ne(() => import("./dialogSiteComponentsParams-8b3cf16d.js")), E = Q, P = M, h = D("pageKey")(), O = D("conditionList")(), Y = D("configData")();
|
|
15
15
|
let S = re((() => ({
|
|
16
16
|
btnLoading: !1,
|
|
17
17
|
showSiteComponentsParamsDialog: !1
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineAsyncComponent as O, inject as k, computed as ne, reactive as de, ref as q, watch as re, resolveComponent as y, resolveDirective as se, openBlock as d, createBlock as m, withCtx as l, createElementVNode as ie, createVNode as e, unref as o, createTextVNode as U, withDirectives as me, toDisplayString as x, createElementBlock as b, Fragment as f, renderList as _, createCommentVNode as C } from "vue";
|
|
2
|
-
import { _ as pe, B as ce, c as be, d as fe, e as _e, f as ge, g as Ve, h as ye, i as he, j as Ce } from "./index-
|
|
2
|
+
import { _ as pe, B as ce, c as be, d as fe, e as _e, f as ge, g as Ve, h as ye, i as he, j as Ce } from "./index-7e0022be.js";
|
|
3
3
|
import { useRoute as ve } from "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const Fe = { class: "dialog-footer" }, Ue = {
|
|
@@ -11,7 +11,7 @@ const Fe = { class: "dialog-footer" }, Ue = {
|
|
|
11
11
|
},
|
|
12
12
|
emits: ["update:visible", "refresh"],
|
|
13
13
|
setup(P, { emit: A }) {
|
|
14
|
-
const D = O(() => import("./index-
|
|
14
|
+
const D = O(() => import("./index-ddd16ee1.js")), E = O(() => import("./index-cad52b3b.js")), W = ve(), R = k("apiPrefix"), Y = k("request"), I = A, N = P, j = ne(() => W.params.key);
|
|
15
15
|
let T = de((() => ({
|
|
16
16
|
btnLoading: !1
|
|
17
17
|
}))());
|
package/lib/{dialogSiteComponentsParams-986817f9.js → dialogSiteComponentsParams-8b3cf16d.js}
RENAMED
|
@@ -8,7 +8,7 @@ const B = { class: "dialog-footer" }, A = {
|
|
|
8
8
|
},
|
|
9
9
|
emits: ["update:visible", "refresh", "update:modelValue"],
|
|
10
10
|
setup(f, { emit: c }) {
|
|
11
|
-
const v = _(() => import("./index-
|
|
11
|
+
const v = _(() => import("./index-cad52b3b.js")), n = c, o = f;
|
|
12
12
|
let t = C();
|
|
13
13
|
y(
|
|
14
14
|
() => o.visible,
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { ref as U, computed as oe, resolveComponent as w, resolveDirective as ne, openBlock as h, createElementBlock as N, withDirectives as ae, createBlock as C, mergeProps as ie, unref as p, withCtx as D, renderSlot as L, createElementVNode as x, toDisplayString as I, createCommentVNode as z, createVNode as $, createTextVNode as se, Fragment as ce, renderList as re, normalizeClass as ue, nextTick as pe } from "vue";
|
|
2
|
+
import { ElNotification as M } from "element-plus";
|
|
3
|
+
import { _ as de, u as me, z as fe, n as ge, o as _e, p as ye } from "./index-7e0022be.js";
|
|
4
|
+
import "vue-router";
|
|
5
|
+
let S;
|
|
6
|
+
const he = new Uint8Array(16);
|
|
7
|
+
function ve() {
|
|
8
|
+
if (!S && (S = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S))
|
|
9
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
10
|
+
return S(he);
|
|
11
|
+
}
|
|
12
|
+
const a = [];
|
|
13
|
+
for (let l = 0; l < 256; ++l)
|
|
14
|
+
a.push((l + 256).toString(16).slice(1));
|
|
15
|
+
function we(l, n = 0) {
|
|
16
|
+
return a[l[n + 0]] + a[l[n + 1]] + a[l[n + 2]] + a[l[n + 3]] + "-" + a[l[n + 4]] + a[l[n + 5]] + "-" + a[l[n + 6]] + a[l[n + 7]] + "-" + a[l[n + 8]] + a[l[n + 9]] + "-" + a[l[n + 10]] + a[l[n + 11]] + a[l[n + 12]] + a[l[n + 13]] + a[l[n + 14]] + a[l[n + 15]];
|
|
17
|
+
}
|
|
18
|
+
const xe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), B = {
|
|
19
|
+
randomUUID: xe
|
|
20
|
+
};
|
|
21
|
+
function Fe(l, n, F) {
|
|
22
|
+
if (B.randomUUID && !n && !l)
|
|
23
|
+
return B.randomUUID();
|
|
24
|
+
l = l || {};
|
|
25
|
+
const m = l.random || (l.rng || ve)();
|
|
26
|
+
if (m[6] = m[6] & 15 | 64, m[8] = m[8] & 63 | 128, n) {
|
|
27
|
+
F = F || 0;
|
|
28
|
+
for (let v = 0; v < 16; ++v)
|
|
29
|
+
n[F + v] = m[v];
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
return we(m);
|
|
33
|
+
}
|
|
34
|
+
const Te = { class: "upload-container" }, ke = { class: "el-upload__text" }, $e = { class: "tip-text" }, be = { class: "file-list-l" }, Pe = ["onMouseenter", "onMouseleave"], Ve = { class: "el-file-operate" }, Ue = {
|
|
35
|
+
__name: "index",
|
|
36
|
+
props: {
|
|
37
|
+
request: { type: Function, required: !0, default: null },
|
|
38
|
+
modelValue: { type: [Array, String], default: [] },
|
|
39
|
+
action: { type: String, default: "/api/v1/utils/uploadFiles" },
|
|
40
|
+
data: { type: Object, default: () => ({ uploadFileType: 1 }) },
|
|
41
|
+
name: { type: String, default: "files" },
|
|
42
|
+
multiple: { type: Boolean, default: !0 },
|
|
43
|
+
limit: { type: Number, default: 9 },
|
|
44
|
+
accept: { type: String, default: "*" },
|
|
45
|
+
tipText: { type: String, default: "" },
|
|
46
|
+
fileMaxSize: { type: Number, default: 100 },
|
|
47
|
+
autoUpload: { type: Boolean, default: !0 }
|
|
48
|
+
},
|
|
49
|
+
emits: ["update:modelValue", "delete"],
|
|
50
|
+
setup(l, { expose: n, emit: F }) {
|
|
51
|
+
const { getAssetsFileName: m, getAssetsFilePath: v, downloadFile: O } = ye(), { t: g } = me(), b = F, s = l, R = {
|
|
52
|
+
image: /(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/,
|
|
53
|
+
word: /(doc|docx)$/,
|
|
54
|
+
pdf: /(pdf)$/,
|
|
55
|
+
excel: /(xls|xlsx)$/
|
|
56
|
+
};
|
|
57
|
+
let P = U(!1), j = U({}), A = U(!1), _ = U(null), V = null, y = oe({
|
|
58
|
+
get() {
|
|
59
|
+
return J(s.modelValue);
|
|
60
|
+
},
|
|
61
|
+
set(e) {
|
|
62
|
+
b("update:modelValue", e);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const q = (e) => {
|
|
66
|
+
const t = (y.value || []).map((r) => r.filePath);
|
|
67
|
+
if (e == 0)
|
|
68
|
+
return t;
|
|
69
|
+
let o = t.splice(e), i = t.splice(0, e);
|
|
70
|
+
return o.concat(i);
|
|
71
|
+
}, G = (e) => {
|
|
72
|
+
const t = e.substring(e.lastIndexOf(".") + 1);
|
|
73
|
+
let o = null;
|
|
74
|
+
return Object.keys(R).some((i) => {
|
|
75
|
+
if (R[i].test(t))
|
|
76
|
+
return o = i, !0;
|
|
77
|
+
}), o === null && (o = "file"), o;
|
|
78
|
+
}, W = (e) => e.map((t) => ({ uid: t.uid ?? Fe(), name: m(t), filePath: t, fileType: G(t), status: "success" })), J = (e) => {
|
|
79
|
+
const t = Array.isArray(e) ? e.map((o) => o.filePath) : e ? e.split(";") : [];
|
|
80
|
+
return W(t || []);
|
|
81
|
+
}, H = ({ name: e }) => {
|
|
82
|
+
const t = e.lastIndexOf("."), o = e.slice(t), i = s.accept.trim().split(",");
|
|
83
|
+
let r = !1;
|
|
84
|
+
return i.includes(o) && (r = !0), r = i.some((d) => d == "image/*" ? R.image.test(o) : d.startsWith(".") ? e.endsWith(d) : d === o), r || M({
|
|
85
|
+
title: `${g("act.tip")}`,
|
|
86
|
+
message: `【${e}】${g("act.uploadErrorTip")}`,
|
|
87
|
+
type: "warning",
|
|
88
|
+
duration: 2500
|
|
89
|
+
}), r;
|
|
90
|
+
}, K = (e, t, o) => {
|
|
91
|
+
V && (clearTimeout(V), V = null), V = setTimeout(() => {
|
|
92
|
+
e.call(this, t);
|
|
93
|
+
}, o);
|
|
94
|
+
}, Q = (e) => s.request({ url: s.action, method: "POST", data: e, headers: { "Content-Type": "application/x-www-form-urlencoded" } }), X = async (e) => {
|
|
95
|
+
try {
|
|
96
|
+
const t = e.filter((c) => c.status == "ready" && H(c)), o = y.value.length + t.length;
|
|
97
|
+
if (t.length === 0) {
|
|
98
|
+
_.value.clearFiles();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (o > s.limit) {
|
|
102
|
+
M({
|
|
103
|
+
title: `${g("act.tip")}`,
|
|
104
|
+
message: `${g("act.uploadLimitTip")}`,
|
|
105
|
+
type: "warning",
|
|
106
|
+
duration: 2500
|
|
107
|
+
}), _.value.clearFiles();
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (!s.autoUpload) {
|
|
111
|
+
const c = t.map((T) => ({ ...T, filePath: null, status: "success" }));
|
|
112
|
+
b("update:modelValue", c), _.value.clearFiles();
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
P.value = !0;
|
|
116
|
+
const i = new FormData();
|
|
117
|
+
Object.keys(s.data).forEach((c) => {
|
|
118
|
+
i.append(c, s.data[c]);
|
|
119
|
+
}), t.forEach((c) => {
|
|
120
|
+
i.append(s.name, c.raw);
|
|
121
|
+
});
|
|
122
|
+
let { data: r } = await Q(i);
|
|
123
|
+
const d = s.multiple ? [...y.value.map((c) => c.filePath), ...r.filePaths || []].join(";") : [...r.filePaths || []].join(";");
|
|
124
|
+
_.value.clearFiles(), b("update:modelValue", d), P.value = !1;
|
|
125
|
+
} catch (t) {
|
|
126
|
+
_.value.clearFiles(), P.value = !1, console.error(t);
|
|
127
|
+
}
|
|
128
|
+
}, Y = (e, t) => {
|
|
129
|
+
K(X, t, 500);
|
|
130
|
+
}, E = (e, t) => {
|
|
131
|
+
const o = j.value[`tooltipRef${t}`];
|
|
132
|
+
A.value = o.scrollWidth <= Math.round(o.getBoundingClientRect().width);
|
|
133
|
+
}, Z = ({ filePath: e, name: t, uid: o }, i) => {
|
|
134
|
+
pe(() => {
|
|
135
|
+
document.querySelector(`.previewImage_${o}`).children[0].click();
|
|
136
|
+
});
|
|
137
|
+
}, ee = ({ filePath: e, name: t }) => {
|
|
138
|
+
O(s.request, e);
|
|
139
|
+
}, te = (e, t) => {
|
|
140
|
+
y.value = y.value.filter((o, i) => i !== t), b("delete", { data: e });
|
|
141
|
+
};
|
|
142
|
+
return n({ clearFiles: () => {
|
|
143
|
+
y.value = [], _.value.clearFiles();
|
|
144
|
+
} }), (e, t) => {
|
|
145
|
+
const o = w("upload-filled"), i = w("el-icon"), r = w("el-upload"), d = w("el-image"), c = w("el-tooltip"), T = w("el-button"), le = ne("loading");
|
|
146
|
+
return h(), N("div", Te, [
|
|
147
|
+
ae((h(), C(r, ie({
|
|
148
|
+
ref_key: "uploadRef",
|
|
149
|
+
ref: _,
|
|
150
|
+
action: "#",
|
|
151
|
+
drag: "",
|
|
152
|
+
accept: s.accept,
|
|
153
|
+
multiple: s.multiple,
|
|
154
|
+
"auto-upload": !1,
|
|
155
|
+
"show-file-list": !1,
|
|
156
|
+
"on-change": Y
|
|
157
|
+
}, e.$attrs, {
|
|
158
|
+
"element-loading-text": p(g)("act.uploadLoading")
|
|
159
|
+
}), {
|
|
160
|
+
tip: D(() => [
|
|
161
|
+
s.tipText ? L(e.$slots, "default", { key: 0 }, () => [
|
|
162
|
+
x("p", $e, I(s.tipText), 1)
|
|
163
|
+
], !0) : z("", !0)
|
|
164
|
+
]),
|
|
165
|
+
default: D(() => [
|
|
166
|
+
$(i, { class: "el-icon--upload" }, {
|
|
167
|
+
default: D(() => [
|
|
168
|
+
$(o)
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
}),
|
|
172
|
+
x("div", ke, [
|
|
173
|
+
se(I(p(g)("act.uploadText")), 1),
|
|
174
|
+
x("em", null, I(p(g)("act.clickUpload")), 1)
|
|
175
|
+
])
|
|
176
|
+
]),
|
|
177
|
+
_: 3
|
|
178
|
+
}, 16, ["accept", "multiple", "element-loading-text"])), [
|
|
179
|
+
[le, p(P)]
|
|
180
|
+
]),
|
|
181
|
+
L(e.$slots, "default", {}, () => [
|
|
182
|
+
(h(!0), N(ce, null, re(p(y), (u, k) => (h(), N("div", {
|
|
183
|
+
class: "file-list",
|
|
184
|
+
key: u.uid
|
|
185
|
+
}, [
|
|
186
|
+
x("div", be, [
|
|
187
|
+
u.fileType === "image" ? (h(), C(d, {
|
|
188
|
+
key: 0,
|
|
189
|
+
class: ue(["file-list-image", { [`previewImage_${u.uid}`]: !0 }]),
|
|
190
|
+
fit: "cover",
|
|
191
|
+
"preview-src-list": q(k),
|
|
192
|
+
"preview-teleported": "",
|
|
193
|
+
src: u.filePath
|
|
194
|
+
}, null, 8, ["class", "preview-src-list", "src"])) : (h(), C(d, {
|
|
195
|
+
key: 1,
|
|
196
|
+
class: "file-list-icon",
|
|
197
|
+
src: p(v)(`images/upload-${u.fileType}.png`)
|
|
198
|
+
}, null, 8, ["src"])),
|
|
199
|
+
$(c, {
|
|
200
|
+
effect: "dark",
|
|
201
|
+
content: u.name,
|
|
202
|
+
placement: "bottom-start",
|
|
203
|
+
disabled: p(A)
|
|
204
|
+
}, {
|
|
205
|
+
default: D(() => [
|
|
206
|
+
x("div", {
|
|
207
|
+
class: "el-file-name",
|
|
208
|
+
ref_for: !0,
|
|
209
|
+
ref: (f) => p(j)[`tooltipRef${k}`] = f,
|
|
210
|
+
onMouseenter: (f) => E(f, k),
|
|
211
|
+
onMouseleave: (f) => E(f, k)
|
|
212
|
+
}, I(u.name), 41, Pe)
|
|
213
|
+
]),
|
|
214
|
+
_: 2
|
|
215
|
+
}, 1032, ["content", "disabled"])
|
|
216
|
+
]),
|
|
217
|
+
x("div", Ve, [
|
|
218
|
+
u.fileType === "image" ? (h(), C(T, {
|
|
219
|
+
key: 0,
|
|
220
|
+
type: "primary",
|
|
221
|
+
size: "small",
|
|
222
|
+
icon: p(fe),
|
|
223
|
+
circle: "",
|
|
224
|
+
onClick: (f) => Z(u)
|
|
225
|
+
}, null, 8, ["icon", "onClick"])) : z("", !0),
|
|
226
|
+
$(T, {
|
|
227
|
+
type: "primary",
|
|
228
|
+
size: "small",
|
|
229
|
+
icon: p(ge),
|
|
230
|
+
circle: "",
|
|
231
|
+
onClick: (f) => ee(u)
|
|
232
|
+
}, null, 8, ["icon", "onClick"]),
|
|
233
|
+
$(T, {
|
|
234
|
+
type: "danger",
|
|
235
|
+
size: "small",
|
|
236
|
+
icon: p(_e),
|
|
237
|
+
circle: "",
|
|
238
|
+
onClick: (f) => te(u, k)
|
|
239
|
+
}, null, 8, ["icon", "onClick"])
|
|
240
|
+
])
|
|
241
|
+
]))), 128))
|
|
242
|
+
], !0)
|
|
243
|
+
]);
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
}, Ne = /* @__PURE__ */ de(Ue, [["__scopeId", "data-v-f839bee6"]]);
|
|
247
|
+
export {
|
|
248
|
+
Ne as default
|
|
249
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as N, watch as O, resolveComponent as u, resolveDirective as T, openBlock as l, createElementBlock as d, withDirectives as j, createBlock as i, mergeProps as D, withCtx as c, createTextVNode as K, toDisplayString as W, unref as f, Fragment as s, renderList as A, renderSlot as w, createCommentVNode as H, nextTick as y } from "vue";
|
|
2
|
-
import { _ as U, u as V } from "./index-
|
|
2
|
+
import { _ as U, u as V } from "./index-7e0022be.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const $ = { class: "act-table" }, F = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineAsyncComponent as se, inject as h, ref as q, watch as de, resolveComponent as f, resolveDirective as pe, unref as t, openBlock as n, createElementBlock as V, createVNode as ce, normalizeStyle as ie, withCtx as T, Fragment as k, renderList as L, createBlock as d, mergeProps as C, withKeys as H, withModifiers as K, createCommentVNode as g, resolveDynamicComponent as fe, createElementVNode as me, toDisplayString as S, createTextVNode as M, withDirectives as ye } from "vue";
|
|
2
|
-
import { _ as be, u as Ve, P as Ce, a as _e, b as he } from "./index-
|
|
2
|
+
import { _ as be, u as Ve, P as Ce, a as _e, b as he } from "./index-7e0022be.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const ge = {
|