@a2simcode/ui 0.0.13 → 0.0.14
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/form/index.d.ts +3 -0
- package/dist/components/form/src/form.vue.d.ts +1 -0
- package/dist/simcode-ui.es.js +1175 -1172
- package/dist/simcode-ui.umd.js +2 -2
- package/dist/stats.html +1 -1
- package/package.json +1 -1
package/dist/simcode-ui.es.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getIcon as
|
|
3
|
-
import
|
|
4
|
-
import { encrypt as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import
|
|
14
|
-
import { CountUp as
|
|
15
|
-
import { format as
|
|
16
|
-
import
|
|
17
|
-
const
|
|
1
|
+
import { defineComponent as G, computed as z, createElementBlock as T, openBlock as i, mergeProps as we, createVNode as K, unref as U, shallowRef as rt, ref as j, watch as ke, withModifiers as ze, normalizeClass as Te, createBlock as w, createCommentVNode as D, renderSlot as te, toDisplayString as ie, resolveComponent as F, normalizeStyle as re, withCtx as L, Fragment as ue, renderList as de, createSlots as Ue, createTextVNode as Se, createElementVNode as W, useSlots as zt, reactive as Ye, onMounted as Xe, onUnmounted as tt, onBeforeUnmount as xt, inject as Ve, nextTick as xe, resolveDynamicComponent as We, resolveDirective as ct, withDirectives as Ee, provide as dt, withKeys as Vt, vShow as nt, useTemplateRef as Me, mergeModels as pt, useModel as Tt, watchEffect as Lt, normalizeProps as Ft } from "vue";
|
|
2
|
+
import { getIcon as vt, Icon as gt } from "@iconify/vue";
|
|
3
|
+
import jt from "dayjs";
|
|
4
|
+
import { encrypt as It, decrypt as St } from "crypto-js/aes";
|
|
5
|
+
import Ze, { parse as ht } from "crypto-js/enc-utf8";
|
|
6
|
+
import Ot from "crypto-js/pad-pkcs7";
|
|
7
|
+
import yt from "crypto-js/enc-base64";
|
|
8
|
+
import Mt from "crypto-js/md5";
|
|
9
|
+
import Dt from "crypto-js/sha256";
|
|
10
|
+
import At from "crypto-js/sha512";
|
|
11
|
+
import * as bt from "@visactor/vtable";
|
|
12
|
+
import * as Nt from "echarts";
|
|
13
|
+
import Rt from "jsbarcode";
|
|
14
|
+
import { CountUp as Et } from "countup.js";
|
|
15
|
+
import { format as Jt } from "sql-formatter";
|
|
16
|
+
import Ut from "async-validator";
|
|
17
|
+
const Z = (e) => (e.install = (l) => {
|
|
18
18
|
l.component(e.name, e);
|
|
19
19
|
}, e);
|
|
20
|
-
function
|
|
20
|
+
function it(e) {
|
|
21
21
|
return e && Array.isArray(e);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Wt(e, l) {
|
|
24
24
|
return toString.call(e) === `[object ${l}]`;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return e !== null &&
|
|
26
|
+
function tn(e) {
|
|
27
|
+
return e !== null && Wt(e, "Object");
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const Fe = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Array.isArray(e) && e.length === 0 || typeof e == "object" && Object.keys(e).length === 0), Je = /* @__PURE__ */ G({
|
|
30
30
|
name: "JIcon",
|
|
31
31
|
inheritAttrs: !1,
|
|
32
32
|
__name: "icon",
|
|
@@ -38,34 +38,34 @@ const Le = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
38
38
|
isDiv: { type: Boolean, default: !0 }
|
|
39
39
|
},
|
|
40
40
|
setup(e) {
|
|
41
|
-
const l = e, o =
|
|
41
|
+
const l = e, o = z(() => {
|
|
42
42
|
const n = l.icon;
|
|
43
43
|
if (n.indexOf(":") === -1)
|
|
44
|
-
return
|
|
44
|
+
return vt(`jcode:${l.icon}`) == null && console.log(n, "icon"), `jcode:${l.icon}`;
|
|
45
45
|
const s = `jcode:${n.split(":")[1]}`;
|
|
46
|
-
return
|
|
47
|
-
}), t =
|
|
46
|
+
return vt(s) != null ? s : (console.log(n, "icon"), n);
|
|
47
|
+
}), t = z(() => ({
|
|
48
48
|
...l,
|
|
49
49
|
icon: o.value
|
|
50
50
|
}));
|
|
51
|
-
return (n, a) => e.isDiv ? (i(),
|
|
51
|
+
return (n, a) => e.isDiv ? (i(), T("div", we({ key: 0 }, n.$attrs, {
|
|
52
52
|
class: "j-icon jicon",
|
|
53
53
|
style: { height: `${e.size}px` }
|
|
54
54
|
}), [
|
|
55
|
-
|
|
55
|
+
K(U(gt), we(t.value, {
|
|
56
56
|
height: `${e.size}px`,
|
|
57
57
|
width: `${e.size}px`,
|
|
58
58
|
mode: "svg"
|
|
59
59
|
}), null, 16, ["height", "width"])
|
|
60
|
-
], 16)) : (i(),
|
|
61
|
-
|
|
60
|
+
], 16)) : (i(), T("span", we({ key: 1 }, n.$attrs, { class: "jicon" }), [
|
|
61
|
+
K(U(gt), we(t.value, {
|
|
62
62
|
height: `${e.size}px`,
|
|
63
63
|
width: `${e.size}px`,
|
|
64
64
|
mode: "svg"
|
|
65
65
|
}), null, 16, ["height", "width"])
|
|
66
66
|
], 16));
|
|
67
67
|
}
|
|
68
|
-
}),
|
|
68
|
+
}), Pt = ["disabled"], Ht = { key: 2 }, Yt = /* @__PURE__ */ G({
|
|
69
69
|
name: "JButton",
|
|
70
70
|
__name: "button",
|
|
71
71
|
props: {
|
|
@@ -179,17 +179,17 @@ const Le = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
179
179
|
setup(e, { expose: l, emit: o }) {
|
|
180
180
|
const t = e, n = o, a = (p) => {
|
|
181
181
|
!m.value && !t.disabled && (n("click", p), t.href && window.open(t.href, t.target ? t.target : "_self"));
|
|
182
|
-
}, s =
|
|
182
|
+
}, s = rt(null), u = () => {
|
|
183
183
|
s.value?.focus();
|
|
184
184
|
}, v = () => {
|
|
185
185
|
s.value?.blur();
|
|
186
|
-
}, d =
|
|
186
|
+
}, d = z(() => t.notLabel || !t.label), m = j(!1);
|
|
187
187
|
ke(
|
|
188
188
|
() => t.loading,
|
|
189
189
|
(p) => {
|
|
190
190
|
if (typeof p == "boolean")
|
|
191
191
|
m.value = p;
|
|
192
|
-
else if (
|
|
192
|
+
else if (Fe(p?.delay))
|
|
193
193
|
m.value = !1;
|
|
194
194
|
else {
|
|
195
195
|
const h = setTimeout(() => {
|
|
@@ -200,12 +200,12 @@ const Le = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
200
200
|
},
|
|
201
201
|
{ immediate: !0 }
|
|
202
202
|
);
|
|
203
|
-
const r =
|
|
204
|
-
return l({ focus: u, blur: v }), (p, h) => (i(),
|
|
203
|
+
const r = z(() => t.label || "");
|
|
204
|
+
return l({ focus: u, blur: v }), (p, h) => (i(), T("button", {
|
|
205
205
|
ref_key: "buttonNodeRef",
|
|
206
206
|
ref: s,
|
|
207
207
|
type: "button",
|
|
208
|
-
class:
|
|
208
|
+
class: Te([
|
|
209
209
|
"j-button",
|
|
210
210
|
{
|
|
211
211
|
"j-button-primary": e.type == "primary",
|
|
@@ -228,29 +228,29 @@ const Le = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
228
228
|
}
|
|
229
229
|
]),
|
|
230
230
|
disabled: e.disabled,
|
|
231
|
-
onClick:
|
|
231
|
+
onClick: ze(a, ["stop"])
|
|
232
232
|
}, [
|
|
233
233
|
m.value ? (i(), w(Je, {
|
|
234
234
|
key: 0,
|
|
235
235
|
icon: "mdi-light:loading",
|
|
236
236
|
size: e.size == "large" ? 14 : 12,
|
|
237
237
|
class: "loading-spin j-button-loading-icon"
|
|
238
|
-
}, null, 8, ["size"])) :
|
|
238
|
+
}, null, 8, ["size"])) : D("", !0),
|
|
239
239
|
e.icon ? (i(), w(Je, {
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: e.icon
|
|
242
|
-
}, null, 8, ["icon"])) :
|
|
243
|
-
e.notLabel ?
|
|
242
|
+
}, null, 8, ["icon"])) : D("", !0),
|
|
243
|
+
e.notLabel ? D("", !0) : (i(), T("div", Ht, ie(r.value), 1)),
|
|
244
244
|
te(p.$slots, "iconAfter")
|
|
245
|
-
], 10,
|
|
245
|
+
], 10, Pt));
|
|
246
246
|
}
|
|
247
|
-
}),
|
|
248
|
-
function
|
|
247
|
+
}), Xt = Z(Yt);
|
|
248
|
+
function _e(e) {
|
|
249
249
|
Object.keys(e || {}).forEach((l) => {
|
|
250
250
|
delete e[l];
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function qt(e) {
|
|
254
254
|
const { toString: l } = Object.prototype, o = {
|
|
255
255
|
"[object Boolean]": "boolean",
|
|
256
256
|
"[object Number]": "number",
|
|
@@ -265,8 +265,8 @@ function Yt(e) {
|
|
|
265
265
|
};
|
|
266
266
|
return e instanceof Element ? "element" : o[l.call(e)];
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
const l =
|
|
268
|
+
function et(e) {
|
|
269
|
+
const l = qt(e);
|
|
270
270
|
let o;
|
|
271
271
|
if (l === "array")
|
|
272
272
|
o = [];
|
|
@@ -276,27 +276,27 @@ function _e(e) {
|
|
|
276
276
|
return e;
|
|
277
277
|
if (l === "array")
|
|
278
278
|
for (let t = 0, n = e.length; t < n; t++)
|
|
279
|
-
e[t] = (e[t] === 0, e[t]), e[t] && delete e[t].$parent, o.push(
|
|
279
|
+
e[t] = (e[t] === 0, e[t]), e[t] && delete e[t].$parent, o.push(et(e[t]));
|
|
280
280
|
else l === "object" && Object.keys(e).forEach((t) => {
|
|
281
|
-
e && delete e.$parent, o[t] =
|
|
281
|
+
e && delete e.$parent, o[t] = et(e[t]);
|
|
282
282
|
});
|
|
283
283
|
return o;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function ut(e, l, o = []) {
|
|
286
286
|
Object.keys(l).forEach((t) => {
|
|
287
287
|
o.indexOf(t) === -1 && (e[t] = l[t]);
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const Gt = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (l) => {
|
|
291
291
|
const o = Math.random() * 16 | 0;
|
|
292
292
|
return (l === "x" ? o : o & 3 | 8).toString(16);
|
|
293
293
|
});
|
|
294
|
-
let
|
|
295
|
-
function
|
|
294
|
+
let st = 0;
|
|
295
|
+
function ft(e = "") {
|
|
296
296
|
const l = Date.now(), o = Math.floor(Math.random() * 1e9);
|
|
297
|
-
return
|
|
297
|
+
return st++, e ? e + "_" + o + st + String(l) : o + st + String(l);
|
|
298
298
|
}
|
|
299
|
-
const
|
|
299
|
+
const Bt = (e) => {
|
|
300
300
|
if (e)
|
|
301
301
|
try {
|
|
302
302
|
const l = new Function("return " + e)();
|
|
@@ -307,7 +307,7 @@ const jt = (e) => {
|
|
|
307
307
|
else
|
|
308
308
|
return { res: !1, msg: "没设置脚本函数" };
|
|
309
309
|
};
|
|
310
|
-
function
|
|
310
|
+
function Kt(e, l, o) {
|
|
311
311
|
if (!e || typeof e != "object")
|
|
312
312
|
return e;
|
|
313
313
|
const t = Array.isArray(l) ? l : l.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
|
|
@@ -320,13 +320,13 @@ function qt(e, l, o) {
|
|
|
320
320
|
}
|
|
321
321
|
return n[t[t.length - 1]] = o, e;
|
|
322
322
|
}
|
|
323
|
-
const
|
|
323
|
+
const Ge = (e) => {
|
|
324
324
|
let l = parseFloat(e);
|
|
325
325
|
return isNaN(l) ? 0 : (l = Math.round(e * 100) / 100, l);
|
|
326
|
-
},
|
|
326
|
+
}, ln = function(e, l, o) {
|
|
327
327
|
const t = (e - 1) * l;
|
|
328
328
|
return t + l >= o.length ? o.slice(t, o.length) : o.slice(t, t + l);
|
|
329
|
-
},
|
|
329
|
+
}, on = function(e, l) {
|
|
330
330
|
const o = (e.page - 1) * e.rows, t = o + e.rows >= l.length ? l.slice(o, l.length) : l.slice(o, o + e.rows);
|
|
331
331
|
return {
|
|
332
332
|
rows: t,
|
|
@@ -334,14 +334,14 @@ const qe = (e) => {
|
|
|
334
334
|
page: e.page,
|
|
335
335
|
records: t.length
|
|
336
336
|
};
|
|
337
|
-
},
|
|
337
|
+
}, an = function(e) {
|
|
338
338
|
return e.filter(
|
|
339
339
|
(l, o, t) => (
|
|
340
340
|
// 当前元素,在原始数组中的第一个索引==当前索引值,否则返回当前元素
|
|
341
341
|
t.indexOf(l, 0) === o
|
|
342
342
|
)
|
|
343
343
|
);
|
|
344
|
-
},
|
|
344
|
+
}, Qt = (e) => {
|
|
345
345
|
if (!/^\d*(\.\d*)?$/.test(e))
|
|
346
346
|
return "Number is wrong!";
|
|
347
347
|
const l = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], o = ["", "十", "百", "千", "万", "亿", "点", ""], t = ("" + e).replace(/(^0*)/g, "").split(".");
|
|
@@ -365,13 +365,13 @@ const qe = (e) => {
|
|
|
365
365
|
for (let s = 0; s < t[1].length; s++) a += l[Number(t[1].charAt(s))];
|
|
366
366
|
}
|
|
367
367
|
return a;
|
|
368
|
-
},
|
|
368
|
+
}, Zt = (e) => {
|
|
369
369
|
const l = (e + "").split("."), o = l[0] + "", t = l[1] || "", n = o.length % 3;
|
|
370
370
|
let a = o.substring(0, n);
|
|
371
371
|
for (let s = 0; s < Math.floor(o.length / 3); s++)
|
|
372
372
|
a += "," + o.substring(n + s * 3, n + (s + 1) * 3);
|
|
373
373
|
return n === 0 && (a = a.substring(1)), e = a + (t ? "." + t : ""), e;
|
|
374
|
-
},
|
|
374
|
+
}, nn = (e) => {
|
|
375
375
|
if (!e)
|
|
376
376
|
return;
|
|
377
377
|
const l = document.createElement("span");
|
|
@@ -379,13 +379,13 @@ const qe = (e) => {
|
|
|
379
379
|
const o = l.offsetWidth;
|
|
380
380
|
return document.body.removeChild(l), o;
|
|
381
381
|
};
|
|
382
|
-
function
|
|
382
|
+
function _t(e) {
|
|
383
383
|
return e == null || e === void 0 || e === "" ? "" : e === e.toUpperCase() ? e.split("_").map((t) => (t = t.toLowerCase(), t.slice(0, 1).toUpperCase() + t.slice(1))).join("") : e.slice(0, 1).toUpperCase() + e.slice(1);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function sn(e, l = !0) {
|
|
386
386
|
if (e == null || e === void 0 || e === "")
|
|
387
387
|
return "";
|
|
388
|
-
l && (e =
|
|
388
|
+
l && (e = _t(e));
|
|
389
389
|
let o = "";
|
|
390
390
|
for (let t = 0, n = e.length; t < n && (o += e[t].toLowerCase(), !(t < n - 1 && e[t + 1] === e[t + 1].toLowerCase() || t < n - 2 && e[t + 2] === e[t + 2].toLowerCase())); t++)
|
|
391
391
|
;
|
|
@@ -394,7 +394,7 @@ function an(e, l = !0) {
|
|
|
394
394
|
o += e[t];
|
|
395
395
|
return o;
|
|
396
396
|
}
|
|
397
|
-
const
|
|
397
|
+
const mt = (e) => ["j-input", "j-textarea", "j-select", "j-radio", "j-checkbox", "j-switch", "j-number", "j-slider-captcha"].includes(
|
|
398
398
|
e
|
|
399
399
|
) || e.indexOf("j-input") != -1, He = (e) => {
|
|
400
400
|
const l = e.config || {};
|
|
@@ -411,14 +411,14 @@ const dt = (e) => ["j-input", "j-textarea", "j-select", "j-radio", "j-checkbox",
|
|
|
411
411
|
return o;
|
|
412
412
|
}
|
|
413
413
|
return l;
|
|
414
|
-
},
|
|
415
|
-
function
|
|
416
|
-
return
|
|
414
|
+
}, el = "YYYY-MM-DD HH:mm:ss", tl = "YYYY-MM-DD";
|
|
415
|
+
function ll(e, l = el) {
|
|
416
|
+
return jt(e).format(l);
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
return
|
|
418
|
+
function Ke(e, l = tl) {
|
|
419
|
+
return jt(e).format(l);
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function wt(e) {
|
|
422
422
|
const l = "j-loading-spin", o = document.querySelector(`.${l}`);
|
|
423
423
|
if (e) {
|
|
424
424
|
if (!o) {
|
|
@@ -436,18 +436,18 @@ function yt(e) {
|
|
|
436
436
|
} else
|
|
437
437
|
o && o.parentNode && (document.body.style.overflow = "", o.parentNode.removeChild(o));
|
|
438
438
|
}
|
|
439
|
-
const
|
|
439
|
+
const ol = /* @__PURE__ */ (() => {
|
|
440
440
|
let e = null, l = 0;
|
|
441
441
|
return (o) => {
|
|
442
|
-
o ? (l++, e && clearTimeout(e),
|
|
443
|
-
|
|
442
|
+
o ? (l++, e && clearTimeout(e), wt(!0), e = null) : (l = Math.max(0, l - 1), l === 0 && (e && clearTimeout(e), e = setTimeout(() => {
|
|
443
|
+
wt(!1), e = null;
|
|
444
444
|
}, 400)));
|
|
445
445
|
};
|
|
446
446
|
})();
|
|
447
447
|
function Pe(e) {
|
|
448
|
-
|
|
448
|
+
ol(e);
|
|
449
449
|
}
|
|
450
|
-
const
|
|
450
|
+
const kt = (e, l = 32) => {
|
|
451
451
|
const { length: o } = e;
|
|
452
452
|
if (o < l) {
|
|
453
453
|
for (let t = 0, n = l - o; t < n; t++)
|
|
@@ -456,23 +456,23 @@ const bt = (e, l = 32) => {
|
|
|
456
456
|
}
|
|
457
457
|
return o > l ? e.substring(0, l) : e;
|
|
458
458
|
};
|
|
459
|
-
class
|
|
459
|
+
class al {
|
|
460
460
|
key;
|
|
461
461
|
iv;
|
|
462
462
|
constructor({ key: l, iv: o }) {
|
|
463
|
-
this.key =
|
|
463
|
+
this.key = ht(kt(l)), this.iv = ht(kt(o || "1234567890000000", 16));
|
|
464
464
|
}
|
|
465
465
|
get getOptions() {
|
|
466
466
|
return {
|
|
467
|
-
padding:
|
|
467
|
+
padding: Ot,
|
|
468
468
|
iv: this.iv
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
471
|
encrypt(l) {
|
|
472
|
-
return
|
|
472
|
+
return It(l, this.key, this.getOptions).toString();
|
|
473
473
|
}
|
|
474
474
|
decrypt(l) {
|
|
475
|
-
return
|
|
475
|
+
return St(l, this.key, this.getOptions).toString(Ze);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
class De {
|
|
@@ -485,10 +485,10 @@ class De {
|
|
|
485
485
|
return De.instance || (De.instance = new De()), De.instance;
|
|
486
486
|
}
|
|
487
487
|
encrypt(l) {
|
|
488
|
-
return
|
|
488
|
+
return Ze.parse(l).toString(yt);
|
|
489
489
|
}
|
|
490
490
|
decrypt(l) {
|
|
491
|
-
return
|
|
491
|
+
return yt.parse(l).toString(Ze);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
class Ae {
|
|
@@ -501,7 +501,7 @@ class Ae {
|
|
|
501
501
|
return Ae.instance || (Ae.instance = new Ae()), Ae.instance;
|
|
502
502
|
}
|
|
503
503
|
hash(l) {
|
|
504
|
-
return
|
|
504
|
+
return Mt(l).toString();
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
class Ne {
|
|
@@ -514,7 +514,7 @@ class Ne {
|
|
|
514
514
|
return Ne.instance || (Ne.instance = new Ne()), Ne.instance;
|
|
515
515
|
}
|
|
516
516
|
hash(l) {
|
|
517
|
-
return
|
|
517
|
+
return Dt(l).toString();
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
class Re {
|
|
@@ -527,18 +527,18 @@ class Re {
|
|
|
527
527
|
return Re.instance || (Re.instance = new Re()), Re.instance;
|
|
528
528
|
}
|
|
529
529
|
hash(l) {
|
|
530
|
-
return
|
|
530
|
+
return At(l).toString();
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
-
class
|
|
533
|
+
class nl {
|
|
534
534
|
static createAesEncryption(l) {
|
|
535
|
-
return new
|
|
535
|
+
return new al(l);
|
|
536
536
|
}
|
|
537
537
|
static createBase64Encryption() {
|
|
538
538
|
return De.getInstance();
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
class
|
|
541
|
+
class un {
|
|
542
542
|
static createMD5Hashing() {
|
|
543
543
|
return Ae.getInstance();
|
|
544
544
|
}
|
|
@@ -549,8 +549,8 @@ class nn {
|
|
|
549
549
|
return Re.getInstance();
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
const
|
|
553
|
-
function
|
|
552
|
+
const rn = (e, l) => St(e, l).toString(Ze);
|
|
553
|
+
function sl(e) {
|
|
554
554
|
const l = (t) => {
|
|
555
555
|
e.value.open(t);
|
|
556
556
|
};
|
|
@@ -577,7 +577,7 @@ function al(e) {
|
|
|
577
577
|
}
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
const
|
|
580
|
+
const il = /* @__PURE__ */ G({
|
|
581
581
|
name: "JButtons",
|
|
582
582
|
__name: "index",
|
|
583
583
|
props: {
|
|
@@ -614,30 +614,30 @@ const nl = /* @__PURE__ */ K({
|
|
|
614
614
|
readonly: Boolean
|
|
615
615
|
},
|
|
616
616
|
setup(e) {
|
|
617
|
-
const l = e, o =
|
|
617
|
+
const l = e, o = z(() => {
|
|
618
618
|
if (Object.keys(l.group).length > 0)
|
|
619
619
|
return l.group;
|
|
620
|
-
const a = {}, s =
|
|
620
|
+
const a = {}, s = et(l.list), u = s.length;
|
|
621
621
|
for (let v = 0; v < u; v++) {
|
|
622
622
|
const d = s[v];
|
|
623
|
-
d.groupId = d.groupId ||
|
|
623
|
+
d.groupId = d.groupId || ft(), a[d.groupId] = a[d.groupId] || [], a[d.groupId].push(d);
|
|
624
624
|
}
|
|
625
625
|
return a;
|
|
626
|
-
}), t = j(), { handleClick: n } =
|
|
626
|
+
}), t = j(), { handleClick: n } = sl(t);
|
|
627
627
|
return (a, s) => {
|
|
628
628
|
const u = F("j-button"), v = F("el-space"), d = F("el-dropdown"), m = F("j-dynamic-layer");
|
|
629
629
|
return i(), w(v, {
|
|
630
|
-
style:
|
|
630
|
+
style: re({ display: e.readonly ? "none" : "" }),
|
|
631
631
|
size: e.isLink ? 0 : 8
|
|
632
632
|
}, {
|
|
633
633
|
default: L(() => [
|
|
634
|
-
(i(!0),
|
|
635
|
-
(i(!0),
|
|
634
|
+
(i(!0), T(ue, null, de(o.value, (r, p) => (i(), T("div", we({ key: p }, { ref_for: !0 }, a.$attrs), [
|
|
635
|
+
(i(!0), T(ue, null, de(r, (h, c) => (i(), T(ue, { key: c }, [
|
|
636
636
|
h.children?.length && h.children?.length > 0 ? (i(), w(d, { key: 0 }, {
|
|
637
637
|
dropdown: L(() => [
|
|
638
|
-
|
|
638
|
+
K(v, { direction: "vertical" }, {
|
|
639
639
|
default: L(() => [
|
|
640
|
-
(i(!0),
|
|
640
|
+
(i(!0), T(ue, null, de(h.children || [], (g) => (i(), w(u, {
|
|
641
641
|
key: g.prop,
|
|
642
642
|
label: g.label,
|
|
643
643
|
type: "text",
|
|
@@ -645,20 +645,20 @@ const nl = /* @__PURE__ */ K({
|
|
|
645
645
|
size: e.size,
|
|
646
646
|
disabled: g.disabled,
|
|
647
647
|
icon: g.icon,
|
|
648
|
-
onClick:
|
|
648
|
+
onClick: ze((y) => U(n)(g), ["stop"])
|
|
649
649
|
}, null, 8, ["label", "danger", "size", "disabled", "icon", "onClick"]))), 128))
|
|
650
650
|
]),
|
|
651
651
|
_: 2
|
|
652
652
|
}, 1024)
|
|
653
653
|
]),
|
|
654
654
|
default: L(() => [
|
|
655
|
-
|
|
655
|
+
K(u, {
|
|
656
656
|
label: h.label,
|
|
657
657
|
type: e.isLink ? "link" : h.type,
|
|
658
658
|
danger: h.danger,
|
|
659
659
|
size: e.size,
|
|
660
660
|
icon: h.icon,
|
|
661
|
-
onClick:
|
|
661
|
+
onClick: ze((g) => U(n)(h), ["stop"])
|
|
662
662
|
}, null, 8, ["label", "type", "danger", "size", "icon", "onClick"])
|
|
663
663
|
]),
|
|
664
664
|
_: 2
|
|
@@ -672,11 +672,11 @@ const nl = /* @__PURE__ */ K({
|
|
|
672
672
|
compact: !0,
|
|
673
673
|
"last-compact-item": c === r.length - 1,
|
|
674
674
|
"first-compact-item": c === 0,
|
|
675
|
-
onClick:
|
|
675
|
+
onClick: ze((g) => U(n)(h), ["stop"])
|
|
676
676
|
}, null, 8, ["label", "type", "danger", "size", "icon", "last-compact-item", "first-compact-item", "onClick"]))
|
|
677
677
|
], 64))), 128))
|
|
678
678
|
], 16))), 128)),
|
|
679
|
-
|
|
679
|
+
K(m, {
|
|
680
680
|
ref_key: "layerRef",
|
|
681
681
|
ref: t
|
|
682
682
|
}, null, 512)
|
|
@@ -685,7 +685,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
685
685
|
}, 8, ["style", "size"]);
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
|
-
}),
|
|
688
|
+
}), ul = Z(il), rl = /* @__PURE__ */ G({
|
|
689
689
|
name: "JInput",
|
|
690
690
|
__name: "input",
|
|
691
691
|
props: {
|
|
@@ -726,7 +726,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
726
726
|
},
|
|
727
727
|
emits: ["update:modelValue", "input", "focus", "blur", "clear", "change"],
|
|
728
728
|
setup(e, { emit: l }) {
|
|
729
|
-
const o = e, t = l, n =
|
|
729
|
+
const o = e, t = l, n = z({
|
|
730
730
|
get() {
|
|
731
731
|
return o.modelValue;
|
|
732
732
|
},
|
|
@@ -790,21 +790,21 @@ const nl = /* @__PURE__ */ K({
|
|
|
790
790
|
e.prefixIcon ? {
|
|
791
791
|
name: "prefix",
|
|
792
792
|
fn: L(() => [
|
|
793
|
-
|
|
793
|
+
K(p, { icon: e.prefixIcon }, null, 8, ["icon"])
|
|
794
794
|
]),
|
|
795
795
|
key: "0"
|
|
796
796
|
} : void 0,
|
|
797
797
|
e.suffixIcon ? {
|
|
798
798
|
name: "suffix",
|
|
799
799
|
fn: L(() => [
|
|
800
|
-
|
|
800
|
+
K(p, { icon: e.suffixIcon }, null, 8, ["icon"])
|
|
801
801
|
]),
|
|
802
802
|
key: "1"
|
|
803
803
|
} : void 0
|
|
804
804
|
]), 1040, ["modelValue", "type", "model-modifiers", "maxlength", "minlength", "show-word-limit", "word-limit-position", "placeholder", "clearable", "clear-icon", "formatter", "parser", "show-password", "disabled", "size", "rows", "autosize", "autocomplete", "name", "readonly", "max", "min", "step", "resize", "autofocus", "form", "aria-label", "tabindex", "validate-event", "input-style", "label", "inputmode"]);
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
|
-
}),
|
|
807
|
+
}), cl = Z(rl), dl = Z(Je), fl = { key: 1 }, ml = /* @__PURE__ */ G({
|
|
808
808
|
name: "JRadio",
|
|
809
809
|
__name: "radio",
|
|
810
810
|
props: {
|
|
@@ -858,10 +858,10 @@ const nl = /* @__PURE__ */ K({
|
|
|
858
858
|
},
|
|
859
859
|
emits: ["update:modelValue"],
|
|
860
860
|
setup(e, { emit: l }) {
|
|
861
|
-
const o = e, t = l, n =
|
|
861
|
+
const o = e, t = l, n = z({
|
|
862
862
|
get() {
|
|
863
863
|
let a = o.options;
|
|
864
|
-
if (!
|
|
864
|
+
if (!Fe(o.modelValue) && a && a.length > 0) {
|
|
865
865
|
let s = o.modelValue + "", u = o.options.find((v) => v.value + "" === s);
|
|
866
866
|
if (u)
|
|
867
867
|
return u.value;
|
|
@@ -880,16 +880,16 @@ const nl = /* @__PURE__ */ K({
|
|
|
880
880
|
disabled: e.readonly
|
|
881
881
|
}, {
|
|
882
882
|
default: L(() => [
|
|
883
|
-
e.isButton ? (i(!0),
|
|
883
|
+
e.isButton ? (i(!0), T(ue, { key: 0 }, de(e.options, (r) => (i(), w(u, {
|
|
884
884
|
key: r.value,
|
|
885
885
|
value: r.value,
|
|
886
886
|
size: e.size
|
|
887
887
|
}, {
|
|
888
888
|
default: L(() => [
|
|
889
|
-
Se(
|
|
889
|
+
Se(ie(r.label), 1)
|
|
890
890
|
]),
|
|
891
891
|
_: 2
|
|
892
|
-
}, 1032, ["value", "size"]))), 128)) : (i(!0),
|
|
892
|
+
}, 1032, ["value", "size"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(e.options, (r, p) => (i(), w(d, {
|
|
893
893
|
key: r.value,
|
|
894
894
|
value: r.value,
|
|
895
895
|
size: e.size
|
|
@@ -904,10 +904,10 @@ const nl = /* @__PURE__ */ K({
|
|
|
904
904
|
style: { "border-width": "0" }
|
|
905
905
|
}, {
|
|
906
906
|
default: L(() => [
|
|
907
|
-
Se(
|
|
907
|
+
Se(ie(r.label), 1)
|
|
908
908
|
]),
|
|
909
909
|
_: 2
|
|
910
|
-
}, 1032, ["color", "size"])) : (i(),
|
|
910
|
+
}, 1032, ["color", "size"])) : (i(), T("span", fl, ie(r.label), 1))
|
|
911
911
|
]),
|
|
912
912
|
_: 2
|
|
913
913
|
}, 1032, ["value", "size"]))), 128))
|
|
@@ -916,7 +916,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
916
916
|
}, 8, ["modelValue", "disabled"]);
|
|
917
917
|
};
|
|
918
918
|
}
|
|
919
|
-
}),
|
|
919
|
+
}), pl = Z(ml), vl = { class: "j-select-input-label-wrapper" }, gl = { class: "j-select-option-wrapper" }, hl = { class: "j-select-option-wrapper" }, yl = /* @__PURE__ */ G({
|
|
920
920
|
name: "JSelect",
|
|
921
921
|
inheritAttrs: !1,
|
|
922
922
|
__name: "select",
|
|
@@ -943,14 +943,14 @@ const nl = /* @__PURE__ */ K({
|
|
|
943
943
|
},
|
|
944
944
|
emits: ["update:modelValue", "change"],
|
|
945
945
|
setup(e, { emit: l }) {
|
|
946
|
-
const o = e, t = l, n =
|
|
946
|
+
const o = e, t = l, n = z({
|
|
947
947
|
get() {
|
|
948
948
|
return o.modelValue;
|
|
949
949
|
},
|
|
950
950
|
set(m) {
|
|
951
951
|
t("update:modelValue", m);
|
|
952
952
|
}
|
|
953
|
-
}), a =
|
|
953
|
+
}), a = z(() => !Fe(n.value) && !o.multiple && o.options.filter((m) => n.value == m.value).map((m) => m.label).join(",") || ""), s = z(() => !Fe(n.value) && !o.multiple ? o.options.find((m) => m.value === n.value)?.icon : ""), u = z(() => o.selectData?.split(",") || []), v = z(() => {
|
|
954
954
|
let m = [];
|
|
955
955
|
if (o.isSelectOnlyone ? m = o.options.map((r) => ({
|
|
956
956
|
...r,
|
|
@@ -1009,45 +1009,45 @@ const nl = /* @__PURE__ */ K({
|
|
|
1009
1009
|
onChange: d
|
|
1010
1010
|
}), Ue({
|
|
1011
1011
|
default: L(() => [
|
|
1012
|
-
e.isGroup ? (i(!0),
|
|
1012
|
+
e.isGroup ? (i(!0), T(ue, { key: 0 }, de(v.value, (y) => (i(), w(c, {
|
|
1013
1013
|
key: y.label,
|
|
1014
1014
|
label: y.label
|
|
1015
1015
|
}, {
|
|
1016
1016
|
default: L(() => [
|
|
1017
|
-
(i(!0),
|
|
1017
|
+
(i(!0), T(ue, null, de(y.children, (k) => (i(), w(h, {
|
|
1018
1018
|
key: k.value,
|
|
1019
1019
|
label: k.label,
|
|
1020
1020
|
value: k.value || " ",
|
|
1021
1021
|
disabled: !!k.disabled
|
|
1022
1022
|
}, {
|
|
1023
1023
|
default: L(() => [
|
|
1024
|
-
|
|
1024
|
+
W("div", gl, [
|
|
1025
1025
|
k.icon ? (i(), w(Je, {
|
|
1026
1026
|
key: 0,
|
|
1027
1027
|
class: "j-select-option-icon",
|
|
1028
1028
|
icon: k.icon
|
|
1029
|
-
}, null, 8, ["icon"])) :
|
|
1030
|
-
|
|
1029
|
+
}, null, 8, ["icon"])) : D("", !0),
|
|
1030
|
+
W("div", null, ie(k.label), 1)
|
|
1031
1031
|
])
|
|
1032
1032
|
]),
|
|
1033
1033
|
_: 2
|
|
1034
1034
|
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
1035
1035
|
]),
|
|
1036
1036
|
_: 2
|
|
1037
|
-
}, 1032, ["label"]))), 128)) : (i(!0),
|
|
1037
|
+
}, 1032, ["label"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(v.value, (y) => (i(), w(h, {
|
|
1038
1038
|
key: y.value,
|
|
1039
1039
|
label: y.label,
|
|
1040
1040
|
value: y.value + "",
|
|
1041
1041
|
disabled: !!y.disabled
|
|
1042
1042
|
}, {
|
|
1043
1043
|
default: L(() => [
|
|
1044
|
-
|
|
1044
|
+
W("div", hl, [
|
|
1045
1045
|
y.icon ? (i(), w(Je, {
|
|
1046
1046
|
key: 0,
|
|
1047
1047
|
class: "j-select-option-icon",
|
|
1048
1048
|
icon: y.icon
|
|
1049
|
-
}, null, 8, ["icon"])) :
|
|
1050
|
-
|
|
1049
|
+
}, null, 8, ["icon"])) : D("", !0),
|
|
1050
|
+
W("div", null, ie(y.label), 1)
|
|
1051
1051
|
])
|
|
1052
1052
|
]),
|
|
1053
1053
|
_: 2
|
|
@@ -1058,24 +1058,24 @@ const nl = /* @__PURE__ */ K({
|
|
|
1058
1058
|
e.multiple ? void 0 : {
|
|
1059
1059
|
name: "label",
|
|
1060
1060
|
fn: L(() => [
|
|
1061
|
-
|
|
1061
|
+
W("div", vl, [
|
|
1062
1062
|
s.value ? (i(), w(Je, {
|
|
1063
1063
|
key: 0,
|
|
1064
1064
|
class: "j-select-option-icon",
|
|
1065
1065
|
icon: s.value
|
|
1066
|
-
}, null, 8, ["icon"])) :
|
|
1067
|
-
|
|
1066
|
+
}, null, 8, ["icon"])) : D("", !0),
|
|
1067
|
+
W("div", null, [
|
|
1068
1068
|
e.isShowTooltip ? (i(), w(p, {
|
|
1069
1069
|
key: 0,
|
|
1070
1070
|
content: a.value,
|
|
1071
1071
|
placement: "top"
|
|
1072
1072
|
}, {
|
|
1073
1073
|
default: L(() => [
|
|
1074
|
-
Se(
|
|
1074
|
+
Se(ie(a.value), 1)
|
|
1075
1075
|
]),
|
|
1076
1076
|
_: 1
|
|
1077
|
-
}, 8, ["content"])) : (i(),
|
|
1078
|
-
Se(
|
|
1077
|
+
}, 8, ["content"])) : (i(), T(ue, { key: 1 }, [
|
|
1078
|
+
Se(ie(a.value), 1)
|
|
1079
1079
|
], 64))
|
|
1080
1080
|
])
|
|
1081
1081
|
])
|
|
@@ -1085,7 +1085,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1085
1085
|
]), 1040, ["modelValue", "class", "teleported", "size", "disabled", "multiple", "clearable", "filterable", "collapse-tags", "collapse-tags-tooltip", "placeholder"]);
|
|
1086
1086
|
};
|
|
1087
1087
|
}
|
|
1088
|
-
}),
|
|
1088
|
+
}), bl = Z(yl), wl = /* @__PURE__ */ G({
|
|
1089
1089
|
name: "JCascaderSelect",
|
|
1090
1090
|
__name: "cascader-select",
|
|
1091
1091
|
props: {
|
|
@@ -1122,19 +1122,19 @@ const nl = /* @__PURE__ */ K({
|
|
|
1122
1122
|
a.value?.clearCheckedNodes();
|
|
1123
1123
|
}
|
|
1124
1124
|
});
|
|
1125
|
-
const d =
|
|
1125
|
+
const d = z({
|
|
1126
1126
|
get() {
|
|
1127
|
-
return
|
|
1127
|
+
return Fe(t.modelValue) ? [] : t.modelValue?.split(",") || [];
|
|
1128
1128
|
},
|
|
1129
1129
|
set(p) {
|
|
1130
|
-
s("update:modelValue",
|
|
1130
|
+
s("update:modelValue", Fe(p) ? "" : p.join(","));
|
|
1131
1131
|
}
|
|
1132
1132
|
}), m = (p, h) => {
|
|
1133
1133
|
d.value = p, s("change", {
|
|
1134
|
-
value:
|
|
1134
|
+
value: Fe(p) ? "" : p.join(","),
|
|
1135
1135
|
data: h
|
|
1136
1136
|
});
|
|
1137
|
-
}, r =
|
|
1137
|
+
}, r = z(() => ({
|
|
1138
1138
|
checkStrictly: t.checkStrictly,
|
|
1139
1139
|
expandTrigger: t.expandTrigger,
|
|
1140
1140
|
multiple: t.multiple,
|
|
@@ -1178,7 +1178,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1178
1178
|
node: g,
|
|
1179
1179
|
data: y
|
|
1180
1180
|
}, () => [
|
|
1181
|
-
Se(
|
|
1181
|
+
Se(ie(y?.label), 1)
|
|
1182
1182
|
])
|
|
1183
1183
|
]),
|
|
1184
1184
|
prefix: L(() => [
|
|
@@ -1207,7 +1207,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1207
1207
|
}, 8, ["modelValue", "cascader-panel-ref", "props", "options", "placeholder", "disabled", "clearable", "collapse-tags", "max-collapse-tags", "collapse-tags-tooltip", "filterable", "show-all-levels", "separator", "size"]);
|
|
1208
1208
|
};
|
|
1209
1209
|
}
|
|
1210
|
-
}),
|
|
1210
|
+
}), kl = Z(wl), Cl = /* @__PURE__ */ G({
|
|
1211
1211
|
name: "JCheckbox",
|
|
1212
1212
|
__name: "checkbox",
|
|
1213
1213
|
props: {
|
|
@@ -1227,7 +1227,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1227
1227
|
},
|
|
1228
1228
|
emits: ["update:modelValue", "change"],
|
|
1229
1229
|
setup(e, { emit: l }) {
|
|
1230
|
-
const o = e, t = l, n =
|
|
1230
|
+
const o = e, t = l, n = z({
|
|
1231
1231
|
get() {
|
|
1232
1232
|
return o.modelValue;
|
|
1233
1233
|
},
|
|
@@ -1255,13 +1255,13 @@ const nl = /* @__PURE__ */ K({
|
|
|
1255
1255
|
onChange: a
|
|
1256
1256
|
}, {
|
|
1257
1257
|
default: L(() => [
|
|
1258
|
-
e.type === "checkbox" ? (i(!0),
|
|
1258
|
+
e.type === "checkbox" ? (i(!0), T(ue, { key: 0 }, de(e.options, (r) => (i(), w(v, {
|
|
1259
1259
|
key: r.value,
|
|
1260
1260
|
value: r.value,
|
|
1261
1261
|
disabled: r.disabled,
|
|
1262
1262
|
size: e.size,
|
|
1263
1263
|
label: r.label
|
|
1264
|
-
}, null, 8, ["value", "disabled", "size", "label"]))), 128)) : (i(!0),
|
|
1264
|
+
}, null, 8, ["value", "disabled", "size", "label"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(e.options, (r) => (i(), w(d, {
|
|
1265
1265
|
key: r.value,
|
|
1266
1266
|
value: r.value,
|
|
1267
1267
|
disabled: r.disabled,
|
|
@@ -1273,7 +1273,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1273
1273
|
}, 8, ["modelValue", "disabled", "size", "min", "max", "text-color", "fill", "tag", "validate-event", "label", "type"]);
|
|
1274
1274
|
};
|
|
1275
1275
|
}
|
|
1276
|
-
}),
|
|
1276
|
+
}), xl = Z(Cl), jl = /* @__PURE__ */ G({
|
|
1277
1277
|
name: "JNumber",
|
|
1278
1278
|
__name: "number",
|
|
1279
1279
|
props: {
|
|
@@ -1304,7 +1304,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1304
1304
|
},
|
|
1305
1305
|
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
1306
1306
|
setup(e, { expose: l, emit: o }) {
|
|
1307
|
-
const t = e, n = j(), a = o, s =
|
|
1307
|
+
const t = e, n = j(), a = o, s = z({
|
|
1308
1308
|
get() {
|
|
1309
1309
|
return t.modelValue;
|
|
1310
1310
|
},
|
|
@@ -1353,10 +1353,10 @@ const nl = /* @__PURE__ */ K({
|
|
|
1353
1353
|
onFocus: d
|
|
1354
1354
|
}, {
|
|
1355
1355
|
prefix: L(() => [
|
|
1356
|
-
|
|
1356
|
+
W("span", null, ie(e.prefix || ""), 1)
|
|
1357
1357
|
]),
|
|
1358
1358
|
suffix: L(() => [
|
|
1359
|
-
|
|
1359
|
+
W("span", null, ie(e.suffix || ""), 1)
|
|
1360
1360
|
]),
|
|
1361
1361
|
"decrease-icon": L(() => [
|
|
1362
1362
|
e.decreaseIcon ? (i(), w(c, {
|
|
@@ -1386,7 +1386,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1386
1386
|
}, 8, ["id", "modelValue", "min", "max", "step", "step-strictly", "precision", "size", "readonly", "disabled", "controls", "controls-position", "aria-label", "placeholder", "value-on-clear", "validate-event", "label", "inputmode", "align", "disabled-scientific"]);
|
|
1387
1387
|
};
|
|
1388
1388
|
}
|
|
1389
|
-
}),
|
|
1389
|
+
}), Sl = Z(jl), Bl = /* @__PURE__ */ G({
|
|
1390
1390
|
name: "JAutocomplete",
|
|
1391
1391
|
__name: "autocomplete",
|
|
1392
1392
|
props: {
|
|
@@ -1414,7 +1414,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1414
1414
|
},
|
|
1415
1415
|
emits: ["update:modelValue", "select", "change", "focus", "blur"],
|
|
1416
1416
|
setup(e, { expose: l, emit: o }) {
|
|
1417
|
-
const t = e, n = j(null), a = o, s =
|
|
1417
|
+
const t = e, n = j(null), a = o, s = z({
|
|
1418
1418
|
get() {
|
|
1419
1419
|
return t.modelValue || "";
|
|
1420
1420
|
},
|
|
@@ -1476,7 +1476,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1476
1476
|
}, Ue({
|
|
1477
1477
|
default: L(({ item: C }) => [
|
|
1478
1478
|
te(g.$slots, "default", { item: C }, () => [
|
|
1479
|
-
|
|
1479
|
+
W("div", null, ie(C[e.valueKey] || ""), 1)
|
|
1480
1480
|
])
|
|
1481
1481
|
]),
|
|
1482
1482
|
_: 2
|
|
@@ -1533,10 +1533,10 @@ const nl = /* @__PURE__ */ K({
|
|
|
1533
1533
|
]), 1032, ["modelValue", "placeholder", "clearable", "disabled", "value-key", "debounce", "placement", "trigger-on-focus", "select-when-unmatched", "aria-label", "hide-loading", "popper-class", "popper-style", "teleported", "append-to", "highlight-first-item", "fit-input-width", "loop-navigation"]);
|
|
1534
1534
|
};
|
|
1535
1535
|
}
|
|
1536
|
-
}),
|
|
1536
|
+
}), $l = Z(Bl), zl = { class: "j-block" }, Vl = {
|
|
1537
1537
|
key: 1,
|
|
1538
1538
|
class: "j-layout--container"
|
|
1539
|
-
},
|
|
1539
|
+
}, Tl = { class: "j-block" }, Ll = { class: "j-block" }, Fl = { class: "j-block" }, Il = /* @__PURE__ */ G({
|
|
1540
1540
|
name: "JLayout",
|
|
1541
1541
|
__name: "layout",
|
|
1542
1542
|
props: {
|
|
@@ -1638,7 +1638,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1638
1638
|
}
|
|
1639
1639
|
},
|
|
1640
1640
|
setup(e) {
|
|
1641
|
-
const l = e, o =
|
|
1641
|
+
const l = e, o = zt(), t = j(), n = j(), a = j(-1), s = j(-1), u = j(-1), v = j(-1), d = j(0), m = j(!1), r = Ye({
|
|
1642
1642
|
type: "",
|
|
1643
1643
|
isMove: !1,
|
|
1644
1644
|
pageX: 0,
|
|
@@ -1646,192 +1646,192 @@ const nl = /* @__PURE__ */ K({
|
|
|
1646
1646
|
size: 0,
|
|
1647
1647
|
h: 0,
|
|
1648
1648
|
w: 0
|
|
1649
|
-
}), p =
|
|
1649
|
+
}), p = z({
|
|
1650
1650
|
get() {
|
|
1651
1651
|
return a.value !== -1 ? a.value : l.left;
|
|
1652
1652
|
},
|
|
1653
|
-
set(
|
|
1654
|
-
a.value =
|
|
1653
|
+
set(A) {
|
|
1654
|
+
a.value = A;
|
|
1655
1655
|
}
|
|
1656
|
-
}), h =
|
|
1656
|
+
}), h = z({
|
|
1657
1657
|
get() {
|
|
1658
1658
|
return s.value !== -1 ? s.value : l.right;
|
|
1659
1659
|
},
|
|
1660
|
-
set(
|
|
1661
|
-
s.value =
|
|
1660
|
+
set(A) {
|
|
1661
|
+
s.value = A;
|
|
1662
1662
|
}
|
|
1663
|
-
}), c =
|
|
1663
|
+
}), c = z({
|
|
1664
1664
|
get() {
|
|
1665
1665
|
return u.value !== -1 ? u.value : l.top;
|
|
1666
1666
|
},
|
|
1667
|
-
set(
|
|
1668
|
-
u.value =
|
|
1667
|
+
set(A) {
|
|
1668
|
+
u.value = A;
|
|
1669
1669
|
}
|
|
1670
|
-
}), g =
|
|
1670
|
+
}), g = z({
|
|
1671
1671
|
get() {
|
|
1672
1672
|
return v.value !== -1 ? v.value : l.bottom;
|
|
1673
1673
|
},
|
|
1674
|
-
set(
|
|
1675
|
-
v.value =
|
|
1674
|
+
set(A) {
|
|
1675
|
+
v.value = A;
|
|
1676
1676
|
}
|
|
1677
|
-
}), y =
|
|
1677
|
+
}), y = z(() => o.left), k = z(() => o.right), C = z(() => o.top), E = z(() => o.bottom), Q = z(() => y.value ? m.value && l.hideMidWhenNarrow && k.value ? "50%" : m.value && l.hideMidWhenNarrow && !k.value ? "100%" : typeof p.value == "number" ? p.value + "px" : p.value : "0"), Y = z(() => k.value ? m.value && l.hideMidWhenNarrow && y.value ? "50%" : m.value && l.hideMidWhenNarrow && !y.value ? "100%" : typeof h.value == "number" ? h.value + "px" : h.value : "0"), f = z(() => C.value ? typeof c.value == "number" ? c.value + "px" : c.value : "0"), B = z(() => E.value ? typeof g.value == "number" ? g.value + "px" : g.value : "0"), O = z(() => ({
|
|
1678
1678
|
minWidth: l.midMinWidth + "px",
|
|
1679
1679
|
minHeight: l.midMinHeight + "px"
|
|
1680
|
-
})), I = (
|
|
1681
|
-
r.type =
|
|
1682
|
-
const
|
|
1683
|
-
switch (
|
|
1680
|
+
})), I = (A, q) => {
|
|
1681
|
+
r.type = A, r.isMove = !0, r.pageX = q.pageX, r.pageY = q.pageY, r.h = n.value.clientHeight, r.w = n.value.clientWidth;
|
|
1682
|
+
const H = t.value.clientWidth, ne = t.value.clientHeight;
|
|
1683
|
+
switch (A) {
|
|
1684
1684
|
case "left": {
|
|
1685
|
-
const
|
|
1686
|
-
r.size = typeof
|
|
1685
|
+
const le = p.value;
|
|
1686
|
+
r.size = typeof le == "string" && le.includes("%") ? parseFloat(le) / 100 * H : Number(le);
|
|
1687
1687
|
break;
|
|
1688
1688
|
}
|
|
1689
1689
|
case "right": {
|
|
1690
|
-
const
|
|
1691
|
-
r.size = typeof
|
|
1690
|
+
const le = h.value;
|
|
1691
|
+
r.size = typeof le == "string" && le.includes("%") ? parseFloat(le) / 100 * H : Number(le);
|
|
1692
1692
|
break;
|
|
1693
1693
|
}
|
|
1694
1694
|
case "top": {
|
|
1695
|
-
const
|
|
1696
|
-
r.size = typeof
|
|
1695
|
+
const le = c.value;
|
|
1696
|
+
r.size = typeof le == "string" && le.includes("%") ? parseFloat(le) / 100 * ne : Number(le);
|
|
1697
1697
|
break;
|
|
1698
1698
|
}
|
|
1699
1699
|
case "bottom": {
|
|
1700
|
-
const
|
|
1701
|
-
r.size = typeof
|
|
1700
|
+
const le = g.value;
|
|
1701
|
+
r.size = typeof le == "string" && le.includes("%") ? parseFloat(le) / 100 * ne : Number(le);
|
|
1702
1702
|
break;
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
document.onmouseup =
|
|
1706
|
-
},
|
|
1705
|
+
document.onmouseup = $, document.onmousemove = ee;
|
|
1706
|
+
}, ee = (A) => {
|
|
1707
1707
|
if (r.isMove)
|
|
1708
1708
|
switch (r.type) {
|
|
1709
1709
|
case "left": {
|
|
1710
|
-
const
|
|
1711
|
-
let
|
|
1712
|
-
|
|
1710
|
+
const q = A.pageX - r.pageX;
|
|
1711
|
+
let H = r.size + q;
|
|
1712
|
+
H < 0 ? H = 4 : H > r.size + r.w - l.midMinWidth && (H = r.size + r.w - l.midMinWidth), p.value = H;
|
|
1713
1713
|
break;
|
|
1714
1714
|
}
|
|
1715
1715
|
case "right": {
|
|
1716
|
-
const
|
|
1717
|
-
let
|
|
1718
|
-
|
|
1716
|
+
const q = A.pageX - r.pageX;
|
|
1717
|
+
let H = r.size - q;
|
|
1718
|
+
H < 0 ? H = 4 : H > r.size + r.w - l.midMinWidth && (H = r.size + r.w - l.midMinWidth), h.value = H;
|
|
1719
1719
|
break;
|
|
1720
1720
|
}
|
|
1721
1721
|
case "top": {
|
|
1722
|
-
const
|
|
1723
|
-
let
|
|
1724
|
-
|
|
1722
|
+
const q = A.pageY - r.pageY;
|
|
1723
|
+
let H = r.size + q;
|
|
1724
|
+
H < 0 ? H = 4 : H > r.size + r.h - l.midMinHeight && (H = r.size + r.h - l.midMinHeight), c.value = H;
|
|
1725
1725
|
break;
|
|
1726
1726
|
}
|
|
1727
1727
|
case "bottom": {
|
|
1728
|
-
const
|
|
1729
|
-
let
|
|
1730
|
-
|
|
1728
|
+
const q = A.pageY - r.pageY;
|
|
1729
|
+
let H = r.size - q;
|
|
1730
|
+
H < 0 ? H = 4 : H > r.size + r.h - l.midMinHeight && (H = r.size + r.h - l.midMinHeight), g.value = H;
|
|
1731
1731
|
break;
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
|
-
},
|
|
1734
|
+
}, $ = () => {
|
|
1735
1735
|
r.isMove = !1, document.onmouseup = null, document.onmousemove = null;
|
|
1736
|
-
},
|
|
1736
|
+
}, se = () => {
|
|
1737
1737
|
if (!l.hideMidWhenNarrow || !t.value) {
|
|
1738
1738
|
m.value = !1;
|
|
1739
1739
|
return;
|
|
1740
1740
|
}
|
|
1741
1741
|
d.value = t.value.clientWidth;
|
|
1742
|
-
let
|
|
1742
|
+
let A = 0, q = 0;
|
|
1743
1743
|
if (y.value) {
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1744
|
+
const ne = p.value;
|
|
1745
|
+
A = typeof ne == "string" && ne.includes("%") ? parseFloat(ne) / 100 * d.value : Number(ne);
|
|
1746
1746
|
}
|
|
1747
1747
|
if (k.value) {
|
|
1748
|
-
const
|
|
1749
|
-
|
|
1748
|
+
const ne = h.value;
|
|
1749
|
+
q = typeof ne == "string" && ne.includes("%") ? parseFloat(ne) / 100 * d.value : Number(ne);
|
|
1750
1750
|
}
|
|
1751
|
-
const
|
|
1752
|
-
m.value =
|
|
1751
|
+
const H = d.value - A - q;
|
|
1752
|
+
m.value = H < l.midMinWidth;
|
|
1753
1753
|
};
|
|
1754
1754
|
let J = null;
|
|
1755
1755
|
return Xe(() => {
|
|
1756
|
-
l.hideMidWhenNarrow && t.value && (
|
|
1757
|
-
|
|
1756
|
+
l.hideMidWhenNarrow && t.value && (se(), J = new ResizeObserver(() => {
|
|
1757
|
+
se();
|
|
1758
1758
|
}), J.observe(t.value));
|
|
1759
|
-
}),
|
|
1759
|
+
}), tt(() => {
|
|
1760
1760
|
J && J.disconnect();
|
|
1761
|
-
}), (
|
|
1761
|
+
}), (A, q) => (i(), T("div", {
|
|
1762
1762
|
ref_key: "layout",
|
|
1763
1763
|
ref: t,
|
|
1764
|
-
class:
|
|
1764
|
+
class: Te(["j-layout", { "j-layout-not-hidden": e.notHidden }])
|
|
1765
1765
|
}, [
|
|
1766
|
-
y.value ? (i(),
|
|
1766
|
+
y.value ? (i(), T("div", {
|
|
1767
1767
|
key: 0,
|
|
1768
1768
|
class: "j-layout--left",
|
|
1769
|
-
style:
|
|
1769
|
+
style: re({ width: Q.value })
|
|
1770
1770
|
}, [
|
|
1771
|
-
|
|
1772
|
-
te(
|
|
1771
|
+
W("div", zl, [
|
|
1772
|
+
te(A.$slots, "left")
|
|
1773
1773
|
]),
|
|
1774
|
-
e.leftMove ? (i(),
|
|
1774
|
+
e.leftMove ? (i(), T("div", {
|
|
1775
1775
|
key: 0,
|
|
1776
1776
|
class: "j-layout--move",
|
|
1777
|
-
onMousedown:
|
|
1778
|
-
}, null, 32)) :
|
|
1779
|
-
], 4)) :
|
|
1780
|
-
m.value ?
|
|
1781
|
-
C.value ? (i(),
|
|
1777
|
+
onMousedown: q[0] || (q[0] = (H) => I("left", H))
|
|
1778
|
+
}, null, 32)) : D("", !0)
|
|
1779
|
+
], 4)) : D("", !0),
|
|
1780
|
+
m.value ? D("", !0) : (i(), T("div", Vl, [
|
|
1781
|
+
C.value ? (i(), T("div", {
|
|
1782
1782
|
key: 0,
|
|
1783
1783
|
class: "j-layout--top",
|
|
1784
|
-
style:
|
|
1784
|
+
style: re({ height: f.value })
|
|
1785
1785
|
}, [
|
|
1786
|
-
|
|
1787
|
-
te(
|
|
1786
|
+
W("div", Tl, [
|
|
1787
|
+
te(A.$slots, "top")
|
|
1788
1788
|
]),
|
|
1789
|
-
e.topMove ? (i(),
|
|
1789
|
+
e.topMove ? (i(), T("div", {
|
|
1790
1790
|
key: 0,
|
|
1791
1791
|
class: "j-layout--move",
|
|
1792
|
-
onMousedown:
|
|
1793
|
-
}, null, 32)) :
|
|
1794
|
-
], 4)) :
|
|
1795
|
-
|
|
1792
|
+
onMousedown: q[1] || (q[1] = (H) => I("top", H))
|
|
1793
|
+
}, null, 32)) : D("", !0)
|
|
1794
|
+
], 4)) : D("", !0),
|
|
1795
|
+
W("div", {
|
|
1796
1796
|
ref_key: "mid",
|
|
1797
1797
|
ref: n,
|
|
1798
1798
|
class: "j-layout--wrapper",
|
|
1799
|
-
style:
|
|
1799
|
+
style: re(O.value)
|
|
1800
1800
|
}, [
|
|
1801
|
-
te(
|
|
1801
|
+
te(A.$slots, "default")
|
|
1802
1802
|
], 4),
|
|
1803
|
-
E.value ? (i(),
|
|
1803
|
+
E.value ? (i(), T("div", {
|
|
1804
1804
|
key: 1,
|
|
1805
1805
|
class: "j-layout--bottom",
|
|
1806
|
-
style:
|
|
1806
|
+
style: re({ height: B.value })
|
|
1807
1807
|
}, [
|
|
1808
|
-
|
|
1809
|
-
te(
|
|
1808
|
+
W("div", Ll, [
|
|
1809
|
+
te(A.$slots, "bottom")
|
|
1810
1810
|
]),
|
|
1811
|
-
e.bottomMove ? (i(),
|
|
1811
|
+
e.bottomMove ? (i(), T("div", {
|
|
1812
1812
|
key: 0,
|
|
1813
1813
|
class: "j-layout--move",
|
|
1814
|
-
onMousedown:
|
|
1815
|
-
}, null, 32)) :
|
|
1816
|
-
], 4)) :
|
|
1814
|
+
onMousedown: q[2] || (q[2] = (H) => I("bottom", H))
|
|
1815
|
+
}, null, 32)) : D("", !0)
|
|
1816
|
+
], 4)) : D("", !0)
|
|
1817
1817
|
])),
|
|
1818
|
-
k.value ? (i(),
|
|
1818
|
+
k.value ? (i(), T("div", {
|
|
1819
1819
|
key: 2,
|
|
1820
1820
|
class: "j-layout--right",
|
|
1821
|
-
style:
|
|
1821
|
+
style: re({ width: Y.value })
|
|
1822
1822
|
}, [
|
|
1823
|
-
|
|
1824
|
-
te(
|
|
1823
|
+
W("div", Fl, [
|
|
1824
|
+
te(A.$slots, "right")
|
|
1825
1825
|
]),
|
|
1826
|
-
e.rightMove ? (i(),
|
|
1826
|
+
e.rightMove ? (i(), T("div", {
|
|
1827
1827
|
key: 0,
|
|
1828
1828
|
class: "j-layout--move",
|
|
1829
|
-
onMousedown:
|
|
1830
|
-
}, null, 32)) :
|
|
1831
|
-
], 4)) :
|
|
1829
|
+
onMousedown: q[3] || (q[3] = (H) => I("right", H))
|
|
1830
|
+
}, null, 32)) : D("", !0)
|
|
1831
|
+
], 4)) : D("", !0)
|
|
1832
1832
|
], 2));
|
|
1833
1833
|
}
|
|
1834
|
-
}),
|
|
1834
|
+
}), Ol = Z(Il), Ml = { class: "j-block" }, Dl = /* @__PURE__ */ G({
|
|
1835
1835
|
name: "JTable",
|
|
1836
1836
|
__name: "table",
|
|
1837
1837
|
props: {
|
|
@@ -1904,14 +1904,14 @@ const nl = /* @__PURE__ */ K({
|
|
|
1904
1904
|
autoFillHeight: !0
|
|
1905
1905
|
};
|
|
1906
1906
|
t.height && (c.height = t.height), t.stripe && (c.theme = {
|
|
1907
|
-
...
|
|
1907
|
+
...bt.themes[t.theme === "dark" ? "DARK" : "DEFAULT"],
|
|
1908
1908
|
bodyStyle: {
|
|
1909
1909
|
bgColor: (g) => {
|
|
1910
1910
|
const { row: y } = g;
|
|
1911
1911
|
return y % 2 === 0 ? t.theme === "dark" ? "#1a1a1a" : "#fafafa" : t.theme === "dark" ? "#0f0f0f" : "#ffffff";
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
|
-
}), console.log(c), s = new
|
|
1914
|
+
}), console.log(c), s = new bt.ListTable(a.value, c), n("ready", s);
|
|
1915
1915
|
}, v = () => {
|
|
1916
1916
|
s && (s.release(), s = null);
|
|
1917
1917
|
}, d = () => {
|
|
@@ -1925,7 +1925,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
1925
1925
|
};
|
|
1926
1926
|
return Xe(() => {
|
|
1927
1927
|
u();
|
|
1928
|
-
}),
|
|
1928
|
+
}), xt(() => {
|
|
1929
1929
|
v();
|
|
1930
1930
|
}), ke(
|
|
1931
1931
|
() => t.records,
|
|
@@ -1938,24 +1938,24 @@ const nl = /* @__PURE__ */ K({
|
|
|
1938
1938
|
setRecords: r,
|
|
1939
1939
|
setColumns: p,
|
|
1940
1940
|
refresh: h
|
|
1941
|
-
}), (c, g) => (i(),
|
|
1942
|
-
|
|
1941
|
+
}), (c, g) => (i(), T("div", Ml, [
|
|
1942
|
+
W("div", {
|
|
1943
1943
|
ref_key: "tableContainer",
|
|
1944
1944
|
ref: a,
|
|
1945
|
-
class:
|
|
1945
|
+
class: Te(["j-table", { "j-table-border": e.border }])
|
|
1946
1946
|
}, null, 2)
|
|
1947
1947
|
]));
|
|
1948
1948
|
}
|
|
1949
|
-
}),
|
|
1949
|
+
}), Al = Z(Dl), Nl = ["title"], Rl = {
|
|
1950
1950
|
key: 0,
|
|
1951
1951
|
style: { "margin-left": "8px" }
|
|
1952
|
-
},
|
|
1952
|
+
}, El = {
|
|
1953
1953
|
key: 0,
|
|
1954
1954
|
class: "j-dialog-steps"
|
|
1955
|
-
},
|
|
1955
|
+
}, Jl = {
|
|
1956
1956
|
key: 1,
|
|
1957
1957
|
class: "j-dialog-btns"
|
|
1958
|
-
},
|
|
1958
|
+
}, Ul = /* @__PURE__ */ G({
|
|
1959
1959
|
name: "JDialog",
|
|
1960
1960
|
__name: "index",
|
|
1961
1961
|
props: {
|
|
@@ -2122,8 +2122,8 @@ const nl = /* @__PURE__ */ K({
|
|
|
2122
2122
|
},
|
|
2123
2123
|
emits: ["update:visible", "update:stepActive", "cancel", "ok", "closed"],
|
|
2124
2124
|
setup(e, { expose: l, emit: o }) {
|
|
2125
|
-
const t = e, n = o, { t: a } =
|
|
2126
|
-
t: (
|
|
2125
|
+
const t = e, n = o, { t: a } = Ve("jcode_app_provide", {
|
|
2126
|
+
t: (R) => R
|
|
2127
2127
|
}), s = j(!1), u = j(!1), v = j(""), d = j(!1), m = j(!0), r = j(!1), p = j(!0), h = j(-1), c = Ye({
|
|
2128
2128
|
isMove: !1,
|
|
2129
2129
|
pageX: 0,
|
|
@@ -2135,59 +2135,59 @@ const nl = /* @__PURE__ */ K({
|
|
|
2135
2135
|
}), g = j(0), y = j(), k = j(48), C = j(0), E = j(0);
|
|
2136
2136
|
ke(
|
|
2137
2137
|
() => t.visible,
|
|
2138
|
-
(
|
|
2139
|
-
g.value = 1, g.value = 0, s.value =
|
|
2140
|
-
y.value = document.querySelector(".j-dialog"), y.value.onmousemove =
|
|
2138
|
+
(R) => {
|
|
2139
|
+
g.value = 1, g.value = 0, s.value = R, R === !0 && t.zoomControls && xe(() => {
|
|
2140
|
+
y.value = document.querySelector(".j-dialog"), y.value.onmousemove = Ie;
|
|
2141
2141
|
});
|
|
2142
2142
|
},
|
|
2143
2143
|
{ immediate: !0 }
|
|
2144
2144
|
);
|
|
2145
|
-
const
|
|
2146
|
-
let
|
|
2147
|
-
return
|
|
2148
|
-
}), Y =
|
|
2149
|
-
let
|
|
2150
|
-
return
|
|
2151
|
-
}), f =
|
|
2152
|
-
let
|
|
2153
|
-
return
|
|
2154
|
-
}), B =
|
|
2155
|
-
let
|
|
2156
|
-
return
|
|
2157
|
-
}), O = (
|
|
2158
|
-
v.value =
|
|
2145
|
+
const Q = z(() => {
|
|
2146
|
+
let R = t.height + g.value;
|
|
2147
|
+
return R + 40 > window.innerHeight && (R = window.innerHeight - 32 - 40), R;
|
|
2148
|
+
}), Y = z(() => {
|
|
2149
|
+
let R = 0 + g.value;
|
|
2150
|
+
return R = (document.body.clientWidth - B.value) / 2, R;
|
|
2151
|
+
}), f = z(() => {
|
|
2152
|
+
let R = 0 + g.value;
|
|
2153
|
+
return R = (window.innerHeight - Q.value - 40) / 2, R;
|
|
2154
|
+
}), B = z(() => {
|
|
2155
|
+
let R = 0 + g.value;
|
|
2156
|
+
return R = t.width, R > document.body.clientWidth && (R = document.body.clientWidth - 32), R;
|
|
2157
|
+
}), O = (R) => {
|
|
2158
|
+
v.value = R || "保存数据中...", u.value = !0;
|
|
2159
2159
|
}, I = () => {
|
|
2160
2160
|
u.value = !1;
|
|
2161
|
-
},
|
|
2161
|
+
}, ee = () => {
|
|
2162
2162
|
t.beforeClose && t.beforeClose() === !1 || (s.value = !1, n("update:visible", !1), n("cancel"));
|
|
2163
|
-
},
|
|
2163
|
+
}, $ = () => {
|
|
2164
2164
|
n("ok", O, I);
|
|
2165
|
-
},
|
|
2165
|
+
}, se = () => {
|
|
2166
2166
|
c.left = 0, c.top = 0, E.value = 0, C.value = 0, t.isStep && (J.value = 0, xe(() => {
|
|
2167
|
-
|
|
2167
|
+
ne();
|
|
2168
2168
|
})), n("closed");
|
|
2169
|
-
}, J =
|
|
2169
|
+
}, J = z({
|
|
2170
2170
|
get() {
|
|
2171
2171
|
return h.value !== -1 ? h.value : t.stepActive;
|
|
2172
2172
|
},
|
|
2173
|
-
set(
|
|
2174
|
-
h.value =
|
|
2173
|
+
set(R) {
|
|
2174
|
+
h.value = R, n("update:stepActive", R);
|
|
2175
2175
|
}
|
|
2176
|
-
}),
|
|
2176
|
+
}), A = () => {
|
|
2177
2177
|
J.value > 0 && J.value--, xe(() => {
|
|
2178
|
-
|
|
2178
|
+
ne();
|
|
2179
2179
|
});
|
|
2180
|
-
},
|
|
2181
|
-
await
|
|
2182
|
-
|
|
2180
|
+
}, q = async () => {
|
|
2181
|
+
await H() && (J.value < t.steps.length - 1 && (J.value += 1), xe(() => {
|
|
2182
|
+
ne();
|
|
2183
2183
|
}));
|
|
2184
|
-
},
|
|
2184
|
+
}, H = async () => {
|
|
2185
2185
|
if (d.value = !0, t.validateSteps) {
|
|
2186
|
-
const
|
|
2187
|
-
return d.value = !1,
|
|
2186
|
+
const R = await t.validateSteps(t.stepActive, O, I);
|
|
2187
|
+
return d.value = !1, R;
|
|
2188
2188
|
}
|
|
2189
2189
|
return d.value = !1, !0;
|
|
2190
|
-
},
|
|
2190
|
+
}, ne = () => {
|
|
2191
2191
|
switch (p.value = !0, r.value = !0, m.value = !0, J.value) {
|
|
2192
2192
|
case 0:
|
|
2193
2193
|
r.value = !1;
|
|
@@ -2199,49 +2199,49 @@ const nl = /* @__PURE__ */ K({
|
|
|
2199
2199
|
m.value = !1, r.value = !1;
|
|
2200
2200
|
break;
|
|
2201
2201
|
}
|
|
2202
|
-
},
|
|
2203
|
-
t.autoHeight || (c.pageX =
|
|
2204
|
-
},
|
|
2202
|
+
}, le = z(() => t.steps.map((R) => ({ title: R, disabled: !0 }))), Be = function(R) {
|
|
2203
|
+
t.autoHeight || (c.pageX = R.pageX, c.pageY = R.pageY, c._left = c.left, c._top = c.top, c.isMove = !0, document.onmouseup = oe, document.onmousemove = he);
|
|
2204
|
+
}, oe = () => {
|
|
2205
2205
|
c.isMove = !1, document.onmouseup = null, document.onmousemove = null;
|
|
2206
|
-
}, he = (
|
|
2206
|
+
}, he = (R) => {
|
|
2207
2207
|
if (c.isMove) {
|
|
2208
|
-
const be =
|
|
2209
|
-
let
|
|
2210
|
-
|
|
2208
|
+
const be = R.pageX - c.pageX, ve = R.pageY - c.pageY;
|
|
2209
|
+
let ce = c._left + be, ye = c._top + ve;
|
|
2210
|
+
ce + Y.value < 0 && (ce = -Y.value), C.value ? ce + C.value + Y.value > document.body.clientWidth && (ce = document.body.clientWidth - C.value - Y.value) : ce + B.value + Y.value > document.body.clientWidth && (ce = document.body.clientWidth - B.value - Y.value), ye + f.value < 0 && (ye = -f.value), E.value ? ye + E.value + f.value + 40 > window.innerHeight && (ye = window.innerHeight - E.value - f.value - 40) : ye + Q.value + f.value + 40 > window.innerHeight && (ye = window.innerHeight - Q.value - f.value - 40), c.left = ce, c.top = ye;
|
|
2211
2211
|
}
|
|
2212
|
-
},
|
|
2213
|
-
const be = y.value.offsetLeft,
|
|
2214
|
-
if (
|
|
2212
|
+
}, Ie = (R) => {
|
|
2213
|
+
const be = y.value.offsetLeft, ve = y.value.offsetTop, ce = y.value.clientWidth, ye = y.value.clientHeight, je = ye - k.value, S = y.value.scrollTop;
|
|
2214
|
+
if (R.clientX > be + ce - 10 && S + R.clientY > ve + ye - 10 || S + R.clientY < ve + 5 && be + 10 > R.clientX)
|
|
2215
2215
|
y.value.style.cursor = "se-resize";
|
|
2216
|
-
else if (be + 10 >
|
|
2216
|
+
else if (be + 10 > R.clientX && S + R.clientY > ve + ye - 10 || R.clientX > be + ce - 10 && S + R.clientY < ve + 5)
|
|
2217
2217
|
y.value.style.cursor = "sw-resize";
|
|
2218
|
-
else if (
|
|
2218
|
+
else if (R.clientX > be + ce - 10 || be + 10 > R.clientX)
|
|
2219
2219
|
y.value.style.cursor = "w-resize";
|
|
2220
|
-
else if (S +
|
|
2220
|
+
else if (S + R.clientY > ve + ye - 10 || S + R.clientY < ve + 5)
|
|
2221
2221
|
y.value.style.cursor = "s-resize";
|
|
2222
2222
|
else {
|
|
2223
2223
|
y.value.style.cursor = "default", y.value.onmousedown = null;
|
|
2224
2224
|
return;
|
|
2225
2225
|
}
|
|
2226
|
-
y.value.onmousedown = (
|
|
2227
|
-
const { clientX:
|
|
2228
|
-
c._left = c.left, c._top = c.top, E.value || (E.value = je), C.value || (C.value =
|
|
2229
|
-
|
|
2226
|
+
y.value.onmousedown = (P) => {
|
|
2227
|
+
const { clientX: _ } = P, { clientY: pe } = P, $e = c.left + Y.value, Le = c.top + f.value;
|
|
2228
|
+
c._left = c.left, c._top = c.top, E.value || (E.value = je), C.value || (C.value = ce), _ > $e + 10 && _ < $e + ce - 10 && pe > Le + 5 && pe < Le + 47 || (document.onmousemove = function(fe) {
|
|
2229
|
+
fe.preventDefault(), _ > $e && _ < $e + 10 && (_ > fe.clientX && (C.value = ce + (_ - fe.clientX), c.left = c._left - (_ - fe.clientX)), _ < fe.clientX && C.value > t.minWidth && (C.value = ce - (fe.clientX - _), c.left = c._left + fe.clientX - _)), _ > $e + ce - 10 && _ < $e + ce && (_ > fe.clientX && C.value > t.minWidth && (C.value = ce - (_ - fe.clientX)), _ < fe.clientX && Y.value + c.left + C.value < document.body.clientWidth && (C.value = ce + (fe.clientX - _))), pe > Le && pe < Le + 5 && (pe > fe.clientY && (E.value = je + pe - fe.clientY, c.top = c._top - (pe - fe.clientY)), pe < fe.clientY && E.value > t.minHeight && (E.value = je - (fe.clientY - pe), c.top = c._top + fe.clientY - pe)), S + pe > Le + je + 38 && S + pe < Le + je + 48 && (pe > fe.clientY && E.value > t.minHeight && (E.value = je - (pe - fe.clientY)), pe < fe.clientY && f.value + c.top + E.value + 48 < window.innerHeight && (E.value = je + fe.clientY - pe));
|
|
2230
2230
|
}, document.onmouseup = function() {
|
|
2231
2231
|
document.onmousemove = null, document.onmouseup = null;
|
|
2232
2232
|
});
|
|
2233
2233
|
};
|
|
2234
|
-
}, Oe = async (
|
|
2235
|
-
|
|
2234
|
+
}, Oe = async (R) => {
|
|
2235
|
+
R.click && await R.click();
|
|
2236
2236
|
};
|
|
2237
2237
|
return l({
|
|
2238
2238
|
showLoading: O,
|
|
2239
2239
|
hideLoading: I
|
|
2240
|
-
}), (
|
|
2241
|
-
const
|
|
2240
|
+
}), (R, be) => {
|
|
2241
|
+
const ve = F("j-button"), ce = F("el-space"), ye = F("el-step"), je = F("el-steps"), S = F("el-dialog");
|
|
2242
2242
|
return i(), w(S, {
|
|
2243
2243
|
modelValue: s.value,
|
|
2244
|
-
"onUpdate:modelValue": be[0] || (be[0] = (
|
|
2244
|
+
"onUpdate:modelValue": be[0] || (be[0] = (P) => s.value = P),
|
|
2245
2245
|
class: "j-dialog",
|
|
2246
2246
|
"align-center": "",
|
|
2247
2247
|
"append-to-body": !0,
|
|
@@ -2251,126 +2251,126 @@ const nl = /* @__PURE__ */ K({
|
|
|
2251
2251
|
"modal-penetrable": !e.mask,
|
|
2252
2252
|
"close-on-click-modal": !1,
|
|
2253
2253
|
width: `${C.value || B.value}px`,
|
|
2254
|
-
style:
|
|
2254
|
+
style: re({
|
|
2255
2255
|
position: "fixed",
|
|
2256
2256
|
left: `${Y.value + c.left}px`,
|
|
2257
2257
|
top: `${f.value + c.top}px`,
|
|
2258
2258
|
"pointer-events": e.mask ? "" : "none"
|
|
2259
2259
|
}),
|
|
2260
|
-
onClosed:
|
|
2260
|
+
onClosed: se
|
|
2261
2261
|
}, {
|
|
2262
2262
|
default: L(() => [
|
|
2263
|
-
|
|
2263
|
+
W("div", {
|
|
2264
2264
|
class: "j-dialog-header",
|
|
2265
|
-
onMousedown:
|
|
2265
|
+
onMousedown: Be
|
|
2266
2266
|
}, [
|
|
2267
|
-
|
|
2267
|
+
W("div", {
|
|
2268
2268
|
class: "j-dialog-header-left",
|
|
2269
|
-
title:
|
|
2270
|
-
style:
|
|
2269
|
+
title: U(a)(e.title || ""),
|
|
2270
|
+
style: re({ cursor: e.autoHeight ? "" : "move" })
|
|
2271
2271
|
}, [
|
|
2272
|
-
|
|
2273
|
-
e.subtitle ? (i(),
|
|
2272
|
+
W("span", null, ie(U(a)(e.title || "")), 1),
|
|
2273
|
+
e.subtitle ? (i(), T("span", Rl, [
|
|
2274
2274
|
(i(), w(We(e.subtitle())))
|
|
2275
|
-
])) :
|
|
2276
|
-
], 12,
|
|
2277
|
-
e.showCloseBtn ? (i(), w(
|
|
2275
|
+
])) : D("", !0)
|
|
2276
|
+
], 12, Nl),
|
|
2277
|
+
e.showCloseBtn ? (i(), w(ce, {
|
|
2278
2278
|
key: 0,
|
|
2279
2279
|
size: 0
|
|
2280
2280
|
}, {
|
|
2281
2281
|
default: L(() => [
|
|
2282
|
-
|
|
2282
|
+
K(ve, {
|
|
2283
2283
|
type: "text",
|
|
2284
2284
|
icon: "material-symbols-light:close-rounded",
|
|
2285
|
-
onClick:
|
|
2285
|
+
onClick: ee
|
|
2286
2286
|
})
|
|
2287
2287
|
]),
|
|
2288
2288
|
_: 1
|
|
2289
|
-
})) :
|
|
2289
|
+
})) : D("", !0)
|
|
2290
2290
|
], 32),
|
|
2291
|
-
|
|
2292
|
-
class:
|
|
2291
|
+
W("div", {
|
|
2292
|
+
class: Te([
|
|
2293
2293
|
"j-dialog-window",
|
|
2294
2294
|
{ "j-dialog-window-hasBtns": e.hasBtns },
|
|
2295
2295
|
{ "j-dialog-window-hasSteps": e.isStep }
|
|
2296
2296
|
]),
|
|
2297
|
-
style:
|
|
2298
|
-
height: e.autoHeight ? "auto" : (E.value > 0 ? E.value :
|
|
2297
|
+
style: re({
|
|
2298
|
+
height: e.autoHeight ? "auto" : (E.value > 0 ? E.value : Q.value) + "px"
|
|
2299
2299
|
})
|
|
2300
2300
|
}, [
|
|
2301
|
-
e.isStep ? (i(),
|
|
2302
|
-
|
|
2303
|
-
style:
|
|
2301
|
+
e.isStep ? (i(), T("div", El, [
|
|
2302
|
+
W("div", {
|
|
2303
|
+
style: re({ maxWidth: `${200 * le.value.length}px`, width: "100%" })
|
|
2304
2304
|
}, [
|
|
2305
|
-
|
|
2305
|
+
K(je, {
|
|
2306
2306
|
simple: "",
|
|
2307
2307
|
active: J.value,
|
|
2308
2308
|
space: 160,
|
|
2309
2309
|
"finish-status": "success"
|
|
2310
2310
|
}, {
|
|
2311
2311
|
default: L(() => [
|
|
2312
|
-
(i(!0),
|
|
2313
|
-
key:
|
|
2314
|
-
title:
|
|
2312
|
+
(i(!0), T(ue, null, de(le.value, (P, _) => (i(), w(ye, {
|
|
2313
|
+
key: _,
|
|
2314
|
+
title: U(a)(P.title)
|
|
2315
2315
|
}, null, 8, ["title"]))), 128))
|
|
2316
2316
|
]),
|
|
2317
2317
|
_: 1
|
|
2318
2318
|
}, 8, ["active"])
|
|
2319
2319
|
], 4)
|
|
2320
|
-
])) :
|
|
2321
|
-
te(
|
|
2322
|
-
e.hasBtns ? (i(),
|
|
2323
|
-
|
|
2320
|
+
])) : D("", !0),
|
|
2321
|
+
te(R.$slots, "default"),
|
|
2322
|
+
e.hasBtns ? (i(), T("div", Jl, [
|
|
2323
|
+
K(ce, { size: 8 }, {
|
|
2324
2324
|
default: L(() => [
|
|
2325
|
-
e.isStep ? (i(), w(
|
|
2325
|
+
e.isStep ? (i(), w(ve, {
|
|
2326
2326
|
key: 0,
|
|
2327
2327
|
size: "mini",
|
|
2328
2328
|
disabled: m.value,
|
|
2329
|
-
label:
|
|
2330
|
-
onClick:
|
|
2331
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2332
|
-
e.isStep ? (i(), w(
|
|
2329
|
+
label: U(a)("上一步"),
|
|
2330
|
+
onClick: A
|
|
2331
|
+
}, null, 8, ["disabled", "label"])) : D("", !0),
|
|
2332
|
+
e.isStep ? (i(), w(ve, {
|
|
2333
2333
|
key: 1,
|
|
2334
2334
|
size: "mini",
|
|
2335
2335
|
disabled: r.value,
|
|
2336
2336
|
loading: d.value,
|
|
2337
|
-
label:
|
|
2338
|
-
onClick:
|
|
2339
|
-
}, null, 8, ["disabled", "loading", "label"])) :
|
|
2340
|
-
!e.isStep && e.showCloseBtn ? (i(), w(
|
|
2337
|
+
label: U(a)("下一步"),
|
|
2338
|
+
onClick: q
|
|
2339
|
+
}, null, 8, ["disabled", "loading", "label"])) : D("", !0),
|
|
2340
|
+
!e.isStep && e.showCloseBtn ? (i(), w(ve, {
|
|
2341
2341
|
key: 2,
|
|
2342
2342
|
size: "mini",
|
|
2343
|
-
label:
|
|
2344
|
-
onClick:
|
|
2345
|
-
}, null, 8, ["label"])) :
|
|
2346
|
-
(i(!0),
|
|
2347
|
-
key:
|
|
2348
|
-
label:
|
|
2349
|
-
danger:
|
|
2350
|
-
ghost:
|
|
2351
|
-
type:
|
|
2352
|
-
icon:
|
|
2353
|
-
onClick: (
|
|
2343
|
+
label: U(a)("取消"),
|
|
2344
|
+
onClick: ee
|
|
2345
|
+
}, null, 8, ["label"])) : D("", !0),
|
|
2346
|
+
(i(!0), T(ue, null, de(e.buttons, (P) => (i(), w(ve, {
|
|
2347
|
+
key: P.prop,
|
|
2348
|
+
label: P.label,
|
|
2349
|
+
danger: P.danger,
|
|
2350
|
+
ghost: P.ghost,
|
|
2351
|
+
type: P.type,
|
|
2352
|
+
icon: P.icon,
|
|
2353
|
+
onClick: (_) => Oe(P)
|
|
2354
2354
|
}, null, 8, ["label", "danger", "ghost", "type", "icon", "onClick"]))), 128)),
|
|
2355
|
-
e.hasSaveBtn ? (i(), w(
|
|
2355
|
+
e.hasSaveBtn ? (i(), w(ve, {
|
|
2356
2356
|
key: 3,
|
|
2357
2357
|
size: "mini",
|
|
2358
2358
|
type: "primary",
|
|
2359
2359
|
disabled: p.value && e.isStep,
|
|
2360
|
-
label:
|
|
2361
|
-
onClick:
|
|
2362
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2360
|
+
label: U(a)(e.btnText),
|
|
2361
|
+
onClick: $
|
|
2362
|
+
}, null, 8, ["disabled", "label"])) : D("", !0)
|
|
2363
2363
|
]),
|
|
2364
2364
|
_: 1
|
|
2365
2365
|
})
|
|
2366
|
-
])) :
|
|
2366
|
+
])) : D("", !0)
|
|
2367
2367
|
], 6)
|
|
2368
2368
|
]),
|
|
2369
2369
|
_: 3
|
|
2370
2370
|
}, 8, ["modelValue", "destroy-on-close", "modal", "modal-penetrable", "width", "style"]);
|
|
2371
2371
|
};
|
|
2372
2372
|
}
|
|
2373
|
-
}),
|
|
2373
|
+
}), Wl = Z(Ul), Pl = ["element-loading-text"], Hl = { class: "j-dialog-full-header" }, Yl = { class: "j-dialog-full-header-left" }, Xl = ["src"], ql = { class: "j-dialog-full-title-text" }, Gl = { style: { height: "28px", "line-height": "32px", "margin-left": "8px" } }, Kl = { class: "j-dialog-full-header-right" }, Ql = { class: "j-dialog-full-body" }, Zl = /* @__PURE__ */ G({
|
|
2374
2374
|
name: "JDialogFull",
|
|
2375
2375
|
__name: "index",
|
|
2376
2376
|
props: {
|
|
@@ -2482,35 +2482,35 @@ const nl = /* @__PURE__ */ K({
|
|
|
2482
2482
|
},
|
|
2483
2483
|
emits: ["update:stepActive", "update:visible", "cancel", "ok", "closed"],
|
|
2484
2484
|
setup(e, { expose: l, emit: o }) {
|
|
2485
|
-
const t = e, n = o, { logoImg: a, t: s } =
|
|
2485
|
+
const t = e, n = o, { logoImg: a, t: s } = Ve("jcode_app_provide", {
|
|
2486
2486
|
logoImg: "",
|
|
2487
|
-
t: (
|
|
2487
|
+
t: ($) => $
|
|
2488
2488
|
}), u = j(!1), v = j(!1), d = j(""), m = j(!1), r = j(!0), p = j(!1), h = j(!0), c = j(-1);
|
|
2489
2489
|
ke(
|
|
2490
2490
|
() => t.visible,
|
|
2491
|
-
(
|
|
2492
|
-
u.value =
|
|
2491
|
+
($) => {
|
|
2492
|
+
u.value = $;
|
|
2493
2493
|
},
|
|
2494
2494
|
{ immediate: !0 }
|
|
2495
2495
|
);
|
|
2496
|
-
const g =
|
|
2496
|
+
const g = z({
|
|
2497
2497
|
get() {
|
|
2498
2498
|
return c.value !== -1 ? c.value : t.stepActive;
|
|
2499
2499
|
},
|
|
2500
|
-
set(
|
|
2501
|
-
c.value =
|
|
2500
|
+
set($) {
|
|
2501
|
+
c.value = $, n("update:stepActive", $);
|
|
2502
2502
|
}
|
|
2503
2503
|
}), y = () => {
|
|
2504
2504
|
t.beforeClose && t.beforeClose() === !1 || (u.value = !1, n("update:visible", !1), n("cancel"));
|
|
2505
2505
|
}, k = () => {
|
|
2506
|
-
n("ok", E,
|
|
2506
|
+
n("ok", E, Q);
|
|
2507
2507
|
}, C = () => {
|
|
2508
2508
|
t.isStep && (g.value = 0, xe(() => {
|
|
2509
2509
|
O();
|
|
2510
2510
|
})), n("closed");
|
|
2511
|
-
}, E = (
|
|
2512
|
-
d.value =
|
|
2513
|
-
},
|
|
2511
|
+
}, E = ($) => {
|
|
2512
|
+
d.value = $ || "保存数据中...", v.value = !0;
|
|
2513
|
+
}, Q = () => {
|
|
2514
2514
|
v.value = !1;
|
|
2515
2515
|
}, Y = () => {
|
|
2516
2516
|
g.value > 0 && g.value--, xe(() => {
|
|
@@ -2522,8 +2522,8 @@ const nl = /* @__PURE__ */ K({
|
|
|
2522
2522
|
}));
|
|
2523
2523
|
}, B = async () => {
|
|
2524
2524
|
if (m.value = !0, t.validateSteps) {
|
|
2525
|
-
const
|
|
2526
|
-
return m.value = !1,
|
|
2525
|
+
const $ = await t.validateSteps(t.stepActive, E, Q);
|
|
2526
|
+
return m.value = !1, $;
|
|
2527
2527
|
}
|
|
2528
2528
|
return m.value = !1, !0;
|
|
2529
2529
|
}, O = () => {
|
|
@@ -2538,14 +2538,14 @@ const nl = /* @__PURE__ */ K({
|
|
|
2538
2538
|
r.value = !1, p.value = !1;
|
|
2539
2539
|
break;
|
|
2540
2540
|
}
|
|
2541
|
-
}, I =
|
|
2542
|
-
|
|
2541
|
+
}, I = z(() => t.steps.map(($) => ({ title: $, disabled: !0 }))), ee = async ($) => {
|
|
2542
|
+
$.click && await $.click();
|
|
2543
2543
|
};
|
|
2544
|
-
return l({ showLoading: E, hideLoading:
|
|
2545
|
-
const J = F("el-step"),
|
|
2546
|
-
return i(), w(
|
|
2544
|
+
return l({ showLoading: E, hideLoading: Q }), ($, se) => {
|
|
2545
|
+
const J = F("el-step"), A = F("el-steps"), q = F("j-button"), H = F("el-space"), ne = F("el-divider"), le = F("el-dialog"), Be = ct("loading");
|
|
2546
|
+
return i(), w(le, {
|
|
2547
2547
|
modelValue: u.value,
|
|
2548
|
-
"onUpdate:modelValue":
|
|
2548
|
+
"onUpdate:modelValue": se[0] || (se[0] = (oe) => u.value = oe),
|
|
2549
2549
|
class: "j-dialog-full",
|
|
2550
2550
|
width: "100%",
|
|
2551
2551
|
"append-to-body": !0,
|
|
@@ -2556,27 +2556,27 @@ const nl = /* @__PURE__ */ K({
|
|
|
2556
2556
|
onClosed: C
|
|
2557
2557
|
}, {
|
|
2558
2558
|
default: L(() => [
|
|
2559
|
-
Ee((i(),
|
|
2559
|
+
Ee((i(), T("div", {
|
|
2560
2560
|
class: "j-block j-dialog-full-window",
|
|
2561
|
-
"element-loading-text":
|
|
2561
|
+
"element-loading-text": U(s)(d.value)
|
|
2562
2562
|
}, [
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2563
|
+
W("div", Hl, [
|
|
2564
|
+
W("div", Yl, [
|
|
2565
|
+
U(a) ? (i(), T("img", {
|
|
2566
2566
|
key: 0,
|
|
2567
2567
|
class: "j-dialog-full-header-logo",
|
|
2568
|
-
src:
|
|
2569
|
-
}, null, 8,
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
e.subtitle ? (i(), w(We(e.subtitle()), { key: 0 })) :
|
|
2568
|
+
src: U(a)
|
|
2569
|
+
}, null, 8, Xl)) : D("", !0),
|
|
2570
|
+
W("span", ql, ie(U(s)(e.title)), 1),
|
|
2571
|
+
W("span", Gl, [
|
|
2572
|
+
e.subtitle ? (i(), w(We(e.subtitle()), { key: 0 })) : D("", !0)
|
|
2573
2573
|
])
|
|
2574
2574
|
]),
|
|
2575
|
-
|
|
2575
|
+
W("div", {
|
|
2576
2576
|
class: "j-dialog-full-header-mid",
|
|
2577
|
-
style:
|
|
2577
|
+
style: re({ maxWidth: `${200 * I.value.length}px` })
|
|
2578
2578
|
}, [
|
|
2579
|
-
e.isStep ? (i(), w(
|
|
2579
|
+
e.isStep ? (i(), w(A, {
|
|
2580
2580
|
key: 0,
|
|
2581
2581
|
simple: "",
|
|
2582
2582
|
active: g.value,
|
|
@@ -2584,96 +2584,96 @@ const nl = /* @__PURE__ */ K({
|
|
|
2584
2584
|
"finish-status": "success"
|
|
2585
2585
|
}, {
|
|
2586
2586
|
default: L(() => [
|
|
2587
|
-
(i(!0),
|
|
2587
|
+
(i(!0), T(ue, null, de(I.value, (oe, he) => (i(), w(J, {
|
|
2588
2588
|
key: he,
|
|
2589
|
-
title:
|
|
2589
|
+
title: U(s)(oe.title)
|
|
2590
2590
|
}, null, 8, ["title"]))), 128))
|
|
2591
2591
|
]),
|
|
2592
2592
|
_: 1
|
|
2593
|
-
}, 8, ["active"])) :
|
|
2593
|
+
}, 8, ["active"])) : D("", !0)
|
|
2594
2594
|
], 4),
|
|
2595
|
-
|
|
2596
|
-
|
|
2595
|
+
W("div", Kl, [
|
|
2596
|
+
K(H, { size: 0 }, {
|
|
2597
2597
|
default: L(() => [
|
|
2598
|
-
e.hasBtns ? (i(), w(
|
|
2598
|
+
e.hasBtns ? (i(), w(H, { key: 0 }, {
|
|
2599
2599
|
default: L(() => [
|
|
2600
|
-
e.isStep ? (i(), w(
|
|
2600
|
+
e.isStep ? (i(), w(q, {
|
|
2601
2601
|
key: 0,
|
|
2602
2602
|
size: "mini",
|
|
2603
2603
|
disabled: r.value,
|
|
2604
|
-
label:
|
|
2604
|
+
label: U(s)("上一步"),
|
|
2605
2605
|
onClick: Y
|
|
2606
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2607
|
-
e.isStep ? (i(), w(
|
|
2606
|
+
}, null, 8, ["disabled", "label"])) : D("", !0),
|
|
2607
|
+
e.isStep ? (i(), w(q, {
|
|
2608
2608
|
key: 1,
|
|
2609
2609
|
size: "mini",
|
|
2610
2610
|
disabled: p.value,
|
|
2611
2611
|
loading: m.value,
|
|
2612
|
-
label:
|
|
2612
|
+
label: U(s)("下一步"),
|
|
2613
2613
|
onClick: f
|
|
2614
|
-
}, null, 8, ["disabled", "loading", "label"])) :
|
|
2615
|
-
(i(!0),
|
|
2616
|
-
key:
|
|
2614
|
+
}, null, 8, ["disabled", "loading", "label"])) : D("", !0),
|
|
2615
|
+
(i(!0), T(ue, null, de(e.buttons, (oe) => (i(), T(ue, {
|
|
2616
|
+
key: oe.prop
|
|
2617
2617
|
}, [
|
|
2618
|
-
|
|
2618
|
+
oe.display !== !1 ? (i(), w(q, {
|
|
2619
2619
|
key: 0,
|
|
2620
|
-
label:
|
|
2621
|
-
danger:
|
|
2622
|
-
ghost:
|
|
2623
|
-
type:
|
|
2624
|
-
disabled:
|
|
2625
|
-
icon:
|
|
2626
|
-
onClick: (he) =>
|
|
2627
|
-
}, null, 8, ["label", "danger", "ghost", "type", "disabled", "icon", "onClick"])) :
|
|
2620
|
+
label: oe.label,
|
|
2621
|
+
danger: oe.danger,
|
|
2622
|
+
ghost: oe.ghost,
|
|
2623
|
+
type: oe.type,
|
|
2624
|
+
disabled: oe.disabled,
|
|
2625
|
+
icon: oe.icon ? oe.icon : "",
|
|
2626
|
+
onClick: (he) => ee(oe)
|
|
2627
|
+
}, null, 8, ["label", "danger", "ghost", "type", "disabled", "icon", "onClick"])) : D("", !0)
|
|
2628
2628
|
], 64))), 128)),
|
|
2629
|
-
e.hasSaveBtn ? (i(), w(
|
|
2629
|
+
e.hasSaveBtn ? (i(), w(q, {
|
|
2630
2630
|
key: 2,
|
|
2631
2631
|
size: "mini",
|
|
2632
2632
|
type: "primary",
|
|
2633
2633
|
disabled: h.value && e.isStep,
|
|
2634
|
-
label:
|
|
2634
|
+
label: U(s)(e.btnText),
|
|
2635
2635
|
onClick: k
|
|
2636
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2636
|
+
}, null, 8, ["disabled", "label"])) : D("", !0)
|
|
2637
2637
|
]),
|
|
2638
2638
|
_: 1
|
|
2639
|
-
})) :
|
|
2640
|
-
e.showCloseBtn && e.hasBtns ? (i(), w(
|
|
2639
|
+
})) : D("", !0),
|
|
2640
|
+
e.showCloseBtn && e.hasBtns ? (i(), w(ne, {
|
|
2641
2641
|
key: 1,
|
|
2642
2642
|
type: "vertical",
|
|
2643
2643
|
style: { margin: "0 8px" }
|
|
2644
|
-
})) :
|
|
2645
|
-
e.showCloseBtn ? (i(), w(
|
|
2644
|
+
})) : D("", !0),
|
|
2645
|
+
e.showCloseBtn ? (i(), w(q, {
|
|
2646
2646
|
key: 2,
|
|
2647
2647
|
type: "text",
|
|
2648
2648
|
icon: "material-symbols-light:close-rounded",
|
|
2649
2649
|
onClick: y
|
|
2650
|
-
})) :
|
|
2650
|
+
})) : D("", !0)
|
|
2651
2651
|
]),
|
|
2652
2652
|
_: 1
|
|
2653
2653
|
})
|
|
2654
2654
|
])
|
|
2655
2655
|
]),
|
|
2656
|
-
|
|
2657
|
-
te(
|
|
2656
|
+
W("div", Ql, [
|
|
2657
|
+
te($.$slots, "default")
|
|
2658
2658
|
])
|
|
2659
|
-
], 8,
|
|
2660
|
-
[
|
|
2659
|
+
], 8, Pl)), [
|
|
2660
|
+
[Be, v.value]
|
|
2661
2661
|
])
|
|
2662
2662
|
]),
|
|
2663
2663
|
_: 3
|
|
2664
2664
|
}, 8, ["modelValue", "destroy-on-close"]);
|
|
2665
2665
|
};
|
|
2666
2666
|
}
|
|
2667
|
-
}),
|
|
2667
|
+
}), _l = Z(Zl), eo = ["element-loading-text"], to = { class: "j-block" }, lo = {
|
|
2668
2668
|
key: 0,
|
|
2669
2669
|
class: "j-drawer-bottom-btns"
|
|
2670
|
-
},
|
|
2670
|
+
}, oo = { class: "j-drawer--header" }, ao = { class: "j-drawer--title" }, no = { style: { height: "28px", "line-height": "32px", "margin-left": "8px" } }, so = {
|
|
2671
2671
|
key: 0,
|
|
2672
2672
|
class: "j-drawer--btns"
|
|
2673
|
-
},
|
|
2673
|
+
}, io = {
|
|
2674
2674
|
key: 0,
|
|
2675
2675
|
class: "j-drawer-steps"
|
|
2676
|
-
},
|
|
2676
|
+
}, uo = /* @__PURE__ */ G({
|
|
2677
2677
|
name: "JDrawer",
|
|
2678
2678
|
__name: "drawer",
|
|
2679
2679
|
props: {
|
|
@@ -2821,17 +2821,17 @@ const nl = /* @__PURE__ */ K({
|
|
|
2821
2821
|
},
|
|
2822
2822
|
emits: ["update:visible", "update:stepActive", "closed", "ok", "cancel"],
|
|
2823
2823
|
setup(e, { expose: l, emit: o }) {
|
|
2824
|
-
const t = e, { t: n } =
|
|
2825
|
-
t: (
|
|
2826
|
-
}), a = o, s = j(!1), u = j(""), v =
|
|
2824
|
+
const t = e, { t: n } = Ve("jcode_app_provide", {
|
|
2825
|
+
t: ($) => $
|
|
2826
|
+
}), a = o, s = j(!1), u = j(""), v = z(() => ["ltr", "rtl"].indexOf(t.direction) !== -1 ? `${t.width}px` : `${t.height}px`), d = z({
|
|
2827
2827
|
get() {
|
|
2828
2828
|
return t.visible;
|
|
2829
2829
|
},
|
|
2830
|
-
set(
|
|
2831
|
-
a("update:visible",
|
|
2830
|
+
set($) {
|
|
2831
|
+
a("update:visible", !!$);
|
|
2832
2832
|
}
|
|
2833
|
-
}), m = (
|
|
2834
|
-
u.value =
|
|
2833
|
+
}), m = ($) => {
|
|
2834
|
+
u.value = $ || "保存数据中...", s.value = !0;
|
|
2835
2835
|
}, r = () => {
|
|
2836
2836
|
s.value = !1;
|
|
2837
2837
|
}, p = () => {
|
|
@@ -2842,14 +2842,14 @@ const nl = /* @__PURE__ */ K({
|
|
|
2842
2842
|
a("ok", m, r);
|
|
2843
2843
|
}, c = () => {
|
|
2844
2844
|
t.beforeClose && t.beforeClose() === !1 || (d.value = !1, a("update:visible", !1), a("cancel"));
|
|
2845
|
-
}, g = async (
|
|
2846
|
-
|
|
2847
|
-
}, y = j(!1), k = j(!0), C = j(!1), E = j(!0),
|
|
2845
|
+
}, g = async ($) => {
|
|
2846
|
+
$.click && await $.click();
|
|
2847
|
+
}, y = j(!1), k = j(!0), C = j(!1), E = j(!0), Q = j(-1), Y = z({
|
|
2848
2848
|
get() {
|
|
2849
|
-
return
|
|
2849
|
+
return Q.value !== -1 ? Q.value : t.stepActive;
|
|
2850
2850
|
},
|
|
2851
|
-
set(
|
|
2852
|
-
|
|
2851
|
+
set($) {
|
|
2852
|
+
Q.value = $, a("update:stepActive", $);
|
|
2853
2853
|
}
|
|
2854
2854
|
}), f = () => {
|
|
2855
2855
|
Y.value > 0 && Y.value--, xe(() => {
|
|
@@ -2861,8 +2861,8 @@ const nl = /* @__PURE__ */ K({
|
|
|
2861
2861
|
}));
|
|
2862
2862
|
}, O = async () => {
|
|
2863
2863
|
if (y.value = !0, t.validateSteps) {
|
|
2864
|
-
const
|
|
2865
|
-
return y.value = !1,
|
|
2864
|
+
const $ = await t.validateSteps(t.stepActive, m, r);
|
|
2865
|
+
return y.value = !1, $;
|
|
2866
2866
|
}
|
|
2867
2867
|
return y.value = !1, !0;
|
|
2868
2868
|
}, I = () => {
|
|
@@ -2877,12 +2877,12 @@ const nl = /* @__PURE__ */ K({
|
|
|
2877
2877
|
k.value = !1, C.value = !1;
|
|
2878
2878
|
break;
|
|
2879
2879
|
}
|
|
2880
|
-
},
|
|
2881
|
-
return l({ showLoading: m, hideLoading: r }), (
|
|
2882
|
-
const J = F("el-input"),
|
|
2883
|
-
return i(), w(
|
|
2880
|
+
}, ee = z(() => t.steps.map(($) => ({ title: $, disabled: !0 })));
|
|
2881
|
+
return l({ showLoading: m, hideLoading: r }), ($, se) => {
|
|
2882
|
+
const J = F("el-input"), A = F("j-button"), q = F("el-space"), H = F("el-step"), ne = F("el-steps"), le = F("el-drawer"), Be = ct("loading");
|
|
2883
|
+
return i(), w(le, {
|
|
2884
2884
|
modelValue: d.value,
|
|
2885
|
-
"onUpdate:modelValue":
|
|
2885
|
+
"onUpdate:modelValue": se[0] || (se[0] = (oe) => d.value = oe),
|
|
2886
2886
|
class: "j-drawer",
|
|
2887
2887
|
"append-to-body": !0,
|
|
2888
2888
|
direction: e.direction,
|
|
@@ -2896,110 +2896,110 @@ const nl = /* @__PURE__ */ K({
|
|
|
2896
2896
|
onClosed: p
|
|
2897
2897
|
}, {
|
|
2898
2898
|
default: L(() => [
|
|
2899
|
-
Ee((i(),
|
|
2900
|
-
class:
|
|
2899
|
+
Ee((i(), T("div", {
|
|
2900
|
+
class: Te(["j-drawer--warpper", { "j-drawer--warpper-hasSteps": e.isStep }]),
|
|
2901
2901
|
"element-loading-text": u.value
|
|
2902
2902
|
}, [
|
|
2903
|
-
|
|
2903
|
+
W("div", {
|
|
2904
2904
|
class: "j-drawer--body",
|
|
2905
|
-
style:
|
|
2905
|
+
style: re({
|
|
2906
2906
|
"padding-bottom": e.showCloseBtn || e.hasSaveBtn || e.buttons.length > 0 ? "48px" : "0"
|
|
2907
2907
|
})
|
|
2908
2908
|
}, [
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
te(
|
|
2909
|
+
K(J, { style: { position: "absolute", top: "-200px" } }),
|
|
2910
|
+
W("div", to, [
|
|
2911
|
+
te($.$slots, "default")
|
|
2912
2912
|
]),
|
|
2913
|
-
e.hasBtns ? (i(),
|
|
2914
|
-
|
|
2913
|
+
e.hasBtns ? (i(), T("div", lo, [
|
|
2914
|
+
K(q, { size: 8 }, {
|
|
2915
2915
|
default: L(() => [
|
|
2916
|
-
e.isStep ? (i(), w(
|
|
2916
|
+
e.isStep ? (i(), w(A, {
|
|
2917
2917
|
key: 0,
|
|
2918
2918
|
size: "mini",
|
|
2919
2919
|
disabled: k.value,
|
|
2920
|
-
label:
|
|
2920
|
+
label: U(n)("上一步"),
|
|
2921
2921
|
onClick: f
|
|
2922
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2923
|
-
e.isStep ? (i(), w(
|
|
2922
|
+
}, null, 8, ["disabled", "label"])) : D("", !0),
|
|
2923
|
+
e.isStep ? (i(), w(A, {
|
|
2924
2924
|
key: 1,
|
|
2925
2925
|
size: "mini",
|
|
2926
2926
|
disabled: C.value,
|
|
2927
2927
|
loading: y.value,
|
|
2928
|
-
label:
|
|
2928
|
+
label: U(n)("下一步"),
|
|
2929
2929
|
onClick: B
|
|
2930
|
-
}, null, 8, ["disabled", "loading", "label"])) :
|
|
2931
|
-
!e.isStep && e.showCloseBtn ? (i(), w(
|
|
2930
|
+
}, null, 8, ["disabled", "loading", "label"])) : D("", !0),
|
|
2931
|
+
!e.isStep && e.showCloseBtn ? (i(), w(A, {
|
|
2932
2932
|
key: 2,
|
|
2933
2933
|
size: "mini",
|
|
2934
|
-
label:
|
|
2934
|
+
label: U(n)("取消"),
|
|
2935
2935
|
onClick: c
|
|
2936
|
-
}, null, 8, ["label"])) :
|
|
2937
|
-
(i(!0),
|
|
2938
|
-
key:
|
|
2939
|
-
label:
|
|
2940
|
-
danger:
|
|
2941
|
-
ghost:
|
|
2942
|
-
type:
|
|
2943
|
-
icon:
|
|
2944
|
-
onClick: (he) => g(
|
|
2936
|
+
}, null, 8, ["label"])) : D("", !0),
|
|
2937
|
+
(i(!0), T(ue, null, de(e.buttons, (oe) => (i(), w(A, {
|
|
2938
|
+
key: oe.prop,
|
|
2939
|
+
label: oe.label,
|
|
2940
|
+
danger: oe.danger,
|
|
2941
|
+
ghost: oe.ghost,
|
|
2942
|
+
type: oe.type,
|
|
2943
|
+
icon: oe.icon,
|
|
2944
|
+
onClick: (he) => g(oe)
|
|
2945
2945
|
}, null, 8, ["label", "danger", "ghost", "type", "icon", "onClick"]))), 128)),
|
|
2946
|
-
e.hasSaveBtn ? (i(), w(
|
|
2946
|
+
e.hasSaveBtn ? (i(), w(A, {
|
|
2947
2947
|
key: 3,
|
|
2948
2948
|
size: "mini",
|
|
2949
2949
|
type: "primary",
|
|
2950
2950
|
disabled: E.value && e.isStep,
|
|
2951
|
-
label:
|
|
2951
|
+
label: U(n)(e.btnText),
|
|
2952
2952
|
onClick: h
|
|
2953
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2953
|
+
}, null, 8, ["disabled", "label"])) : D("", !0)
|
|
2954
2954
|
]),
|
|
2955
2955
|
_: 1
|
|
2956
2956
|
})
|
|
2957
|
-
])) :
|
|
2957
|
+
])) : D("", !0)
|
|
2958
2958
|
], 4),
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
e.subtitle ? (i(), w(We(e.subtitle()), { key: 0 })) :
|
|
2959
|
+
W("div", oo, [
|
|
2960
|
+
W("div", ao, [
|
|
2961
|
+
W("span", null, ie(U(n)(e.title)), 1),
|
|
2962
|
+
W("span", no, [
|
|
2963
|
+
e.subtitle ? (i(), w(We(e.subtitle()), { key: 0 })) : D("", !0)
|
|
2964
2964
|
])
|
|
2965
2965
|
]),
|
|
2966
|
-
e.showCloseBtn ? (i(),
|
|
2967
|
-
|
|
2966
|
+
e.showCloseBtn ? (i(), T("div", so, [
|
|
2967
|
+
K(A, {
|
|
2968
2968
|
type: "text",
|
|
2969
2969
|
icon: "material-symbols-light:close-rounded",
|
|
2970
2970
|
onClick: c
|
|
2971
2971
|
})
|
|
2972
|
-
])) :
|
|
2972
|
+
])) : D("", !0)
|
|
2973
2973
|
]),
|
|
2974
|
-
e.isStep ? (i(),
|
|
2975
|
-
|
|
2976
|
-
style:
|
|
2974
|
+
e.isStep ? (i(), T("div", io, [
|
|
2975
|
+
W("div", {
|
|
2976
|
+
style: re({ maxWidth: `${200 * ee.value.length}px`, width: "100%" })
|
|
2977
2977
|
}, [
|
|
2978
|
-
|
|
2978
|
+
K(ne, {
|
|
2979
2979
|
simple: "",
|
|
2980
2980
|
active: Y.value,
|
|
2981
2981
|
space: 160,
|
|
2982
2982
|
"finish-status": "success"
|
|
2983
2983
|
}, {
|
|
2984
2984
|
default: L(() => [
|
|
2985
|
-
(i(!0),
|
|
2985
|
+
(i(!0), T(ue, null, de(ee.value, (oe, he) => (i(), w(H, {
|
|
2986
2986
|
key: he,
|
|
2987
|
-
title:
|
|
2987
|
+
title: U(n)(oe.title)
|
|
2988
2988
|
}, null, 8, ["title"]))), 128))
|
|
2989
2989
|
]),
|
|
2990
2990
|
_: 1
|
|
2991
2991
|
}, 8, ["active"])
|
|
2992
2992
|
], 4)
|
|
2993
|
-
])) :
|
|
2994
|
-
], 10,
|
|
2995
|
-
[
|
|
2993
|
+
])) : D("", !0)
|
|
2994
|
+
], 10, eo)), [
|
|
2995
|
+
[Be, s.value]
|
|
2996
2996
|
])
|
|
2997
2997
|
]),
|
|
2998
2998
|
_: 3
|
|
2999
2999
|
}, 8, ["modelValue", "direction", "size", "destroy-on-close", "modal", "before-close"]);
|
|
3000
3000
|
};
|
|
3001
3001
|
}
|
|
3002
|
-
}),
|
|
3002
|
+
}), ro = Z(uo), co = /* @__PURE__ */ G({
|
|
3003
3003
|
name: "JLayer",
|
|
3004
3004
|
__name: "layer",
|
|
3005
3005
|
props: {
|
|
@@ -3113,10 +3113,10 @@ const nl = /* @__PURE__ */ K({
|
|
|
3113
3113
|
}, y = () => {
|
|
3114
3114
|
s.value && s.value.hideLoading();
|
|
3115
3115
|
};
|
|
3116
|
-
return
|
|
3116
|
+
return dt("jcode_layer_provide", {
|
|
3117
3117
|
stepActive: u
|
|
3118
3118
|
}), l({ open: m, close: r, showLoading: g, hideLoading: y }), (k, C) => {
|
|
3119
|
-
const E = F("j-dialog-full"),
|
|
3119
|
+
const E = F("j-dialog-full"), Q = F("j-drawer"), Y = F("j-dialog");
|
|
3120
3120
|
return v.value === "full" ? (i(), w(E, {
|
|
3121
3121
|
key: 0,
|
|
3122
3122
|
ref_key: "modalRef",
|
|
@@ -3145,7 +3145,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
3145
3145
|
te(k.$slots, "default")
|
|
3146
3146
|
]),
|
|
3147
3147
|
_: 3
|
|
3148
|
-
}, 8, ["visible", "step-active", "title", "before-close", "is-step", "steps", "validate-steps", "has-btns", "btn-text", "destroy-on-close", "buttons", "has-save-btn", "has-header", "subtitle"])) : v.value === "drawer" ? (i(), w(
|
|
3148
|
+
}, 8, ["visible", "step-active", "title", "before-close", "is-step", "steps", "validate-steps", "has-btns", "btn-text", "destroy-on-close", "buttons", "has-save-btn", "has-header", "subtitle"])) : v.value === "drawer" ? (i(), w(Q, {
|
|
3149
3149
|
key: 1,
|
|
3150
3150
|
ref_key: "modalRef",
|
|
3151
3151
|
ref: s,
|
|
@@ -3203,11 +3203,11 @@ const nl = /* @__PURE__ */ K({
|
|
|
3203
3203
|
}, 8, ["visible", "step-active", "width", "height", "title", "before-close", "has-btns", "btn-text", "destroy-on-close", "buttons", "has-save-btn", "is-step", "steps", "validate-steps", "subtitle"]));
|
|
3204
3204
|
};
|
|
3205
3205
|
}
|
|
3206
|
-
}),
|
|
3206
|
+
}), fo = Z(co), mo = /* @__PURE__ */ G({
|
|
3207
3207
|
name: "JDynamicLayer",
|
|
3208
3208
|
__name: "dynamic-layer",
|
|
3209
3209
|
setup(e, { expose: l }) {
|
|
3210
|
-
const o = j(), t = j(600), n = j(400), a = j(!0), s = j(!0), u = j(!0), v = j(""), d = j([]), m = j(!0), r = j(), p =
|
|
3210
|
+
const o = j(), t = j(600), n = j(400), a = j(!0), s = j(!0), u = j(!0), v = j(""), d = j([]), m = j(!0), r = j(), p = rt(), h = j(), { getPageName: c } = Ve("jcode_auth_page_provide", {
|
|
3211
3211
|
getPageName: () => ""
|
|
3212
3212
|
}), g = () => {
|
|
3213
3213
|
const J = c();
|
|
@@ -3215,30 +3215,30 @@ const nl = /* @__PURE__ */ K({
|
|
|
3215
3215
|
}, y = j(!1), k = j([]), C = async (J) => {
|
|
3216
3216
|
if (r.value?.validateSteps) {
|
|
3217
3217
|
Pe(!0);
|
|
3218
|
-
const
|
|
3219
|
-
return Pe(!1),
|
|
3218
|
+
const A = r.value.validateSteps(J);
|
|
3219
|
+
return Pe(!1), A;
|
|
3220
3220
|
}
|
|
3221
3221
|
return !0;
|
|
3222
3222
|
}, E = () => r.value?.beforeClose ? r.value.beforeClose() : !0;
|
|
3223
|
-
let
|
|
3223
|
+
let Q, Y, f, B = 0;
|
|
3224
3224
|
const O = async (J) => {
|
|
3225
3225
|
if (r.value) {
|
|
3226
3226
|
if (B = 0, r.value.getConfig) {
|
|
3227
|
-
const
|
|
3228
|
-
d.value =
|
|
3227
|
+
const A = r.value.getConfig();
|
|
3228
|
+
d.value = A.buttons || [], y.value = A.isStep, k.value = A.steps || [];
|
|
3229
3229
|
} else
|
|
3230
3230
|
d.value = [], y.value = !1, k.value = [];
|
|
3231
3231
|
if (r.value.open)
|
|
3232
3232
|
try {
|
|
3233
|
-
const { buttons:
|
|
3234
|
-
|
|
3233
|
+
const { buttons: A } = await r.value.open(J, o.value, () => {
|
|
3234
|
+
Q && Q();
|
|
3235
3235
|
}) || {};
|
|
3236
|
-
if (
|
|
3237
|
-
const
|
|
3238
|
-
|
|
3236
|
+
if (A && A.length > 0) {
|
|
3237
|
+
const q = [];
|
|
3238
|
+
q.push(...d.value), q.push(...A), d.value = q;
|
|
3239
3239
|
}
|
|
3240
|
-
} catch (
|
|
3241
|
-
o.value.close(), console.error(
|
|
3240
|
+
} catch (A) {
|
|
3241
|
+
o.value.close(), console.error(A);
|
|
3242
3242
|
}
|
|
3243
3243
|
o.value.hideLoading();
|
|
3244
3244
|
} else {
|
|
@@ -3251,25 +3251,25 @@ const nl = /* @__PURE__ */ K({
|
|
|
3251
3251
|
}, 100);
|
|
3252
3252
|
}
|
|
3253
3253
|
}, I = (J) => {
|
|
3254
|
-
p.value = J?.name, t.value = J?.width || 600, n.value = J?.height || 400, a.value = J?.hasBtns !== !1, s.value = J?.hasSaveBtn !== !1, u.value = J?.hasHeader !== !1, J?.destroyOnClose !== !1 && (m.value = !0), h.value = J?.config || {}, v.value = J?.btnText || "保存",
|
|
3254
|
+
p.value = J?.name, t.value = J?.width || 600, n.value = J?.height || 400, a.value = J?.hasBtns !== !1, s.value = J?.hasSaveBtn !== !1, u.value = J?.hasHeader !== !1, J?.destroyOnClose !== !1 && (m.value = !0), h.value = J?.config || {}, v.value = J?.btnText || "保存", Q = J?.afterOk || null, Y = J?.afterClose || null, f = J?.afterCancel || null, o.value.open(J.title, J.type, J.subtitle), xe(async () => {
|
|
3255
3255
|
o.value.showLoading("加载中"), await O(J.param || {});
|
|
3256
3256
|
});
|
|
3257
|
-
},
|
|
3257
|
+
}, ee = async () => {
|
|
3258
3258
|
if (r.value?.ok) {
|
|
3259
3259
|
Pe(!0);
|
|
3260
3260
|
const J = await r.value.ok();
|
|
3261
|
-
J && (o.value.close(),
|
|
3261
|
+
J && (o.value.close(), Q && await Q(J)), Pe(!1);
|
|
3262
3262
|
}
|
|
3263
|
-
},
|
|
3263
|
+
}, $ = () => {
|
|
3264
3264
|
r.value?.closed && r.value.closed(), Y && Y();
|
|
3265
|
-
},
|
|
3265
|
+
}, se = () => {
|
|
3266
3266
|
f && f();
|
|
3267
3267
|
};
|
|
3268
|
-
return
|
|
3268
|
+
return dt("jcode_auth_page_provide", {
|
|
3269
3269
|
getPageName: g
|
|
3270
|
-
}), l({ open: I }), (J,
|
|
3271
|
-
const
|
|
3272
|
-
return i(), w(
|
|
3270
|
+
}), l({ open: I }), (J, A) => {
|
|
3271
|
+
const q = F("j-layer");
|
|
3272
|
+
return i(), w(q, {
|
|
3273
3273
|
ref_key: "layerRef",
|
|
3274
3274
|
ref: o,
|
|
3275
3275
|
width: t.value,
|
|
@@ -3284,9 +3284,9 @@ const nl = /* @__PURE__ */ K({
|
|
|
3284
3284
|
"destroy-on-close": m.value,
|
|
3285
3285
|
"has-save-btn": s.value,
|
|
3286
3286
|
"has-header": u.value,
|
|
3287
|
-
onOk:
|
|
3288
|
-
onClosed:
|
|
3289
|
-
onCancel:
|
|
3287
|
+
onOk: ee,
|
|
3288
|
+
onClosed: $,
|
|
3289
|
+
onCancel: se
|
|
3290
3290
|
}, {
|
|
3291
3291
|
default: L(() => [
|
|
3292
3292
|
(i(), w(We(p.value), we({
|
|
@@ -3298,7 +3298,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
3298
3298
|
}, 8, ["width", "height", "is-step", "steps", "has-btns", "buttons", "btn-text", "destroy-on-close", "has-save-btn", "has-header"]);
|
|
3299
3299
|
};
|
|
3300
3300
|
}
|
|
3301
|
-
}),
|
|
3301
|
+
}), po = Z(mo), vo = /* @__PURE__ */ G({
|
|
3302
3302
|
name: "JInputTag",
|
|
3303
3303
|
__name: "input-tag",
|
|
3304
3304
|
props: {
|
|
@@ -3312,9 +3312,9 @@ const nl = /* @__PURE__ */ K({
|
|
|
3312
3312
|
},
|
|
3313
3313
|
emits: ["update:modelValue", "change", "select", "search"],
|
|
3314
3314
|
setup(e, { emit: l }) {
|
|
3315
|
-
const o = e, t = l, n = j(), a =
|
|
3316
|
-
() =>
|
|
3317
|
-
), s =
|
|
3315
|
+
const o = e, t = l, n = j(), a = z(
|
|
3316
|
+
() => Fe(o.modelValue) ? [] : o.modelValue?.split(",") || []
|
|
3317
|
+
), s = z(() => o.isStyleLoop ? a.value?.map((m, r) => {
|
|
3318
3318
|
let p = o.colors[r % o.colors.length] || {};
|
|
3319
3319
|
return p = { ...p, borderWidth: (p.borderWidth || 0) + "px" }, p;
|
|
3320
3320
|
}) || [] : o.colors), u = (m) => {
|
|
@@ -3336,21 +3336,21 @@ const nl = /* @__PURE__ */ K({
|
|
|
3336
3336
|
placeholder: e.placeholder,
|
|
3337
3337
|
size: e.size,
|
|
3338
3338
|
onSelect: u,
|
|
3339
|
-
onKeyup:
|
|
3339
|
+
onKeyup: Vt(v, ["enter"])
|
|
3340
3340
|
}, {
|
|
3341
3341
|
prefix: L(() => [
|
|
3342
|
-
|
|
3342
|
+
K(h, null, {
|
|
3343
3343
|
default: L(() => [
|
|
3344
|
-
(i(!0),
|
|
3344
|
+
(i(!0), T(ue, null, de(a.value, (g, y) => (i(), w(p, {
|
|
3345
3345
|
key: y,
|
|
3346
3346
|
type: "info",
|
|
3347
3347
|
closable: !e.readonly,
|
|
3348
|
-
style:
|
|
3348
|
+
style: re(s.value[y] || {}),
|
|
3349
3349
|
size: e.size,
|
|
3350
|
-
onClose:
|
|
3350
|
+
onClose: ze((k) => d(y), ["prevent"])
|
|
3351
3351
|
}, {
|
|
3352
3352
|
default: L(() => [
|
|
3353
|
-
Se(
|
|
3353
|
+
Se(ie(g), 1)
|
|
3354
3354
|
]),
|
|
3355
3355
|
_: 2
|
|
3356
3356
|
}, 1032, ["closable", "style", "size", "onClose"]))), 128))
|
|
@@ -3362,7 +3362,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
3362
3362
|
}, 8, ["modelValue", "options", "readonly", "placeholder", "size"]);
|
|
3363
3363
|
};
|
|
3364
3364
|
}
|
|
3365
|
-
}),
|
|
3365
|
+
}), go = Z(vo), ho = /* @__PURE__ */ G({
|
|
3366
3366
|
name: "JRate",
|
|
3367
3367
|
__name: "rate",
|
|
3368
3368
|
props: {
|
|
@@ -3378,14 +3378,14 @@ const nl = /* @__PURE__ */ K({
|
|
|
3378
3378
|
},
|
|
3379
3379
|
emits: ["update:modelValue", "change"],
|
|
3380
3380
|
setup(e, { emit: l }) {
|
|
3381
|
-
const o = e, t = l, n =
|
|
3381
|
+
const o = e, t = l, n = z({
|
|
3382
3382
|
get() {
|
|
3383
3383
|
return Number(o.modelValue);
|
|
3384
3384
|
},
|
|
3385
3385
|
set(v) {
|
|
3386
3386
|
t("update:modelValue", v), t("change", { value: v });
|
|
3387
3387
|
}
|
|
3388
|
-
}), a =
|
|
3388
|
+
}), a = z(() => o.texts?.map((v) => v.value) || []), s = j(0), u = (v) => {
|
|
3389
3389
|
s.value = v;
|
|
3390
3390
|
};
|
|
3391
3391
|
return (v, d) => {
|
|
@@ -3405,7 +3405,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
3405
3405
|
}, null, 8, ["modelValue", "size", "max", "allow-half", "clearable", "disabled", "show-text", "texts", "show-score"]);
|
|
3406
3406
|
};
|
|
3407
3407
|
}
|
|
3408
|
-
}),
|
|
3408
|
+
}), yo = Z(ho), bo = /* @__PURE__ */ G({
|
|
3409
3409
|
name: "JSlider",
|
|
3410
3410
|
__name: "slider",
|
|
3411
3411
|
props: {
|
|
@@ -3435,7 +3435,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
3435
3435
|
},
|
|
3436
3436
|
emits: ["update:modelValue", "change"],
|
|
3437
3437
|
setup(e, { emit: l }) {
|
|
3438
|
-
const o = e, t = l, n =
|
|
3438
|
+
const o = e, t = l, n = z({
|
|
3439
3439
|
get() {
|
|
3440
3440
|
return Number(o.modelValue);
|
|
3441
3441
|
},
|
|
@@ -3474,13 +3474,13 @@ const nl = /* @__PURE__ */ K({
|
|
|
3474
3474
|
}, null, 8, ["modelValue", "min", "max", "disabled", "step", "show-input", "show-input-controls", "size", "input-size", "show-stops", "show-tooltip", "format-tooltip", "range", "vertical", "height", "aria-label", "range-start-label", "range-end-label", "format-value-text", "tooltip-class", "placement", "marks", "validate-event", "persistent"]);
|
|
3475
3475
|
};
|
|
3476
3476
|
}
|
|
3477
|
-
}),
|
|
3477
|
+
}), wo = Z(bo), Qe = (e) => e < 1024 ? Ge(e) + " B" : e >= 1024 && e < 1048576 ? Ge(e / 1024) + " KB" : e >= 1048576 && e < 1073741824 ? Ge(e / 1024 / 1024) + " MB" : e >= 1073741824 ? Ge(e / 1024 / 1024 / 1024) + " GB" : "", ko = (e) => {
|
|
3478
3478
|
const l = window.open("_blank");
|
|
3479
3479
|
l && (l.location = e);
|
|
3480
|
-
},
|
|
3480
|
+
}, Co = {
|
|
3481
3481
|
key: 1,
|
|
3482
3482
|
style: { position: "relative", width: "72px", height: "72px", overflow: "hidden" }
|
|
3483
|
-
},
|
|
3483
|
+
}, xo = ["src"], jo = { class: "j-upload-dragItem-content" }, So = { class: "j-upload-dragItem-mask" }, Bo = ["src"], $o = { class: "j-upload-imgItem-mask" }, zo = { class: "j-upload-item-content" }, Ct = /* @__PURE__ */ G({
|
|
3484
3484
|
__name: "list",
|
|
3485
3485
|
props: {
|
|
3486
3486
|
isUploadImg: {
|
|
@@ -3523,76 +3523,76 @@ const nl = /* @__PURE__ */ K({
|
|
|
3523
3523
|
}
|
|
3524
3524
|
},
|
|
3525
3525
|
setup(e) {
|
|
3526
|
-
const { t: l } =
|
|
3526
|
+
const { t: l } = Ve("jcode_app_provide", {
|
|
3527
3527
|
t: (o) => o
|
|
3528
3528
|
});
|
|
3529
3529
|
return (o, t) => {
|
|
3530
3530
|
const n = F("j-icon"), a = F("el-text"), s = F("j-button"), u = F("el-progress"), v = F("el-link");
|
|
3531
|
-
return i(),
|
|
3532
|
-
class:
|
|
3531
|
+
return i(), T("div", {
|
|
3532
|
+
class: Te(["j-upload-list", { "j-upload-image-list": e.isUploadImg, "j-upload-drag-list": e.drag }])
|
|
3533
3533
|
}, [
|
|
3534
|
-
e.drag ? (i(),
|
|
3535
|
-
e.showFileList ? (i(!0),
|
|
3534
|
+
e.drag ? (i(), T(ue, { key: 0 }, [
|
|
3535
|
+
e.showFileList ? (i(!0), T(ue, { key: 0 }, de(e.list, (d) => (i(), T("div", {
|
|
3536
3536
|
key: d.id,
|
|
3537
3537
|
class: "j-upload-dragItem"
|
|
3538
3538
|
}, [
|
|
3539
|
-
e.isUploadImg ? (i(),
|
|
3540
|
-
|
|
3539
|
+
e.isUploadImg ? (i(), T("div", Co, [
|
|
3540
|
+
W("img", {
|
|
3541
3541
|
src: d.url,
|
|
3542
3542
|
style: { width: "100%" },
|
|
3543
3543
|
alt: ""
|
|
3544
|
-
}, null, 8,
|
|
3544
|
+
}, null, 8, xo)
|
|
3545
3545
|
])) : (i(), w(n, {
|
|
3546
3546
|
key: 0,
|
|
3547
3547
|
icon: "file-text",
|
|
3548
|
-
style:
|
|
3548
|
+
style: re({ color: d.color ? `var(${d.color})` : void 0 }),
|
|
3549
3549
|
size: 72
|
|
3550
3550
|
}, null, 8, ["style"])),
|
|
3551
|
-
|
|
3552
|
-
|
|
3551
|
+
W("div", jo, [
|
|
3552
|
+
K(a, { ellipsis: "" }, {
|
|
3553
3553
|
default: L(() => [
|
|
3554
|
-
Se(
|
|
3554
|
+
Se(ie(`${U(l)(d.name)}${d.status === "unUpload" ? "(" + U(l)("未传") + ")" : ""}`), 1)
|
|
3555
3555
|
]),
|
|
3556
3556
|
_: 2
|
|
3557
3557
|
}, 1024),
|
|
3558
|
-
|
|
3558
|
+
W("div", null, [
|
|
3559
3559
|
d.status === "uploading" ? (i(), w(a, { key: 0 }, {
|
|
3560
3560
|
default: L(() => [
|
|
3561
|
-
Se(
|
|
3561
|
+
Se(ie(U(Qe)(d.uploadSize)) + "/", 1)
|
|
3562
3562
|
]),
|
|
3563
3563
|
_: 2
|
|
3564
|
-
}, 1024)) :
|
|
3565
|
-
|
|
3564
|
+
}, 1024)) : D("", !0),
|
|
3565
|
+
K(a, null, {
|
|
3566
3566
|
default: L(() => [
|
|
3567
|
-
Se(
|
|
3567
|
+
Se(ie(U(Qe)(d.size)), 1)
|
|
3568
3568
|
]),
|
|
3569
3569
|
_: 2
|
|
3570
3570
|
}, 1024)
|
|
3571
3571
|
])
|
|
3572
3572
|
]),
|
|
3573
|
-
Ee(
|
|
3573
|
+
Ee(W("div", So, [
|
|
3574
3574
|
d.status === "done" || d.status === "unUpload" ? (i(), w(s, {
|
|
3575
3575
|
key: 0,
|
|
3576
3576
|
type: "link"
|
|
3577
3577
|
}, {
|
|
3578
3578
|
icon: L(() => [
|
|
3579
|
-
|
|
3579
|
+
K(n, {
|
|
3580
3580
|
icon: "eye",
|
|
3581
3581
|
size: 24,
|
|
3582
|
-
onClick:
|
|
3582
|
+
onClick: ze((m) => e.previewFile(d), ["stop"])
|
|
3583
3583
|
}, null, 8, ["onClick"])
|
|
3584
3584
|
]),
|
|
3585
3585
|
_: 2
|
|
3586
|
-
}, 1024)) :
|
|
3586
|
+
}, 1024)) : D("", !0),
|
|
3587
3587
|
!e.readonly && (d.status === "done" || d.status === "unUpload") ? (i(), w(s, {
|
|
3588
3588
|
key: 1,
|
|
3589
3589
|
icon: "delete",
|
|
3590
3590
|
type: "link",
|
|
3591
3591
|
danger: "",
|
|
3592
|
-
onClick:
|
|
3593
|
-
}, null, 8, ["onClick"])) :
|
|
3592
|
+
onClick: ze((m) => e.deleteFile(d), ["stop", "prevent"])
|
|
3593
|
+
}, null, 8, ["onClick"])) : D("", !0)
|
|
3594
3594
|
], 512), [
|
|
3595
|
-
[
|
|
3595
|
+
[nt, d.status === "error"]
|
|
3596
3596
|
]),
|
|
3597
3597
|
d.status === "uploading" ? (i(), w(u, {
|
|
3598
3598
|
key: 2,
|
|
@@ -3600,86 +3600,86 @@ const nl = /* @__PURE__ */ K({
|
|
|
3600
3600
|
style: { position: "absolute", bottom: "-4px", left: "0", margin: "0 !important" },
|
|
3601
3601
|
percent: d.percent,
|
|
3602
3602
|
"show-text": !1
|
|
3603
|
-
}, null, 8, ["percent"])) :
|
|
3604
|
-
]))), 128)) :
|
|
3603
|
+
}, null, 8, ["percent"])) : D("", !0)
|
|
3604
|
+
]))), 128)) : D("", !0),
|
|
3605
3605
|
te(o.$slots, "default")
|
|
3606
|
-
], 64)) : e.isUploadImg ? (i(!0),
|
|
3606
|
+
], 64)) : e.isUploadImg ? (i(!0), T(ue, { key: 1 }, de(e.list, (d) => (i(), T("div", {
|
|
3607
3607
|
key: d.id,
|
|
3608
3608
|
class: "j-upload-imgItem"
|
|
3609
3609
|
}, [
|
|
3610
|
-
d.status === "done" || d.status === "unUpload" ? (i(),
|
|
3610
|
+
d.status === "done" || d.status === "unUpload" ? (i(), T("img", {
|
|
3611
3611
|
key: 0,
|
|
3612
3612
|
src: d.url,
|
|
3613
3613
|
style: { width: "100%" },
|
|
3614
3614
|
alt: ""
|
|
3615
|
-
}, null, 8,
|
|
3616
|
-
Ee(
|
|
3615
|
+
}, null, 8, Bo)) : D("", !0),
|
|
3616
|
+
Ee(W("div", $o, [
|
|
3617
3617
|
d.status === "done" || d.status === "unUpload" ? (i(), w(s, {
|
|
3618
3618
|
key: 0,
|
|
3619
3619
|
type: "link"
|
|
3620
3620
|
}, {
|
|
3621
3621
|
icon: L(() => [
|
|
3622
|
-
|
|
3622
|
+
K(n, {
|
|
3623
3623
|
icon: "eye",
|
|
3624
3624
|
size: 24,
|
|
3625
|
-
onClick:
|
|
3625
|
+
onClick: ze((m) => e.previewFile(d), ["stop"])
|
|
3626
3626
|
}, null, 8, ["onClick"])
|
|
3627
3627
|
]),
|
|
3628
3628
|
_: 2
|
|
3629
|
-
}, 1024)) :
|
|
3629
|
+
}, 1024)) : D("", !0),
|
|
3630
3630
|
!e.readonly && (d.status === "done" || d.status === "unUpload") ? (i(), w(s, {
|
|
3631
3631
|
key: 1,
|
|
3632
3632
|
type: "link",
|
|
3633
3633
|
danger: ""
|
|
3634
3634
|
}, {
|
|
3635
3635
|
icon: L(() => [
|
|
3636
|
-
|
|
3636
|
+
K(n, {
|
|
3637
3637
|
icon: "delete",
|
|
3638
3638
|
size: 24,
|
|
3639
|
-
onClick:
|
|
3639
|
+
onClick: ze((m) => e.deleteFile(d), ["stop", "prevent"])
|
|
3640
3640
|
}, null, 8, ["onClick"])
|
|
3641
3641
|
]),
|
|
3642
3642
|
_: 2
|
|
3643
|
-
}, 1024)) :
|
|
3643
|
+
}, 1024)) : D("", !0)
|
|
3644
3644
|
], 512), [
|
|
3645
|
-
[
|
|
3645
|
+
[nt, d.status === "error"]
|
|
3646
3646
|
]),
|
|
3647
3647
|
d.status === "uploading" ? (i(), w(u, {
|
|
3648
3648
|
key: 1,
|
|
3649
3649
|
"stroke-width": 4,
|
|
3650
3650
|
percent: d.percent,
|
|
3651
3651
|
"show-text": !1
|
|
3652
|
-
}, null, 8, ["percent"])) :
|
|
3653
|
-
]))), 128)) : (i(!0),
|
|
3652
|
+
}, null, 8, ["percent"])) : D("", !0)
|
|
3653
|
+
]))), 128)) : (i(!0), T(ue, { key: 2 }, de(e.list, (d) => (i(), T("div", {
|
|
3654
3654
|
key: d.id,
|
|
3655
3655
|
class: "j-upload-item"
|
|
3656
3656
|
}, [
|
|
3657
|
-
|
|
3657
|
+
K(n, {
|
|
3658
3658
|
icon: "file-text",
|
|
3659
|
-
style:
|
|
3659
|
+
style: re({ color: d.color ? `var(${d.color})` : void 0 }),
|
|
3660
3660
|
size: 16
|
|
3661
3661
|
}, null, 8, ["style"]),
|
|
3662
|
-
|
|
3663
|
-
|
|
3662
|
+
W("div", zo, [
|
|
3663
|
+
K(v, {
|
|
3664
3664
|
type: "primary",
|
|
3665
3665
|
underline: "never",
|
|
3666
|
-
onClick:
|
|
3666
|
+
onClick: ze((m) => e.previewFile(d), ["stop"])
|
|
3667
3667
|
}, {
|
|
3668
3668
|
default: L(() => [
|
|
3669
|
-
Se(
|
|
3669
|
+
Se(ie(`${U(l)(d.name)}${d.status === "unUpload" ? "(" + U(l)("未传") + ")" : ""}`), 1)
|
|
3670
3670
|
]),
|
|
3671
3671
|
_: 2
|
|
3672
3672
|
}, 1032, ["onClick"])
|
|
3673
3673
|
]),
|
|
3674
3674
|
d.status === "uploading" ? (i(), w(a, { key: 0 }, {
|
|
3675
3675
|
default: L(() => [
|
|
3676
|
-
Se(
|
|
3676
|
+
Se(ie(U(Qe)(d.uploadSize)) + "/", 1)
|
|
3677
3677
|
]),
|
|
3678
3678
|
_: 2
|
|
3679
|
-
}, 1024)) :
|
|
3680
|
-
|
|
3679
|
+
}, 1024)) : D("", !0),
|
|
3680
|
+
K(a, null, {
|
|
3681
3681
|
default: L(() => [
|
|
3682
|
-
Se(
|
|
3682
|
+
Se(ie(U(Qe)(d.size)), 1)
|
|
3683
3683
|
]),
|
|
3684
3684
|
_: 2
|
|
3685
3685
|
}, 1024),
|
|
@@ -3688,15 +3688,15 @@ const nl = /* @__PURE__ */ K({
|
|
|
3688
3688
|
class: "j-upload-item-success",
|
|
3689
3689
|
icon: "check-circle",
|
|
3690
3690
|
size: 24
|
|
3691
|
-
})) :
|
|
3692
|
-
e.readonly ?
|
|
3691
|
+
})) : D("", !0),
|
|
3692
|
+
e.readonly ? D("", !0) : Ee((i(), w(n, {
|
|
3693
3693
|
key: 2,
|
|
3694
3694
|
class: "j-upload-item-error",
|
|
3695
3695
|
icon: "delete",
|
|
3696
3696
|
size: 24,
|
|
3697
|
-
onClick:
|
|
3697
|
+
onClick: ze((m) => e.deleteFile(d), ["stop", "prevent"])
|
|
3698
3698
|
}, null, 8, ["onClick"])), [
|
|
3699
|
-
[
|
|
3699
|
+
[nt, d.status === "error"]
|
|
3700
3700
|
]),
|
|
3701
3701
|
d.status === "uploading" ? (i(), w(u, {
|
|
3702
3702
|
key: 3,
|
|
@@ -3704,22 +3704,22 @@ const nl = /* @__PURE__ */ K({
|
|
|
3704
3704
|
"stroke-width": 4,
|
|
3705
3705
|
percent: d.percent,
|
|
3706
3706
|
"show-text": !1
|
|
3707
|
-
}, null, 8, ["percent"])) :
|
|
3707
|
+
}, null, 8, ["percent"])) : D("", !0)
|
|
3708
3708
|
]))), 128))
|
|
3709
3709
|
], 2);
|
|
3710
3710
|
};
|
|
3711
3711
|
}
|
|
3712
|
-
}),
|
|
3712
|
+
}), Vo = { class: "j-upload" }, To = { key: 0 }, Lo = { style: { "margin-top": "8px" } }, Fo = {
|
|
3713
3713
|
key: 0,
|
|
3714
3714
|
style: { "margin-top": "4px" }
|
|
3715
|
-
},
|
|
3715
|
+
}, Io = {
|
|
3716
3716
|
key: 0,
|
|
3717
3717
|
class: "j-block",
|
|
3718
3718
|
style: { display: "flex", "align-items": "center", "justify-content": "center", overflow: "auto", "overflow-x": "hidden" }
|
|
3719
|
-
},
|
|
3719
|
+
}, Oo = ["src"], Mo = {
|
|
3720
3720
|
key: 1,
|
|
3721
3721
|
class: "j-block"
|
|
3722
|
-
},
|
|
3722
|
+
}, Do = ["src"], Ao = /* @__PURE__ */ G({
|
|
3723
3723
|
name: "JUpload",
|
|
3724
3724
|
__name: "upload",
|
|
3725
3725
|
props: {
|
|
@@ -3894,37 +3894,37 @@ const nl = /* @__PURE__ */ K({
|
|
|
3894
3894
|
"notUploadChange"
|
|
3895
3895
|
],
|
|
3896
3896
|
setup(e, { emit: l }) {
|
|
3897
|
-
const o = e, t = l, { warning: n, error: a, createConfirm: s, t: u, apiUrl: v, token: d } =
|
|
3897
|
+
const o = e, t = l, { warning: n, error: a, createConfirm: s, t: u, apiUrl: v, token: d } = Ve("jcode_app_provide", {
|
|
3898
3898
|
t: (S) => S
|
|
3899
|
-
}), { useFile: m } =
|
|
3899
|
+
}), { useFile: m } = Ve("jcode_app_form_provide", {
|
|
3900
3900
|
useFile: () => ({})
|
|
3901
|
-
}), { fileChunkedUpload: r, deleteFile: p } = m(), h =
|
|
3901
|
+
}), { fileChunkedUpload: r, deleteFile: p } = m(), h = z(() => o.isUploadImg ? o.accept || "image/*" : o.accept), c = z(() => {
|
|
3902
3902
|
if (o.limit !== -1)
|
|
3903
3903
|
return o.limit;
|
|
3904
|
-
}), g =
|
|
3904
|
+
}), g = z(() => o.limit === -1 ? "" : `,${u("上传数量")}${o.limit}`), y = j(""), k = z(() => ({
|
|
3905
3905
|
folderId: o.modelValue || y.value,
|
|
3906
3906
|
maxSize: o.maxSize,
|
|
3907
3907
|
sizeType: o.sizeType
|
|
3908
3908
|
})), C = j([]), E = () => {
|
|
3909
3909
|
C.value = [...C.value];
|
|
3910
|
-
},
|
|
3910
|
+
}, Q = (S) => {
|
|
3911
3911
|
if (o.maxSize && o.sizeType) {
|
|
3912
|
-
let
|
|
3912
|
+
let P = S;
|
|
3913
3913
|
switch (o.sizeType) {
|
|
3914
3914
|
case "GB":
|
|
3915
|
-
|
|
3915
|
+
P = 1024 * 1024 * 1024 * o.maxSize;
|
|
3916
3916
|
break;
|
|
3917
3917
|
case "MB":
|
|
3918
|
-
|
|
3918
|
+
P = 1024 * 1024 * o.maxSize;
|
|
3919
3919
|
break;
|
|
3920
3920
|
case "KB":
|
|
3921
|
-
|
|
3921
|
+
P = 1024 * o.maxSize;
|
|
3922
3922
|
break;
|
|
3923
3923
|
default:
|
|
3924
|
-
|
|
3924
|
+
P = o.maxSize;
|
|
3925
3925
|
break;
|
|
3926
3926
|
}
|
|
3927
|
-
if (
|
|
3927
|
+
if (P < S)
|
|
3928
3928
|
return !1;
|
|
3929
3929
|
}
|
|
3930
3930
|
return !0;
|
|
@@ -3939,25 +3939,25 @@ const nl = /* @__PURE__ */ K({
|
|
|
3939
3939
|
json: "file-json"
|
|
3940
3940
|
}, f = (S) => {
|
|
3941
3941
|
if (S) {
|
|
3942
|
-
const
|
|
3943
|
-
return
|
|
3942
|
+
const P = S.split(".");
|
|
3943
|
+
return P[P.length - 1];
|
|
3944
3944
|
}
|
|
3945
3945
|
return "";
|
|
3946
|
-
}, B = (S,
|
|
3947
|
-
if (
|
|
3946
|
+
}, B = (S, P) => {
|
|
3947
|
+
if (P && P.indexOf("image") > -1)
|
|
3948
3948
|
return "file-image";
|
|
3949
|
-
const
|
|
3950
|
-
return ["webp", "bmp", "jpg", "jpge", "png", "tif", "gif", "svg"].includes(
|
|
3949
|
+
const _ = f(S);
|
|
3950
|
+
return ["webp", "bmp", "jpg", "jpge", "png", "tif", "gif", "svg"].includes(_) ? "file-image" : Y[_] || "file-ufo";
|
|
3951
3951
|
}, O = (S) => {
|
|
3952
|
-
S.status = o.autoUpload ? "uploading" : "unUpload", S.uploadSize = 0, S.icon = B(S.name, S.type), r || (S.icon = "file-text"), S.id = S.uid, S.url = window.URL.createObjectURL(S), S.date =
|
|
3952
|
+
S.status = o.autoUpload ? "uploading" : "unUpload", S.uploadSize = 0, S.icon = B(S.name, S.type), r || (S.icon = "file-text"), S.id = S.uid, S.url = window.URL.createObjectURL(S), S.date = Ke(), S.param = k.value;
|
|
3953
3953
|
}, I = (S) => {
|
|
3954
3954
|
t("start", { file: S, list: C.value });
|
|
3955
|
-
},
|
|
3956
|
-
S.percent =
|
|
3957
|
-
},
|
|
3955
|
+
}, ee = (S, P, _) => {
|
|
3956
|
+
S.percent = _, S.uploadSize = P, E();
|
|
3957
|
+
}, $ = (S) => {
|
|
3958
3958
|
S.status = "done", S.id += "1", S.uid += "1", E(), t("success", { file: S, list: C.value }), o.modelValue || (t("update:modelValue", y.value), t("change", { value: y.value }));
|
|
3959
|
-
},
|
|
3960
|
-
console.error(
|
|
3959
|
+
}, se = (S, P) => {
|
|
3960
|
+
console.error(P, "简搭提醒您:文件上传错误!"), S.status = "error", E(), t("error", { file: S, list: C.value });
|
|
3961
3961
|
}, J = (S) => {
|
|
3962
3962
|
if (C.value.push(S), S.status === "unUpload") {
|
|
3963
3963
|
t("notUploadChange", { value: S.url });
|
|
@@ -3965,52 +3965,52 @@ const nl = /* @__PURE__ */ K({
|
|
|
3965
3965
|
}
|
|
3966
3966
|
!o.isNotApi && o.upload ? o.upload(S) : !o.isNotApi && r ? r(S, {
|
|
3967
3967
|
onStart: I,
|
|
3968
|
-
onProgress:
|
|
3969
|
-
onSuccess:
|
|
3970
|
-
onError:
|
|
3968
|
+
onProgress: ee,
|
|
3969
|
+
onSuccess: $,
|
|
3970
|
+
onError: se,
|
|
3971
3971
|
uploadCallback: o.uploadCallback
|
|
3972
|
-
}) :
|
|
3973
|
-
},
|
|
3974
|
-
if (!
|
|
3972
|
+
}) : $(S);
|
|
3973
|
+
}, A = (S) => {
|
|
3974
|
+
if (!Q(S.size))
|
|
3975
3975
|
return a && a("上传文件超出大小了"), !1;
|
|
3976
|
-
},
|
|
3976
|
+
}, q = (S) => {
|
|
3977
3977
|
O(S.file), J(S.file);
|
|
3978
|
-
},
|
|
3978
|
+
}, H = (S) => new Promise((P) => {
|
|
3979
3979
|
s ? s({
|
|
3980
3980
|
title: "提示",
|
|
3981
3981
|
iconType: "warning",
|
|
3982
3982
|
content: `您确定删除【${S.name}】?`,
|
|
3983
3983
|
onOk: () => {
|
|
3984
|
-
|
|
3984
|
+
P(!0);
|
|
3985
3985
|
},
|
|
3986
3986
|
onCancel: () => {
|
|
3987
|
-
|
|
3987
|
+
P(!1);
|
|
3988
3988
|
}
|
|
3989
|
-
}) : (
|
|
3990
|
-
}),
|
|
3989
|
+
}) : (ne(S), P(!0));
|
|
3990
|
+
}), ne = (S) => {
|
|
3991
3991
|
if (!o.isNotApi) {
|
|
3992
|
-
const
|
|
3993
|
-
p && p(
|
|
3992
|
+
const P = S.response?.fileId || S.id;
|
|
3993
|
+
p && p(P);
|
|
3994
3994
|
}
|
|
3995
|
-
C.value = C.value.filter((
|
|
3996
|
-
},
|
|
3997
|
-
await
|
|
3998
|
-
},
|
|
3999
|
-
let
|
|
4000
|
-
const be = j(
|
|
3995
|
+
C.value = C.value.filter((P) => P.id !== S.id), C.value.length === 0 && (t("update:modelValue", ""), t("change", { value: "" })), t("delete", { file: S, list: C.value });
|
|
3996
|
+
}, le = async (S) => {
|
|
3997
|
+
await H(S) && ne(S);
|
|
3998
|
+
}, Be = j(!1), oe = j(""), he = j(""), Ie = j(!1), Oe = j(!1);
|
|
3999
|
+
let R = null;
|
|
4000
|
+
const be = j(Ke(/* @__PURE__ */ new Date(), "YYYY-MM-DD")), ve = (S) => {
|
|
4001
4001
|
if (S.isPreview === !1 && !o.isUploadImg) {
|
|
4002
4002
|
n && n("无权限预览!");
|
|
4003
4003
|
return;
|
|
4004
4004
|
}
|
|
4005
|
-
const
|
|
4006
|
-
switch (
|
|
4005
|
+
const P = S.name.split(".")[S.name.split(".").length - 1];
|
|
4006
|
+
switch (R = S, Be.value = !1, oe.value = S.name, P.toLowerCase()) {
|
|
4007
4007
|
case "jpg":
|
|
4008
4008
|
case "gif":
|
|
4009
4009
|
case "png":
|
|
4010
4010
|
case "bmp":
|
|
4011
4011
|
case "jpeg":
|
|
4012
4012
|
case "svg":
|
|
4013
|
-
|
|
4013
|
+
Be.value = !0, he.value = S.url, Oe.value = !1, Ie.value = !0;
|
|
4014
4014
|
break;
|
|
4015
4015
|
default:
|
|
4016
4016
|
if (o.isNotApi) {
|
|
@@ -4021,32 +4021,32 @@ const nl = /* @__PURE__ */ K({
|
|
|
4021
4021
|
n && n("当前文件还没上传成功,不支持预览!");
|
|
4022
4022
|
return;
|
|
4023
4023
|
}
|
|
4024
|
-
if (he.value =
|
|
4024
|
+
if (he.value = ce(S), he.value === "") {
|
|
4025
4025
|
n && n("当前文件不支持预览!");
|
|
4026
4026
|
return;
|
|
4027
4027
|
}
|
|
4028
|
-
Oe.value = !0,
|
|
4028
|
+
Oe.value = !0, Ie.value = !0;
|
|
4029
4029
|
break;
|
|
4030
4030
|
}
|
|
4031
|
-
be.value =
|
|
4032
|
-
},
|
|
4033
|
-
const
|
|
4031
|
+
be.value = Ke(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss");
|
|
4032
|
+
}, ce = (S) => {
|
|
4033
|
+
const P = S.response?.fileId || S.id;
|
|
4034
4034
|
if (!v)
|
|
4035
4035
|
return "";
|
|
4036
|
-
const
|
|
4037
|
-
return `${v}/system/annexesfile/preview/${
|
|
4036
|
+
const _ = Ke(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss") + "|" + P, pe = nl.createAesEncryption({ key: "jianda" }).encrypt(_).replace(/\//g, "|");
|
|
4037
|
+
return `${v}/system/annexesfile/preview/${pe}?token=${d?.value}`;
|
|
4038
4038
|
}, ye = () => {
|
|
4039
|
-
|
|
4040
|
-
const S =
|
|
4041
|
-
|
|
4039
|
+
R.isDown === !1 && n && n("无权限下载!");
|
|
4040
|
+
const S = R.response?.fileId || R.id, P = `${v}/system/annexesfile/${S}?token=${d?.value}`;
|
|
4041
|
+
ko(P);
|
|
4042
4042
|
}, je = () => {
|
|
4043
4043
|
if (o.limit !== -1 && o.limit <= C.value.length)
|
|
4044
4044
|
return n && n(`当前限制选择${o.limit}个文件`), !1;
|
|
4045
4045
|
};
|
|
4046
|
-
return (S,
|
|
4047
|
-
const
|
|
4048
|
-
return i(),
|
|
4049
|
-
|
|
4046
|
+
return (S, P) => {
|
|
4047
|
+
const _ = F("j-icon"), pe = F("j-button"), $e = F("el-popover"), Le = F("el-upload"), fe = F("el-text"), lt = F("j-dialog-full"), ot = ct("loading");
|
|
4048
|
+
return i(), T("div", Vo, [
|
|
4049
|
+
K(Le, {
|
|
4050
4050
|
action: "",
|
|
4051
4051
|
drag: e.drag,
|
|
4052
4052
|
disabled: e.readonly,
|
|
@@ -4055,43 +4055,43 @@ const nl = /* @__PURE__ */ K({
|
|
|
4055
4055
|
accept: h.value,
|
|
4056
4056
|
limit: c.value,
|
|
4057
4057
|
multiple: e.multiple,
|
|
4058
|
-
"before-upload":
|
|
4059
|
-
"http-request":
|
|
4058
|
+
"before-upload": A,
|
|
4059
|
+
"http-request": q,
|
|
4060
4060
|
"file-list": C.value,
|
|
4061
|
-
"before-remove":
|
|
4062
|
-
"on-remove":
|
|
4063
|
-
"on-preview":
|
|
4061
|
+
"before-remove": H,
|
|
4062
|
+
"on-remove": ne,
|
|
4063
|
+
"on-preview": ve,
|
|
4064
4064
|
"on-exceed": je
|
|
4065
4065
|
}, {
|
|
4066
4066
|
default: L(() => [
|
|
4067
|
-
e.isUploadImg && !e.isLayer && !e.readonly ? (i(),
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
])) : e.isLayer && e.showFileList && C.value.length > 0 && !
|
|
4067
|
+
e.isUploadImg && !e.isLayer && !e.readonly ? (i(), T("div", To, [
|
|
4068
|
+
K(_, { icon: "material-symbols-light:add-2-rounded" }),
|
|
4069
|
+
W("div", Lo, ie(U(u)(e.placeholder)), 1)
|
|
4070
|
+
])) : e.isLayer && e.showFileList && C.value.length > 0 && !Ie.value ? (i(), w($e, {
|
|
4071
4071
|
key: 1,
|
|
4072
4072
|
placement: "bottom",
|
|
4073
|
-
title: e.isUploadImg ?
|
|
4073
|
+
title: e.isUploadImg ? U(u)("图片列表") : U(u)("文件列表")
|
|
4074
4074
|
}, {
|
|
4075
4075
|
content: L(() => [
|
|
4076
|
-
|
|
4077
|
-
style:
|
|
4076
|
+
K(Ct, {
|
|
4077
|
+
style: re({ width: e.isUploadImg ? void 0 : "400px" }),
|
|
4078
4078
|
list: C.value,
|
|
4079
|
-
"preview-file":
|
|
4080
|
-
"delete-file":
|
|
4079
|
+
"preview-file": ve,
|
|
4080
|
+
"delete-file": le,
|
|
4081
4081
|
"is-upload-img": e.isUploadImg,
|
|
4082
4082
|
readonly: e.readonly
|
|
4083
4083
|
}, null, 8, ["style", "list", "is-upload-img", "readonly"])
|
|
4084
4084
|
]),
|
|
4085
4085
|
default: L(() => [
|
|
4086
|
-
|
|
4086
|
+
K(pe, {
|
|
4087
4087
|
type: e.btnType,
|
|
4088
4088
|
size: e.btnSize,
|
|
4089
4089
|
icon: "material-symbols-light:upload-rounded",
|
|
4090
|
-
label: e.readonly ?
|
|
4090
|
+
label: e.readonly ? U(u)(e.btnText) : e.placeholder
|
|
4091
4091
|
}, null, 8, ["type", "size", "label"])
|
|
4092
4092
|
]),
|
|
4093
4093
|
_: 1
|
|
4094
|
-
}, 8, ["title"])) : e.readonly ?
|
|
4094
|
+
}, 8, ["title"])) : e.readonly ? D("", !0) : (i(), w(pe, {
|
|
4095
4095
|
key: 2,
|
|
4096
4096
|
type: e.btnType,
|
|
4097
4097
|
size: e.btnSize,
|
|
@@ -4101,58 +4101,58 @@ const nl = /* @__PURE__ */ K({
|
|
|
4101
4101
|
]),
|
|
4102
4102
|
_: 1
|
|
4103
4103
|
}, 8, ["drag", "disabled", "show-file-list", "list-type", "accept", "limit", "multiple", "file-list"]),
|
|
4104
|
-
e.isTip ? (i(),
|
|
4105
|
-
|
|
4104
|
+
e.isTip ? (i(), T("div", Fo, [
|
|
4105
|
+
K(fe, null, {
|
|
4106
4106
|
default: L(() => [
|
|
4107
|
-
Se(
|
|
4107
|
+
Se(ie(`${U(u)("只能上传不超过{0}的{1}文件", `${e.maxSize}${e.sizeType}`, `${h.value || ""}`)},${g.value}`), 1)
|
|
4108
4108
|
]),
|
|
4109
4109
|
_: 1
|
|
4110
4110
|
})
|
|
4111
|
-
])) :
|
|
4112
|
-
!e.isLayer && !e.isUploadImg && e.showFileList && C.value.length > 0 ? (i(), w(
|
|
4111
|
+
])) : D("", !0),
|
|
4112
|
+
!e.isLayer && !e.isUploadImg && e.showFileList && C.value.length > 0 ? (i(), w(Ct, {
|
|
4113
4113
|
key: 1,
|
|
4114
4114
|
style: { "margin-top": "4px" },
|
|
4115
4115
|
list: C.value,
|
|
4116
|
-
"preview-file":
|
|
4117
|
-
"delete-file":
|
|
4116
|
+
"preview-file": ve,
|
|
4117
|
+
"delete-file": le,
|
|
4118
4118
|
readonly: e.readonly,
|
|
4119
4119
|
"is-show-success-icon": e.isShowSuccessIcon
|
|
4120
|
-
}, null, 8, ["list", "readonly", "is-show-success-icon"])) :
|
|
4121
|
-
|
|
4122
|
-
visible:
|
|
4123
|
-
"onUpdate:visible":
|
|
4120
|
+
}, null, 8, ["list", "readonly", "is-show-success-icon"])) : D("", !0),
|
|
4121
|
+
K(lt, {
|
|
4122
|
+
visible: Ie.value,
|
|
4123
|
+
"onUpdate:visible": P[1] || (P[1] = (qe) => Ie.value = qe),
|
|
4124
4124
|
"btn-text": "下载",
|
|
4125
|
-
title: `${
|
|
4125
|
+
title: `${U(u)("文件预览")}【${oe.value}】`,
|
|
4126
4126
|
"destroy-on-close": !0,
|
|
4127
|
-
"has-btns": !!
|
|
4127
|
+
"has-btns": !!U(v),
|
|
4128
4128
|
onOk: ye
|
|
4129
4129
|
}, {
|
|
4130
4130
|
default: L(() => [
|
|
4131
|
-
|
|
4132
|
-
|
|
4131
|
+
Be.value && he.value ? (i(), T("div", Io, [
|
|
4132
|
+
W("img", {
|
|
4133
4133
|
width: "100%",
|
|
4134
4134
|
style: { "max-width": "1024px" },
|
|
4135
4135
|
src: he.value,
|
|
4136
4136
|
alt: ""
|
|
4137
|
-
}, null, 8,
|
|
4138
|
-
])) : he.value != "" ? Ee((i(),
|
|
4139
|
-
|
|
4137
|
+
}, null, 8, Oo)
|
|
4138
|
+
])) : he.value != "" ? Ee((i(), T("div", Mo, [
|
|
4139
|
+
W("iframe", {
|
|
4140
4140
|
ref: "iframe",
|
|
4141
4141
|
src: he.value,
|
|
4142
4142
|
style: { width: "100%", height: "100%" },
|
|
4143
4143
|
frameborder: "0",
|
|
4144
|
-
onLoad:
|
|
4145
|
-
}, null, 40,
|
|
4144
|
+
onLoad: P[0] || (P[0] = (qe) => Oe.value = !1)
|
|
4145
|
+
}, null, 40, Do)
|
|
4146
4146
|
])), [
|
|
4147
|
-
[
|
|
4148
|
-
]) :
|
|
4147
|
+
[ot, Oe.value]
|
|
4148
|
+
]) : D("", !0)
|
|
4149
4149
|
]),
|
|
4150
4150
|
_: 1
|
|
4151
4151
|
}, 8, ["visible", "title", "has-btns"])
|
|
4152
4152
|
]);
|
|
4153
4153
|
};
|
|
4154
4154
|
}
|
|
4155
|
-
}),
|
|
4155
|
+
}), No = Z(Ao), Ro = /* @__PURE__ */ G({
|
|
4156
4156
|
name: "JEcharts",
|
|
4157
4157
|
__name: "echarts",
|
|
4158
4158
|
props: {
|
|
@@ -4194,10 +4194,10 @@ const nl = /* @__PURE__ */ K({
|
|
|
4194
4194
|
},
|
|
4195
4195
|
emits: ["click", "ready"],
|
|
4196
4196
|
setup(e, { expose: l, emit: o }) {
|
|
4197
|
-
const t = e, n = o, a = j(), s =
|
|
4197
|
+
const t = e, n = o, a = j(), s = rt();
|
|
4198
4198
|
let u = null, v = null;
|
|
4199
4199
|
const d = async () => {
|
|
4200
|
-
a.value && (s.value =
|
|
4200
|
+
a.value && (s.value = Nt.init(a.value, t.theme, t.initOptions), m(t.option), s.value && s.value.on("click", (c) => {
|
|
4201
4201
|
n("click", c);
|
|
4202
4202
|
}), u = new ResizeObserver(() => {
|
|
4203
4203
|
s.value?.resize();
|
|
@@ -4215,7 +4215,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4215
4215
|
{ deep: !0 }
|
|
4216
4216
|
), Xe(() => {
|
|
4217
4217
|
d();
|
|
4218
|
-
}),
|
|
4218
|
+
}), tt(() => {
|
|
4219
4219
|
v && clearTimeout(v), u && a.value && (u.unobserve(a.value), u.disconnect(), u = null), s.value && (s.value.dispose(), s.value = void 0);
|
|
4220
4220
|
}), l({
|
|
4221
4221
|
getInstance: () => s.value,
|
|
@@ -4225,18 +4225,18 @@ const nl = /* @__PURE__ */ K({
|
|
|
4225
4225
|
clear: () => {
|
|
4226
4226
|
s.value?.clear();
|
|
4227
4227
|
}
|
|
4228
|
-
}), (c, g) => (i(),
|
|
4228
|
+
}), (c, g) => (i(), T("div", {
|
|
4229
4229
|
ref_key: "chartRef",
|
|
4230
4230
|
ref: a,
|
|
4231
4231
|
class: "j-echarts"
|
|
4232
4232
|
}, null, 512));
|
|
4233
4233
|
}
|
|
4234
|
-
}),
|
|
4234
|
+
}), Eo = (e, l) => {
|
|
4235
4235
|
const o = e.__vccOpts || e;
|
|
4236
4236
|
for (const [t, n] of l)
|
|
4237
4237
|
o[t] = n;
|
|
4238
4238
|
return o;
|
|
4239
|
-
},
|
|
4239
|
+
}, Jo = /* @__PURE__ */ Eo(Ro, [["__scopeId", "data-v-d0771090"]]), Uo = Z(Jo), Wo = ["src"], Po = /* @__PURE__ */ G({
|
|
4240
4240
|
name: "JBarcode",
|
|
4241
4241
|
__name: "barcode",
|
|
4242
4242
|
props: {
|
|
@@ -4273,7 +4273,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4273
4273
|
logoCornerRadius: { default: 8 }
|
|
4274
4274
|
},
|
|
4275
4275
|
setup(e) {
|
|
4276
|
-
const l = e, o = j(), t = j(1), n = j(""), a =
|
|
4276
|
+
const l = e, o = j(), t = j(1), n = j(""), a = z(() => {
|
|
4277
4277
|
const u = {};
|
|
4278
4278
|
return l.format === "qr" ? (u.text = l.modelValue + "", u.size = l.size, u.margin = l.margin, u.correctLevel = l.correctLevel, u.colorDark = l.color, u.colorLight = l.background, u.autoColor = l.autoColor, u.backgroundImage = l.backgroundImage, u.backgroundDimming = l.backgroundDimming, u.gifBackground = l.gifBackground, u.whiteMargin = l.whiteMargin, u.logoImage = l.logoImage, u.logoScale = l.logoScale, u.logoMargin = l.logoMargin, u.logoCornerRadius = l.logoCornerRadius) : (u.format = l.format, u.width = l.width, u.height = l.height, u.text = l.text, u.fontOptions = l.fontOptions, u.textAlign = l.textAlign, u.textPosition = l.textPosition, u.textMargin = l.textMargin, u.fontSize = l.fontSize, u.background = l.background, u.lineColor = l.color, u.margin = l.margin, u.marginTop = l.marginTop, u.marginRight = l.marginRight, u.marginBottom = l.marginBottom, u.marginLeft = l.marginLeft, u.displayValue = l.displayValue, u.flat = l.flat), u;
|
|
4279
4279
|
}), s = () => {
|
|
@@ -4287,7 +4287,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4287
4287
|
}).catch((u) => {
|
|
4288
4288
|
console.error(u);
|
|
4289
4289
|
});
|
|
4290
|
-
} else o.value ?
|
|
4290
|
+
} else o.value ? Fe(l.modelValue) || Rt(o.value, l.modelValue + "", a.value) : Fe(l.modelValue) || setTimeout(() => {
|
|
4291
4291
|
s();
|
|
4292
4292
|
}, 100);
|
|
4293
4293
|
};
|
|
@@ -4301,14 +4301,14 @@ const nl = /* @__PURE__ */ K({
|
|
|
4301
4301
|
{ immediate: !0 }
|
|
4302
4302
|
), ke(a, () => {
|
|
4303
4303
|
s();
|
|
4304
|
-
}), (u, v) => n.value || e.format != "qr" && !
|
|
4304
|
+
}), (u, v) => n.value || e.format != "qr" && !U(Fe)(e.modelValue) ? (i(), T("img", {
|
|
4305
4305
|
key: t.value,
|
|
4306
4306
|
ref_key: "barcodeRef",
|
|
4307
4307
|
ref: o,
|
|
4308
4308
|
src: n.value
|
|
4309
|
-
}, null, 8,
|
|
4309
|
+
}, null, 8, Wo)) : D("", !0);
|
|
4310
4310
|
}
|
|
4311
|
-
}),
|
|
4311
|
+
}), Ho = Z(Po), Yo = /* @__PURE__ */ G({
|
|
4312
4312
|
name: "JCount",
|
|
4313
4313
|
__name: "count",
|
|
4314
4314
|
props: {
|
|
@@ -4335,34 +4335,34 @@ const nl = /* @__PURE__ */ K({
|
|
|
4335
4335
|
if (/[><=]/.test(B)) {
|
|
4336
4336
|
const I = B.match(/^([><=]+)(.+)$/);
|
|
4337
4337
|
if (I) {
|
|
4338
|
-
const
|
|
4339
|
-
for (let
|
|
4338
|
+
const ee = I[1], $ = Number(I[2]);
|
|
4339
|
+
for (let se = 0; se < f.length; se++)
|
|
4340
4340
|
try {
|
|
4341
|
-
const J = Number(f[
|
|
4342
|
-
let
|
|
4343
|
-
switch (
|
|
4341
|
+
const J = Number(f[se]);
|
|
4342
|
+
let A = !1;
|
|
4343
|
+
switch (ee) {
|
|
4344
4344
|
case ">":
|
|
4345
|
-
|
|
4345
|
+
A = J > $;
|
|
4346
4346
|
break;
|
|
4347
4347
|
case "<":
|
|
4348
|
-
|
|
4348
|
+
A = J < $;
|
|
4349
4349
|
break;
|
|
4350
4350
|
case ">=":
|
|
4351
|
-
|
|
4351
|
+
A = J >= $;
|
|
4352
4352
|
break;
|
|
4353
4353
|
case "<=":
|
|
4354
|
-
|
|
4354
|
+
A = J <= $;
|
|
4355
4355
|
break;
|
|
4356
4356
|
case "==":
|
|
4357
4357
|
case "===":
|
|
4358
|
-
|
|
4358
|
+
A = J === $;
|
|
4359
4359
|
break;
|
|
4360
4360
|
case "!=":
|
|
4361
4361
|
case "!==":
|
|
4362
|
-
|
|
4362
|
+
A = J !== $;
|
|
4363
4363
|
break;
|
|
4364
4364
|
}
|
|
4365
|
-
|
|
4365
|
+
A && O++;
|
|
4366
4366
|
} catch {
|
|
4367
4367
|
console.log("计算失败");
|
|
4368
4368
|
break;
|
|
@@ -4393,34 +4393,34 @@ const nl = /* @__PURE__ */ K({
|
|
|
4393
4393
|
for (let O = 0; O < f.length; O++)
|
|
4394
4394
|
B += Number(f[O]);
|
|
4395
4395
|
return B;
|
|
4396
|
-
}, y = (...f) => f[0].map((I,
|
|
4397
|
-
let
|
|
4398
|
-
for (let
|
|
4399
|
-
|
|
4400
|
-
return
|
|
4401
|
-
}).reduce((I,
|
|
4396
|
+
}, y = (...f) => f[0].map((I, ee) => {
|
|
4397
|
+
let $ = I;
|
|
4398
|
+
for (let se = 1; se < f.length; se++)
|
|
4399
|
+
$ *= f[se][ee] || 0;
|
|
4400
|
+
return $;
|
|
4401
|
+
}).reduce((I, ee) => I + ee, 0), k = l, { getValue: C } = Ve("jd_form_provide", {}), E = (f) => {
|
|
4402
4402
|
const B = C(f);
|
|
4403
|
-
if (
|
|
4403
|
+
if (it(B)) {
|
|
4404
4404
|
const I = [];
|
|
4405
|
-
return B.forEach((
|
|
4406
|
-
const
|
|
4407
|
-
Number.isNaN(
|
|
4405
|
+
return B.forEach((ee) => {
|
|
4406
|
+
const $ = Number(ee);
|
|
4407
|
+
Number.isNaN($) ? I.push(0) : I.push($);
|
|
4408
4408
|
}), I;
|
|
4409
4409
|
}
|
|
4410
4410
|
const O = Number(B);
|
|
4411
4411
|
return Number.isNaN(O) ? 0 : O;
|
|
4412
|
-
},
|
|
4412
|
+
}, Q = z(() => {
|
|
4413
4413
|
if (!C)
|
|
4414
4414
|
return "";
|
|
4415
4415
|
const f = JSON.parse(o.formatJson || "[]");
|
|
4416
4416
|
let B = "";
|
|
4417
|
-
for (let
|
|
4418
|
-
const
|
|
4419
|
-
if (
|
|
4420
|
-
if (["abs", "max", "min", "sqrt"].includes(
|
|
4421
|
-
B += `Math.${
|
|
4422
|
-
else if (["int", "power", "rand"].includes(
|
|
4423
|
-
switch (
|
|
4417
|
+
for (let ee = 0; ee < f.length; ee++) {
|
|
4418
|
+
const $ = f[ee];
|
|
4419
|
+
if ($.type === "fun" && $.value !== "(" && $.value !== ")")
|
|
4420
|
+
if (["abs", "max", "min", "sqrt"].includes($.value))
|
|
4421
|
+
B += `Math.${$.value}`;
|
|
4422
|
+
else if (["int", "power", "rand"].includes($.value))
|
|
4423
|
+
switch ($.value) {
|
|
4424
4424
|
case "int":
|
|
4425
4425
|
B += "Math.floor";
|
|
4426
4426
|
break;
|
|
@@ -4432,8 +4432,8 @@ const nl = /* @__PURE__ */ K({
|
|
|
4432
4432
|
break;
|
|
4433
4433
|
}
|
|
4434
4434
|
else
|
|
4435
|
-
B += `${
|
|
4436
|
-
else
|
|
4435
|
+
B += `${$.value}Fun`;
|
|
4436
|
+
else $.type === "comp" ? B += `getCompValue('${$.value}')` : $.value === "i" && o.tableIndex !== void 0 ? B += o.tableIndex : B += $.value;
|
|
4437
4437
|
}
|
|
4438
4438
|
if (!B)
|
|
4439
4439
|
return "";
|
|
@@ -4454,7 +4454,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4454
4454
|
sumproductFun,
|
|
4455
4455
|
getCompValue)=>{ return ${B} }`;
|
|
4456
4456
|
let O;
|
|
4457
|
-
const I =
|
|
4457
|
+
const I = Bt(B);
|
|
4458
4458
|
if (I.res)
|
|
4459
4459
|
try {
|
|
4460
4460
|
O = I.fn(
|
|
@@ -4474,17 +4474,17 @@ const nl = /* @__PURE__ */ K({
|
|
|
4474
4474
|
y,
|
|
4475
4475
|
E
|
|
4476
4476
|
);
|
|
4477
|
-
} catch (
|
|
4478
|
-
console.log(
|
|
4477
|
+
} catch (ee) {
|
|
4478
|
+
console.log(ee, "计算组件公式运行错误");
|
|
4479
4479
|
}
|
|
4480
4480
|
else
|
|
4481
4481
|
return console.log(I.msg), "";
|
|
4482
4482
|
return Number.isNaN(O) ? "" : (o.decimal !== void 0 && (O = O.toFixed(o.decimal)), O);
|
|
4483
|
-
}), Y =
|
|
4484
|
-
let f =
|
|
4485
|
-
return o.thousandSeparator && (f =
|
|
4483
|
+
}), Y = z(() => {
|
|
4484
|
+
let f = Q.value;
|
|
4485
|
+
return o.thousandSeparator && (f = Zt(f)), o.isChinese && (f = Qt(f)), f;
|
|
4486
4486
|
});
|
|
4487
|
-
return ke(
|
|
4487
|
+
return ke(Q, (f) => {
|
|
4488
4488
|
k("update:modelValue", f), k("change", { value: f, data: Y.value });
|
|
4489
4489
|
}), (f, B) => {
|
|
4490
4490
|
const O = F("el-input");
|
|
@@ -4496,7 +4496,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4496
4496
|
}, null, 8, ["modelValue", "size"]);
|
|
4497
4497
|
};
|
|
4498
4498
|
}
|
|
4499
|
-
}),
|
|
4499
|
+
}), Xo = Z(Yo), qo = { key: 0 }, Go = /* @__PURE__ */ G({
|
|
4500
4500
|
name: "JCountUp",
|
|
4501
4501
|
__name: "count-up",
|
|
4502
4502
|
props: {
|
|
@@ -4509,9 +4509,9 @@ const nl = /* @__PURE__ */ K({
|
|
|
4509
4509
|
callback: { type: Function, default: void 0 }
|
|
4510
4510
|
},
|
|
4511
4511
|
setup(e, { expose: l }) {
|
|
4512
|
-
const o = e, t =
|
|
4512
|
+
const o = e, t = z(() => ({
|
|
4513
4513
|
...o
|
|
4514
|
-
})), n = j(), a = j(null), s =
|
|
4514
|
+
})), n = j(), a = j(null), s = z(() => o.options);
|
|
4515
4515
|
Xe(() => {
|
|
4516
4516
|
o.animation && u();
|
|
4517
4517
|
}), ke(
|
|
@@ -4527,13 +4527,13 @@ const nl = /* @__PURE__ */ K({
|
|
|
4527
4527
|
}
|
|
4528
4528
|
);
|
|
4529
4529
|
const u = () => {
|
|
4530
|
-
a.value || (s.value.startVal = o.startValue, s.value.decimalPlaces = o.decimals, s.value.duration = o.duration, a.value = new
|
|
4530
|
+
a.value || (s.value.startVal = o.startValue, s.value.decimalPlaces = o.decimals, s.value.duration = o.duration, a.value = new Et(n.value, Number(o.endValue), s.value), a.value.start(() => {
|
|
4531
4531
|
o.callback?.(a.value);
|
|
4532
4532
|
}));
|
|
4533
4533
|
};
|
|
4534
|
-
return
|
|
4534
|
+
return tt(() => {
|
|
4535
4535
|
a.value = null;
|
|
4536
|
-
}),
|
|
4536
|
+
}), xt(() => {
|
|
4537
4537
|
a.value = null;
|
|
4538
4538
|
}), l({
|
|
4539
4539
|
myProps: t,
|
|
@@ -4553,36 +4553,36 @@ const nl = /* @__PURE__ */ K({
|
|
|
4553
4553
|
update: (p) => {
|
|
4554
4554
|
a.value && a.value.update && a.value.update(p);
|
|
4555
4555
|
}
|
|
4556
|
-
}), (p, h) => (i(),
|
|
4556
|
+
}), (p, h) => (i(), T("span", {
|
|
4557
4557
|
ref_key: "el",
|
|
4558
4558
|
ref: n
|
|
4559
4559
|
}, [
|
|
4560
|
-
e.animation ?
|
|
4560
|
+
e.animation ? D("", !0) : (i(), T("span", qo, ie(e.endValue), 1))
|
|
4561
4561
|
], 512));
|
|
4562
4562
|
}
|
|
4563
|
-
}),
|
|
4563
|
+
}), Ko = Z(Go), Qo = { class: "j-block j-data-panel" }, Zo = {
|
|
4564
4564
|
key: 0,
|
|
4565
4565
|
class: "j-data-panel-header"
|
|
4566
|
-
},
|
|
4566
|
+
}, _o = { style: { color: "var(--j-color-text)", "font-size": "14px", "font-weight": "bold" } }, ea = { class: "j-data-panel-header-right" }, ta = { class: "j-data-panel-body" }, la = /* @__PURE__ */ G({
|
|
4567
4567
|
name: "JDataPanel",
|
|
4568
4568
|
__name: "data-panel",
|
|
4569
4569
|
props: {
|
|
4570
4570
|
title: { default: void 0 }
|
|
4571
4571
|
},
|
|
4572
4572
|
setup(e) {
|
|
4573
|
-
return (l, o) => (i(),
|
|
4574
|
-
e.title ? (i(),
|
|
4575
|
-
|
|
4576
|
-
|
|
4573
|
+
return (l, o) => (i(), T("div", Qo, [
|
|
4574
|
+
e.title ? (i(), T("div", Zo, [
|
|
4575
|
+
W("div", _o, ie(e.title), 1),
|
|
4576
|
+
W("div", ea, [
|
|
4577
4577
|
te(l.$slots, "titleRight")
|
|
4578
4578
|
])
|
|
4579
|
-
])) :
|
|
4580
|
-
|
|
4579
|
+
])) : D("", !0),
|
|
4580
|
+
W("div", ta, [
|
|
4581
4581
|
te(l.$slots, "default")
|
|
4582
4582
|
])
|
|
4583
4583
|
]));
|
|
4584
4584
|
}
|
|
4585
|
-
}),
|
|
4585
|
+
}), oa = Z(la), aa = { class: "j-divider-content" }, na = /* @__PURE__ */ G({
|
|
4586
4586
|
name: "JDivider",
|
|
4587
4587
|
__name: "divider",
|
|
4588
4588
|
props: {
|
|
@@ -4593,44 +4593,44 @@ const nl = /* @__PURE__ */ K({
|
|
|
4593
4593
|
contentPosition: { default: "center" }
|
|
4594
4594
|
},
|
|
4595
4595
|
setup(e) {
|
|
4596
|
-
const l = e, o =
|
|
4596
|
+
const l = e, o = z(() => {
|
|
4597
4597
|
const n = {
|
|
4598
4598
|
color: l.color
|
|
4599
4599
|
};
|
|
4600
4600
|
return l.size && Number(l.size) && (n.fontSize = `${l.size}px`), n;
|
|
4601
|
-
}), t =
|
|
4601
|
+
}), t = z(() => ({
|
|
4602
4602
|
borderTopStyle: l.borderStyle
|
|
4603
4603
|
}));
|
|
4604
|
-
return (n, a) => (i(),
|
|
4605
|
-
class:
|
|
4606
|
-
style:
|
|
4604
|
+
return (n, a) => (i(), T("div", {
|
|
4605
|
+
class: Te(`j-divider-container j-divider-${e.contentPosition}`),
|
|
4606
|
+
style: re(o.value)
|
|
4607
4607
|
}, [
|
|
4608
|
-
|
|
4608
|
+
W("div", {
|
|
4609
4609
|
class: "j-divider-line j-divider-line-left",
|
|
4610
|
-
style:
|
|
4610
|
+
style: re(t.value)
|
|
4611
4611
|
}, null, 4),
|
|
4612
|
-
|
|
4613
|
-
|
|
4612
|
+
W("div", aa, [
|
|
4613
|
+
W("span", null, ie(e.content || ""), 1)
|
|
4614
4614
|
]),
|
|
4615
|
-
|
|
4615
|
+
W("div", {
|
|
4616
4616
|
class: "j-divider-line j-divider-line-right",
|
|
4617
|
-
style:
|
|
4617
|
+
style: re(t.value)
|
|
4618
4618
|
}, null, 4)
|
|
4619
4619
|
], 6));
|
|
4620
4620
|
}
|
|
4621
|
-
}),
|
|
4621
|
+
}), sa = Z(na), ia = { class: "j-hpanel" }, ua = { class: "j-hpanel-main" }, ra = /* @__PURE__ */ G({
|
|
4622
4622
|
name: "JHpanel",
|
|
4623
4623
|
__name: "hpanel",
|
|
4624
4624
|
setup(e) {
|
|
4625
|
-
return (l, o) => (i(),
|
|
4625
|
+
return (l, o) => (i(), T("div", ia, [
|
|
4626
4626
|
te(l.$slots, "left"),
|
|
4627
|
-
|
|
4627
|
+
W("div", ua, [
|
|
4628
4628
|
te(l.$slots, "default")
|
|
4629
4629
|
]),
|
|
4630
4630
|
te(l.$slots, "right")
|
|
4631
4631
|
]));
|
|
4632
4632
|
}
|
|
4633
|
-
}),
|
|
4633
|
+
}), ca = Z(ra), da = /* @__PURE__ */ G({
|
|
4634
4634
|
name: "JInputButton",
|
|
4635
4635
|
__name: "input-button",
|
|
4636
4636
|
props: {
|
|
@@ -4667,14 +4667,14 @@ const nl = /* @__PURE__ */ K({
|
|
|
4667
4667
|
{ immediate: !0 }
|
|
4668
4668
|
), (m, r) => {
|
|
4669
4669
|
const p = F("j-button"), h = F("j-layer");
|
|
4670
|
-
return i(),
|
|
4671
|
-
|
|
4670
|
+
return i(), T(ue, null, [
|
|
4671
|
+
K(p, we({ style: { width: "auto" } }, m.$attrs, {
|
|
4672
4672
|
type: e.type,
|
|
4673
4673
|
label: e.btnText,
|
|
4674
4674
|
size: e.size,
|
|
4675
4675
|
onClick: d
|
|
4676
4676
|
}), null, 16, ["type", "label", "size"]),
|
|
4677
|
-
|
|
4677
|
+
K(h, {
|
|
4678
4678
|
ref_key: "layerRef",
|
|
4679
4679
|
ref: n,
|
|
4680
4680
|
height: e.height,
|
|
@@ -4693,7 +4693,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4693
4693
|
], 64);
|
|
4694
4694
|
};
|
|
4695
4695
|
}
|
|
4696
|
-
}),
|
|
4696
|
+
}), fa = Z(da), ma = /* @__PURE__ */ G({
|
|
4697
4697
|
name: "JInputCode",
|
|
4698
4698
|
__name: "input-code",
|
|
4699
4699
|
props: {
|
|
@@ -4712,7 +4712,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4712
4712
|
},
|
|
4713
4713
|
emits: ["update:modelValue", "change"],
|
|
4714
4714
|
setup(e, { emit: l }) {
|
|
4715
|
-
const o = e, t = l, n =
|
|
4715
|
+
const o = e, t = l, n = z({
|
|
4716
4716
|
get: () => o.modelValue,
|
|
4717
4717
|
set: (r) => {
|
|
4718
4718
|
t("update:modelValue", r);
|
|
@@ -4721,7 +4721,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4721
4721
|
a.value = r;
|
|
4722
4722
|
}, u = () => a.value, v = (r) => o.beforeClose ? o.beforeClose(r) : !0, d = (r) => {
|
|
4723
4723
|
t("change", r);
|
|
4724
|
-
}, m =
|
|
4724
|
+
}, m = z(() => o.modelValue && o.modelValue.trim() ? `${o.btnText}(已设置)` : o.btnText);
|
|
4725
4725
|
return (r, p) => {
|
|
4726
4726
|
const h = F("j-code-mirror"), c = F("j-layout"), g = F("j-input-button");
|
|
4727
4727
|
return i(), w(g, {
|
|
@@ -4739,12 +4739,12 @@ const nl = /* @__PURE__ */ K({
|
|
|
4739
4739
|
onChange: d
|
|
4740
4740
|
}, {
|
|
4741
4741
|
default: L(() => [
|
|
4742
|
-
|
|
4742
|
+
K(c, {
|
|
4743
4743
|
"right-move": !1,
|
|
4744
4744
|
right: 560
|
|
4745
4745
|
}, Ue({
|
|
4746
4746
|
default: L(() => [
|
|
4747
|
-
|
|
4747
|
+
K(h, {
|
|
4748
4748
|
value: a.value,
|
|
4749
4749
|
"onUpdate:value": p[0] || (p[0] = (y) => a.value = y),
|
|
4750
4750
|
mode: e.mode,
|
|
@@ -4757,7 +4757,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4757
4757
|
e.example ? {
|
|
4758
4758
|
name: "right",
|
|
4759
4759
|
fn: L(() => [
|
|
4760
|
-
|
|
4760
|
+
K(h, {
|
|
4761
4761
|
value: e.example,
|
|
4762
4762
|
mode: e.mode,
|
|
4763
4763
|
"read-only": ""
|
|
@@ -4771,7 +4771,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4771
4771
|
}, 8, ["modelValue", "type", "btn-text", "title", "size", "width", "height"]);
|
|
4772
4772
|
};
|
|
4773
4773
|
}
|
|
4774
|
-
}),
|
|
4774
|
+
}), pa = Z(ma), va = /* @__PURE__ */ G({
|
|
4775
4775
|
name: "JTitle",
|
|
4776
4776
|
__name: "title",
|
|
4777
4777
|
props: {
|
|
@@ -4783,18 +4783,18 @@ const nl = /* @__PURE__ */ K({
|
|
|
4783
4783
|
weight: { default: "normal" }
|
|
4784
4784
|
},
|
|
4785
4785
|
setup(e) {
|
|
4786
|
-
const l = e, o =
|
|
4786
|
+
const l = e, o = z(() => l.class || ""), t = z(() => {
|
|
4787
4787
|
const n = {
|
|
4788
4788
|
...l.style
|
|
4789
4789
|
};
|
|
4790
4790
|
return l.color && (n.color = l.color), l.size && (typeof l.size == "number" ? n.fontSize = `${l.size}px` : n.fontSize = l.size), l.weight && (n.fontWeight = l.weight), n;
|
|
4791
4791
|
});
|
|
4792
|
-
return (n, a) => (i(),
|
|
4793
|
-
class:
|
|
4794
|
-
style:
|
|
4795
|
-
},
|
|
4792
|
+
return (n, a) => (i(), T("div", {
|
|
4793
|
+
class: Te(["j-title", o.value]),
|
|
4794
|
+
style: re(t.value)
|
|
4795
|
+
}, ie(e.title), 7));
|
|
4796
4796
|
}
|
|
4797
|
-
}),
|
|
4797
|
+
}), ga = Z(va), ha = /* @__PURE__ */ G({
|
|
4798
4798
|
name: "JCodeMirror",
|
|
4799
4799
|
__name: "code-mirror",
|
|
4800
4800
|
props: {
|
|
@@ -4851,7 +4851,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4851
4851
|
}
|
|
4852
4852
|
);
|
|
4853
4853
|
}, r = () => {
|
|
4854
|
-
let c =
|
|
4854
|
+
let c = Jt(t.value);
|
|
4855
4855
|
c = c.replace(/{ JCODE_SASSID }/g, "{JCODE_SASSID}").replace(/{ JCODE_SASSID_NOTT }/g, "{JCODE_SASSID_NOTT}").replace(/{ JCODE_SASSID_NOTA }/g, "{JCODE_SASSID_NOTA}").replace(/@ /g, "@"), n("update:value", c), n("change", { value: c });
|
|
4856
4856
|
}, p = () => {
|
|
4857
4857
|
const c = v.getScrollInfo();
|
|
@@ -4880,7 +4880,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4880
4880
|
}, 300), h.observe(s.value)) : (c++, c < g ? setTimeout(y, 100) : console.error("CodeMirror failed to load after maximum retries"));
|
|
4881
4881
|
};
|
|
4882
4882
|
y();
|
|
4883
|
-
}),
|
|
4883
|
+
}), tt(() => {
|
|
4884
4884
|
v.off("change"), v = null;
|
|
4885
4885
|
}), l({
|
|
4886
4886
|
/**
|
|
@@ -4888,19 +4888,19 @@ const nl = /* @__PURE__ */ K({
|
|
|
4888
4888
|
* @public
|
|
4889
4889
|
*/
|
|
4890
4890
|
sqlFormatter: r
|
|
4891
|
-
}), (c, g) => (i(),
|
|
4891
|
+
}), (c, g) => (i(), T("div", {
|
|
4892
4892
|
ref_key: "codeWraperRef",
|
|
4893
4893
|
ref: s,
|
|
4894
4894
|
class: "j-code-mirror",
|
|
4895
|
-
style:
|
|
4895
|
+
style: re({ height: e.height ? `${e.height}px` : "" })
|
|
4896
4896
|
}, [
|
|
4897
|
-
|
|
4897
|
+
W("textarea", {
|
|
4898
4898
|
ref_key: "codeRef",
|
|
4899
4899
|
ref: a
|
|
4900
4900
|
}, null, 512)
|
|
4901
4901
|
], 4));
|
|
4902
4902
|
}
|
|
4903
|
-
}),
|
|
4903
|
+
}), ya = Z(ha), ba = /* @__PURE__ */ G({
|
|
4904
4904
|
__name: "slider-captcha-action",
|
|
4905
4905
|
props: {
|
|
4906
4906
|
actionStyle: {},
|
|
@@ -4908,7 +4908,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4908
4908
|
toLeft: { type: Boolean }
|
|
4909
4909
|
},
|
|
4910
4910
|
setup(e, { expose: l }) {
|
|
4911
|
-
const o = e, t = Me("actionRef"), n = j("0"), a =
|
|
4911
|
+
const o = e, t = Me("actionRef"), n = j("0"), a = z(() => {
|
|
4912
4912
|
const { actionStyle: u, toLeft: v } = o;
|
|
4913
4913
|
return {
|
|
4914
4914
|
...u,
|
|
@@ -4917,7 +4917,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4917
4917
|
borderRadius: s.value ? "6px" : void 0,
|
|
4918
4918
|
transition: v ? "all 300ms cubic-bezier(0.4, 0, 0.2, 1)" : void 0
|
|
4919
4919
|
};
|
|
4920
|
-
}), s =
|
|
4920
|
+
}), s = z(() => Number.parseInt(n.value) > 10 && !o.isPassing);
|
|
4921
4921
|
return l({
|
|
4922
4922
|
getEl: () => t.value,
|
|
4923
4923
|
getStyle: () => t?.value?.style,
|
|
@@ -4926,10 +4926,10 @@ const nl = /* @__PURE__ */ K({
|
|
|
4926
4926
|
}
|
|
4927
4927
|
}), (u, v) => {
|
|
4928
4928
|
const d = F("j-icon");
|
|
4929
|
-
return i(),
|
|
4929
|
+
return i(), T("div", {
|
|
4930
4930
|
ref_key: "actionRef",
|
|
4931
4931
|
ref: t,
|
|
4932
|
-
style:
|
|
4932
|
+
style: re(a.value),
|
|
4933
4933
|
class: "j-slider-captcha-action",
|
|
4934
4934
|
name: "captcha-action"
|
|
4935
4935
|
}, [
|
|
@@ -4947,14 +4947,14 @@ const nl = /* @__PURE__ */ K({
|
|
|
4947
4947
|
], 4);
|
|
4948
4948
|
};
|
|
4949
4949
|
}
|
|
4950
|
-
}),
|
|
4950
|
+
}), wa = /* @__PURE__ */ G({
|
|
4951
4951
|
__name: "slider-captcha-bar",
|
|
4952
4952
|
props: {
|
|
4953
4953
|
barStyle: {},
|
|
4954
4954
|
toLeft: { type: Boolean }
|
|
4955
4955
|
},
|
|
4956
4956
|
setup(e, { expose: l }) {
|
|
4957
|
-
const o = e, t = Me("barRef"), n = j("0"), a =
|
|
4957
|
+
const o = e, t = Me("barRef"), n = j("0"), a = z(() => {
|
|
4958
4958
|
const { barStyle: s, toLeft: u } = o;
|
|
4959
4959
|
return {
|
|
4960
4960
|
...s,
|
|
@@ -4970,13 +4970,13 @@ const nl = /* @__PURE__ */ K({
|
|
|
4970
4970
|
setWidth: (s) => {
|
|
4971
4971
|
n.value = s;
|
|
4972
4972
|
}
|
|
4973
|
-
}), (s, u) => (i(),
|
|
4973
|
+
}), (s, u) => (i(), T("div", {
|
|
4974
4974
|
ref_key: "barRef",
|
|
4975
4975
|
ref: t,
|
|
4976
|
-
style:
|
|
4976
|
+
style: re(a.value)
|
|
4977
4977
|
}, null, 4));
|
|
4978
4978
|
}
|
|
4979
|
-
}),
|
|
4979
|
+
}), ka = /* @__PURE__ */ G({
|
|
4980
4980
|
__name: "slider-captcha-content",
|
|
4981
4981
|
props: {
|
|
4982
4982
|
contentStyle: {
|
|
@@ -4999,7 +4999,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
4999
4999
|
}
|
|
5000
5000
|
},
|
|
5001
5001
|
setup(e, { expose: l }) {
|
|
5002
|
-
const o = e, t = Me("contentRef"), n =
|
|
5002
|
+
const o = e, t = Me("contentRef"), n = z(() => {
|
|
5003
5003
|
const { contentStyle: s } = o;
|
|
5004
5004
|
return {
|
|
5005
5005
|
...s,
|
|
@@ -5009,25 +5009,25 @@ const nl = /* @__PURE__ */ K({
|
|
|
5009
5009
|
l({
|
|
5010
5010
|
getEl: () => t.value
|
|
5011
5011
|
});
|
|
5012
|
-
const a =
|
|
5012
|
+
const a = z(() => ({
|
|
5013
5013
|
animation: `shine ${o.animationDuration}s linear ${o.animationIterationCount}`
|
|
5014
5014
|
}));
|
|
5015
|
-
return (s, u) => (i(),
|
|
5015
|
+
return (s, u) => (i(), T("div", {
|
|
5016
5016
|
ref_key: "contentRef",
|
|
5017
5017
|
ref: t,
|
|
5018
|
-
class:
|
|
5019
|
-
style:
|
|
5018
|
+
class: Te([{ success: e.isPassing }, "j-slider-captcha-content"]),
|
|
5019
|
+
style: re(n.value)
|
|
5020
5020
|
}, [
|
|
5021
|
-
|
|
5022
|
-
style:
|
|
5021
|
+
W("div", {
|
|
5022
|
+
style: re(a.value),
|
|
5023
5023
|
class: "j-spine-text"
|
|
5024
|
-
},
|
|
5024
|
+
}, ie(e.isPassing ? "验证成功" : "请按住滑块拖动"), 5)
|
|
5025
5025
|
], 6));
|
|
5026
5026
|
}
|
|
5027
|
-
}),
|
|
5027
|
+
}), Ca = /* @__PURE__ */ G({
|
|
5028
5028
|
name: "JSliderCaptcha",
|
|
5029
5029
|
__name: "slider-captcha",
|
|
5030
|
-
props: /* @__PURE__ */
|
|
5030
|
+
props: /* @__PURE__ */ pt({
|
|
5031
5031
|
class: {},
|
|
5032
5032
|
actionStyle: { default: () => ({}) },
|
|
5033
5033
|
barStyle: { default: () => ({}) },
|
|
@@ -5039,9 +5039,9 @@ const nl = /* @__PURE__ */ K({
|
|
|
5039
5039
|
modelValue: { type: Boolean, default: void 0 },
|
|
5040
5040
|
modelModifiers: {}
|
|
5041
5041
|
}),
|
|
5042
|
-
emits: /* @__PURE__ */
|
|
5042
|
+
emits: /* @__PURE__ */ pt(["end", "move", "start", "success"], ["update:modelValue"]),
|
|
5043
5043
|
setup(e, { emit: l }) {
|
|
5044
|
-
const o = e, t = l, n =
|
|
5044
|
+
const o = e, t = l, n = Tt(e, "modelValue"), a = Ye({
|
|
5045
5045
|
endTime: 0,
|
|
5046
5046
|
isMoving: !1,
|
|
5047
5047
|
isPassing: !1,
|
|
@@ -5053,11 +5053,11 @@ const nl = /* @__PURE__ */ K({
|
|
|
5053
5053
|
() => a.isPassing,
|
|
5054
5054
|
(k) => {
|
|
5055
5055
|
if (k) {
|
|
5056
|
-
const { endTime: C, startTime: E } = a,
|
|
5057
|
-
t("success", { isPassing: k, time:
|
|
5056
|
+
const { endTime: C, startTime: E } = a, Q = (C - E) / 1e3;
|
|
5057
|
+
t("success", { isPassing: k, time: Q.toFixed(1) }), n.value = k;
|
|
5058
5058
|
}
|
|
5059
5059
|
}
|
|
5060
|
-
),
|
|
5060
|
+
), Lt(() => {
|
|
5061
5061
|
a.isPassing = !!n.value;
|
|
5062
5062
|
});
|
|
5063
5063
|
function m(k) {
|
|
@@ -5067,30 +5067,30 @@ const nl = /* @__PURE__ */ K({
|
|
|
5067
5067
|
a.isPassing || d.value && (t("start", k), a.moveDistance = m(k) - Number.parseInt(d.value.getStyle().left.replace("px", "") || "0", 10), a.startTime = Date.now(), a.isMoving = !0);
|
|
5068
5068
|
}
|
|
5069
5069
|
function p(k) {
|
|
5070
|
-
const C = s.value?.offsetWidth ?? 220, E = k?.offsetWidth ?? 40,
|
|
5071
|
-
return { actionWidth: E, offset:
|
|
5070
|
+
const C = s.value?.offsetWidth ?? 220, E = k?.offsetWidth ?? 40, Q = C - E - 6;
|
|
5071
|
+
return { actionWidth: E, offset: Q, wrapperWidth: C };
|
|
5072
5072
|
}
|
|
5073
5073
|
function h(k) {
|
|
5074
5074
|
const { isMoving: C, moveDistance: E } = a;
|
|
5075
5075
|
if (C) {
|
|
5076
|
-
const
|
|
5077
|
-
if (!
|
|
5078
|
-
const { actionWidth: f, offset: B, wrapperWidth: O } = p(
|
|
5076
|
+
const Q = U(d), Y = U(u);
|
|
5077
|
+
if (!Q || !Y) return;
|
|
5078
|
+
const { actionWidth: f, offset: B, wrapperWidth: O } = p(Q.getEl()), I = m(k) - E;
|
|
5079
5079
|
t("move", {
|
|
5080
5080
|
event: k,
|
|
5081
5081
|
moveDistance: E,
|
|
5082
5082
|
moveX: I
|
|
5083
|
-
}), I > 0 && I <= B ? (
|
|
5083
|
+
}), I > 0 && I <= B ? (Q.setLeft(`${I}px`), Y.setWidth(`${I + f / 2}px`)) : I > B && (Q.setLeft(`${O - f}px`), Y.setWidth(`${O - f / 2}px`), g());
|
|
5084
5084
|
}
|
|
5085
5085
|
}
|
|
5086
5086
|
function c(k) {
|
|
5087
|
-
const { isMoving: C, isPassing: E, moveDistance:
|
|
5087
|
+
const { isMoving: C, isPassing: E, moveDistance: Q } = a;
|
|
5088
5088
|
if (C && !E) {
|
|
5089
5089
|
t("end", k);
|
|
5090
|
-
const Y = d.value, f =
|
|
5090
|
+
const Y = d.value, f = U(u);
|
|
5091
5091
|
if (!Y || !f) return;
|
|
5092
|
-
const B = m(k) -
|
|
5093
|
-
B < I ? y() : (Y.setLeft(`${
|
|
5092
|
+
const B = m(k) - Q, { actionWidth: O, offset: I, wrapperWidth: ee } = p(Y.getEl());
|
|
5093
|
+
B < I ? y() : (Y.setLeft(`${ee - O}px`), f.setWidth(`${ee - O / 2}px`), g()), a.isMoving = !1;
|
|
5094
5094
|
}
|
|
5095
5095
|
}
|
|
5096
5096
|
function g() {
|
|
@@ -5098,35 +5098,35 @@ const nl = /* @__PURE__ */ K({
|
|
|
5098
5098
|
}
|
|
5099
5099
|
function y() {
|
|
5100
5100
|
a.isMoving = !1, a.isPassing = !1, a.moveDistance = 0, a.toLeft = !1, a.startTime = 0, a.endTime = 0;
|
|
5101
|
-
const k =
|
|
5101
|
+
const k = U(d), C = U(u), E = U(v);
|
|
5102
5102
|
!k || !C || !E || (E.getEl().style.width = "100%", a.toLeft = !0, setTimeout(() => {
|
|
5103
5103
|
a.toLeft = !1, k.setLeft("0"), C.setWidth("0");
|
|
5104
5104
|
}, 300));
|
|
5105
5105
|
}
|
|
5106
|
-
return (k, C) => (i(),
|
|
5106
|
+
return (k, C) => (i(), T("div", {
|
|
5107
5107
|
ref_key: "wrapperRef",
|
|
5108
5108
|
ref: s,
|
|
5109
|
-
class:
|
|
5110
|
-
style:
|
|
5109
|
+
class: Te(["j-slider-captcha slider-border", o.class]),
|
|
5110
|
+
style: re([{ "background-color": "var(--j-color-bg)" }, e.wrapperStyle]),
|
|
5111
5111
|
onMouseleave: c,
|
|
5112
5112
|
onMousemove: h,
|
|
5113
5113
|
onMouseup: c,
|
|
5114
5114
|
onTouchend: c,
|
|
5115
5115
|
onTouchmove: h
|
|
5116
5116
|
}, [
|
|
5117
|
-
|
|
5117
|
+
K(wa, {
|
|
5118
5118
|
ref_key: "barRef",
|
|
5119
5119
|
ref: u,
|
|
5120
5120
|
"bar-style": e.barStyle,
|
|
5121
5121
|
"to-left": a.toLeft
|
|
5122
5122
|
}, null, 8, ["bar-style", "to-left"]),
|
|
5123
|
-
|
|
5123
|
+
K(ka, {
|
|
5124
5124
|
ref_key: "contentRef",
|
|
5125
5125
|
ref: v,
|
|
5126
5126
|
"content-style": e.contentStyle,
|
|
5127
5127
|
"is-passing": a.isPassing
|
|
5128
5128
|
}, null, 8, ["content-style", "is-passing"]),
|
|
5129
|
-
|
|
5129
|
+
K(ba, {
|
|
5130
5130
|
ref_key: "actionRef",
|
|
5131
5131
|
ref: d,
|
|
5132
5132
|
"action-style": e.actionStyle,
|
|
@@ -5137,7 +5137,7 @@ const nl = /* @__PURE__ */ K({
|
|
|
5137
5137
|
}, null, 8, ["action-style", "is-passing", "to-left"])
|
|
5138
5138
|
], 38));
|
|
5139
5139
|
}
|
|
5140
|
-
}),
|
|
5140
|
+
}), xa = Z(Ca), ja = /* @__PURE__ */ G({
|
|
5141
5141
|
name: "JComp",
|
|
5142
5142
|
__name: "comp",
|
|
5143
5143
|
props: {
|
|
@@ -5203,21 +5203,21 @@ const nl = /* @__PURE__ */ K({
|
|
|
5203
5203
|
},
|
|
5204
5204
|
emits: ["update:modelValue", "change"],
|
|
5205
5205
|
setup(e, { emit: l }) {
|
|
5206
|
-
const o = e, t = l, { formData: n, onChange: a } =
|
|
5207
|
-
() =>
|
|
5208
|
-
), u =
|
|
5206
|
+
const o = e, t = l, { formData: n, onChange: a } = Ve("jcode_form_provide", {}), s = z(
|
|
5207
|
+
() => mt(d.value) && !o.config?.notInput || o.config?.isInput
|
|
5208
|
+
), u = z({
|
|
5209
5209
|
get() {
|
|
5210
5210
|
return o.row ? o.modelValue : n ? n[o.id] : o.modelValue;
|
|
5211
5211
|
},
|
|
5212
5212
|
set(p) {
|
|
5213
5213
|
o.row ? t("update:modelValue", p) : n ? n[o.id] = p : t("update:modelValue", p);
|
|
5214
5214
|
}
|
|
5215
|
-
}), v =
|
|
5215
|
+
}), v = z(() => He({
|
|
5216
5216
|
config: o.config,
|
|
5217
5217
|
getCompConfig: o.getCompConfig,
|
|
5218
5218
|
formData: n,
|
|
5219
5219
|
row: o.row
|
|
5220
|
-
})), d =
|
|
5220
|
+
})), d = z(() => o.getCompType ? o.getCompType({ config: o.config, formData: n, row: o.row }) : o.type), m = z(() => {
|
|
5221
5221
|
const p = {};
|
|
5222
5222
|
return o.children.forEach((h) => {
|
|
5223
5223
|
h.slot ? (p[h.slot] = p[h.slot] || [], p[h.slot].push(h)) : (p.default = p.default || [], p.default.push(h));
|
|
@@ -5232,19 +5232,19 @@ const nl = /* @__PURE__ */ K({
|
|
|
5232
5232
|
"onUpdate:modelValue": h[0] || (h[0] = (g) => u.value = g),
|
|
5233
5233
|
onChange: r
|
|
5234
5234
|
}), Ue({ _: 2 }, [
|
|
5235
|
-
|
|
5235
|
+
de(m.value, (g, y) => ({
|
|
5236
5236
|
name: y,
|
|
5237
5237
|
fn: L(() => [
|
|
5238
|
-
(i(!0),
|
|
5238
|
+
(i(!0), T(ue, null, de(g, (k) => (i(), w(c, we({
|
|
5239
5239
|
key: k.id
|
|
5240
5240
|
}, { ref_for: !0 }, k), null, 16))), 128))
|
|
5241
5241
|
])
|
|
5242
5242
|
}))
|
|
5243
5243
|
]), 1040, ["modelValue"])) : (i(), w(We(d.value), we({ key: 1 }, v.value, { onChange: r }), Ue({ _: 2 }, [
|
|
5244
|
-
|
|
5244
|
+
de(m.value, (g, y) => ({
|
|
5245
5245
|
name: y,
|
|
5246
5246
|
fn: L(() => [
|
|
5247
|
-
(i(!0),
|
|
5247
|
+
(i(!0), T(ue, null, de(g, (k) => (i(), w(c, we({
|
|
5248
5248
|
key: k.id
|
|
5249
5249
|
}, { ref_for: !0 }, k), null, 16))), 128))
|
|
5250
5250
|
])
|
|
@@ -5252,11 +5252,11 @@ const nl = /* @__PURE__ */ K({
|
|
|
5252
5252
|
]), 1040));
|
|
5253
5253
|
};
|
|
5254
5254
|
}
|
|
5255
|
-
}),
|
|
5256
|
-
async function
|
|
5255
|
+
}), Sa = Z(ja), Ba = Ut;
|
|
5256
|
+
async function $a(e, l, o) {
|
|
5257
5257
|
const t = { ...o };
|
|
5258
5258
|
delete t.ruleIndex, delete t.trigger;
|
|
5259
|
-
const n = new
|
|
5259
|
+
const n = new Ba({
|
|
5260
5260
|
[e]: [t]
|
|
5261
5261
|
});
|
|
5262
5262
|
let a = [];
|
|
@@ -5267,7 +5267,7 @@ async function Sa(e, l, o) {
|
|
|
5267
5267
|
}
|
|
5268
5268
|
return a.length > 0 ? a[0] : "";
|
|
5269
5269
|
}
|
|
5270
|
-
async function
|
|
5270
|
+
async function za(e, l, o) {
|
|
5271
5271
|
const t = o.map((n, a) => ({
|
|
5272
5272
|
...n,
|
|
5273
5273
|
ruleIndex: a
|
|
@@ -5275,12 +5275,12 @@ async function Ba(e, l, o) {
|
|
|
5275
5275
|
for (let n = 0; n < t.length; n += 1) {
|
|
5276
5276
|
const a = t[n];
|
|
5277
5277
|
"pattern" in a && (l += "");
|
|
5278
|
-
const s = await
|
|
5278
|
+
const s = await $a(e, l, a);
|
|
5279
5279
|
if (s !== "")
|
|
5280
5280
|
return { name: e, errors: s };
|
|
5281
5281
|
}
|
|
5282
5282
|
}
|
|
5283
|
-
function
|
|
5283
|
+
function Va(e, l) {
|
|
5284
5284
|
const o = (a, s, u, v, d) => {
|
|
5285
5285
|
Object.keys(s).forEach((m) => {
|
|
5286
5286
|
let r = m;
|
|
@@ -5299,10 +5299,10 @@ function $a(e, l) {
|
|
|
5299
5299
|
o(a, g, c, p, u ? s : void 0);
|
|
5300
5300
|
});
|
|
5301
5301
|
});
|
|
5302
|
-
}, t = (a, s, u) =>
|
|
5302
|
+
}, t = (a, s, u) => za(a, s, u);
|
|
5303
5303
|
return {
|
|
5304
5304
|
validateForm: async () => {
|
|
5305
|
-
const a =
|
|
5305
|
+
const a = U(e), s = [];
|
|
5306
5306
|
o(s, a, "");
|
|
5307
5307
|
const u = await Promise.all(s), v = {};
|
|
5308
5308
|
return u.forEach((d) => {
|
|
@@ -5312,7 +5312,7 @@ function $a(e, l) {
|
|
|
5312
5312
|
validateField: t
|
|
5313
5313
|
};
|
|
5314
5314
|
}
|
|
5315
|
-
const
|
|
5315
|
+
const Ta = /* @__PURE__ */ G({
|
|
5316
5316
|
name: "JForm",
|
|
5317
5317
|
__name: "form",
|
|
5318
5318
|
props: {
|
|
@@ -5344,7 +5344,7 @@ const za = /* @__PURE__ */ K({
|
|
|
5344
5344
|
},
|
|
5345
5345
|
emits: ["change"],
|
|
5346
5346
|
setup(e, { expose: l, emit: o }) {
|
|
5347
|
-
const t = e, n = o, { useData: a, existField: s, httpGet: u, httpPost: v, success: d, warning: m, error: r, info: p, t: h } =
|
|
5347
|
+
const t = e, n = o, { useData: a, existField: s, httpGet: u, httpPost: v, success: d, warning: m, error: r, info: p, t: h } = Ve(
|
|
5348
5348
|
"jcode_app_form_provide",
|
|
5349
5349
|
{
|
|
5350
5350
|
t: (b) => b
|
|
@@ -5354,26 +5354,26 @@ const za = /* @__PURE__ */ K({
|
|
|
5354
5354
|
a && (c = a());
|
|
5355
5355
|
const g = (b) => {
|
|
5356
5356
|
r && r(b);
|
|
5357
|
-
}, y = j(!1), k =
|
|
5357
|
+
}, y = j(!1), k = z(() => t.config?.gutter || 16), C = z(() => t.config?.span || 24), E = z(() => t.config?.labelWidth), Q = z(() => t.config?.labelPosition || "right"), Y = z(
|
|
5358
5358
|
() => O.length === 1 && (O[0].type === "j-tabs" || O[0].type === "j-layout" || O[0].config?.isAutoWindow)
|
|
5359
|
-
), f = Ye({}), B = j({}), O = [], I = {};
|
|
5360
|
-
let
|
|
5361
|
-
const
|
|
5359
|
+
), f = Ye({}), B = j({}), O = [], I = {}, ee = j({});
|
|
5360
|
+
let $ = {}, se = {}, J = [], A = {};
|
|
5361
|
+
const q = (b) => {
|
|
5362
5362
|
n("change", b);
|
|
5363
|
-
},
|
|
5364
|
-
let
|
|
5365
|
-
const
|
|
5363
|
+
}, H = (b) => mt(I[b]?.type) && !I[b]?.config?.notInput || I[b]?.config?.isInput, ne = (b) => ["j-table", "j-input-rows", "j-input-cards"].includes(I[b]?.type || "");
|
|
5364
|
+
let le;
|
|
5365
|
+
const Be = (b, N) => {
|
|
5366
5366
|
Object.keys(b).forEach((x) => {
|
|
5367
|
-
const
|
|
5368
|
-
|
|
5367
|
+
const V = b[x];
|
|
5368
|
+
N && (x = N + "." + x), V != null && typeof V == "object" && !it(V) && Be(V, x), f[x] = V;
|
|
5369
5369
|
});
|
|
5370
|
-
},
|
|
5370
|
+
}, oe = (b, N) => {
|
|
5371
5371
|
let x = b.id;
|
|
5372
|
-
return x || (b.config?.table && b.config?.field ? x = `${b.config.table}.${b.config.field}` : b.config?.table ? x = b.config?.table : b.config?.field && (x = b.config?.field),
|
|
5373
|
-
},
|
|
5372
|
+
return x || (b.config?.table && b.config?.field ? x = `${b.config.table}.${b.config.field}` : b.config?.table ? x = b.config?.table : b.config?.field && (x = b.config?.field), N && ne(N) && (x = `${N}.${x}`)), x || ft("j");
|
|
5373
|
+
}, he = (b, N, x, V = "") => {
|
|
5374
5374
|
b.forEach((M) => {
|
|
5375
|
-
M.id =
|
|
5376
|
-
const
|
|
5375
|
+
M.id = oe(M, V);
|
|
5376
|
+
const X = {
|
|
5377
5377
|
id: M.id,
|
|
5378
5378
|
slot: M.slot,
|
|
5379
5379
|
type: M.type,
|
|
@@ -5382,205 +5382,205 @@ const za = /* @__PURE__ */ K({
|
|
|
5382
5382
|
config: {},
|
|
5383
5383
|
children: []
|
|
5384
5384
|
};
|
|
5385
|
-
|
|
5386
|
-
const { children:
|
|
5387
|
-
|
|
5388
|
-
let
|
|
5389
|
-
|
|
5390
|
-
const
|
|
5391
|
-
if (
|
|
5392
|
-
!x &&
|
|
5393
|
-
else if (
|
|
5394
|
-
|
|
5395
|
-
else if (
|
|
5396
|
-
!x && !
|
|
5397
|
-
else if (
|
|
5398
|
-
f[M.id] =
|
|
5399
|
-
else if (M.type === "collapse" &&
|
|
5400
|
-
const
|
|
5401
|
-
(
|
|
5402
|
-
|
|
5403
|
-
}), f[M.id] =
|
|
5385
|
+
N.push(X);
|
|
5386
|
+
const { children: ae } = M;
|
|
5387
|
+
ut(X, M, ["children", "config"]), ut(X.config, M.config || {}, []), I[M.id] && console.warn("有重复的组件id:" + M.id), I[M.id] = X, t.readonly === !0 && (X.config.readonly = !0);
|
|
5388
|
+
let me = !1, Ce;
|
|
5389
|
+
V !== "" && ne(V) && (me = !0, X.config = M.config || {}, X.config.parentTableId = V, Ce = I[V]?.config?.table);
|
|
5390
|
+
const ge = X.config || {};
|
|
5391
|
+
if (H(M.id))
|
|
5392
|
+
!x && me === !1 && (ge?.defaultValue === 0 ? f[M.id] = ge?.defaultValue : f[M.id] = ge?.defaultValue || void 0), ge.table && ge.field ? $[`${ge.table}_${ge.field}`.toLowerCase()] = M.id : ge.field && (me ? $[`${Ce}_${ge.field}`.toLowerCase()] = M.id : $[`${ge.field}`.toLowerCase()] = M.id);
|
|
5393
|
+
else if (me && ge.field)
|
|
5394
|
+
$[`${Ce}_${ge.field}`.toLowerCase()] = M.id;
|
|
5395
|
+
else if (ne(M.id))
|
|
5396
|
+
!x && !ge.isSubTable && (f[M.id] = []), ge.table && ($[ge.table.toLowerCase() || ""] = M.id), ge.isSubTable || J.push(X);
|
|
5397
|
+
else if (ge?.defaultValue)
|
|
5398
|
+
f[M.id] = ge?.defaultValue;
|
|
5399
|
+
else if (M.type === "collapse" && ge?.isExpand) {
|
|
5400
|
+
const at = [];
|
|
5401
|
+
(ge?.groups || []).forEach(($t) => {
|
|
5402
|
+
at.push($t.i);
|
|
5403
|
+
}), f[M.id] = at;
|
|
5404
5404
|
}
|
|
5405
|
-
|
|
5405
|
+
ae && ae.length > 0 && he(ae, X.children, x, X.id);
|
|
5406
5406
|
});
|
|
5407
|
-
},
|
|
5407
|
+
}, Ie = async (b, N) => {
|
|
5408
5408
|
y.value = !1;
|
|
5409
|
-
const x = !!
|
|
5410
|
-
O.splice(0, O.length),
|
|
5409
|
+
const x = !!N;
|
|
5410
|
+
O.splice(0, O.length), $ = {}, se = {}, J = [], le = N, _e(f), ee.value = {}, x && Be(N, ""), he(b, O, x), A = et(f), xe(() => {
|
|
5411
5411
|
y.value = !0, xe(() => {
|
|
5412
|
-
|
|
5412
|
+
ot(t.config?.codeInit, {});
|
|
5413
5413
|
});
|
|
5414
5414
|
});
|
|
5415
|
-
},
|
|
5416
|
-
const
|
|
5417
|
-
return
|
|
5418
|
-
const
|
|
5419
|
-
Object.keys(M).forEach((
|
|
5420
|
-
if (!x || x(
|
|
5421
|
-
const
|
|
5422
|
-
if (
|
|
5423
|
-
|
|
5415
|
+
}, Oe = (b, N, x) => {
|
|
5416
|
+
const V = [];
|
|
5417
|
+
return N.forEach((M) => {
|
|
5418
|
+
const X = {};
|
|
5419
|
+
Object.keys(M).forEach((ae) => {
|
|
5420
|
+
if (!x || x(ae, M[ae], b)) {
|
|
5421
|
+
const me = _(ae);
|
|
5422
|
+
if (me?.type === "j-table")
|
|
5423
|
+
X[me?.id || ""] = Oe(ae, M[ae], x);
|
|
5424
5424
|
else {
|
|
5425
|
-
let Ce =
|
|
5426
|
-
Ce = Ce.indexOf(".") !== -1 ? Ce.split(".")[1] : Ce,
|
|
5425
|
+
let Ce = $[`${b}_${ae}`.toLowerCase()] || ae;
|
|
5426
|
+
Ce = Ce.indexOf(".") !== -1 ? Ce.split(".")[1] : Ce, X[Ce] = M[ae];
|
|
5427
5427
|
}
|
|
5428
5428
|
}
|
|
5429
|
-
}),
|
|
5430
|
-
}),
|
|
5431
|
-
},
|
|
5429
|
+
}), V.push(X);
|
|
5430
|
+
}), V;
|
|
5431
|
+
}, R = (b, N) => {
|
|
5432
5432
|
Object.keys(b || {}).forEach((x) => {
|
|
5433
|
-
let
|
|
5434
|
-
const M =
|
|
5433
|
+
let V = b[x];
|
|
5434
|
+
const M = _(x);
|
|
5435
5435
|
if (M === void 0)
|
|
5436
|
-
|
|
5437
|
-
if (!
|
|
5438
|
-
let
|
|
5439
|
-
x !== "main" && (
|
|
5436
|
+
V && (it(V) && (V = V[0] || {}), typeof V == "object" ? Object.keys(V).forEach((X) => {
|
|
5437
|
+
if (!N || N(x, V[X], x)) {
|
|
5438
|
+
let ae = X;
|
|
5439
|
+
x !== "main" && (ae = `${x}_${X}`), se[ae] = x, f[$[ae.toLowerCase()] || X] = V[X];
|
|
5440
5440
|
}
|
|
5441
|
-
}) : f[x] =
|
|
5442
|
-
else if (
|
|
5443
|
-
if (!Array.isArray(
|
|
5441
|
+
}) : f[x] = V);
|
|
5442
|
+
else if (ne(M.id || "")) {
|
|
5443
|
+
if (!Array.isArray(V)) {
|
|
5444
5444
|
console.warn("表格数据不是数组:" + x);
|
|
5445
5445
|
return;
|
|
5446
5446
|
}
|
|
5447
|
-
|
|
5447
|
+
V?.length > 0 ? f[$[x.toLowerCase()] || x] = Oe(x, V, N) : f[$[x.toLowerCase()] || x] = [];
|
|
5448
5448
|
} else
|
|
5449
|
-
(!
|
|
5450
|
-
}),
|
|
5451
|
-
const
|
|
5452
|
-
(
|
|
5449
|
+
(!N || N(x, V, x)) && (f[$[x.toLowerCase()] || x] = V);
|
|
5450
|
+
}), le && Object.keys(f).forEach((x) => {
|
|
5451
|
+
const V = _(x);
|
|
5452
|
+
(V === void 0 || !["tabs", "collapse"].includes(V.type || "")) && Kt(le, x, f[x]);
|
|
5453
5453
|
});
|
|
5454
|
-
},
|
|
5454
|
+
}, be = (b, N = !1) => {
|
|
5455
5455
|
const x = {};
|
|
5456
|
-
return Object.keys(b).forEach((
|
|
5457
|
-
if (
|
|
5458
|
-
const M = I[
|
|
5456
|
+
return Object.keys(b).forEach((V) => {
|
|
5457
|
+
if (V === "parentRow") return;
|
|
5458
|
+
const M = I[V];
|
|
5459
5459
|
if (M) {
|
|
5460
|
-
const
|
|
5461
|
-
if (
|
|
5462
|
-
|
|
5463
|
-
else if (
|
|
5464
|
-
const
|
|
5465
|
-
b[
|
|
5466
|
-
|
|
5467
|
-
}), x[
|
|
5468
|
-
} else
|
|
5469
|
-
} else
|
|
5460
|
+
const X = M.config?.table, ae = M.config?.field;
|
|
5461
|
+
if (N)
|
|
5462
|
+
ae ? x[ae] = b[V] : x[V] = b[V];
|
|
5463
|
+
else if (ne(V)) {
|
|
5464
|
+
const me = [];
|
|
5465
|
+
b[V].forEach((Ce) => {
|
|
5466
|
+
me.push(be(Ce, !0));
|
|
5467
|
+
}), x[X || V] = me;
|
|
5468
|
+
} else X && ae ? (x[X] = x[X] || {}, x[X][ae] = b[V]) : ae && (x[ae] = b[V]);
|
|
5469
|
+
} else N ? V !== "_X_ROW_KEY" && V !== "_isHover" && (x[V] = b[V]) : se[V] ? (x[se[V]] = x[se[V]] || {}, x[se[V]][V.replace(`${se[V]}_`, "")] = b[V]) : x[V] = b[V];
|
|
5470
5470
|
}), x;
|
|
5471
|
-
},
|
|
5471
|
+
}, ve = (b = !0) => b ? be(f) : f, ce = (b, N, x, V) => {
|
|
5472
5472
|
let M = I[b];
|
|
5473
5473
|
if (M == null) {
|
|
5474
|
-
const
|
|
5475
|
-
M = I[
|
|
5474
|
+
const ae = b.split(".");
|
|
5475
|
+
M = I[ae[ae.length - 1]] || {};
|
|
5476
5476
|
}
|
|
5477
5477
|
if (!M)
|
|
5478
5478
|
return {};
|
|
5479
|
-
const
|
|
5479
|
+
const X = He({
|
|
5480
5480
|
config: M.config,
|
|
5481
5481
|
getCompConfig: M.getCompConfig,
|
|
5482
5482
|
formData: f,
|
|
5483
5483
|
tableData: x,
|
|
5484
|
-
row:
|
|
5485
|
-
pRowData:
|
|
5484
|
+
row: N,
|
|
5485
|
+
pRowData: V
|
|
5486
5486
|
});
|
|
5487
|
-
return
|
|
5488
|
-
},
|
|
5489
|
-
const M =
|
|
5487
|
+
return X._componentId = M?.id, X;
|
|
5488
|
+
}, ye = (b, N, x, V) => {
|
|
5489
|
+
const M = ce(b, N, x, V);
|
|
5490
5490
|
if (M.isNotRule !== !0 && M.display !== !1) {
|
|
5491
|
-
const
|
|
5492
|
-
return
|
|
5491
|
+
const X = M.rule || [], ae = X.find((me) => me.type === "only");
|
|
5492
|
+
return ae && (ae.validator = async (me, Ce) => {
|
|
5493
5493
|
if (Ce) {
|
|
5494
|
-
const
|
|
5495
|
-
table:
|
|
5496
|
-
key:
|
|
5497
|
-
keyName:
|
|
5498
|
-
field:
|
|
5499
|
-
keyValue:
|
|
5494
|
+
const ge = {
|
|
5495
|
+
table: me.table,
|
|
5496
|
+
key: me.key,
|
|
5497
|
+
keyName: me.keyName,
|
|
5498
|
+
field: me.field,
|
|
5499
|
+
keyValue: me.getKeyValue ? me.getKeyValue() : "",
|
|
5500
5500
|
value: Ce,
|
|
5501
|
-
paramNames:
|
|
5502
|
-
getParams:
|
|
5503
|
-
withProjectId:
|
|
5504
|
-
getValue:
|
|
5501
|
+
paramNames: me.paramNames,
|
|
5502
|
+
getParams: me.getParams,
|
|
5503
|
+
withProjectId: me.withProjectId,
|
|
5504
|
+
getValue: me.getValue,
|
|
5505
5505
|
formData: f
|
|
5506
5506
|
};
|
|
5507
|
-
if (!await s(
|
|
5508
|
-
throw h(
|
|
5507
|
+
if (!await s(ge))
|
|
5508
|
+
throw h(me.message) || h("数据值重复");
|
|
5509
5509
|
}
|
|
5510
5510
|
}), {
|
|
5511
|
-
rules:
|
|
5512
|
-
myGridtableId:
|
|
5511
|
+
rules: X,
|
|
5512
|
+
myGridtableId: ne(M._componentId) ? M._componentId : ""
|
|
5513
5513
|
};
|
|
5514
5514
|
}
|
|
5515
5515
|
return { rules: [], myGridtableId: "" };
|
|
5516
|
-
}, { validateForm:
|
|
5516
|
+
}, { validateForm: je } = Va(f, ye), S = async () => {
|
|
5517
5517
|
B.value = {};
|
|
5518
|
-
const b = await
|
|
5518
|
+
const b = await je();
|
|
5519
5519
|
return Object.keys(b).length > 0 ? (B.value = b, g(
|
|
5520
5520
|
`${h(I[Object.keys(b)[0]]?.config?.label)}:${h(b[Object.keys(b)[0]].msg)}`
|
|
5521
5521
|
), !1) : !0;
|
|
5522
|
-
},
|
|
5523
|
-
B.value = {},
|
|
5524
|
-
f[b] =
|
|
5522
|
+
}, P = () => {
|
|
5523
|
+
B.value = {}, _e(f), Object.keys(A || {}).forEach((b) => {
|
|
5524
|
+
f[b] = A[b];
|
|
5525
5525
|
});
|
|
5526
|
-
},
|
|
5527
|
-
let
|
|
5528
|
-
return
|
|
5529
|
-
},
|
|
5530
|
-
if (
|
|
5526
|
+
}, _ = (b) => {
|
|
5527
|
+
let N = I[b];
|
|
5528
|
+
return N === void 0 && $[b.toLowerCase()] && (N = I[$[b.toLowerCase()]]), N;
|
|
5529
|
+
}, pe = ({ id: b, i: N, value: x, type: V }) => {
|
|
5530
|
+
if (V === "add")
|
|
5531
5531
|
f[b].push(x);
|
|
5532
|
-
else if (
|
|
5533
|
-
f[b].splice(
|
|
5532
|
+
else if (V === "delete")
|
|
5533
|
+
f[b].splice(N, 1);
|
|
5534
5534
|
else {
|
|
5535
|
-
const M =
|
|
5536
|
-
M && (M.config.parentTableId ? f[M.config.parentTableId][
|
|
5535
|
+
const M = _(b);
|
|
5536
|
+
M && (M.config.parentTableId ? f[M.config.parentTableId][N][b] = x : f[b] = x);
|
|
5537
5537
|
}
|
|
5538
|
-
},
|
|
5539
|
-
const x =
|
|
5538
|
+
}, $e = ({ id: b, i: N }) => {
|
|
5539
|
+
const x = _(b);
|
|
5540
5540
|
if (x) {
|
|
5541
5541
|
if (x.config.parentTableId) {
|
|
5542
|
-
const
|
|
5543
|
-
if (
|
|
5544
|
-
return (
|
|
5545
|
-
const
|
|
5546
|
-
return
|
|
5547
|
-
|
|
5548
|
-
}),
|
|
5542
|
+
const V = f[x.config.parentTableId], M = x.id ? x.id.replace(`${x.config.parentTableId}.`, "") : "";
|
|
5543
|
+
if (N != null)
|
|
5544
|
+
return (V[N] || {})[M || ""];
|
|
5545
|
+
const X = [];
|
|
5546
|
+
return V && V.forEach((ae) => {
|
|
5547
|
+
X.push(ae[M || ""]);
|
|
5548
|
+
}), X;
|
|
5549
5549
|
}
|
|
5550
|
-
if (
|
|
5551
|
-
const
|
|
5550
|
+
if (ne(x.id || "")) {
|
|
5551
|
+
const V = [];
|
|
5552
5552
|
return f[x.id || ""].forEach((M) => {
|
|
5553
|
-
|
|
5554
|
-
}),
|
|
5553
|
+
V.push(be(M, !0));
|
|
5554
|
+
}), V;
|
|
5555
5555
|
}
|
|
5556
5556
|
return f[x.id || ""];
|
|
5557
5557
|
}
|
|
5558
5558
|
if (f[b])
|
|
5559
5559
|
return f[b];
|
|
5560
|
-
},
|
|
5561
|
-
const x =
|
|
5562
|
-
if (
|
|
5563
|
-
if (
|
|
5564
|
-
const M = x[
|
|
5560
|
+
}, Le = async ({ id: b, i: N }) => {
|
|
5561
|
+
const x = $e({ id: b, i: N }), V = _(b);
|
|
5562
|
+
if (V && c?.getLabel)
|
|
5563
|
+
if (N !== void 0) {
|
|
5564
|
+
const M = x[N], X = f[V.config.parentTableId || ""][N], ae = He({
|
|
5565
5565
|
config: t.config,
|
|
5566
|
-
getCompConfig:
|
|
5566
|
+
getCompConfig: V.getCompConfig,
|
|
5567
5567
|
formData: f,
|
|
5568
5568
|
// @ts-expect-error clone类型推断不完整,此处可安全传递
|
|
5569
|
-
tableData: f[
|
|
5570
|
-
row:
|
|
5569
|
+
tableData: f[V.config.parentTableId || ""],
|
|
5570
|
+
row: X
|
|
5571
5571
|
});
|
|
5572
5572
|
return await c?.getLabel({
|
|
5573
5573
|
value: M,
|
|
5574
|
-
config:
|
|
5574
|
+
config: ae,
|
|
5575
5575
|
formData: f,
|
|
5576
5576
|
// @ts-expect-error clone类型推断不完整,此处可安全传递
|
|
5577
|
-
tableData: f[
|
|
5578
|
-
row:
|
|
5577
|
+
tableData: f[V.config.parentTableId || ""],
|
|
5578
|
+
row: X
|
|
5579
5579
|
});
|
|
5580
5580
|
} else {
|
|
5581
5581
|
const M = He({
|
|
5582
5582
|
config: t.config,
|
|
5583
|
-
getCompConfig:
|
|
5583
|
+
getCompConfig: V.getCompConfig,
|
|
5584
5584
|
formData: f
|
|
5585
5585
|
});
|
|
5586
5586
|
return await c?.getLabel({
|
|
@@ -5590,85 +5590,88 @@ const za = /* @__PURE__ */ K({
|
|
|
5590
5590
|
});
|
|
5591
5591
|
}
|
|
5592
5592
|
return x;
|
|
5593
|
-
},
|
|
5593
|
+
}, fe = async (b, N) => c?.loadViewDataList ? await c?.loadViewDataList(b, N, !1) : [], lt = (b) => (b.set = pe, b.get = $e, b.setFormData = R, b.getFormData = ve, b.getLabel = Le, b.getViewData = fe, b.getDateNow = (N) => ll(/* @__PURE__ */ new Date(), N || "YYYY-MM-DD HH:mm:ss"), b.httpGet = u || (() => {
|
|
5594
5594
|
console.log("当前状态不支持");
|
|
5595
5595
|
}), b.httpPost = v || (() => {
|
|
5596
5596
|
console.log("当前状态不支持");
|
|
5597
|
-
}), b.loading = (
|
|
5598
|
-
Pe(
|
|
5599
|
-
}, b.showMsg = ({ text:
|
|
5597
|
+
}), b.loading = (N) => {
|
|
5598
|
+
Pe(N);
|
|
5599
|
+
}, b.showMsg = ({ text: N, type: x }) => {
|
|
5600
5600
|
switch (x) {
|
|
5601
5601
|
case "success":
|
|
5602
|
-
d && d(
|
|
5602
|
+
d && d(N);
|
|
5603
5603
|
break;
|
|
5604
5604
|
case "warning":
|
|
5605
|
-
m && m(
|
|
5605
|
+
m && m(N);
|
|
5606
5606
|
break;
|
|
5607
5607
|
case "error":
|
|
5608
|
-
r && r(
|
|
5608
|
+
r && r(N);
|
|
5609
5609
|
break;
|
|
5610
5610
|
case "info":
|
|
5611
|
-
p && p(
|
|
5611
|
+
p && p(N);
|
|
5612
5612
|
break;
|
|
5613
5613
|
default:
|
|
5614
|
-
p && p(
|
|
5614
|
+
p && p(N);
|
|
5615
5615
|
break;
|
|
5616
5616
|
}
|
|
5617
|
-
console.log("showMsg",
|
|
5618
|
-
}, b),
|
|
5617
|
+
console.log("showMsg", N, x);
|
|
5618
|
+
}, b), ot = async (b, N) => {
|
|
5619
5619
|
if (b && b.trim()) {
|
|
5620
5620
|
b = `async (jcode) => {${b}}`;
|
|
5621
|
-
const { res: x, fn:
|
|
5622
|
-
x && await
|
|
5621
|
+
const { res: x, fn: V } = Bt(b);
|
|
5622
|
+
x && await V(lt(N));
|
|
5623
5623
|
}
|
|
5624
|
+
}, qe = (b, N) => {
|
|
5625
|
+
ee.value[b] = { ...ee.value[b] || {}, ...N };
|
|
5624
5626
|
};
|
|
5625
|
-
return t.schema &&
|
|
5627
|
+
return t.schema && Ie(t.schema), dt("jcode_form_provide", {
|
|
5626
5628
|
formData: f,
|
|
5627
5629
|
errorFields: B,
|
|
5628
5630
|
isAutoWindow: Y,
|
|
5629
5631
|
gutter: k,
|
|
5630
5632
|
span: C,
|
|
5631
5633
|
labelWidth: E,
|
|
5632
|
-
onChange:
|
|
5634
|
+
onChange: q
|
|
5633
5635
|
}), l({
|
|
5634
|
-
init:
|
|
5635
|
-
reset:
|
|
5636
|
-
validate:
|
|
5637
|
-
setValue:
|
|
5638
|
-
getValue:
|
|
5639
|
-
getLabel:
|
|
5640
|
-
setFormData:
|
|
5641
|
-
getFormData:
|
|
5642
|
-
|
|
5643
|
-
|
|
5636
|
+
init: Ie,
|
|
5637
|
+
reset: P,
|
|
5638
|
+
validate: S,
|
|
5639
|
+
setValue: pe,
|
|
5640
|
+
getValue: $e,
|
|
5641
|
+
getLabel: Le,
|
|
5642
|
+
setFormData: R,
|
|
5643
|
+
getFormData: ve,
|
|
5644
|
+
setCompConfig: qe
|
|
5645
|
+
}), (b, N) => {
|
|
5646
|
+
const x = F("j-form-item"), V = F("el-row"), M = F("el-form");
|
|
5644
5647
|
return y.value ? (i(), w(M, {
|
|
5645
5648
|
key: 0,
|
|
5646
|
-
class:
|
|
5647
|
-
"label-position":
|
|
5649
|
+
class: Te([{ "j-block": e.isAutoSize }, "j-form"]),
|
|
5650
|
+
"label-position": Q.value,
|
|
5648
5651
|
"label-width": E.value,
|
|
5649
5652
|
size: e.config?.size,
|
|
5650
|
-
onSubmit:
|
|
5653
|
+
onSubmit: N[0] || (N[0] = ze(() => {
|
|
5651
5654
|
}, ["prevent"]))
|
|
5652
5655
|
}, {
|
|
5653
5656
|
default: L(() => [
|
|
5654
|
-
Y.value ? (i(), w(x,
|
|
5657
|
+
Y.value ? (i(), w(x, Ft(we({ key: 0 }, O[0])), null, 16)) : (i(), w(V, {
|
|
5655
5658
|
key: 1,
|
|
5656
5659
|
gutter: k.value
|
|
5657
5660
|
}, {
|
|
5658
5661
|
default: L(() => [
|
|
5659
|
-
(i(),
|
|
5660
|
-
key:
|
|
5662
|
+
(i(), T(ue, null, de(O, (X) => K(x, we({
|
|
5663
|
+
key: X.id,
|
|
5661
5664
|
ref_for: !0
|
|
5662
|
-
},
|
|
5665
|
+
}, X), null, 16)), 64))
|
|
5663
5666
|
]),
|
|
5664
5667
|
_: 1
|
|
5665
5668
|
}, 8, ["gutter"]))
|
|
5666
5669
|
]),
|
|
5667
5670
|
_: 1
|
|
5668
|
-
}, 8, ["class", "label-position", "label-width", "size"])) :
|
|
5671
|
+
}, 8, ["class", "label-position", "label-width", "size"])) : D("", !0);
|
|
5669
5672
|
};
|
|
5670
5673
|
}
|
|
5671
|
-
}),
|
|
5674
|
+
}), La = Z(Ta), Fa = /* @__PURE__ */ G({
|
|
5672
5675
|
name: "JFormItem",
|
|
5673
5676
|
__name: "form-item",
|
|
5674
5677
|
props: {
|
|
@@ -5717,40 +5720,40 @@ const za = /* @__PURE__ */ K({
|
|
|
5717
5720
|
}
|
|
5718
5721
|
},
|
|
5719
5722
|
setup(e) {
|
|
5720
|
-
const l = e, { formData: o, errorFields: t, isAutoWindow: n, span: a, labelWidth: s } =
|
|
5723
|
+
const l = e, { formData: o, errorFields: t, isAutoWindow: n, span: a, labelWidth: s } = Ve(
|
|
5721
5724
|
"jcode_form_provide",
|
|
5722
5725
|
{}
|
|
5723
|
-
), { t: u } =
|
|
5726
|
+
), { t: u } = Ve("jcode_app_provide", {
|
|
5724
5727
|
t: (c) => c
|
|
5725
|
-
}), v =
|
|
5728
|
+
}), v = z(() => He({
|
|
5726
5729
|
config: l.config,
|
|
5727
5730
|
getCompConfig: l.getCompConfig,
|
|
5728
5731
|
formData: o
|
|
5729
|
-
})), d =
|
|
5732
|
+
})), d = z(() => l.getCompType ? l.getCompType({ config: l.config, formData: o }) : l.type), m = z(() => mt(d.value) && !v.value?.notInput || v.value?.isInput), r = z(() => v.value?.labelWidth || s.value), p = z(() => (v.value?.rule || []).some((g) => g.required === !0)), h = z(() => {
|
|
5730
5733
|
const c = t.value[l.id];
|
|
5731
5734
|
return c ? c.msg : "";
|
|
5732
5735
|
});
|
|
5733
5736
|
return (c, g) => {
|
|
5734
5737
|
const y = F("j-comp"), k = F("el-form-item"), C = F("el-col");
|
|
5735
|
-
return v.value.display !== !1 && !
|
|
5738
|
+
return v.value.display !== !1 && !U(n) ? (i(), w(C, {
|
|
5736
5739
|
key: 0,
|
|
5737
|
-
span: v.value.span ||
|
|
5738
|
-
style:
|
|
5740
|
+
span: v.value.span || U(a),
|
|
5741
|
+
style: re({
|
|
5739
5742
|
...v.value.colStyle || {}
|
|
5740
5743
|
}),
|
|
5741
|
-
class:
|
|
5744
|
+
class: Te(v.value.colClass || {})
|
|
5742
5745
|
}, {
|
|
5743
5746
|
default: L(() => [
|
|
5744
5747
|
m.value ? (i(), w(k, {
|
|
5745
5748
|
key: 0,
|
|
5746
|
-
label:
|
|
5749
|
+
label: U(u)(v.value.notShowLabel ? "" : v.value.label || ""),
|
|
5747
5750
|
"label-position": v.value.labelPosition,
|
|
5748
5751
|
"label-width": r.value,
|
|
5749
5752
|
required: p.value,
|
|
5750
|
-
error:
|
|
5753
|
+
error: U(u)(h.value)
|
|
5751
5754
|
}, {
|
|
5752
5755
|
default: L(() => [
|
|
5753
|
-
|
|
5756
|
+
K(y, {
|
|
5754
5757
|
id: e.id,
|
|
5755
5758
|
type: d.value,
|
|
5756
5759
|
config: v.value,
|
|
@@ -5773,10 +5776,10 @@ const za = /* @__PURE__ */ K({
|
|
|
5773
5776
|
type: d.value,
|
|
5774
5777
|
config: v.value,
|
|
5775
5778
|
children: e.children
|
|
5776
|
-
}, null, 8, ["id", "type", "config", "children"])) :
|
|
5779
|
+
}, null, 8, ["id", "type", "config", "children"])) : D("", !0);
|
|
5777
5780
|
};
|
|
5778
5781
|
}
|
|
5779
|
-
}),
|
|
5782
|
+
}), Ia = Z(Fa), Oa = { class: "j-page" }, Ma = /* @__PURE__ */ G({
|
|
5780
5783
|
name: "JPage",
|
|
5781
5784
|
__name: "page",
|
|
5782
5785
|
props: {
|
|
@@ -5805,7 +5808,7 @@ const za = /* @__PURE__ */ K({
|
|
|
5805
5808
|
setup(e) {
|
|
5806
5809
|
const l = e, o = j(!1), t = [], n = {}, a = Ye({}), s = (v, d) => {
|
|
5807
5810
|
v.forEach((m) => {
|
|
5808
|
-
m.id = m.id ||
|
|
5811
|
+
m.id = m.id || ft("c");
|
|
5809
5812
|
const r = {
|
|
5810
5813
|
id: m.id,
|
|
5811
5814
|
slot: m.slot,
|
|
@@ -5813,17 +5816,17 @@ const za = /* @__PURE__ */ K({
|
|
|
5813
5816
|
config: {},
|
|
5814
5817
|
children: []
|
|
5815
5818
|
}, { children: p } = m;
|
|
5816
|
-
n[m.id] = r,
|
|
5819
|
+
n[m.id] = r, ut(r.config, m.config || {}, ["defaultValue"]), m?.config?.defaultValue !== void 0 && (a.value[m.id] = m.config.defaultValue), d.push(r), p && p.length > 0 && s(p, r.children);
|
|
5817
5820
|
});
|
|
5818
5821
|
}, u = (v) => {
|
|
5819
|
-
o.value = !1, t.splice(0, t.length),
|
|
5822
|
+
o.value = !1, t.splice(0, t.length), _e(n), _e(a), s(v, t), xe(() => {
|
|
5820
5823
|
o.value = !0;
|
|
5821
5824
|
});
|
|
5822
5825
|
};
|
|
5823
5826
|
return l.schema && u(l.schema), (v, d) => {
|
|
5824
5827
|
const m = F("j-comp");
|
|
5825
|
-
return i(),
|
|
5826
|
-
(i(),
|
|
5828
|
+
return i(), T("div", Oa, [
|
|
5829
|
+
(i(), T(ue, null, de(t, (r) => K(m, {
|
|
5827
5830
|
key: r.id,
|
|
5828
5831
|
id: r.id,
|
|
5829
5832
|
type: r.type,
|
|
@@ -5833,7 +5836,7 @@ const za = /* @__PURE__ */ K({
|
|
|
5833
5836
|
]);
|
|
5834
5837
|
};
|
|
5835
5838
|
}
|
|
5836
|
-
}),
|
|
5839
|
+
}), Da = Z(Ma), Aa = /* @__PURE__ */ G({
|
|
5837
5840
|
name: "JGuid",
|
|
5838
5841
|
__name: "guid",
|
|
5839
5842
|
props: {
|
|
@@ -5846,7 +5849,7 @@ const za = /* @__PURE__ */ K({
|
|
|
5846
5849
|
return ke(
|
|
5847
5850
|
() => o.modelValue,
|
|
5848
5851
|
(a) => {
|
|
5849
|
-
a ? n.value = a : (n.value =
|
|
5852
|
+
a ? n.value = a : (n.value = Gt(), t("update:modelValue", n.value));
|
|
5850
5853
|
},
|
|
5851
5854
|
{ immediate: !0 }
|
|
5852
5855
|
), (a, s) => {
|
|
@@ -5859,119 +5862,119 @@ const za = /* @__PURE__ */ K({
|
|
|
5859
5862
|
}, null, 8, ["modelValue", "size"]);
|
|
5860
5863
|
};
|
|
5861
5864
|
}
|
|
5862
|
-
}),
|
|
5863
|
-
|
|
5864
|
-
sl,
|
|
5865
|
+
}), Na = Z(Aa), Ra = [
|
|
5866
|
+
Xt,
|
|
5865
5867
|
ul,
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5868
|
+
cl,
|
|
5869
|
+
dl,
|
|
5870
|
+
pl,
|
|
5869
5871
|
bl,
|
|
5870
5872
|
kl,
|
|
5871
5873
|
xl,
|
|
5872
5874
|
Sl,
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5875
|
+
$l,
|
|
5876
|
+
Ol,
|
|
5877
|
+
Al,
|
|
5878
|
+
Wl,
|
|
5879
|
+
_l,
|
|
5878
5880
|
ro,
|
|
5879
5881
|
fo,
|
|
5880
5882
|
po,
|
|
5881
5883
|
go,
|
|
5882
5884
|
yo,
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
ga,
|
|
5885
|
+
wo,
|
|
5886
|
+
No,
|
|
5887
|
+
Uo,
|
|
5887
5888
|
Ho,
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5889
|
+
ya,
|
|
5890
|
+
Xo,
|
|
5891
|
+
Ko,
|
|
5892
|
+
oa,
|
|
5893
|
+
sa,
|
|
5892
5894
|
ca,
|
|
5893
5895
|
fa,
|
|
5894
5896
|
pa,
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
+
ga,
|
|
5898
|
+
Sa,
|
|
5897
5899
|
La,
|
|
5898
|
-
|
|
5900
|
+
Ia,
|
|
5899
5901
|
Da,
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5902
|
+
Na,
|
|
5903
|
+
xa
|
|
5904
|
+
], Ea = (e) => {
|
|
5905
|
+
Ra.forEach((l) => {
|
|
5903
5906
|
e.component(l.name, l);
|
|
5904
5907
|
});
|
|
5905
|
-
},
|
|
5906
|
-
install:
|
|
5908
|
+
}, cn = {
|
|
5909
|
+
install: Ea
|
|
5907
5910
|
};
|
|
5908
5911
|
export {
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5912
|
+
nl as EncryptionFactory,
|
|
5913
|
+
un as HashingFactory,
|
|
5914
|
+
$l as JAutoComplete,
|
|
5915
|
+
Ho as JBarcode,
|
|
5916
|
+
Xt as JButton,
|
|
5917
|
+
ul as JButtons,
|
|
5918
|
+
kl as JCascaderSelect,
|
|
5919
|
+
xl as JCheckbox,
|
|
5920
|
+
ya as JCodeMirror,
|
|
5921
|
+
Sa as JComp,
|
|
5922
|
+
Xo as JCount,
|
|
5923
|
+
Ko as JCountUp,
|
|
5924
|
+
oa as JDataPanel,
|
|
5925
|
+
Wl as JDialog,
|
|
5926
|
+
_l as JDialogFull,
|
|
5927
|
+
sa as JDivider,
|
|
5928
|
+
ro as JDrawer,
|
|
5929
|
+
po as JDynamicLayer,
|
|
5930
|
+
Uo as JEcharts,
|
|
5931
|
+
La as JForm,
|
|
5932
|
+
Ia as JFormItem,
|
|
5933
|
+
Na as JGuid,
|
|
5934
|
+
ca as JHpanel,
|
|
5935
|
+
dl as JIcon,
|
|
5936
|
+
cl as JInput,
|
|
5937
|
+
fa as JInputButton,
|
|
5938
|
+
pa as JInputCode,
|
|
5939
|
+
go as JInputTag,
|
|
5940
|
+
fo as JLayer,
|
|
5941
|
+
Ol as JLayout,
|
|
5942
|
+
Sl as JNumber,
|
|
5943
|
+
Da as JPage,
|
|
5944
|
+
pl as JRadio,
|
|
5945
|
+
yo as JRate,
|
|
5946
|
+
bl as JSelect,
|
|
5947
|
+
wo as JSlider,
|
|
5948
|
+
xa as JSliderCaptcha,
|
|
5949
|
+
Al as JTable,
|
|
5950
|
+
ga as JTitle,
|
|
5951
|
+
No as JUpload,
|
|
5952
|
+
ft as buildShortUUID,
|
|
5953
|
+
Gt as buildUUID,
|
|
5954
|
+
_e as clearJson,
|
|
5955
|
+
ut as clone,
|
|
5956
|
+
et as deepClone,
|
|
5957
|
+
cn as default,
|
|
5958
|
+
Ke as formatToDate,
|
|
5959
|
+
ll as formatToDateTime,
|
|
5957
5960
|
Pe as fullScreenLoading,
|
|
5958
5961
|
He as getCompConfig,
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5962
|
+
Bt as getFunction,
|
|
5963
|
+
mt as getIsInputComp,
|
|
5964
|
+
qt as getObjType,
|
|
5965
|
+
nn as getTextWidth,
|
|
5966
|
+
Wt as is,
|
|
5967
|
+
it as isArray,
|
|
5968
|
+
Fe as isNullOrEmpty,
|
|
5969
|
+
tn as isObject,
|
|
5970
|
+
sn as lowerFirst,
|
|
5971
|
+
rn as myAesDecrypt,
|
|
5972
|
+
Qt as numberToChinese,
|
|
5973
|
+
Zt as numberToThousandSeparator,
|
|
5974
|
+
ln as pagination,
|
|
5975
|
+
on as paginationEx,
|
|
5976
|
+
Kt as set,
|
|
5977
|
+
Ge as toDecimal,
|
|
5978
|
+
an as uniqueArray,
|
|
5979
|
+
_t as upFirst
|
|
5977
5980
|
};
|