@a2simcode/ui 0.0.4 → 0.0.6
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/dialog/index.d.ts +6 -6
- package/dist/components/dialog/src/index.vue.d.ts +2 -2
- package/dist/components/layout/index.d.ts +70 -24
- package/dist/components/layout/src/layout.vue.d.ts +65 -12
- package/dist/simcode-ui.es.js +1452 -1385
- package/dist/simcode-ui.umd.js +1 -1
- package/dist/stats.html +1 -1
- package/package.json +2 -2
- package/dist/components/layout/__tests__/layout.test.d.ts +0 -1
package/dist/simcode-ui.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getIcon as
|
|
1
|
+
import { defineComponent as Z, computed as V, createElementBlock as $, openBlock as n, mergeProps as ke, createVNode as q, unref as E, shallowRef as at, ref as x, watch as Oe, withModifiers as Be, normalizeClass as Me, createBlock as h, createCommentVNode as M, renderSlot as ee, toDisplayString as de, resolveComponent as L, normalizeStyle as ve, withCtx as B, Fragment as te, renderList as se, createSlots as He, createTextVNode as je, createElementVNode as J, useSlots as Ct, reactive as Qe, onMounted as Ze, onUnmounted as nt, onBeforeUnmount as xt, inject as Ve, nextTick as Ce, resolveDynamicComponent as Ue, resolveDirective as it, withDirectives as Re, provide as st, withKeys as jt, vShow as tt, normalizeProps as Bt } from "vue";
|
|
2
|
+
import { getIcon as ct, Icon as dt } from "@iconify/vue";
|
|
3
3
|
import bt from "dayjs";
|
|
4
4
|
import { encrypt as St, decrypt as wt } from "crypto-js/aes";
|
|
5
|
-
import qe, { parse as
|
|
5
|
+
import qe, { parse as ft } from "crypto-js/enc-utf8";
|
|
6
6
|
import $t from "crypto-js/pad-pkcs7";
|
|
7
|
-
import
|
|
7
|
+
import pt from "crypto-js/enc-base64";
|
|
8
8
|
import zt from "crypto-js/md5";
|
|
9
9
|
import Vt from "crypto-js/sha256";
|
|
10
10
|
import Tt from "crypto-js/sha512";
|
|
11
|
-
import * as
|
|
11
|
+
import * as mt from "@visactor/vtable";
|
|
12
12
|
import * as Lt from "echarts";
|
|
13
13
|
import It from "jsbarcode";
|
|
14
14
|
import { format as Ot } from "sql-formatter";
|
|
15
|
-
import
|
|
16
|
-
const
|
|
15
|
+
import Mt from "async-validator";
|
|
16
|
+
const le = (e) => (e.install = (l) => {
|
|
17
17
|
l.component(e.name, e);
|
|
18
18
|
}, e);
|
|
19
|
-
function
|
|
19
|
+
function vt(e) {
|
|
20
20
|
return e && Array.isArray(e);
|
|
21
21
|
}
|
|
22
|
-
const ze = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Array.isArray(e) && e.length === 0 || typeof e == "object" && Object.keys(e).length === 0), Ee = /* @__PURE__ */
|
|
22
|
+
const ze = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Array.isArray(e) && e.length === 0 || typeof e == "object" && Object.keys(e).length === 0), Ee = /* @__PURE__ */ Z({
|
|
23
23
|
name: "JIcon",
|
|
24
24
|
inheritAttrs: !1,
|
|
25
25
|
__name: "icon",
|
|
@@ -31,34 +31,34 @@ const ze = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
31
31
|
isDiv: { type: Boolean, default: !0 }
|
|
32
32
|
},
|
|
33
33
|
setup(e) {
|
|
34
|
-
const l = e, o =
|
|
34
|
+
const l = e, o = V(() => {
|
|
35
35
|
const a = l.icon;
|
|
36
36
|
if (a.indexOf(":") === -1)
|
|
37
|
-
return
|
|
37
|
+
return ct(`jcode:${l.icon}`) == null && console.log(a, "icon"), `jcode:${l.icon}`;
|
|
38
38
|
const s = `jcode:${a.split(":")[1]}`;
|
|
39
|
-
return
|
|
40
|
-
}), t =
|
|
39
|
+
return ct(s) != null ? s : (console.log(a, "icon"), a);
|
|
40
|
+
}), t = V(() => ({
|
|
41
41
|
...l,
|
|
42
42
|
icon: o.value
|
|
43
43
|
}));
|
|
44
|
-
return (a, c) => e.isDiv ? (n(), $("div",
|
|
44
|
+
return (a, c) => e.isDiv ? (n(), $("div", ke({ key: 0 }, a.$attrs, {
|
|
45
45
|
class: "j-icon jicon",
|
|
46
46
|
style: { height: `${e.size}px` }
|
|
47
47
|
}), [
|
|
48
|
-
q(
|
|
48
|
+
q(E(dt), ke(t.value, {
|
|
49
49
|
height: `${e.size}px`,
|
|
50
50
|
width: `${e.size}px`,
|
|
51
51
|
mode: "svg"
|
|
52
52
|
}), null, 16, ["height", "width"])
|
|
53
|
-
], 16)) : (n(), $("span",
|
|
54
|
-
q(
|
|
53
|
+
], 16)) : (n(), $("span", ke({ key: 1 }, a.$attrs, { class: "jicon" }), [
|
|
54
|
+
q(E(dt), ke(t.value, {
|
|
55
55
|
height: `${e.size}px`,
|
|
56
56
|
width: `${e.size}px`,
|
|
57
57
|
mode: "svg"
|
|
58
58
|
}), null, 16, ["height", "width"])
|
|
59
59
|
], 16));
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), Dt = ["disabled"], At = { key: 2 }, Ft = /* @__PURE__ */ Z({
|
|
62
62
|
name: "JButton",
|
|
63
63
|
__name: "button",
|
|
64
64
|
props: {
|
|
@@ -170,35 +170,35 @@ const ze = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
170
170
|
},
|
|
171
171
|
emits: ["click"],
|
|
172
172
|
setup(e, { expose: l, emit: o }) {
|
|
173
|
-
const t = e, a = o, c = (
|
|
174
|
-
!
|
|
175
|
-
}, s =
|
|
173
|
+
const t = e, a = o, c = (p) => {
|
|
174
|
+
!f.value && !t.disabled && (a("click", p), t.href && window.open(t.href, t.target ? t.target : "_self"));
|
|
175
|
+
}, s = at(null), r = () => {
|
|
176
176
|
s.value?.focus();
|
|
177
|
-
},
|
|
177
|
+
}, m = () => {
|
|
178
178
|
s.value?.blur();
|
|
179
|
-
}, d =
|
|
179
|
+
}, d = V(() => t.notLabel || !t.label), f = x(!1);
|
|
180
180
|
Oe(
|
|
181
181
|
() => t.loading,
|
|
182
|
-
(
|
|
183
|
-
if (typeof
|
|
184
|
-
|
|
185
|
-
else if (ze(
|
|
186
|
-
|
|
182
|
+
(p) => {
|
|
183
|
+
if (typeof p == "boolean")
|
|
184
|
+
f.value = p;
|
|
185
|
+
else if (ze(p?.delay))
|
|
186
|
+
f.value = !1;
|
|
187
187
|
else {
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
},
|
|
191
|
-
return () => clearTimeout(
|
|
188
|
+
const b = setTimeout(() => {
|
|
189
|
+
f.value = !0;
|
|
190
|
+
}, p.delay);
|
|
191
|
+
return () => clearTimeout(b);
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
{ immediate: !0 }
|
|
195
195
|
);
|
|
196
|
-
const
|
|
197
|
-
return l({ focus:
|
|
196
|
+
const i = V(() => t.label || "");
|
|
197
|
+
return l({ focus: r, blur: m }), (p, b) => (n(), $("button", {
|
|
198
198
|
ref_key: "buttonNodeRef",
|
|
199
199
|
ref: s,
|
|
200
200
|
type: "button",
|
|
201
|
-
class:
|
|
201
|
+
class: Me([
|
|
202
202
|
"j-button",
|
|
203
203
|
{
|
|
204
204
|
"j-button-primary": e.type == "primary",
|
|
@@ -213,7 +213,7 @@ const ze = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
213
213
|
"j-button-circle": e.shape == "circle",
|
|
214
214
|
"j-button-round": e.shape == "round",
|
|
215
215
|
"j-button-block": e.block == !0,
|
|
216
|
-
"j-button-loading":
|
|
216
|
+
"j-button-loading": f.value == !0,
|
|
217
217
|
"j-button-icon-only": d.value == !0,
|
|
218
218
|
"j-button-compact": e.compact == !0,
|
|
219
219
|
"j-button-last-compact-item": e.lastCompactItem == !0,
|
|
@@ -223,21 +223,21 @@ const ze = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
223
223
|
disabled: e.disabled,
|
|
224
224
|
onClick: Be(c, ["stop"])
|
|
225
225
|
}, [
|
|
226
|
-
|
|
226
|
+
f.value ? (n(), h(Ee, {
|
|
227
227
|
key: 0,
|
|
228
228
|
icon: "mdi-light:loading",
|
|
229
229
|
size: e.size == "large" ? 14 : 12,
|
|
230
230
|
class: "loading-spin j-button-loading-icon"
|
|
231
|
-
}, null, 8, ["size"])) :
|
|
232
|
-
e.icon ? (n(),
|
|
231
|
+
}, null, 8, ["size"])) : M("", !0),
|
|
232
|
+
e.icon ? (n(), h(Ee, {
|
|
233
233
|
key: 1,
|
|
234
234
|
icon: e.icon
|
|
235
|
-
}, null, 8, ["icon"])) :
|
|
236
|
-
e.notLabel ?
|
|
237
|
-
|
|
238
|
-
], 10,
|
|
235
|
+
}, null, 8, ["icon"])) : M("", !0),
|
|
236
|
+
e.notLabel ? M("", !0) : (n(), $("div", At, de(i.value), 1)),
|
|
237
|
+
ee(p.$slots, "iconAfter")
|
|
238
|
+
], 10, Dt));
|
|
239
239
|
}
|
|
240
|
-
}), Nt =
|
|
240
|
+
}), Nt = le(Ft);
|
|
241
241
|
function Ge(e) {
|
|
242
242
|
Object.keys(e || {}).forEach((l) => {
|
|
243
243
|
delete e[l];
|
|
@@ -275,15 +275,15 @@ function Ke(e) {
|
|
|
275
275
|
});
|
|
276
276
|
return o;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function ot(e, l, o = []) {
|
|
279
279
|
Object.keys(l).forEach((t) => {
|
|
280
280
|
o.indexOf(t) === -1 && (e[t] = l[t]);
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
|
-
let
|
|
284
|
-
function
|
|
283
|
+
let lt = 0;
|
|
284
|
+
function ut(e = "") {
|
|
285
285
|
const l = Date.now(), o = Math.floor(Math.random() * 1e9);
|
|
286
|
-
return
|
|
286
|
+
return lt++, e ? e + "_" + o + lt + String(l) : o + lt + String(l);
|
|
287
287
|
}
|
|
288
288
|
const Et = (e) => {
|
|
289
289
|
if (e)
|
|
@@ -304,17 +304,17 @@ function Ut(e, l, o) {
|
|
|
304
304
|
return e;
|
|
305
305
|
let a = e;
|
|
306
306
|
for (let c = 0; c < t.length - 1; c++) {
|
|
307
|
-
const s = t[c],
|
|
308
|
-
(!(s in a) || typeof a[s] != "object" || a[s] === null) && (a[s] = /^\d+$/.test(
|
|
307
|
+
const s = t[c], r = t[c + 1];
|
|
308
|
+
(!(s in a) || typeof a[s] != "object" || a[s] === null) && (a[s] = /^\d+$/.test(r) ? [] : {}), a = a[s];
|
|
309
309
|
}
|
|
310
310
|
return a[t[t.length - 1]] = o, e;
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const Pe = (e) => {
|
|
313
313
|
let l = parseFloat(e);
|
|
314
314
|
return isNaN(l) ? 0 : (l = Math.round(e * 100) / 100, l);
|
|
315
|
-
},
|
|
315
|
+
}, rt = (e) => ["j-input", "j-textarea", "j-select", "j-radio", "j-checkbox", "j-switch", "j-number"].includes(
|
|
316
316
|
e
|
|
317
|
-
) || e.indexOf("j-input") != -1,
|
|
317
|
+
) || e.indexOf("j-input") != -1, We = (e) => {
|
|
318
318
|
const l = e.config || {};
|
|
319
319
|
if (e.getCompConfig) {
|
|
320
320
|
const o = e.getCompConfig({
|
|
@@ -329,14 +329,14 @@ const He = (e) => {
|
|
|
329
329
|
return o;
|
|
330
330
|
}
|
|
331
331
|
return l;
|
|
332
|
-
}, Jt = "YYYY-MM-DD HH:mm:ss",
|
|
333
|
-
function
|
|
332
|
+
}, Jt = "YYYY-MM-DD HH:mm:ss", Wt = "YYYY-MM-DD";
|
|
333
|
+
function Ht(e, l = Jt) {
|
|
334
334
|
return bt(e).format(l);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Ye(e, l = Wt) {
|
|
337
337
|
return bt(e).format(l);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function gt(e) {
|
|
340
340
|
const l = "j-loading-spin", o = document.querySelector(`.${l}`);
|
|
341
341
|
if (e) {
|
|
342
342
|
if (!o) {
|
|
@@ -346,26 +346,26 @@ function vt(e) {
|
|
|
346
346
|
const c = document.createElement("span");
|
|
347
347
|
c.className = "j-loading-spin-dot";
|
|
348
348
|
for (let s = 0; s < 4; s++) {
|
|
349
|
-
const
|
|
350
|
-
c.appendChild(
|
|
349
|
+
const r = document.createElement("i");
|
|
350
|
+
c.appendChild(r);
|
|
351
351
|
}
|
|
352
352
|
a.appendChild(c), t.appendChild(a), document.body.appendChild(t);
|
|
353
353
|
}
|
|
354
354
|
} else
|
|
355
355
|
o && o.parentNode && (document.body.style.overflow = "", o.parentNode.removeChild(o));
|
|
356
356
|
}
|
|
357
|
-
const
|
|
357
|
+
const Pt = /* @__PURE__ */ (() => {
|
|
358
358
|
let e = null, l = 0;
|
|
359
359
|
return (o) => {
|
|
360
|
-
o ? (l++, e && clearTimeout(e),
|
|
361
|
-
|
|
360
|
+
o ? (l++, e && clearTimeout(e), gt(!0), e = null) : (l = Math.max(0, l - 1), l === 0 && (e && clearTimeout(e), e = setTimeout(() => {
|
|
361
|
+
gt(!1), e = null;
|
|
362
362
|
}, 400)));
|
|
363
363
|
};
|
|
364
364
|
})();
|
|
365
365
|
function Je(e) {
|
|
366
|
-
|
|
366
|
+
Pt(e);
|
|
367
367
|
}
|
|
368
|
-
const
|
|
368
|
+
const yt = (e, l = 32) => {
|
|
369
369
|
const { length: o } = e;
|
|
370
370
|
if (o < l) {
|
|
371
371
|
for (let t = 0, a = l - o; t < a; t++)
|
|
@@ -374,11 +374,11 @@ const gt = (e, l = 32) => {
|
|
|
374
374
|
}
|
|
375
375
|
return o > l ? e.substring(0, l) : e;
|
|
376
376
|
};
|
|
377
|
-
class
|
|
377
|
+
class Yt {
|
|
378
378
|
key;
|
|
379
379
|
iv;
|
|
380
380
|
constructor({ key: l, iv: o }) {
|
|
381
|
-
this.key =
|
|
381
|
+
this.key = ft(yt(l)), this.iv = ft(yt(o || "1234567890000000", 16));
|
|
382
382
|
}
|
|
383
383
|
get getOptions() {
|
|
384
384
|
return {
|
|
@@ -393,43 +393,43 @@ class Wt {
|
|
|
393
393
|
return wt(l, this.key, this.getOptions).toString(qe);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
class
|
|
396
|
+
class De {
|
|
397
397
|
static instance;
|
|
398
398
|
constructor() {
|
|
399
399
|
}
|
|
400
400
|
// Get the singleton instance
|
|
401
401
|
// 获取单例实例
|
|
402
402
|
static getInstance() {
|
|
403
|
-
return
|
|
403
|
+
return De.instance || (De.instance = new De()), De.instance;
|
|
404
404
|
}
|
|
405
405
|
encrypt(l) {
|
|
406
|
-
return qe.parse(l).toString(
|
|
406
|
+
return qe.parse(l).toString(pt);
|
|
407
407
|
}
|
|
408
408
|
decrypt(l) {
|
|
409
|
-
return
|
|
409
|
+
return pt.parse(l).toString(qe);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
class
|
|
412
|
+
class Ae {
|
|
413
413
|
static instance;
|
|
414
414
|
constructor() {
|
|
415
415
|
}
|
|
416
416
|
// Get the singleton instance
|
|
417
417
|
// 获取单例实例
|
|
418
418
|
static getInstance() {
|
|
419
|
-
return
|
|
419
|
+
return Ae.instance || (Ae.instance = new Ae()), Ae.instance;
|
|
420
420
|
}
|
|
421
421
|
hash(l) {
|
|
422
422
|
return zt(l).toString();
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
class
|
|
425
|
+
class Fe {
|
|
426
426
|
static instance;
|
|
427
427
|
constructor() {
|
|
428
428
|
}
|
|
429
429
|
// Get the singleton instance
|
|
430
430
|
// 获取单例实例
|
|
431
431
|
static getInstance() {
|
|
432
|
-
return
|
|
432
|
+
return Fe.instance || (Fe.instance = new Fe()), Fe.instance;
|
|
433
433
|
}
|
|
434
434
|
hash(l) {
|
|
435
435
|
return Vt(l).toString();
|
|
@@ -450,18 +450,18 @@ class Ne {
|
|
|
450
450
|
}
|
|
451
451
|
class Xt {
|
|
452
452
|
static createAesEncryption(l) {
|
|
453
|
-
return new
|
|
453
|
+
return new Yt(l);
|
|
454
454
|
}
|
|
455
455
|
static createBase64Encryption() {
|
|
456
|
-
return
|
|
456
|
+
return De.getInstance();
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
class ca {
|
|
460
460
|
static createMD5Hashing() {
|
|
461
|
-
return
|
|
461
|
+
return Ae.getInstance();
|
|
462
462
|
}
|
|
463
463
|
static createSHA256Hashing() {
|
|
464
|
-
return
|
|
464
|
+
return Fe.getInstance();
|
|
465
465
|
}
|
|
466
466
|
static createSHA512Hashing() {
|
|
467
467
|
return Ne.getInstance();
|
|
@@ -495,7 +495,7 @@ function qt(e) {
|
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
|
-
const Gt = /* @__PURE__ */
|
|
498
|
+
const Gt = /* @__PURE__ */ Z({
|
|
499
499
|
name: "JButtons",
|
|
500
500
|
__name: "index",
|
|
501
501
|
props: {
|
|
@@ -532,30 +532,30 @@ const Gt = /* @__PURE__ */ K({
|
|
|
532
532
|
readonly: Boolean
|
|
533
533
|
},
|
|
534
534
|
setup(e) {
|
|
535
|
-
const l = e, o =
|
|
535
|
+
const l = e, o = V(() => {
|
|
536
536
|
if (Object.keys(l.group).length > 0)
|
|
537
537
|
return l.group;
|
|
538
|
-
const c = {}, s = Ke(l.list),
|
|
539
|
-
for (let
|
|
540
|
-
const d = s[
|
|
541
|
-
d.groupId = d.groupId ||
|
|
538
|
+
const c = {}, s = Ke(l.list), r = s.length;
|
|
539
|
+
for (let m = 0; m < r; m++) {
|
|
540
|
+
const d = s[m];
|
|
541
|
+
d.groupId = d.groupId || ut(), c[d.groupId] = c[d.groupId] || [], c[d.groupId].push(d);
|
|
542
542
|
}
|
|
543
543
|
return c;
|
|
544
544
|
}), t = x(), { handleClick: a } = qt(t);
|
|
545
545
|
return (c, s) => {
|
|
546
|
-
const
|
|
547
|
-
return n(),
|
|
548
|
-
style:
|
|
546
|
+
const r = L("j-button"), m = L("el-space"), d = L("el-dropdown"), f = L("j-dynamic-layer");
|
|
547
|
+
return n(), h(m, {
|
|
548
|
+
style: ve({ display: e.readonly ? "none" : "" }),
|
|
549
549
|
size: e.isLink ? 0 : 8
|
|
550
550
|
}, {
|
|
551
551
|
default: B(() => [
|
|
552
|
-
(n(!0), $(
|
|
553
|
-
(n(!0), $(
|
|
554
|
-
|
|
552
|
+
(n(!0), $(te, null, se(o.value, (i, p) => (n(), $("div", ke({ key: p }, { ref_for: !0 }, c.$attrs), [
|
|
553
|
+
(n(!0), $(te, null, se(i, (b, u) => (n(), $(te, { key: u }, [
|
|
554
|
+
b.children?.length && b.children?.length > 0 ? (n(), h(d, { key: 0 }, {
|
|
555
555
|
dropdown: B(() => [
|
|
556
|
-
q(
|
|
556
|
+
q(m, { direction: "vertical" }, {
|
|
557
557
|
default: B(() => [
|
|
558
|
-
(n(!0), $(
|
|
558
|
+
(n(!0), $(te, null, se(b.children || [], (v) => (n(), h(r, {
|
|
559
559
|
key: v.prop,
|
|
560
560
|
label: v.label,
|
|
561
561
|
type: "text",
|
|
@@ -563,38 +563,38 @@ const Gt = /* @__PURE__ */ K({
|
|
|
563
563
|
size: e.size,
|
|
564
564
|
disabled: v.disabled,
|
|
565
565
|
icon: v.icon,
|
|
566
|
-
onClick: Be((
|
|
566
|
+
onClick: Be((y) => E(a)(v), ["stop"])
|
|
567
567
|
}, null, 8, ["label", "danger", "size", "disabled", "icon", "onClick"]))), 128))
|
|
568
568
|
]),
|
|
569
569
|
_: 2
|
|
570
570
|
}, 1024)
|
|
571
571
|
]),
|
|
572
572
|
default: B(() => [
|
|
573
|
-
q(
|
|
574
|
-
label:
|
|
575
|
-
type: e.isLink ? "link" :
|
|
576
|
-
danger:
|
|
573
|
+
q(r, {
|
|
574
|
+
label: b.label,
|
|
575
|
+
type: e.isLink ? "link" : b.type,
|
|
576
|
+
danger: b.danger,
|
|
577
577
|
size: e.size,
|
|
578
|
-
icon:
|
|
579
|
-
onClick: Be((v) =>
|
|
578
|
+
icon: b.icon,
|
|
579
|
+
onClick: Be((v) => E(a)(b), ["stop"])
|
|
580
580
|
}, null, 8, ["label", "type", "danger", "size", "icon", "onClick"])
|
|
581
581
|
]),
|
|
582
582
|
_: 2
|
|
583
|
-
}, 1024)) : (n(),
|
|
583
|
+
}, 1024)) : (n(), h(r, {
|
|
584
584
|
key: 1,
|
|
585
|
-
label:
|
|
586
|
-
type: e.isLink ? "link" :
|
|
587
|
-
danger:
|
|
585
|
+
label: b.label,
|
|
586
|
+
type: e.isLink ? "link" : b.type,
|
|
587
|
+
danger: b.danger,
|
|
588
588
|
size: e.size,
|
|
589
|
-
icon:
|
|
589
|
+
icon: b.icon,
|
|
590
590
|
compact: !0,
|
|
591
|
-
"last-compact-item":
|
|
592
|
-
"first-compact-item":
|
|
593
|
-
onClick: Be((v) =>
|
|
591
|
+
"last-compact-item": u === i.length - 1,
|
|
592
|
+
"first-compact-item": u === 0,
|
|
593
|
+
onClick: Be((v) => E(a)(b), ["stop"])
|
|
594
594
|
}, null, 8, ["label", "type", "danger", "size", "icon", "last-compact-item", "first-compact-item", "onClick"]))
|
|
595
595
|
], 64))), 128))
|
|
596
596
|
], 16))), 128)),
|
|
597
|
-
q(
|
|
597
|
+
q(f, {
|
|
598
598
|
ref_key: "layerRef",
|
|
599
599
|
ref: t
|
|
600
600
|
}, null, 512)
|
|
@@ -603,7 +603,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
603
603
|
}, 8, ["style", "size"]);
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
|
-
}), Kt =
|
|
606
|
+
}), Kt = le(Gt), Qt = /* @__PURE__ */ Z({
|
|
607
607
|
name: "JInput",
|
|
608
608
|
__name: "input",
|
|
609
609
|
props: {
|
|
@@ -644,29 +644,29 @@ const Gt = /* @__PURE__ */ K({
|
|
|
644
644
|
},
|
|
645
645
|
emits: ["update:modelValue", "input", "focus", "blur", "clear", "change"],
|
|
646
646
|
setup(e, { emit: l }) {
|
|
647
|
-
const o = e, t = l, a =
|
|
647
|
+
const o = e, t = l, a = V({
|
|
648
648
|
get() {
|
|
649
649
|
return o.modelValue;
|
|
650
650
|
},
|
|
651
|
-
set(
|
|
652
|
-
t("update:modelValue",
|
|
651
|
+
set(f) {
|
|
652
|
+
t("update:modelValue", f);
|
|
653
653
|
}
|
|
654
|
-
}), c = (
|
|
655
|
-
t("input",
|
|
656
|
-
}, s = (
|
|
657
|
-
t("focus",
|
|
658
|
-
},
|
|
659
|
-
t("blur",
|
|
660
|
-
},
|
|
654
|
+
}), c = (f) => {
|
|
655
|
+
t("input", f);
|
|
656
|
+
}, s = (f) => {
|
|
657
|
+
t("focus", f);
|
|
658
|
+
}, r = (f) => {
|
|
659
|
+
t("blur", f);
|
|
660
|
+
}, m = () => {
|
|
661
661
|
t("clear");
|
|
662
|
-
}, d = (
|
|
663
|
-
t("change",
|
|
662
|
+
}, d = (f) => {
|
|
663
|
+
t("change", f);
|
|
664
664
|
};
|
|
665
|
-
return (
|
|
666
|
-
const
|
|
667
|
-
return n(),
|
|
665
|
+
return (f, i) => {
|
|
666
|
+
const p = L("j-icon"), b = L("el-input");
|
|
667
|
+
return n(), h(b, ke({
|
|
668
668
|
modelValue: a.value,
|
|
669
|
-
"onUpdate:modelValue":
|
|
669
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => a.value = u),
|
|
670
670
|
type: e.type,
|
|
671
671
|
"model-modifiers": e.modelModifiers,
|
|
672
672
|
maxlength: e.maxlength,
|
|
@@ -698,31 +698,31 @@ const Gt = /* @__PURE__ */ K({
|
|
|
698
698
|
"input-style": e.inputStyle,
|
|
699
699
|
label: e.label,
|
|
700
700
|
inputmode: e.inputmode
|
|
701
|
-
},
|
|
701
|
+
}, f.$attrs, {
|
|
702
702
|
onInput: c,
|
|
703
703
|
onFocus: s,
|
|
704
|
-
onBlur:
|
|
705
|
-
onClear:
|
|
704
|
+
onBlur: r,
|
|
705
|
+
onClear: m,
|
|
706
706
|
onChange: d
|
|
707
|
-
}),
|
|
707
|
+
}), He({ _: 2 }, [
|
|
708
708
|
e.prefixIcon ? {
|
|
709
709
|
name: "prefix",
|
|
710
710
|
fn: B(() => [
|
|
711
|
-
q(
|
|
711
|
+
q(p, { icon: e.prefixIcon }, null, 8, ["icon"])
|
|
712
712
|
]),
|
|
713
713
|
key: "0"
|
|
714
714
|
} : void 0,
|
|
715
715
|
e.suffixIcon ? {
|
|
716
716
|
name: "suffix",
|
|
717
717
|
fn: B(() => [
|
|
718
|
-
q(
|
|
718
|
+
q(p, { icon: e.suffixIcon }, null, 8, ["icon"])
|
|
719
719
|
]),
|
|
720
720
|
key: "1"
|
|
721
721
|
} : void 0
|
|
722
722
|
]), 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"]);
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
}), Zt =
|
|
725
|
+
}), Zt = le(Qt), _t = le(Ee), el = { key: 1 }, tl = /* @__PURE__ */ Z({
|
|
726
726
|
name: "JRadio",
|
|
727
727
|
__name: "radio",
|
|
728
728
|
props: {
|
|
@@ -776,13 +776,13 @@ const Gt = /* @__PURE__ */ K({
|
|
|
776
776
|
},
|
|
777
777
|
emits: ["update:modelValue"],
|
|
778
778
|
setup(e, { emit: l }) {
|
|
779
|
-
const o = e, t = l, a =
|
|
779
|
+
const o = e, t = l, a = V({
|
|
780
780
|
get() {
|
|
781
781
|
let c = o.options;
|
|
782
782
|
if (!ze(o.modelValue) && c && c.length > 0) {
|
|
783
|
-
let s = o.modelValue + "",
|
|
784
|
-
if (
|
|
785
|
-
return
|
|
783
|
+
let s = o.modelValue + "", r = o.options.find((m) => m.value + "" === s);
|
|
784
|
+
if (r)
|
|
785
|
+
return r.value;
|
|
786
786
|
}
|
|
787
787
|
return o.modelValue;
|
|
788
788
|
},
|
|
@@ -791,41 +791,41 @@ const Gt = /* @__PURE__ */ K({
|
|
|
791
791
|
}
|
|
792
792
|
});
|
|
793
793
|
return (c, s) => {
|
|
794
|
-
const
|
|
795
|
-
return n(),
|
|
794
|
+
const r = L("el-radio-button"), m = L("el-tag"), d = L("el-radio"), f = L("el-radio-group");
|
|
795
|
+
return n(), h(f, {
|
|
796
796
|
modelValue: a.value,
|
|
797
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
797
|
+
"onUpdate:modelValue": s[0] || (s[0] = (i) => a.value = i),
|
|
798
798
|
disabled: e.readonly
|
|
799
799
|
}, {
|
|
800
800
|
default: B(() => [
|
|
801
|
-
e.isButton ? (n(!0), $(
|
|
802
|
-
key:
|
|
803
|
-
value:
|
|
801
|
+
e.isButton ? (n(!0), $(te, { key: 0 }, se(e.options, (i) => (n(), h(r, {
|
|
802
|
+
key: i.value,
|
|
803
|
+
value: i.value,
|
|
804
804
|
size: e.size
|
|
805
805
|
}, {
|
|
806
806
|
default: B(() => [
|
|
807
|
-
|
|
807
|
+
je(de(i.label), 1)
|
|
808
808
|
]),
|
|
809
809
|
_: 2
|
|
810
|
-
}, 1032, ["value", "size"]))), 128)) : (n(!0), $(
|
|
811
|
-
key:
|
|
812
|
-
value:
|
|
810
|
+
}, 1032, ["value", "size"]))), 128)) : (n(!0), $(te, { key: 1 }, se(e.options, (i, p) => (n(), h(d, {
|
|
811
|
+
key: i.value,
|
|
812
|
+
value: i.value,
|
|
813
813
|
size: e.size
|
|
814
814
|
}, {
|
|
815
815
|
default: B(() => [
|
|
816
|
-
e.isColor ? (n(),
|
|
816
|
+
e.isColor ? (n(), h(m, {
|
|
817
817
|
key: 0,
|
|
818
|
-
color: e.colors[
|
|
818
|
+
color: e.colors[p] || i.color || "",
|
|
819
819
|
size: e.size,
|
|
820
820
|
hit: !1,
|
|
821
821
|
effect: "dark",
|
|
822
822
|
style: { "border-width": "0" }
|
|
823
823
|
}, {
|
|
824
824
|
default: B(() => [
|
|
825
|
-
|
|
825
|
+
je(de(i.label), 1)
|
|
826
826
|
]),
|
|
827
827
|
_: 2
|
|
828
|
-
}, 1032, ["color", "size"])) : (n(), $("span", el,
|
|
828
|
+
}, 1032, ["color", "size"])) : (n(), $("span", el, de(i.label), 1))
|
|
829
829
|
]),
|
|
830
830
|
_: 2
|
|
831
831
|
}, 1032, ["value", "size"]))), 128))
|
|
@@ -834,7 +834,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
834
834
|
}, 8, ["modelValue", "disabled"]);
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
}), ll =
|
|
837
|
+
}), ll = le(tl), ol = { class: "j-select-input-label-wrapper" }, al = { class: "j-select-option-wrapper" }, nl = { class: "j-select-option-wrapper" }, il = /* @__PURE__ */ Z({
|
|
838
838
|
name: "JSelect",
|
|
839
839
|
inheritAttrs: !1,
|
|
840
840
|
__name: "select",
|
|
@@ -861,59 +861,59 @@ const Gt = /* @__PURE__ */ K({
|
|
|
861
861
|
},
|
|
862
862
|
emits: ["update:modelValue", "change"],
|
|
863
863
|
setup(e, { emit: l }) {
|
|
864
|
-
const o = e, t = l, a =
|
|
864
|
+
const o = e, t = l, a = V({
|
|
865
865
|
get() {
|
|
866
866
|
return o.modelValue;
|
|
867
867
|
},
|
|
868
|
-
set(
|
|
869
|
-
t("update:modelValue",
|
|
868
|
+
set(f) {
|
|
869
|
+
t("update:modelValue", f);
|
|
870
870
|
}
|
|
871
|
-
}), c =
|
|
872
|
-
let
|
|
873
|
-
if (o.isSelectOnlyone ?
|
|
874
|
-
...
|
|
875
|
-
disabled:
|
|
876
|
-
})) :
|
|
877
|
-
const
|
|
878
|
-
return
|
|
879
|
-
let
|
|
880
|
-
const v =
|
|
881
|
-
|
|
882
|
-
const
|
|
883
|
-
value:
|
|
884
|
-
label:
|
|
885
|
-
icon:
|
|
886
|
-
disabled:
|
|
871
|
+
}), c = V(() => !ze(a.value) && !o.multiple && o.options.filter((f) => a.value == f.value).map((f) => f.label).join(",") || ""), s = V(() => !ze(a.value) && !o.multiple ? o.options.find((f) => f.value === a.value)?.icon : ""), r = V(() => o.selectData?.split(",") || []), m = V(() => {
|
|
872
|
+
let f = [];
|
|
873
|
+
if (o.isSelectOnlyone ? f = o.options.map((i) => ({
|
|
874
|
+
...i,
|
|
875
|
+
disabled: r.value.includes(i.value)
|
|
876
|
+
})) : f = o.options, o.isGroup) {
|
|
877
|
+
const i = [], p = {};
|
|
878
|
+
return f.forEach((b) => {
|
|
879
|
+
let u = {};
|
|
880
|
+
const v = b[o.groupKey || ""] || "";
|
|
881
|
+
p[v] || (u.value = v, u.label = v, p[v] = [], u.children = p[v], i.push(u));
|
|
882
|
+
const y = {
|
|
883
|
+
value: b.value,
|
|
884
|
+
label: b.label,
|
|
885
|
+
icon: b.icon,
|
|
886
|
+
disabled: b.disabled
|
|
887
887
|
};
|
|
888
|
-
|
|
889
|
-
}),
|
|
888
|
+
p[v].push(y);
|
|
889
|
+
}), i;
|
|
890
890
|
}
|
|
891
|
-
return
|
|
892
|
-
}), d = (
|
|
891
|
+
return f;
|
|
892
|
+
}), d = (f) => {
|
|
893
893
|
if (o.multiple) {
|
|
894
|
-
if (
|
|
894
|
+
if (f.length == 0) {
|
|
895
895
|
t("change", void 0);
|
|
896
896
|
return;
|
|
897
897
|
}
|
|
898
|
-
const
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
}), t("change",
|
|
898
|
+
const i = [];
|
|
899
|
+
f.forEach((p) => {
|
|
900
|
+
const b = o.options.find((u) => u.value == p);
|
|
901
|
+
b && i.push(b);
|
|
902
|
+
}), t("change", i);
|
|
903
903
|
} else {
|
|
904
|
-
if (
|
|
904
|
+
if (f == "" || f == null || f == null) {
|
|
905
905
|
t("change", void 0);
|
|
906
906
|
return;
|
|
907
907
|
}
|
|
908
|
-
const
|
|
909
|
-
t("change",
|
|
908
|
+
const i = o.options.find((p) => p.value == f);
|
|
909
|
+
t("change", i);
|
|
910
910
|
}
|
|
911
911
|
};
|
|
912
|
-
return (
|
|
913
|
-
const
|
|
914
|
-
return n(),
|
|
912
|
+
return (f, i) => {
|
|
913
|
+
const p = L("el-tooltip"), b = L("el-option"), u = L("el-option-group"), v = L("el-select");
|
|
914
|
+
return n(), h(v, ke(f.$attrs, {
|
|
915
915
|
modelValue: a.value,
|
|
916
|
-
"onUpdate:modelValue":
|
|
916
|
+
"onUpdate:modelValue": i[0] || (i[0] = (y) => a.value = y),
|
|
917
917
|
class: [{ "no-border": e.noBorder, "rows-background": e.isRows }],
|
|
918
918
|
teleported: e.teleported,
|
|
919
919
|
size: e.size,
|
|
@@ -925,47 +925,47 @@ const Gt = /* @__PURE__ */ K({
|
|
|
925
925
|
"collapse-tags-tooltip": e.collapseTagsTooltip,
|
|
926
926
|
placeholder: e.placeholder,
|
|
927
927
|
onChange: d
|
|
928
|
-
}),
|
|
928
|
+
}), He({
|
|
929
929
|
default: B(() => [
|
|
930
|
-
e.isGroup ? (n(!0), $(
|
|
931
|
-
key:
|
|
932
|
-
label:
|
|
930
|
+
e.isGroup ? (n(!0), $(te, { key: 0 }, se(m.value, (y) => (n(), h(u, {
|
|
931
|
+
key: y.label,
|
|
932
|
+
label: y.label
|
|
933
933
|
}, {
|
|
934
934
|
default: B(() => [
|
|
935
|
-
(n(!0), $(
|
|
936
|
-
key:
|
|
937
|
-
label:
|
|
938
|
-
value:
|
|
939
|
-
disabled: !!
|
|
935
|
+
(n(!0), $(te, null, se(y.children, (z) => (n(), h(b, {
|
|
936
|
+
key: z.value,
|
|
937
|
+
label: z.label,
|
|
938
|
+
value: z.value || " ",
|
|
939
|
+
disabled: !!z.disabled
|
|
940
940
|
}, {
|
|
941
941
|
default: B(() => [
|
|
942
942
|
J("div", al, [
|
|
943
|
-
|
|
943
|
+
z.icon ? (n(), h(Ee, {
|
|
944
944
|
key: 0,
|
|
945
945
|
class: "j-select-option-icon",
|
|
946
|
-
icon:
|
|
947
|
-
}, null, 8, ["icon"])) :
|
|
948
|
-
J("div", null,
|
|
946
|
+
icon: z.icon
|
|
947
|
+
}, null, 8, ["icon"])) : M("", !0),
|
|
948
|
+
J("div", null, de(z.label), 1)
|
|
949
949
|
])
|
|
950
950
|
]),
|
|
951
951
|
_: 2
|
|
952
952
|
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
953
953
|
]),
|
|
954
954
|
_: 2
|
|
955
|
-
}, 1032, ["label"]))), 128)) : (n(!0), $(
|
|
956
|
-
key:
|
|
957
|
-
label:
|
|
958
|
-
value:
|
|
959
|
-
disabled: !!
|
|
955
|
+
}, 1032, ["label"]))), 128)) : (n(!0), $(te, { key: 1 }, se(m.value, (y) => (n(), h(b, {
|
|
956
|
+
key: y.value,
|
|
957
|
+
label: y.label,
|
|
958
|
+
value: y.value + "",
|
|
959
|
+
disabled: !!y.disabled
|
|
960
960
|
}, {
|
|
961
961
|
default: B(() => [
|
|
962
962
|
J("div", nl, [
|
|
963
|
-
|
|
963
|
+
y.icon ? (n(), h(Ee, {
|
|
964
964
|
key: 0,
|
|
965
965
|
class: "j-select-option-icon",
|
|
966
|
-
icon:
|
|
967
|
-
}, null, 8, ["icon"])) :
|
|
968
|
-
J("div", null,
|
|
966
|
+
icon: y.icon
|
|
967
|
+
}, null, 8, ["icon"])) : M("", !0),
|
|
968
|
+
J("div", null, de(y.label), 1)
|
|
969
969
|
])
|
|
970
970
|
]),
|
|
971
971
|
_: 2
|
|
@@ -977,23 +977,23 @@ const Gt = /* @__PURE__ */ K({
|
|
|
977
977
|
name: "label",
|
|
978
978
|
fn: B(() => [
|
|
979
979
|
J("div", ol, [
|
|
980
|
-
s.value ? (n(),
|
|
980
|
+
s.value ? (n(), h(Ee, {
|
|
981
981
|
key: 0,
|
|
982
982
|
class: "j-select-option-icon",
|
|
983
983
|
icon: s.value
|
|
984
|
-
}, null, 8, ["icon"])) :
|
|
984
|
+
}, null, 8, ["icon"])) : M("", !0),
|
|
985
985
|
J("div", null, [
|
|
986
|
-
e.isShowTooltip ? (n(),
|
|
986
|
+
e.isShowTooltip ? (n(), h(p, {
|
|
987
987
|
key: 0,
|
|
988
988
|
content: c.value,
|
|
989
989
|
placement: "top"
|
|
990
990
|
}, {
|
|
991
991
|
default: B(() => [
|
|
992
|
-
|
|
992
|
+
je(de(c.value), 1)
|
|
993
993
|
]),
|
|
994
994
|
_: 1
|
|
995
|
-
}, 8, ["content"])) : (n(), $(
|
|
996
|
-
|
|
995
|
+
}, 8, ["content"])) : (n(), $(te, { key: 1 }, [
|
|
996
|
+
je(de(c.value), 1)
|
|
997
997
|
], 64))
|
|
998
998
|
])
|
|
999
999
|
])
|
|
@@ -1003,7 +1003,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1003
1003
|
]), 1040, ["modelValue", "class", "teleported", "size", "disabled", "multiple", "clearable", "filterable", "collapse-tags", "collapse-tags-tooltip", "placeholder"]);
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
|
-
}),
|
|
1006
|
+
}), sl = le(il), ul = /* @__PURE__ */ Z({
|
|
1007
1007
|
name: "JCascaderSelect",
|
|
1008
1008
|
__name: "cascader-select",
|
|
1009
1009
|
props: {
|
|
@@ -1035,24 +1035,24 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1035
1035
|
setup(e, { expose: l, emit: o }) {
|
|
1036
1036
|
const t = e, a = x(null), c = x(null), s = o;
|
|
1037
1037
|
l({
|
|
1038
|
-
getCheckedNodes: (
|
|
1038
|
+
getCheckedNodes: (p = !1) => a.value?.getCheckedNodes(p),
|
|
1039
1039
|
clearCheckedNodes: () => {
|
|
1040
1040
|
c.value?.clearCheckedNodes();
|
|
1041
1041
|
}
|
|
1042
1042
|
});
|
|
1043
|
-
const d =
|
|
1043
|
+
const d = V({
|
|
1044
1044
|
get() {
|
|
1045
1045
|
return ze(t.modelValue) ? [] : t.modelValue?.split(",") || [];
|
|
1046
1046
|
},
|
|
1047
|
-
set(
|
|
1048
|
-
s("update:modelValue", ze(
|
|
1047
|
+
set(p) {
|
|
1048
|
+
s("update:modelValue", ze(p) ? "" : p.join(","));
|
|
1049
1049
|
}
|
|
1050
|
-
}),
|
|
1051
|
-
d.value =
|
|
1052
|
-
value: ze(
|
|
1053
|
-
data:
|
|
1050
|
+
}), f = (p, b) => {
|
|
1051
|
+
d.value = p, s("change", {
|
|
1052
|
+
value: ze(p) ? "" : p.join(","),
|
|
1053
|
+
data: b
|
|
1054
1054
|
});
|
|
1055
|
-
},
|
|
1055
|
+
}, i = V(() => ({
|
|
1056
1056
|
checkStrictly: t.checkStrictly,
|
|
1057
1057
|
expandTrigger: t.expandTrigger,
|
|
1058
1058
|
multiple: t.multiple,
|
|
@@ -1069,15 +1069,15 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1069
1069
|
disabled: "disabled",
|
|
1070
1070
|
leaf: "leaf"
|
|
1071
1071
|
}));
|
|
1072
|
-
return (
|
|
1073
|
-
const
|
|
1074
|
-
return n(),
|
|
1072
|
+
return (p, b) => {
|
|
1073
|
+
const u = L("el-cascader");
|
|
1074
|
+
return n(), h(u, {
|
|
1075
1075
|
ref_key: "cascaderRef",
|
|
1076
1076
|
ref: a,
|
|
1077
1077
|
modelValue: d.value,
|
|
1078
|
-
"onUpdate:modelValue":
|
|
1078
|
+
"onUpdate:modelValue": b[0] || (b[0] = (v) => d.value = v),
|
|
1079
1079
|
"cascader-panel-ref": c.value,
|
|
1080
|
-
props:
|
|
1080
|
+
props: i.value,
|
|
1081
1081
|
options: e.options,
|
|
1082
1082
|
placeholder: e.placeholder,
|
|
1083
1083
|
disabled: e.disabled || e.readonly,
|
|
@@ -1089,43 +1089,43 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1089
1089
|
"show-all-levels": e.showAllLevels,
|
|
1090
1090
|
separator: e.separator,
|
|
1091
1091
|
size: e.size,
|
|
1092
|
-
onChange:
|
|
1092
|
+
onChange: f
|
|
1093
1093
|
}, {
|
|
1094
|
-
default: B(({ node: v, data:
|
|
1095
|
-
|
|
1094
|
+
default: B(({ node: v, data: y }) => [
|
|
1095
|
+
ee(p.$slots, "default", {
|
|
1096
1096
|
node: v,
|
|
1097
|
-
data:
|
|
1097
|
+
data: y
|
|
1098
1098
|
}, () => [
|
|
1099
|
-
|
|
1099
|
+
je(de(y?.label), 1)
|
|
1100
1100
|
])
|
|
1101
1101
|
]),
|
|
1102
1102
|
prefix: B(() => [
|
|
1103
|
-
|
|
1103
|
+
ee(p.$slots, "prefix")
|
|
1104
1104
|
]),
|
|
1105
1105
|
"suggestion-item": B(({ item: v }) => [
|
|
1106
|
-
|
|
1106
|
+
ee(p.$slots, "suggestion-item", { item: v })
|
|
1107
1107
|
]),
|
|
1108
|
-
tag: B(({ option: v, handleClose:
|
|
1109
|
-
|
|
1108
|
+
tag: B(({ option: v, handleClose: y, disabled: z }) => [
|
|
1109
|
+
ee(p.$slots, "tag", {
|
|
1110
1110
|
option: v,
|
|
1111
|
-
handleClose:
|
|
1112
|
-
disabled:
|
|
1111
|
+
handleClose: y,
|
|
1112
|
+
disabled: z
|
|
1113
1113
|
})
|
|
1114
1114
|
]),
|
|
1115
1115
|
header: B(() => [
|
|
1116
|
-
|
|
1116
|
+
ee(p.$slots, "header")
|
|
1117
1117
|
]),
|
|
1118
1118
|
footer: B(() => [
|
|
1119
|
-
|
|
1119
|
+
ee(p.$slots, "footer")
|
|
1120
1120
|
]),
|
|
1121
1121
|
empty: B(() => [
|
|
1122
|
-
|
|
1122
|
+
ee(p.$slots, "empty")
|
|
1123
1123
|
]),
|
|
1124
1124
|
_: 3
|
|
1125
1125
|
}, 8, ["modelValue", "cascader-panel-ref", "props", "options", "placeholder", "disabled", "clearable", "collapse-tags", "max-collapse-tags", "collapse-tags-tooltip", "filterable", "show-all-levels", "separator", "size"]);
|
|
1126
1126
|
};
|
|
1127
1127
|
}
|
|
1128
|
-
}), rl =
|
|
1128
|
+
}), rl = le(ul), cl = /* @__PURE__ */ Z({
|
|
1129
1129
|
name: "JCheckbox",
|
|
1130
1130
|
__name: "checkbox",
|
|
1131
1131
|
props: {
|
|
@@ -1145,7 +1145,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1145
1145
|
},
|
|
1146
1146
|
emits: ["update:modelValue", "change"],
|
|
1147
1147
|
setup(e, { emit: l }) {
|
|
1148
|
-
const o = e, t = l, a =
|
|
1148
|
+
const o = e, t = l, a = V({
|
|
1149
1149
|
get() {
|
|
1150
1150
|
return o.modelValue;
|
|
1151
1151
|
},
|
|
@@ -1155,11 +1155,11 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1155
1155
|
}), c = (s) => {
|
|
1156
1156
|
t("change", s);
|
|
1157
1157
|
};
|
|
1158
|
-
return (s,
|
|
1159
|
-
const
|
|
1160
|
-
return n(),
|
|
1158
|
+
return (s, r) => {
|
|
1159
|
+
const m = L("el-checkbox"), d = L("el-checkbox-button"), f = L("el-checkbox-group");
|
|
1160
|
+
return n(), h(f, {
|
|
1161
1161
|
modelValue: a.value,
|
|
1162
|
-
"onUpdate:modelValue":
|
|
1162
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => a.value = i),
|
|
1163
1163
|
disabled: e.disabled || e.readonly,
|
|
1164
1164
|
size: e.size,
|
|
1165
1165
|
min: e.min,
|
|
@@ -1173,25 +1173,25 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1173
1173
|
onChange: c
|
|
1174
1174
|
}, {
|
|
1175
1175
|
default: B(() => [
|
|
1176
|
-
e.type === "checkbox" ? (n(!0), $(
|
|
1177
|
-
key:
|
|
1178
|
-
value:
|
|
1179
|
-
disabled:
|
|
1176
|
+
e.type === "checkbox" ? (n(!0), $(te, { key: 0 }, se(e.options, (i) => (n(), h(m, {
|
|
1177
|
+
key: i.value,
|
|
1178
|
+
value: i.value,
|
|
1179
|
+
disabled: i.disabled,
|
|
1180
1180
|
size: e.size,
|
|
1181
|
-
label:
|
|
1182
|
-
}, null, 8, ["value", "disabled", "size", "label"]))), 128)) : (n(!0), $(
|
|
1183
|
-
key:
|
|
1184
|
-
value:
|
|
1185
|
-
disabled:
|
|
1181
|
+
label: i.label
|
|
1182
|
+
}, null, 8, ["value", "disabled", "size", "label"]))), 128)) : (n(!0), $(te, { key: 1 }, se(e.options, (i) => (n(), h(d, {
|
|
1183
|
+
key: i.value,
|
|
1184
|
+
value: i.value,
|
|
1185
|
+
disabled: i.disabled,
|
|
1186
1186
|
size: e.size,
|
|
1187
|
-
label:
|
|
1187
|
+
label: i.label
|
|
1188
1188
|
}, null, 8, ["value", "disabled", "size", "label"]))), 128))
|
|
1189
1189
|
]),
|
|
1190
1190
|
_: 1
|
|
1191
1191
|
}, 8, ["modelValue", "disabled", "size", "min", "max", "text-color", "fill", "tag", "validate-event", "label", "type"]);
|
|
1192
1192
|
};
|
|
1193
1193
|
}
|
|
1194
|
-
}), dl =
|
|
1194
|
+
}), dl = le(cl), fl = /* @__PURE__ */ Z({
|
|
1195
1195
|
name: "JNumber",
|
|
1196
1196
|
__name: "number",
|
|
1197
1197
|
props: {
|
|
@@ -1222,16 +1222,16 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1222
1222
|
},
|
|
1223
1223
|
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
1224
1224
|
setup(e, { expose: l, emit: o }) {
|
|
1225
|
-
const t = e, a = x(), c = o, s =
|
|
1225
|
+
const t = e, a = x(), c = o, s = V({
|
|
1226
1226
|
get() {
|
|
1227
1227
|
return t.modelValue;
|
|
1228
1228
|
},
|
|
1229
|
-
set(
|
|
1230
|
-
c("update:modelValue",
|
|
1229
|
+
set(p) {
|
|
1230
|
+
c("update:modelValue", p);
|
|
1231
1231
|
}
|
|
1232
|
-
}),
|
|
1233
|
-
c("change",
|
|
1234
|
-
},
|
|
1232
|
+
}), r = (p) => {
|
|
1233
|
+
c("change", p);
|
|
1234
|
+
}, m = () => {
|
|
1235
1235
|
c("blur");
|
|
1236
1236
|
}, d = () => {
|
|
1237
1237
|
c("focus");
|
|
@@ -1240,14 +1240,14 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1240
1240
|
a.value?.blur();
|
|
1241
1241
|
}, focus: () => {
|
|
1242
1242
|
a.value?.focus();
|
|
1243
|
-
} }), (
|
|
1244
|
-
const
|
|
1245
|
-
return n(),
|
|
1243
|
+
} }), (p, b) => {
|
|
1244
|
+
const u = L("j-icon"), v = L("el-input-number");
|
|
1245
|
+
return n(), h(v, {
|
|
1246
1246
|
id: e.id,
|
|
1247
1247
|
ref_key: "inputNumberRef",
|
|
1248
1248
|
ref: a,
|
|
1249
1249
|
modelValue: s.value,
|
|
1250
|
-
"onUpdate:modelValue":
|
|
1250
|
+
"onUpdate:modelValue": b[0] || (b[0] = (y) => s.value = y),
|
|
1251
1251
|
min: e.min,
|
|
1252
1252
|
max: e.max,
|
|
1253
1253
|
step: e.step,
|
|
@@ -1266,36 +1266,36 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1266
1266
|
inputmode: e.inputmode,
|
|
1267
1267
|
align: e.align,
|
|
1268
1268
|
"disabled-scientific": e.disabledScientific,
|
|
1269
|
-
onChange:
|
|
1270
|
-
onBlur:
|
|
1269
|
+
onChange: r,
|
|
1270
|
+
onBlur: m,
|
|
1271
1271
|
onFocus: d
|
|
1272
1272
|
}, {
|
|
1273
1273
|
prefix: B(() => [
|
|
1274
|
-
J("span", null,
|
|
1274
|
+
J("span", null, de(e.prefix || ""), 1)
|
|
1275
1275
|
]),
|
|
1276
1276
|
suffix: B(() => [
|
|
1277
|
-
J("span", null,
|
|
1277
|
+
J("span", null, de(e.suffix || ""), 1)
|
|
1278
1278
|
]),
|
|
1279
1279
|
"decrease-icon": B(() => [
|
|
1280
|
-
e.decreaseIcon ? (n(),
|
|
1280
|
+
e.decreaseIcon ? (n(), h(u, {
|
|
1281
1281
|
key: 0,
|
|
1282
1282
|
icon: e.decreaseIcon
|
|
1283
|
-
}, null, 8, ["icon"])) : e.controlsPosition === "right" ? (n(),
|
|
1283
|
+
}, null, 8, ["icon"])) : e.controlsPosition === "right" ? (n(), h(u, {
|
|
1284
1284
|
key: 1,
|
|
1285
1285
|
icon: "ep:arrow-down"
|
|
1286
|
-
})) : (n(),
|
|
1286
|
+
})) : (n(), h(u, {
|
|
1287
1287
|
key: 2,
|
|
1288
1288
|
icon: "ep:minus"
|
|
1289
1289
|
}))
|
|
1290
1290
|
]),
|
|
1291
1291
|
"increase-icon": B(() => [
|
|
1292
|
-
e.increaseIcon ? (n(),
|
|
1292
|
+
e.increaseIcon ? (n(), h(u, {
|
|
1293
1293
|
key: 0,
|
|
1294
1294
|
icon: e.increaseIcon
|
|
1295
|
-
}, null, 8, ["icon"])) : e.controlsPosition === "right" ? (n(),
|
|
1295
|
+
}, null, 8, ["icon"])) : e.controlsPosition === "right" ? (n(), h(u, {
|
|
1296
1296
|
key: 1,
|
|
1297
1297
|
icon: "ep:arrow-up"
|
|
1298
|
-
})) : (n(),
|
|
1298
|
+
})) : (n(), h(u, {
|
|
1299
1299
|
key: 2,
|
|
1300
1300
|
icon: "ep:plus"
|
|
1301
1301
|
}))
|
|
@@ -1304,7 +1304,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1304
1304
|
}, 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"]);
|
|
1305
1305
|
};
|
|
1306
1306
|
}
|
|
1307
|
-
}), pl =
|
|
1307
|
+
}), pl = le(fl), ml = /* @__PURE__ */ Z({
|
|
1308
1308
|
name: "JAutocomplete",
|
|
1309
1309
|
__name: "autocomplete",
|
|
1310
1310
|
props: {
|
|
@@ -1332,27 +1332,27 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1332
1332
|
},
|
|
1333
1333
|
emits: ["update:modelValue", "select", "change", "focus", "blur"],
|
|
1334
1334
|
setup(e, { expose: l, emit: o }) {
|
|
1335
|
-
const t = e, a = x(null), c = o, s =
|
|
1335
|
+
const t = e, a = x(null), c = o, s = V({
|
|
1336
1336
|
get() {
|
|
1337
1337
|
return t.modelValue || "";
|
|
1338
1338
|
},
|
|
1339
1339
|
set(v) {
|
|
1340
1340
|
c("update:modelValue", v);
|
|
1341
1341
|
}
|
|
1342
|
-
}),
|
|
1342
|
+
}), r = (v, y) => {
|
|
1343
1343
|
if (t.fetchSuggestions) {
|
|
1344
|
-
t.fetchSuggestions(v,
|
|
1344
|
+
t.fetchSuggestions(v, y);
|
|
1345
1345
|
return;
|
|
1346
1346
|
}
|
|
1347
|
-
const
|
|
1348
|
-
|
|
1349
|
-
},
|
|
1347
|
+
const z = v ? t.options.filter(m(v)) : t.options;
|
|
1348
|
+
y(z);
|
|
1349
|
+
}, m = (v) => (y) => y?.[t.valueKey]?.toLowerCase().indexOf(v.toLowerCase()) === 0, d = (v) => {
|
|
1350
1350
|
c("select", v);
|
|
1351
|
-
},
|
|
1351
|
+
}, f = (v) => {
|
|
1352
1352
|
c("change", v);
|
|
1353
|
-
},
|
|
1353
|
+
}, i = () => {
|
|
1354
1354
|
c("focus");
|
|
1355
|
-
},
|
|
1355
|
+
}, p = () => {
|
|
1356
1356
|
c("blur");
|
|
1357
1357
|
};
|
|
1358
1358
|
return l({
|
|
@@ -1362,14 +1362,14 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1362
1362
|
blur: () => {
|
|
1363
1363
|
a.value?.blur();
|
|
1364
1364
|
}
|
|
1365
|
-
}), (v,
|
|
1366
|
-
const
|
|
1367
|
-
return n(),
|
|
1365
|
+
}), (v, y) => {
|
|
1366
|
+
const z = L("el-autocomplete");
|
|
1367
|
+
return n(), h(z, {
|
|
1368
1368
|
ref_key: "autocompleteRef",
|
|
1369
1369
|
ref: a,
|
|
1370
1370
|
modelValue: s.value,
|
|
1371
|
-
"onUpdate:modelValue":
|
|
1372
|
-
"fetch-suggestions":
|
|
1371
|
+
"onUpdate:modelValue": y[0] || (y[0] = (j) => s.value = j),
|
|
1372
|
+
"fetch-suggestions": r,
|
|
1373
1373
|
placeholder: e.placeholder,
|
|
1374
1374
|
clearable: e.clearable,
|
|
1375
1375
|
disabled: e.disabled || e.readonly,
|
|
@@ -1388,13 +1388,13 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1388
1388
|
"fit-input-width": e.fitInputWidth,
|
|
1389
1389
|
"loop-navigation": e.loopNavigation,
|
|
1390
1390
|
onSelect: d,
|
|
1391
|
-
onChange:
|
|
1392
|
-
onFocus:
|
|
1393
|
-
onBlur:
|
|
1394
|
-
},
|
|
1391
|
+
onChange: f,
|
|
1392
|
+
onFocus: i,
|
|
1393
|
+
onBlur: p
|
|
1394
|
+
}, He({
|
|
1395
1395
|
default: B(({ item: j }) => [
|
|
1396
|
-
|
|
1397
|
-
J("div", null,
|
|
1396
|
+
ee(v.$slots, "default", { item: j }, () => [
|
|
1397
|
+
J("div", null, de(j[e.valueKey] || ""), 1)
|
|
1398
1398
|
])
|
|
1399
1399
|
]),
|
|
1400
1400
|
_: 2
|
|
@@ -1402,56 +1402,59 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1402
1402
|
v.$slots.prefix ? {
|
|
1403
1403
|
name: "prefix",
|
|
1404
1404
|
fn: B(() => [
|
|
1405
|
-
|
|
1405
|
+
ee(v.$slots, "prefix")
|
|
1406
1406
|
]),
|
|
1407
1407
|
key: "0"
|
|
1408
1408
|
} : void 0,
|
|
1409
1409
|
v.$slots.suffix ? {
|
|
1410
1410
|
name: "suffix",
|
|
1411
1411
|
fn: B(() => [
|
|
1412
|
-
|
|
1412
|
+
ee(v.$slots, "suffix")
|
|
1413
1413
|
]),
|
|
1414
1414
|
key: "1"
|
|
1415
1415
|
} : void 0,
|
|
1416
1416
|
v.$slots.header ? {
|
|
1417
1417
|
name: "header",
|
|
1418
1418
|
fn: B(() => [
|
|
1419
|
-
|
|
1419
|
+
ee(v.$slots, "header")
|
|
1420
1420
|
]),
|
|
1421
1421
|
key: "2"
|
|
1422
1422
|
} : void 0,
|
|
1423
1423
|
v.$slots.footer ? {
|
|
1424
1424
|
name: "footer",
|
|
1425
1425
|
fn: B(() => [
|
|
1426
|
-
|
|
1426
|
+
ee(v.$slots, "footer")
|
|
1427
1427
|
]),
|
|
1428
1428
|
key: "3"
|
|
1429
1429
|
} : void 0,
|
|
1430
1430
|
v.$slots.prepend ? {
|
|
1431
1431
|
name: "prepend",
|
|
1432
1432
|
fn: B(() => [
|
|
1433
|
-
|
|
1433
|
+
ee(v.$slots, "prepend")
|
|
1434
1434
|
]),
|
|
1435
1435
|
key: "4"
|
|
1436
1436
|
} : void 0,
|
|
1437
1437
|
v.$slots.append ? {
|
|
1438
1438
|
name: "append",
|
|
1439
1439
|
fn: B(() => [
|
|
1440
|
-
|
|
1440
|
+
ee(v.$slots, "append")
|
|
1441
1441
|
]),
|
|
1442
1442
|
key: "5"
|
|
1443
1443
|
} : void 0,
|
|
1444
1444
|
v.$slots.loading ? {
|
|
1445
1445
|
name: "loading",
|
|
1446
1446
|
fn: B(() => [
|
|
1447
|
-
|
|
1447
|
+
ee(v.$slots, "loading")
|
|
1448
1448
|
]),
|
|
1449
1449
|
key: "6"
|
|
1450
1450
|
} : void 0
|
|
1451
1451
|
]), 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"]);
|
|
1452
1452
|
};
|
|
1453
1453
|
}
|
|
1454
|
-
}), vl =
|
|
1454
|
+
}), vl = le(ml), gl = { class: "j-block" }, yl = {
|
|
1455
|
+
key: 1,
|
|
1456
|
+
class: "j-layout--container"
|
|
1457
|
+
}, hl = { class: "j-block" }, bl = { class: "j-block" }, wl = { class: "j-block" }, kl = /* @__PURE__ */ Z({
|
|
1455
1458
|
name: "JLayout",
|
|
1456
1459
|
__name: "layout",
|
|
1457
1460
|
props: {
|
|
@@ -1460,7 +1463,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1460
1463
|
* @defaultValue 240
|
|
1461
1464
|
*/
|
|
1462
1465
|
left: {
|
|
1463
|
-
type: Number,
|
|
1466
|
+
type: [Number, String],
|
|
1464
1467
|
default: 240
|
|
1465
1468
|
},
|
|
1466
1469
|
/**
|
|
@@ -1468,7 +1471,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1468
1471
|
* @defaultValue 240
|
|
1469
1472
|
*/
|
|
1470
1473
|
right: {
|
|
1471
|
-
type: Number,
|
|
1474
|
+
type: [Number, String],
|
|
1472
1475
|
default: 240
|
|
1473
1476
|
},
|
|
1474
1477
|
/**
|
|
@@ -1476,7 +1479,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1476
1479
|
* @defaultValue 60
|
|
1477
1480
|
*/
|
|
1478
1481
|
top: {
|
|
1479
|
-
type: Number,
|
|
1482
|
+
type: [Number, String],
|
|
1480
1483
|
default: 60
|
|
1481
1484
|
},
|
|
1482
1485
|
/**
|
|
@@ -1484,7 +1487,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1484
1487
|
* @defaultValue 60
|
|
1485
1488
|
*/
|
|
1486
1489
|
bottom: {
|
|
1487
|
-
type: Number,
|
|
1490
|
+
type: [Number, String],
|
|
1488
1491
|
default: 60
|
|
1489
1492
|
},
|
|
1490
1493
|
/**
|
|
@@ -1526,10 +1529,34 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1526
1529
|
notHidden: {
|
|
1527
1530
|
type: Boolean,
|
|
1528
1531
|
default: !1
|
|
1532
|
+
},
|
|
1533
|
+
/**
|
|
1534
|
+
* @zh mid区域最小宽度
|
|
1535
|
+
* @defaultValue 0
|
|
1536
|
+
*/
|
|
1537
|
+
midMinWidth: {
|
|
1538
|
+
type: Number,
|
|
1539
|
+
default: 0
|
|
1540
|
+
},
|
|
1541
|
+
/**
|
|
1542
|
+
* @zh mid区域最小高度
|
|
1543
|
+
* @defaultValue 0
|
|
1544
|
+
*/
|
|
1545
|
+
midMinHeight: {
|
|
1546
|
+
type: Number,
|
|
1547
|
+
default: 0
|
|
1548
|
+
},
|
|
1549
|
+
/**
|
|
1550
|
+
* @zh 当整体宽度小于mid最小宽度时隐藏中间区域
|
|
1551
|
+
* @defaultValue false
|
|
1552
|
+
*/
|
|
1553
|
+
hideMidWhenNarrow: {
|
|
1554
|
+
type: Boolean,
|
|
1555
|
+
default: !1
|
|
1529
1556
|
}
|
|
1530
1557
|
},
|
|
1531
1558
|
setup(e) {
|
|
1532
|
-
const l = e, o = Ct(), t = x(), a = x(
|
|
1559
|
+
const l = e, o = Ct(), t = x(), a = x(), c = x(-1), s = x(-1), r = x(-1), m = x(-1), d = x(0), f = x(!1), i = Qe({
|
|
1533
1560
|
type: "",
|
|
1534
1561
|
isMove: !1,
|
|
1535
1562
|
pageX: 0,
|
|
@@ -1537,152 +1564,192 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1537
1564
|
size: 0,
|
|
1538
1565
|
h: 0,
|
|
1539
1566
|
w: 0
|
|
1540
|
-
}),
|
|
1567
|
+
}), p = V({
|
|
1541
1568
|
get() {
|
|
1542
|
-
return
|
|
1569
|
+
return c.value !== -1 ? c.value : l.left;
|
|
1543
1570
|
},
|
|
1544
|
-
set(
|
|
1545
|
-
|
|
1571
|
+
set(N) {
|
|
1572
|
+
c.value = N;
|
|
1546
1573
|
}
|
|
1547
|
-
}),
|
|
1574
|
+
}), b = V({
|
|
1548
1575
|
get() {
|
|
1549
|
-
return
|
|
1576
|
+
return s.value !== -1 ? s.value : l.right;
|
|
1550
1577
|
},
|
|
1551
|
-
set(
|
|
1552
|
-
|
|
1578
|
+
set(N) {
|
|
1579
|
+
s.value = N;
|
|
1553
1580
|
}
|
|
1554
|
-
}),
|
|
1581
|
+
}), u = V({
|
|
1555
1582
|
get() {
|
|
1556
|
-
return
|
|
1583
|
+
return r.value !== -1 ? r.value : l.top;
|
|
1557
1584
|
},
|
|
1558
|
-
set(
|
|
1559
|
-
|
|
1585
|
+
set(N) {
|
|
1586
|
+
r.value = N;
|
|
1560
1587
|
}
|
|
1561
|
-
}),
|
|
1588
|
+
}), v = V({
|
|
1562
1589
|
get() {
|
|
1563
|
-
return
|
|
1590
|
+
return m.value !== -1 ? m.value : l.bottom;
|
|
1564
1591
|
},
|
|
1565
|
-
set(
|
|
1566
|
-
|
|
1592
|
+
set(N) {
|
|
1593
|
+
m.value = N;
|
|
1567
1594
|
}
|
|
1568
|
-
}),
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1595
|
+
}), y = V(() => o.left), z = V(() => o.right), j = V(() => o.top), U = V(() => o.bottom), ae = V(() => y.value ? f.value && l.hideMidWhenNarrow && z.value ? "50%" : f.value && l.hideMidWhenNarrow && !z.value ? "100%" : typeof p.value == "number" ? p.value + "px" : p.value : "0"), G = V(() => z.value ? f.value && l.hideMidWhenNarrow && y.value ? "50%" : f.value && l.hideMidWhenNarrow && !y.value ? "100%" : typeof b.value == "number" ? b.value + "px" : b.value : "0"), S = V(() => j.value ? typeof u.value == "number" ? u.value + "px" : u.value : "0"), pe = V(() => U.value ? typeof v.value == "number" ? v.value + "px" : v.value : "0"), ne = V(() => ({
|
|
1596
|
+
minWidth: l.midMinWidth + "px",
|
|
1597
|
+
minHeight: l.midMinHeight + "px"
|
|
1598
|
+
})), Y = (N, H) => {
|
|
1599
|
+
i.type = N, i.isMove = !0, i.pageX = H.pageX, i.pageY = H.pageY, i.h = a.value.clientHeight, i.w = a.value.clientWidth;
|
|
1600
|
+
const A = t.value.clientWidth, _ = t.value.clientHeight;
|
|
1601
|
+
switch (N) {
|
|
1602
|
+
case "left": {
|
|
1603
|
+
const K = p.value;
|
|
1604
|
+
i.size = typeof K == "string" && K.includes("%") ? parseFloat(K) / 100 * A : Number(K);
|
|
1572
1605
|
break;
|
|
1573
|
-
|
|
1574
|
-
|
|
1606
|
+
}
|
|
1607
|
+
case "right": {
|
|
1608
|
+
const K = b.value;
|
|
1609
|
+
i.size = typeof K == "string" && K.includes("%") ? parseFloat(K) / 100 * A : Number(K);
|
|
1575
1610
|
break;
|
|
1576
|
-
|
|
1577
|
-
|
|
1611
|
+
}
|
|
1612
|
+
case "top": {
|
|
1613
|
+
const K = u.value;
|
|
1614
|
+
i.size = typeof K == "string" && K.includes("%") ? parseFloat(K) / 100 * _ : Number(K);
|
|
1578
1615
|
break;
|
|
1579
|
-
|
|
1580
|
-
|
|
1616
|
+
}
|
|
1617
|
+
case "bottom": {
|
|
1618
|
+
const K = v.value;
|
|
1619
|
+
i.size = typeof K == "string" && K.includes("%") ? parseFloat(K) / 100 * _ : Number(K);
|
|
1581
1620
|
break;
|
|
1621
|
+
}
|
|
1582
1622
|
}
|
|
1583
|
-
document.onmouseup =
|
|
1584
|
-
},
|
|
1623
|
+
document.onmouseup = F, document.onmousemove = oe;
|
|
1624
|
+
}, oe = (N) => {
|
|
1585
1625
|
if (i.isMove)
|
|
1586
1626
|
switch (i.type) {
|
|
1587
1627
|
case "left": {
|
|
1588
|
-
const
|
|
1589
|
-
let A = i.size +
|
|
1590
|
-
A < 0 ? A = 4 : A > i.size + i.w && (A = i.size + i.w),
|
|
1628
|
+
const H = N.pageX - i.pageX;
|
|
1629
|
+
let A = i.size + H;
|
|
1630
|
+
A < 0 ? A = 4 : A > i.size + i.w - l.midMinWidth && (A = i.size + i.w - l.midMinWidth), p.value = A;
|
|
1591
1631
|
break;
|
|
1592
1632
|
}
|
|
1593
1633
|
case "right": {
|
|
1594
|
-
const
|
|
1595
|
-
let A = i.size -
|
|
1596
|
-
A < 0 ? A = 4 : A > i.size + i.w && (A = i.size + i.w),
|
|
1634
|
+
const H = N.pageX - i.pageX;
|
|
1635
|
+
let A = i.size - H;
|
|
1636
|
+
A < 0 ? A = 4 : A > i.size + i.w - l.midMinWidth && (A = i.size + i.w - l.midMinWidth), b.value = A;
|
|
1597
1637
|
break;
|
|
1598
1638
|
}
|
|
1599
1639
|
case "top": {
|
|
1600
|
-
const
|
|
1601
|
-
let A = i.size +
|
|
1602
|
-
A < 0 ? A = 4 : A > i.size + i.h && (A = i.size + i.h),
|
|
1640
|
+
const H = N.pageY - i.pageY;
|
|
1641
|
+
let A = i.size + H;
|
|
1642
|
+
A < 0 ? A = 4 : A > i.size + i.h - l.midMinHeight && (A = i.size + i.h - l.midMinHeight), u.value = A;
|
|
1603
1643
|
break;
|
|
1604
1644
|
}
|
|
1605
1645
|
case "bottom": {
|
|
1606
|
-
const
|
|
1607
|
-
let A = i.size -
|
|
1608
|
-
A < 0 ? A = 4 : A > i.size + i.h && (A = i.size + i.h),
|
|
1646
|
+
const H = N.pageY - i.pageY;
|
|
1647
|
+
let A = i.size - H;
|
|
1648
|
+
A < 0 ? A = 4 : A > i.size + i.h - l.midMinHeight && (A = i.size + i.h - l.midMinHeight), v.value = A;
|
|
1609
1649
|
break;
|
|
1610
1650
|
}
|
|
1611
1651
|
}
|
|
1612
|
-
},
|
|
1652
|
+
}, F = () => {
|
|
1613
1653
|
i.isMove = !1, document.onmouseup = null, document.onmousemove = null;
|
|
1654
|
+
}, he = () => {
|
|
1655
|
+
if (!l.hideMidWhenNarrow || !t.value) {
|
|
1656
|
+
f.value = !1;
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
d.value = t.value.clientWidth;
|
|
1660
|
+
let N = 0, H = 0;
|
|
1661
|
+
if (y.value) {
|
|
1662
|
+
const _ = p.value;
|
|
1663
|
+
N = typeof _ == "string" && _.includes("%") ? parseFloat(_) / 100 * d.value : Number(_);
|
|
1664
|
+
}
|
|
1665
|
+
if (z.value) {
|
|
1666
|
+
const _ = b.value;
|
|
1667
|
+
H = typeof _ == "string" && _.includes("%") ? parseFloat(_) / 100 * d.value : Number(_);
|
|
1668
|
+
}
|
|
1669
|
+
const A = d.value - N - H;
|
|
1670
|
+
f.value = A < l.midMinWidth;
|
|
1614
1671
|
};
|
|
1615
|
-
|
|
1616
|
-
|
|
1672
|
+
let R = null;
|
|
1673
|
+
return Ze(() => {
|
|
1674
|
+
l.hideMidWhenNarrow && t.value && (he(), R = new ResizeObserver(() => {
|
|
1675
|
+
he();
|
|
1676
|
+
}), R.observe(t.value));
|
|
1677
|
+
}), nt(() => {
|
|
1678
|
+
R && R.disconnect();
|
|
1679
|
+
}), (N, H) => (n(), $("div", {
|
|
1680
|
+
ref_key: "layout",
|
|
1681
|
+
ref: t,
|
|
1682
|
+
class: Me(["j-layout", { "j-layout-not-hidden": e.notHidden }])
|
|
1617
1683
|
}, [
|
|
1618
|
-
|
|
1684
|
+
y.value ? (n(), $("div", {
|
|
1619
1685
|
key: 0,
|
|
1620
1686
|
class: "j-layout--left",
|
|
1621
|
-
style:
|
|
1687
|
+
style: ve({ width: ae.value })
|
|
1622
1688
|
}, [
|
|
1623
1689
|
J("div", gl, [
|
|
1624
|
-
|
|
1690
|
+
ee(N.$slots, "left")
|
|
1625
1691
|
]),
|
|
1626
1692
|
e.leftMove ? (n(), $("div", {
|
|
1627
1693
|
key: 0,
|
|
1628
1694
|
class: "j-layout--move",
|
|
1629
|
-
onMousedown:
|
|
1630
|
-
}, null, 32)) :
|
|
1631
|
-
], 4)) :
|
|
1632
|
-
|
|
1633
|
-
|
|
1695
|
+
onMousedown: H[0] || (H[0] = (A) => Y("left", A))
|
|
1696
|
+
}, null, 32)) : M("", !0)
|
|
1697
|
+
], 4)) : M("", !0),
|
|
1698
|
+
f.value ? M("", !0) : (n(), $("div", yl, [
|
|
1699
|
+
j.value ? (n(), $("div", {
|
|
1634
1700
|
key: 0,
|
|
1635
1701
|
class: "j-layout--top",
|
|
1636
|
-
style:
|
|
1702
|
+
style: ve({ height: S.value })
|
|
1637
1703
|
}, [
|
|
1638
1704
|
J("div", hl, [
|
|
1639
|
-
|
|
1705
|
+
ee(N.$slots, "top")
|
|
1640
1706
|
]),
|
|
1641
1707
|
e.topMove ? (n(), $("div", {
|
|
1642
1708
|
key: 0,
|
|
1643
1709
|
class: "j-layout--move",
|
|
1644
|
-
onMousedown:
|
|
1645
|
-
}, null, 32)) :
|
|
1646
|
-
], 4)) :
|
|
1710
|
+
onMousedown: H[1] || (H[1] = (A) => Y("top", A))
|
|
1711
|
+
}, null, 32)) : M("", !0)
|
|
1712
|
+
], 4)) : M("", !0),
|
|
1647
1713
|
J("div", {
|
|
1648
1714
|
ref_key: "mid",
|
|
1649
|
-
ref:
|
|
1650
|
-
class: "j-layout--wrapper"
|
|
1715
|
+
ref: a,
|
|
1716
|
+
class: "j-layout--wrapper",
|
|
1717
|
+
style: ve(ne.value)
|
|
1651
1718
|
}, [
|
|
1652
|
-
|
|
1653
|
-
],
|
|
1654
|
-
|
|
1719
|
+
ee(N.$slots, "default")
|
|
1720
|
+
], 4),
|
|
1721
|
+
U.value ? (n(), $("div", {
|
|
1655
1722
|
key: 1,
|
|
1656
1723
|
class: "j-layout--bottom",
|
|
1657
|
-
style:
|
|
1724
|
+
style: ve({ height: pe.value })
|
|
1658
1725
|
}, [
|
|
1659
1726
|
J("div", bl, [
|
|
1660
|
-
|
|
1727
|
+
ee(N.$slots, "bottom")
|
|
1661
1728
|
]),
|
|
1662
1729
|
e.bottomMove ? (n(), $("div", {
|
|
1663
1730
|
key: 0,
|
|
1664
1731
|
class: "j-layout--move",
|
|
1665
|
-
onMousedown:
|
|
1666
|
-
}, null, 32)) :
|
|
1667
|
-
], 4)) :
|
|
1668
|
-
]),
|
|
1669
|
-
|
|
1670
|
-
key:
|
|
1732
|
+
onMousedown: H[2] || (H[2] = (A) => Y("bottom", A))
|
|
1733
|
+
}, null, 32)) : M("", !0)
|
|
1734
|
+
], 4)) : M("", !0)
|
|
1735
|
+
])),
|
|
1736
|
+
z.value ? (n(), $("div", {
|
|
1737
|
+
key: 2,
|
|
1671
1738
|
class: "j-layout--right",
|
|
1672
|
-
style:
|
|
1739
|
+
style: ve({ width: G.value })
|
|
1673
1740
|
}, [
|
|
1674
1741
|
J("div", wl, [
|
|
1675
|
-
|
|
1742
|
+
ee(N.$slots, "right")
|
|
1676
1743
|
]),
|
|
1677
1744
|
e.rightMove ? (n(), $("div", {
|
|
1678
1745
|
key: 0,
|
|
1679
1746
|
class: "j-layout--move",
|
|
1680
|
-
onMousedown:
|
|
1681
|
-
}, null, 32)) :
|
|
1682
|
-
], 4)) :
|
|
1747
|
+
onMousedown: H[3] || (H[3] = (A) => Y("right", A))
|
|
1748
|
+
}, null, 32)) : M("", !0)
|
|
1749
|
+
], 4)) : M("", !0)
|
|
1683
1750
|
], 2));
|
|
1684
1751
|
}
|
|
1685
|
-
}), Cl =
|
|
1752
|
+
}), Cl = le(kl), xl = { class: "j-block" }, jl = /* @__PURE__ */ Z({
|
|
1686
1753
|
name: "JTable",
|
|
1687
1754
|
__name: "table",
|
|
1688
1755
|
props: {
|
|
@@ -1746,38 +1813,38 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1746
1813
|
setup(e, { expose: l, emit: o }) {
|
|
1747
1814
|
const t = e, a = o, c = x(null);
|
|
1748
1815
|
let s = null;
|
|
1749
|
-
const
|
|
1816
|
+
const r = () => {
|
|
1750
1817
|
if (!c.value) return;
|
|
1751
|
-
const
|
|
1818
|
+
const u = {
|
|
1752
1819
|
records: t.records,
|
|
1753
1820
|
columns: t.columns,
|
|
1754
1821
|
autoFillWidth: !0,
|
|
1755
1822
|
autoFillHeight: !0
|
|
1756
1823
|
};
|
|
1757
|
-
t.height && (
|
|
1758
|
-
...
|
|
1824
|
+
t.height && (u.height = t.height), t.stripe && (u.theme = {
|
|
1825
|
+
...mt.themes[t.theme === "dark" ? "DARK" : "DEFAULT"],
|
|
1759
1826
|
bodyStyle: {
|
|
1760
1827
|
bgColor: (v) => {
|
|
1761
|
-
const { row:
|
|
1762
|
-
return
|
|
1828
|
+
const { row: y } = v;
|
|
1829
|
+
return y % 2 === 0 ? t.theme === "dark" ? "#1a1a1a" : "#fafafa" : t.theme === "dark" ? "#0f0f0f" : "#ffffff";
|
|
1763
1830
|
}
|
|
1764
1831
|
}
|
|
1765
|
-
}), console.log(
|
|
1766
|
-
},
|
|
1832
|
+
}), console.log(u), s = new mt.ListTable(c.value, u), a("ready", s);
|
|
1833
|
+
}, m = () => {
|
|
1767
1834
|
s && (s.release(), s = null);
|
|
1768
1835
|
}, d = () => {
|
|
1769
1836
|
s && s.setRecords(t.records);
|
|
1770
|
-
},
|
|
1771
|
-
s && s.setRecords(
|
|
1772
|
-
},
|
|
1773
|
-
s && s.setColumns(
|
|
1774
|
-
},
|
|
1775
|
-
s && (
|
|
1837
|
+
}, f = () => s, i = (u) => {
|
|
1838
|
+
s && s.setRecords(u);
|
|
1839
|
+
}, p = (u) => {
|
|
1840
|
+
s && s.setColumns(u);
|
|
1841
|
+
}, b = () => {
|
|
1842
|
+
s && (m(), r());
|
|
1776
1843
|
};
|
|
1777
|
-
return
|
|
1778
|
-
|
|
1844
|
+
return Ze(() => {
|
|
1845
|
+
r();
|
|
1779
1846
|
}), xt(() => {
|
|
1780
|
-
|
|
1847
|
+
m();
|
|
1781
1848
|
}), Oe(
|
|
1782
1849
|
() => t.records,
|
|
1783
1850
|
() => {
|
|
@@ -1785,19 +1852,19 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1785
1852
|
},
|
|
1786
1853
|
{ deep: !0 }
|
|
1787
1854
|
), l({
|
|
1788
|
-
getInstance:
|
|
1789
|
-
setRecords:
|
|
1790
|
-
setColumns:
|
|
1791
|
-
refresh:
|
|
1792
|
-
}), (
|
|
1855
|
+
getInstance: f,
|
|
1856
|
+
setRecords: i,
|
|
1857
|
+
setColumns: p,
|
|
1858
|
+
refresh: b
|
|
1859
|
+
}), (u, v) => (n(), $("div", xl, [
|
|
1793
1860
|
J("div", {
|
|
1794
1861
|
ref_key: "tableContainer",
|
|
1795
1862
|
ref: c,
|
|
1796
|
-
class:
|
|
1863
|
+
class: Me(["j-table", { "j-table-border": e.border }])
|
|
1797
1864
|
}, null, 2)
|
|
1798
1865
|
]));
|
|
1799
1866
|
}
|
|
1800
|
-
}), Bl =
|
|
1867
|
+
}), Bl = le(jl), Sl = ["title"], $l = {
|
|
1801
1868
|
key: 0,
|
|
1802
1869
|
style: { "margin-left": "8px" }
|
|
1803
1870
|
}, zl = {
|
|
@@ -1806,7 +1873,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1806
1873
|
}, Vl = {
|
|
1807
1874
|
key: 1,
|
|
1808
1875
|
class: "j-dialog-btns"
|
|
1809
|
-
}, Tl = /* @__PURE__ */
|
|
1876
|
+
}, Tl = /* @__PURE__ */ Z({
|
|
1810
1877
|
name: "JDialog",
|
|
1811
1878
|
__name: "index",
|
|
1812
1879
|
props: {
|
|
@@ -1975,7 +2042,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1975
2042
|
setup(e, { expose: l, emit: o }) {
|
|
1976
2043
|
const t = e, a = o, { t: c } = Ve("jcode_app_provide", {
|
|
1977
2044
|
t: (O) => O
|
|
1978
|
-
}), s = x(!1),
|
|
2045
|
+
}), s = x(!1), r = x(!1), m = x(""), d = x(!1), f = x(!0), i = x(!1), p = x(!0), b = x(-1), u = Qe({
|
|
1979
2046
|
isMove: !1,
|
|
1980
2047
|
pageX: 0,
|
|
1981
2048
|
pageY: 0,
|
|
@@ -1983,101 +2050,101 @@ const Gt = /* @__PURE__ */ K({
|
|
|
1983
2050
|
top: 0,
|
|
1984
2051
|
_left: 0,
|
|
1985
2052
|
_top: 0
|
|
1986
|
-
}), v = x(0),
|
|
2053
|
+
}), v = x(0), y = x(), z = x(48), j = x(0), U = x(0);
|
|
1987
2054
|
Oe(
|
|
1988
2055
|
() => t.visible,
|
|
1989
2056
|
(O) => {
|
|
1990
|
-
v.value = 1, v.value = 0, s.value = O, O === !0 && t.zoomControls &&
|
|
1991
|
-
|
|
2057
|
+
v.value = 1, v.value = 0, s.value = O, O === !0 && t.zoomControls && Ce(() => {
|
|
2058
|
+
y.value = document.querySelector(".j-dialog"), y.value.onmousemove = Te;
|
|
1992
2059
|
});
|
|
1993
2060
|
},
|
|
1994
2061
|
{ immediate: !0 }
|
|
1995
2062
|
);
|
|
1996
|
-
const
|
|
2063
|
+
const ae = V(() => {
|
|
1997
2064
|
let O = t.height + v.value;
|
|
1998
2065
|
return O + 40 > window.innerHeight && (O = window.innerHeight - 32 - 40), O;
|
|
1999
|
-
}),
|
|
2066
|
+
}), G = V(() => {
|
|
2000
2067
|
let O = 0 + v.value;
|
|
2001
|
-
return O = (document.body.clientWidth -
|
|
2002
|
-
}), S =
|
|
2068
|
+
return O = (document.body.clientWidth - pe.value) / 2, O;
|
|
2069
|
+
}), S = V(() => {
|
|
2003
2070
|
let O = 0 + v.value;
|
|
2004
|
-
return O = (window.innerHeight -
|
|
2005
|
-
}),
|
|
2071
|
+
return O = (window.innerHeight - ae.value - 40) / 2, O;
|
|
2072
|
+
}), pe = V(() => {
|
|
2006
2073
|
let O = 0 + v.value;
|
|
2007
2074
|
return O = t.width, O > document.body.clientWidth && (O = document.body.clientWidth - 32), O;
|
|
2008
|
-
}),
|
|
2009
|
-
|
|
2010
|
-
},
|
|
2011
|
-
|
|
2012
|
-
},
|
|
2075
|
+
}), ne = (O) => {
|
|
2076
|
+
m.value = O || "保存数据中...", r.value = !0;
|
|
2077
|
+
}, Y = () => {
|
|
2078
|
+
r.value = !1;
|
|
2079
|
+
}, oe = () => {
|
|
2013
2080
|
t.beforeClose && t.beforeClose() === !1 || (s.value = !1, a("update:visible", !1), a("cancel"));
|
|
2014
|
-
},
|
|
2015
|
-
a("ok",
|
|
2081
|
+
}, F = () => {
|
|
2082
|
+
a("ok", ne, Y);
|
|
2016
2083
|
}, he = () => {
|
|
2017
|
-
|
|
2018
|
-
|
|
2084
|
+
u.left = 0, u.top = 0, U.value = 0, j.value = 0, t.isStep && (R.value = 0, Ce(() => {
|
|
2085
|
+
_();
|
|
2019
2086
|
})), a("closed");
|
|
2020
|
-
},
|
|
2087
|
+
}, R = V({
|
|
2021
2088
|
get() {
|
|
2022
|
-
return
|
|
2089
|
+
return b.value !== -1 ? b.value : t.stepActive;
|
|
2023
2090
|
},
|
|
2024
2091
|
set(O) {
|
|
2025
|
-
|
|
2092
|
+
b.value = O, a("update:stepActive", O);
|
|
2026
2093
|
}
|
|
2027
|
-
}),
|
|
2028
|
-
|
|
2029
|
-
|
|
2094
|
+
}), N = () => {
|
|
2095
|
+
R.value > 0 && R.value--, Ce(() => {
|
|
2096
|
+
_();
|
|
2030
2097
|
});
|
|
2031
|
-
},
|
|
2032
|
-
await
|
|
2033
|
-
|
|
2098
|
+
}, H = async () => {
|
|
2099
|
+
await A() && (R.value < t.steps.length - 1 && (R.value += 1), Ce(() => {
|
|
2100
|
+
_();
|
|
2034
2101
|
}));
|
|
2035
|
-
},
|
|
2102
|
+
}, A = async () => {
|
|
2036
2103
|
if (d.value = !0, t.validateSteps) {
|
|
2037
|
-
const O = await t.validateSteps(t.stepActive,
|
|
2104
|
+
const O = await t.validateSteps(t.stepActive, ne, Y);
|
|
2038
2105
|
return d.value = !1, O;
|
|
2039
2106
|
}
|
|
2040
2107
|
return d.value = !1, !0;
|
|
2041
|
-
},
|
|
2042
|
-
switch (
|
|
2108
|
+
}, _ = () => {
|
|
2109
|
+
switch (p.value = !0, i.value = !0, f.value = !0, R.value) {
|
|
2043
2110
|
case 0:
|
|
2044
|
-
|
|
2111
|
+
i.value = !1;
|
|
2045
2112
|
break;
|
|
2046
2113
|
case t.steps.length - 1:
|
|
2047
|
-
|
|
2114
|
+
f.value = !1, p.value = !1;
|
|
2048
2115
|
break;
|
|
2049
2116
|
default:
|
|
2050
|
-
|
|
2117
|
+
f.value = !1, i.value = !1;
|
|
2051
2118
|
break;
|
|
2052
2119
|
}
|
|
2053
|
-
},
|
|
2054
|
-
t.autoHeight || (
|
|
2055
|
-
},
|
|
2056
|
-
|
|
2057
|
-
},
|
|
2058
|
-
if (
|
|
2059
|
-
const
|
|
2060
|
-
let
|
|
2061
|
-
|
|
2120
|
+
}, K = V(() => t.steps.map((O) => ({ title: O, disabled: !0 }))), Se = function(O) {
|
|
2121
|
+
t.autoHeight || (u.pageX = O.pageX, u.pageY = O.pageY, u._left = u.left, u._top = u.top, u.isMove = !0, document.onmouseup = P, document.onmousemove = ge);
|
|
2122
|
+
}, P = () => {
|
|
2123
|
+
u.isMove = !1, document.onmouseup = null, document.onmousemove = null;
|
|
2124
|
+
}, ge = (O) => {
|
|
2125
|
+
if (u.isMove) {
|
|
2126
|
+
const be = O.pageX - u.pageX, me = O.pageY - u.pageY;
|
|
2127
|
+
let ie = u._left + be, ye = u._top + me;
|
|
2128
|
+
ie + G.value < 0 && (ie = -G.value), j.value ? ie + j.value + G.value > document.body.clientWidth && (ie = document.body.clientWidth - j.value - G.value) : ie + pe.value + G.value > document.body.clientWidth && (ie = document.body.clientWidth - pe.value - G.value), ye + S.value < 0 && (ye = -S.value), U.value ? ye + U.value + S.value + 40 > window.innerHeight && (ye = window.innerHeight - U.value - S.value - 40) : ye + ae.value + S.value + 40 > window.innerHeight && (ye = window.innerHeight - ae.value - S.value - 40), u.left = ie, u.top = ye;
|
|
2062
2129
|
}
|
|
2063
2130
|
}, Te = (O) => {
|
|
2064
|
-
const
|
|
2065
|
-
if (O.clientX >
|
|
2066
|
-
|
|
2067
|
-
else if (
|
|
2068
|
-
|
|
2069
|
-
else if (O.clientX >
|
|
2070
|
-
|
|
2071
|
-
else if (k + O.clientY >
|
|
2072
|
-
|
|
2131
|
+
const be = y.value.offsetLeft, me = y.value.offsetTop, ie = y.value.clientWidth, ye = y.value.clientHeight, xe = ye - z.value, k = y.value.scrollTop;
|
|
2132
|
+
if (O.clientX > be + ie - 10 && k + O.clientY > me + ye - 10 || k + O.clientY < me + 5 && be + 10 > O.clientX)
|
|
2133
|
+
y.value.style.cursor = "se-resize";
|
|
2134
|
+
else if (be + 10 > O.clientX && k + O.clientY > me + ye - 10 || O.clientX > be + ie - 10 && k + O.clientY < me + 5)
|
|
2135
|
+
y.value.style.cursor = "sw-resize";
|
|
2136
|
+
else if (O.clientX > be + ie - 10 || be + 10 > O.clientX)
|
|
2137
|
+
y.value.style.cursor = "w-resize";
|
|
2138
|
+
else if (k + O.clientY > me + ye - 10 || k + O.clientY < me + 5)
|
|
2139
|
+
y.value.style.cursor = "s-resize";
|
|
2073
2140
|
else {
|
|
2074
|
-
|
|
2141
|
+
y.value.style.cursor = "default", y.value.onmousedown = null;
|
|
2075
2142
|
return;
|
|
2076
2143
|
}
|
|
2077
|
-
|
|
2078
|
-
const { clientX:
|
|
2079
|
-
|
|
2080
|
-
|
|
2144
|
+
y.value.onmousedown = (D) => {
|
|
2145
|
+
const { clientX: Q } = D, { clientY: ue } = D, $e = u.left + G.value, Le = u.top + S.value;
|
|
2146
|
+
u._left = u.left, u._top = u.top, U.value || (U.value = xe), j.value || (j.value = ie), Q > $e + 10 && Q < $e + ie - 10 && ue > Le + 5 && ue < Le + 47 || (document.onmousemove = function(re) {
|
|
2147
|
+
re.preventDefault(), Q > $e && Q < $e + 10 && (Q > re.clientX && (j.value = ie + (Q - re.clientX), u.left = u._left - (Q - re.clientX)), Q < re.clientX && j.value > t.minWidth && (j.value = ie - (re.clientX - Q), u.left = u._left + re.clientX - Q)), Q > $e + ie - 10 && Q < $e + ie && (Q > re.clientX && j.value > t.minWidth && (j.value = ie - (Q - re.clientX)), Q < re.clientX && G.value + u.left + j.value < document.body.clientWidth && (j.value = ie + (re.clientX - Q))), ue > Le && ue < Le + 5 && (ue > re.clientY && (U.value = xe + ue - re.clientY, u.top = u._top - (ue - re.clientY)), ue < re.clientY && U.value > t.minHeight && (U.value = xe - (re.clientY - ue), u.top = u._top + re.clientY - ue)), k + ue > Le + xe + 38 && k + ue < Le + xe + 48 && (ue > re.clientY && U.value > t.minHeight && (U.value = xe - (ue - re.clientY)), ue < re.clientY && S.value + u.top + U.value + 48 < window.innerHeight && (U.value = xe + re.clientY - ue));
|
|
2081
2148
|
}, document.onmouseup = function() {
|
|
2082
2149
|
document.onmousemove = null, document.onmouseup = null;
|
|
2083
2150
|
});
|
|
@@ -2086,13 +2153,13 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2086
2153
|
O.click && await O.click();
|
|
2087
2154
|
};
|
|
2088
2155
|
return l({
|
|
2089
|
-
showLoading:
|
|
2090
|
-
hideLoading:
|
|
2091
|
-
}), (O,
|
|
2092
|
-
const
|
|
2093
|
-
return n(),
|
|
2156
|
+
showLoading: ne,
|
|
2157
|
+
hideLoading: Y
|
|
2158
|
+
}), (O, be) => {
|
|
2159
|
+
const me = L("j-button"), ie = L("el-space"), ye = L("el-step"), xe = L("el-steps"), k = L("el-dialog");
|
|
2160
|
+
return n(), h(k, {
|
|
2094
2161
|
modelValue: s.value,
|
|
2095
|
-
"onUpdate:modelValue":
|
|
2162
|
+
"onUpdate:modelValue": be[0] || (be[0] = (D) => s.value = D),
|
|
2096
2163
|
class: "j-dialog",
|
|
2097
2164
|
"align-center": "",
|
|
2098
2165
|
"append-to-body": !0,
|
|
@@ -2101,11 +2168,11 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2101
2168
|
modal: e.mask,
|
|
2102
2169
|
"modal-penetrable": !e.mask,
|
|
2103
2170
|
"close-on-click-modal": !1,
|
|
2104
|
-
width: `${j.value ||
|
|
2105
|
-
style:
|
|
2171
|
+
width: `${j.value || pe.value}px`,
|
|
2172
|
+
style: ve({
|
|
2106
2173
|
position: "fixed",
|
|
2107
|
-
left: `${
|
|
2108
|
-
top: `${S.value +
|
|
2174
|
+
left: `${G.value + u.left}px`,
|
|
2175
|
+
top: `${S.value + u.top}px`,
|
|
2109
2176
|
"pointer-events": e.mask ? "" : "none"
|
|
2110
2177
|
}),
|
|
2111
2178
|
onClosed: he
|
|
@@ -2117,111 +2184,111 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2117
2184
|
}, [
|
|
2118
2185
|
J("div", {
|
|
2119
2186
|
class: "j-dialog-header-left",
|
|
2120
|
-
title:
|
|
2121
|
-
style:
|
|
2187
|
+
title: E(c)(e.title || ""),
|
|
2188
|
+
style: ve({ cursor: e.autoHeight ? "" : "move" })
|
|
2122
2189
|
}, [
|
|
2123
|
-
J("span", null,
|
|
2190
|
+
J("span", null, de(E(c)(e.title || "")), 1),
|
|
2124
2191
|
e.subtitle ? (n(), $("span", $l, [
|
|
2125
|
-
(n(),
|
|
2126
|
-
])) :
|
|
2192
|
+
(n(), h(Ue(e.subtitle())))
|
|
2193
|
+
])) : M("", !0)
|
|
2127
2194
|
], 12, Sl),
|
|
2128
|
-
e.showCloseBtn ? (n(),
|
|
2195
|
+
e.showCloseBtn ? (n(), h(ie, {
|
|
2129
2196
|
key: 0,
|
|
2130
2197
|
size: 0
|
|
2131
2198
|
}, {
|
|
2132
2199
|
default: B(() => [
|
|
2133
|
-
q(
|
|
2200
|
+
q(me, {
|
|
2134
2201
|
type: "text",
|
|
2135
2202
|
icon: "material-symbols-light:close-rounded",
|
|
2136
|
-
onClick:
|
|
2203
|
+
onClick: oe
|
|
2137
2204
|
})
|
|
2138
2205
|
]),
|
|
2139
2206
|
_: 1
|
|
2140
|
-
})) :
|
|
2207
|
+
})) : M("", !0)
|
|
2141
2208
|
], 32),
|
|
2142
2209
|
J("div", {
|
|
2143
|
-
class:
|
|
2210
|
+
class: Me([
|
|
2144
2211
|
"j-dialog-window",
|
|
2145
2212
|
{ "j-dialog-window-hasBtns": e.hasBtns },
|
|
2146
2213
|
{ "j-dialog-window-hasSteps": e.isStep }
|
|
2147
2214
|
]),
|
|
2148
|
-
style:
|
|
2149
|
-
height: e.autoHeight ? "auto" : (
|
|
2215
|
+
style: ve({
|
|
2216
|
+
height: e.autoHeight ? "auto" : (U.value > 0 ? U.value : ae.value) + "px"
|
|
2150
2217
|
})
|
|
2151
2218
|
}, [
|
|
2152
2219
|
e.isStep ? (n(), $("div", zl, [
|
|
2153
2220
|
J("div", {
|
|
2154
|
-
style:
|
|
2221
|
+
style: ve({ maxWidth: `${200 * K.value.length}px`, width: "100%" })
|
|
2155
2222
|
}, [
|
|
2156
|
-
q(
|
|
2223
|
+
q(xe, {
|
|
2157
2224
|
simple: "",
|
|
2158
|
-
active:
|
|
2225
|
+
active: R.value,
|
|
2159
2226
|
space: 160,
|
|
2160
2227
|
"finish-status": "success"
|
|
2161
2228
|
}, {
|
|
2162
2229
|
default: B(() => [
|
|
2163
|
-
(n(!0), $(
|
|
2164
|
-
key:
|
|
2165
|
-
title:
|
|
2230
|
+
(n(!0), $(te, null, se(K.value, (D, Q) => (n(), h(ye, {
|
|
2231
|
+
key: Q,
|
|
2232
|
+
title: E(c)(D.title)
|
|
2166
2233
|
}, null, 8, ["title"]))), 128))
|
|
2167
2234
|
]),
|
|
2168
2235
|
_: 1
|
|
2169
2236
|
}, 8, ["active"])
|
|
2170
2237
|
], 4)
|
|
2171
|
-
])) :
|
|
2172
|
-
|
|
2238
|
+
])) : M("", !0),
|
|
2239
|
+
ee(O.$slots, "default"),
|
|
2173
2240
|
e.hasBtns ? (n(), $("div", Vl, [
|
|
2174
|
-
q(
|
|
2241
|
+
q(ie, { size: 8 }, {
|
|
2175
2242
|
default: B(() => [
|
|
2176
|
-
e.isStep ? (n(),
|
|
2243
|
+
e.isStep ? (n(), h(me, {
|
|
2177
2244
|
key: 0,
|
|
2178
2245
|
size: "mini",
|
|
2179
|
-
disabled:
|
|
2180
|
-
label:
|
|
2181
|
-
onClick:
|
|
2182
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2183
|
-
e.isStep ? (n(),
|
|
2246
|
+
disabled: f.value,
|
|
2247
|
+
label: E(c)("上一步"),
|
|
2248
|
+
onClick: N
|
|
2249
|
+
}, null, 8, ["disabled", "label"])) : M("", !0),
|
|
2250
|
+
e.isStep ? (n(), h(me, {
|
|
2184
2251
|
key: 1,
|
|
2185
2252
|
size: "mini",
|
|
2186
|
-
disabled:
|
|
2253
|
+
disabled: i.value,
|
|
2187
2254
|
loading: d.value,
|
|
2188
|
-
label:
|
|
2189
|
-
onClick:
|
|
2190
|
-
}, null, 8, ["disabled", "loading", "label"])) :
|
|
2191
|
-
!e.isStep && e.showCloseBtn ? (n(),
|
|
2255
|
+
label: E(c)("下一步"),
|
|
2256
|
+
onClick: H
|
|
2257
|
+
}, null, 8, ["disabled", "loading", "label"])) : M("", !0),
|
|
2258
|
+
!e.isStep && e.showCloseBtn ? (n(), h(me, {
|
|
2192
2259
|
key: 2,
|
|
2193
2260
|
size: "mini",
|
|
2194
|
-
label:
|
|
2195
|
-
onClick:
|
|
2196
|
-
}, null, 8, ["label"])) :
|
|
2197
|
-
(n(!0), $(
|
|
2198
|
-
key:
|
|
2199
|
-
label:
|
|
2200
|
-
danger:
|
|
2201
|
-
ghost:
|
|
2202
|
-
type:
|
|
2203
|
-
icon:
|
|
2204
|
-
onClick: (
|
|
2261
|
+
label: E(c)("取消"),
|
|
2262
|
+
onClick: oe
|
|
2263
|
+
}, null, 8, ["label"])) : M("", !0),
|
|
2264
|
+
(n(!0), $(te, null, se(e.buttons, (D) => (n(), h(me, {
|
|
2265
|
+
key: D.prop,
|
|
2266
|
+
label: D.label,
|
|
2267
|
+
danger: D.danger,
|
|
2268
|
+
ghost: D.ghost,
|
|
2269
|
+
type: D.type,
|
|
2270
|
+
icon: D.icon,
|
|
2271
|
+
onClick: (Q) => Ie(D)
|
|
2205
2272
|
}, null, 8, ["label", "danger", "ghost", "type", "icon", "onClick"]))), 128)),
|
|
2206
|
-
e.hasSaveBtn ? (n(),
|
|
2273
|
+
e.hasSaveBtn ? (n(), h(me, {
|
|
2207
2274
|
key: 3,
|
|
2208
2275
|
size: "mini",
|
|
2209
2276
|
type: "primary",
|
|
2210
|
-
disabled:
|
|
2211
|
-
label:
|
|
2212
|
-
onClick:
|
|
2213
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2277
|
+
disabled: p.value && e.isStep,
|
|
2278
|
+
label: E(c)(e.btnText),
|
|
2279
|
+
onClick: F
|
|
2280
|
+
}, null, 8, ["disabled", "label"])) : M("", !0)
|
|
2214
2281
|
]),
|
|
2215
2282
|
_: 1
|
|
2216
2283
|
})
|
|
2217
|
-
])) :
|
|
2284
|
+
])) : M("", !0)
|
|
2218
2285
|
], 6)
|
|
2219
2286
|
]),
|
|
2220
2287
|
_: 3
|
|
2221
2288
|
}, 8, ["modelValue", "destroy-on-close", "modal", "modal-penetrable", "width", "style"]);
|
|
2222
2289
|
};
|
|
2223
2290
|
}
|
|
2224
|
-
}), Ll =
|
|
2291
|
+
}), Ll = le(Tl), Il = ["element-loading-text"], Ol = { class: "j-dialog-full-header" }, Ml = { class: "j-dialog-full-header-left" }, Dl = ["src"], Al = { class: "j-dialog-full-title-text" }, Fl = { style: { height: "28px", "line-height": "32px", "margin-left": "8px" } }, Nl = { class: "j-dialog-full-header-right" }, Rl = { class: "j-dialog-full-body" }, El = /* @__PURE__ */ Z({
|
|
2225
2292
|
name: "JDialogFull",
|
|
2226
2293
|
__name: "index",
|
|
2227
2294
|
props: {
|
|
@@ -2335,68 +2402,68 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2335
2402
|
setup(e, { expose: l, emit: o }) {
|
|
2336
2403
|
const t = e, a = o, { logoImg: c, t: s } = Ve("jcode_app_provide", {
|
|
2337
2404
|
logoImg: "",
|
|
2338
|
-
t: (
|
|
2339
|
-
}),
|
|
2405
|
+
t: (F) => F
|
|
2406
|
+
}), r = x(!1), m = x(!1), d = x(""), f = x(!1), i = x(!0), p = x(!1), b = x(!0), u = x(-1);
|
|
2340
2407
|
Oe(
|
|
2341
2408
|
() => t.visible,
|
|
2342
|
-
(
|
|
2343
|
-
|
|
2409
|
+
(F) => {
|
|
2410
|
+
r.value = F;
|
|
2344
2411
|
},
|
|
2345
2412
|
{ immediate: !0 }
|
|
2346
2413
|
);
|
|
2347
|
-
const v =
|
|
2414
|
+
const v = V({
|
|
2348
2415
|
get() {
|
|
2349
|
-
return
|
|
2416
|
+
return u.value !== -1 ? u.value : t.stepActive;
|
|
2350
2417
|
},
|
|
2351
|
-
set(
|
|
2352
|
-
|
|
2418
|
+
set(F) {
|
|
2419
|
+
u.value = F, a("update:stepActive", F);
|
|
2353
2420
|
}
|
|
2354
|
-
}),
|
|
2355
|
-
t.beforeClose && t.beforeClose() === !1 || (
|
|
2356
|
-
},
|
|
2357
|
-
a("ok",
|
|
2421
|
+
}), y = () => {
|
|
2422
|
+
t.beforeClose && t.beforeClose() === !1 || (r.value = !1, a("update:visible", !1), a("cancel"));
|
|
2423
|
+
}, z = () => {
|
|
2424
|
+
a("ok", U, ae);
|
|
2358
2425
|
}, j = () => {
|
|
2359
|
-
t.isStep && (v.value = 0,
|
|
2360
|
-
|
|
2426
|
+
t.isStep && (v.value = 0, Ce(() => {
|
|
2427
|
+
ne();
|
|
2361
2428
|
})), a("closed");
|
|
2362
|
-
},
|
|
2363
|
-
d.value =
|
|
2364
|
-
},
|
|
2365
|
-
|
|
2366
|
-
},
|
|
2367
|
-
v.value > 0 && v.value--,
|
|
2368
|
-
|
|
2429
|
+
}, U = (F) => {
|
|
2430
|
+
d.value = F || "保存数据中...", m.value = !0;
|
|
2431
|
+
}, ae = () => {
|
|
2432
|
+
m.value = !1;
|
|
2433
|
+
}, G = () => {
|
|
2434
|
+
v.value > 0 && v.value--, Ce(() => {
|
|
2435
|
+
ne();
|
|
2369
2436
|
});
|
|
2370
2437
|
}, S = async () => {
|
|
2371
|
-
await
|
|
2372
|
-
|
|
2438
|
+
await pe() && (v.value < t.steps.length - 1 && (v.value += 1), Ce(() => {
|
|
2439
|
+
ne();
|
|
2373
2440
|
}));
|
|
2374
|
-
},
|
|
2375
|
-
if (
|
|
2376
|
-
const
|
|
2377
|
-
return
|
|
2441
|
+
}, pe = async () => {
|
|
2442
|
+
if (f.value = !0, t.validateSteps) {
|
|
2443
|
+
const F = await t.validateSteps(t.stepActive, U, ae);
|
|
2444
|
+
return f.value = !1, F;
|
|
2378
2445
|
}
|
|
2379
|
-
return
|
|
2380
|
-
},
|
|
2381
|
-
switch (
|
|
2446
|
+
return f.value = !1, !0;
|
|
2447
|
+
}, ne = () => {
|
|
2448
|
+
switch (b.value = !0, p.value = !0, i.value = !0, v.value) {
|
|
2382
2449
|
case 0:
|
|
2383
|
-
|
|
2450
|
+
p.value = !1;
|
|
2384
2451
|
break;
|
|
2385
2452
|
case t.steps.length - 1:
|
|
2386
|
-
|
|
2453
|
+
i.value = !1, b.value = !1;
|
|
2387
2454
|
break;
|
|
2388
2455
|
default:
|
|
2389
|
-
|
|
2456
|
+
i.value = !1, p.value = !1;
|
|
2390
2457
|
break;
|
|
2391
2458
|
}
|
|
2392
|
-
},
|
|
2393
|
-
|
|
2459
|
+
}, Y = V(() => t.steps.map((F) => ({ title: F, disabled: !0 }))), oe = async (F) => {
|
|
2460
|
+
F.click && await F.click();
|
|
2394
2461
|
};
|
|
2395
|
-
return l({ showLoading:
|
|
2396
|
-
const
|
|
2397
|
-
return n(),
|
|
2398
|
-
modelValue:
|
|
2399
|
-
"onUpdate:modelValue": he[0] || (he[0] = (
|
|
2462
|
+
return l({ showLoading: U, hideLoading: ae }), (F, he) => {
|
|
2463
|
+
const R = L("el-step"), N = L("el-steps"), H = L("j-button"), A = L("el-space"), _ = L("el-divider"), K = L("el-dialog"), Se = it("loading");
|
|
2464
|
+
return n(), h(K, {
|
|
2465
|
+
modelValue: r.value,
|
|
2466
|
+
"onUpdate:modelValue": he[0] || (he[0] = (P) => r.value = P),
|
|
2400
2467
|
class: "j-dialog-full",
|
|
2401
2468
|
width: "100%",
|
|
2402
2469
|
"append-to-body": !0,
|
|
@@ -2409,25 +2476,25 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2409
2476
|
default: B(() => [
|
|
2410
2477
|
Re((n(), $("div", {
|
|
2411
2478
|
class: "j-block j-dialog-full-window",
|
|
2412
|
-
"element-loading-text":
|
|
2479
|
+
"element-loading-text": E(s)(d.value)
|
|
2413
2480
|
}, [
|
|
2414
2481
|
J("div", Ol, [
|
|
2415
|
-
J("div",
|
|
2416
|
-
|
|
2482
|
+
J("div", Ml, [
|
|
2483
|
+
E(c) ? (n(), $("img", {
|
|
2417
2484
|
key: 0,
|
|
2418
2485
|
class: "j-dialog-full-header-logo",
|
|
2419
|
-
src:
|
|
2420
|
-
}, null, 8,
|
|
2421
|
-
J("span",
|
|
2422
|
-
J("span",
|
|
2423
|
-
e.subtitle ? (n(),
|
|
2486
|
+
src: E(c)
|
|
2487
|
+
}, null, 8, Dl)) : M("", !0),
|
|
2488
|
+
J("span", Al, de(E(s)(e.title)), 1),
|
|
2489
|
+
J("span", Fl, [
|
|
2490
|
+
e.subtitle ? (n(), h(Ue(e.subtitle()), { key: 0 })) : M("", !0)
|
|
2424
2491
|
])
|
|
2425
2492
|
]),
|
|
2426
2493
|
J("div", {
|
|
2427
2494
|
class: "j-dialog-full-header-mid",
|
|
2428
|
-
style:
|
|
2495
|
+
style: ve({ maxWidth: `${200 * Y.value.length}px` })
|
|
2429
2496
|
}, [
|
|
2430
|
-
e.isStep ? (n(),
|
|
2497
|
+
e.isStep ? (n(), h(N, {
|
|
2431
2498
|
key: 0,
|
|
2432
2499
|
simple: "",
|
|
2433
2500
|
active: v.value,
|
|
@@ -2435,96 +2502,96 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2435
2502
|
"finish-status": "success"
|
|
2436
2503
|
}, {
|
|
2437
2504
|
default: B(() => [
|
|
2438
|
-
(n(!0), $(
|
|
2439
|
-
key:
|
|
2440
|
-
title:
|
|
2505
|
+
(n(!0), $(te, null, se(Y.value, (P, ge) => (n(), h(R, {
|
|
2506
|
+
key: ge,
|
|
2507
|
+
title: E(s)(P.title)
|
|
2441
2508
|
}, null, 8, ["title"]))), 128))
|
|
2442
2509
|
]),
|
|
2443
2510
|
_: 1
|
|
2444
|
-
}, 8, ["active"])) :
|
|
2511
|
+
}, 8, ["active"])) : M("", !0)
|
|
2445
2512
|
], 4),
|
|
2446
2513
|
J("div", Nl, [
|
|
2447
|
-
q(
|
|
2514
|
+
q(A, { size: 0 }, {
|
|
2448
2515
|
default: B(() => [
|
|
2449
|
-
e.hasBtns ? (n(),
|
|
2516
|
+
e.hasBtns ? (n(), h(A, { key: 0 }, {
|
|
2450
2517
|
default: B(() => [
|
|
2451
|
-
e.isStep ? (n(),
|
|
2518
|
+
e.isStep ? (n(), h(H, {
|
|
2452
2519
|
key: 0,
|
|
2453
2520
|
size: "mini",
|
|
2454
|
-
disabled:
|
|
2455
|
-
label:
|
|
2456
|
-
onClick:
|
|
2457
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2458
|
-
e.isStep ? (n(),
|
|
2521
|
+
disabled: i.value,
|
|
2522
|
+
label: E(s)("上一步"),
|
|
2523
|
+
onClick: G
|
|
2524
|
+
}, null, 8, ["disabled", "label"])) : M("", !0),
|
|
2525
|
+
e.isStep ? (n(), h(H, {
|
|
2459
2526
|
key: 1,
|
|
2460
2527
|
size: "mini",
|
|
2461
|
-
disabled:
|
|
2462
|
-
loading:
|
|
2463
|
-
label:
|
|
2528
|
+
disabled: p.value,
|
|
2529
|
+
loading: f.value,
|
|
2530
|
+
label: E(s)("下一步"),
|
|
2464
2531
|
onClick: S
|
|
2465
|
-
}, null, 8, ["disabled", "loading", "label"])) :
|
|
2466
|
-
(n(!0), $(
|
|
2467
|
-
key:
|
|
2532
|
+
}, null, 8, ["disabled", "loading", "label"])) : M("", !0),
|
|
2533
|
+
(n(!0), $(te, null, se(e.buttons, (P) => (n(), $(te, {
|
|
2534
|
+
key: P.prop
|
|
2468
2535
|
}, [
|
|
2469
|
-
|
|
2536
|
+
P.display !== !1 ? (n(), h(H, {
|
|
2470
2537
|
key: 0,
|
|
2471
|
-
label:
|
|
2472
|
-
danger:
|
|
2473
|
-
ghost:
|
|
2474
|
-
type:
|
|
2475
|
-
disabled:
|
|
2476
|
-
icon:
|
|
2477
|
-
onClick: (
|
|
2478
|
-
}, null, 8, ["label", "danger", "ghost", "type", "disabled", "icon", "onClick"])) :
|
|
2538
|
+
label: P.label,
|
|
2539
|
+
danger: P.danger,
|
|
2540
|
+
ghost: P.ghost,
|
|
2541
|
+
type: P.type,
|
|
2542
|
+
disabled: P.disabled,
|
|
2543
|
+
icon: P.icon ? P.icon : "",
|
|
2544
|
+
onClick: (ge) => oe(P)
|
|
2545
|
+
}, null, 8, ["label", "danger", "ghost", "type", "disabled", "icon", "onClick"])) : M("", !0)
|
|
2479
2546
|
], 64))), 128)),
|
|
2480
|
-
e.hasSaveBtn ? (n(),
|
|
2547
|
+
e.hasSaveBtn ? (n(), h(H, {
|
|
2481
2548
|
key: 2,
|
|
2482
2549
|
size: "mini",
|
|
2483
2550
|
type: "primary",
|
|
2484
|
-
disabled:
|
|
2485
|
-
label:
|
|
2486
|
-
onClick:
|
|
2487
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2551
|
+
disabled: b.value && e.isStep,
|
|
2552
|
+
label: E(s)(e.btnText),
|
|
2553
|
+
onClick: z
|
|
2554
|
+
}, null, 8, ["disabled", "label"])) : M("", !0)
|
|
2488
2555
|
]),
|
|
2489
2556
|
_: 1
|
|
2490
|
-
})) :
|
|
2491
|
-
e.showCloseBtn && e.hasBtns ? (n(),
|
|
2557
|
+
})) : M("", !0),
|
|
2558
|
+
e.showCloseBtn && e.hasBtns ? (n(), h(_, {
|
|
2492
2559
|
key: 1,
|
|
2493
2560
|
type: "vertical",
|
|
2494
2561
|
style: { margin: "0 8px" }
|
|
2495
|
-
})) :
|
|
2496
|
-
e.showCloseBtn ? (n(),
|
|
2562
|
+
})) : M("", !0),
|
|
2563
|
+
e.showCloseBtn ? (n(), h(H, {
|
|
2497
2564
|
key: 2,
|
|
2498
2565
|
type: "text",
|
|
2499
2566
|
icon: "material-symbols-light:close-rounded",
|
|
2500
|
-
onClick:
|
|
2501
|
-
})) :
|
|
2567
|
+
onClick: y
|
|
2568
|
+
})) : M("", !0)
|
|
2502
2569
|
]),
|
|
2503
2570
|
_: 1
|
|
2504
2571
|
})
|
|
2505
2572
|
])
|
|
2506
2573
|
]),
|
|
2507
2574
|
J("div", Rl, [
|
|
2508
|
-
|
|
2575
|
+
ee(F.$slots, "default")
|
|
2509
2576
|
])
|
|
2510
2577
|
], 8, Il)), [
|
|
2511
|
-
[Se,
|
|
2578
|
+
[Se, m.value]
|
|
2512
2579
|
])
|
|
2513
2580
|
]),
|
|
2514
2581
|
_: 3
|
|
2515
2582
|
}, 8, ["modelValue", "destroy-on-close"]);
|
|
2516
2583
|
};
|
|
2517
2584
|
}
|
|
2518
|
-
}), Ul =
|
|
2585
|
+
}), Ul = le(El), Jl = ["element-loading-text"], Wl = { class: "j-block" }, Hl = {
|
|
2519
2586
|
key: 0,
|
|
2520
2587
|
class: "j-drawer-bottom-btns"
|
|
2521
|
-
},
|
|
2588
|
+
}, Pl = { class: "j-drawer--header" }, Yl = { class: "j-drawer--title" }, Xl = { style: { height: "28px", "line-height": "32px", "margin-left": "8px" } }, ql = {
|
|
2522
2589
|
key: 0,
|
|
2523
2590
|
class: "j-drawer--btns"
|
|
2524
2591
|
}, Gl = {
|
|
2525
2592
|
key: 0,
|
|
2526
2593
|
class: "j-drawer-steps"
|
|
2527
|
-
}, Kl = /* @__PURE__ */
|
|
2594
|
+
}, Kl = /* @__PURE__ */ Z({
|
|
2528
2595
|
name: "JDrawer",
|
|
2529
2596
|
__name: "drawer",
|
|
2530
2597
|
props: {
|
|
@@ -2673,175 +2740,175 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2673
2740
|
emits: ["update:visible", "update:stepActive", "closed", "ok", "cancel"],
|
|
2674
2741
|
setup(e, { expose: l, emit: o }) {
|
|
2675
2742
|
const t = e, { t: a } = Ve("jcode_app_provide", {
|
|
2676
|
-
t: (
|
|
2677
|
-
}), c = o, s = x(!1),
|
|
2743
|
+
t: (F) => F
|
|
2744
|
+
}), c = o, s = x(!1), r = x(""), m = V(() => ["ltr", "rtl"].indexOf(t.direction) !== -1 ? `${t.width}px` : `${t.height}px`), d = V({
|
|
2678
2745
|
get() {
|
|
2679
2746
|
return t.visible;
|
|
2680
2747
|
},
|
|
2681
|
-
set(
|
|
2682
|
-
c("update:visible", !!
|
|
2748
|
+
set(F) {
|
|
2749
|
+
c("update:visible", !!F);
|
|
2683
2750
|
}
|
|
2684
|
-
}),
|
|
2685
|
-
|
|
2686
|
-
},
|
|
2751
|
+
}), f = (F) => {
|
|
2752
|
+
r.value = F || "保存数据中...", s.value = !0;
|
|
2753
|
+
}, i = () => {
|
|
2687
2754
|
s.value = !1;
|
|
2688
|
-
},
|
|
2689
|
-
t.isStep && (
|
|
2690
|
-
|
|
2755
|
+
}, p = () => {
|
|
2756
|
+
t.isStep && (G.value = 0, Ce(() => {
|
|
2757
|
+
Y();
|
|
2691
2758
|
})), c("closed");
|
|
2692
|
-
},
|
|
2693
|
-
c("ok",
|
|
2694
|
-
},
|
|
2759
|
+
}, b = () => {
|
|
2760
|
+
c("ok", f, i);
|
|
2761
|
+
}, u = () => {
|
|
2695
2762
|
t.beforeClose && t.beforeClose() === !1 || (d.value = !1, c("update:visible", !1), c("cancel"));
|
|
2696
|
-
}, v = async (
|
|
2697
|
-
|
|
2698
|
-
},
|
|
2763
|
+
}, v = async (F) => {
|
|
2764
|
+
F.click && await F.click();
|
|
2765
|
+
}, y = x(!1), z = x(!0), j = x(!1), U = x(!0), ae = x(-1), G = V({
|
|
2699
2766
|
get() {
|
|
2700
|
-
return
|
|
2767
|
+
return ae.value !== -1 ? ae.value : t.stepActive;
|
|
2701
2768
|
},
|
|
2702
|
-
set(
|
|
2703
|
-
|
|
2769
|
+
set(F) {
|
|
2770
|
+
ae.value = F, c("update:stepActive", F);
|
|
2704
2771
|
}
|
|
2705
2772
|
}), S = () => {
|
|
2706
|
-
|
|
2707
|
-
|
|
2773
|
+
G.value > 0 && G.value--, Ce(() => {
|
|
2774
|
+
Y();
|
|
2708
2775
|
});
|
|
2709
|
-
},
|
|
2710
|
-
await
|
|
2711
|
-
|
|
2776
|
+
}, pe = async () => {
|
|
2777
|
+
await ne() && (G.value < t.steps.length - 1 && (G.value += 1), Ce(() => {
|
|
2778
|
+
Y();
|
|
2712
2779
|
}));
|
|
2713
|
-
},
|
|
2714
|
-
if (
|
|
2715
|
-
const
|
|
2716
|
-
return
|
|
2780
|
+
}, ne = async () => {
|
|
2781
|
+
if (y.value = !0, t.validateSteps) {
|
|
2782
|
+
const F = await t.validateSteps(t.stepActive, f, i);
|
|
2783
|
+
return y.value = !1, F;
|
|
2717
2784
|
}
|
|
2718
|
-
return
|
|
2719
|
-
},
|
|
2720
|
-
switch (
|
|
2785
|
+
return y.value = !1, !0;
|
|
2786
|
+
}, Y = () => {
|
|
2787
|
+
switch (U.value = !0, j.value = !0, z.value = !0, G.value) {
|
|
2721
2788
|
case 0:
|
|
2722
2789
|
j.value = !1;
|
|
2723
2790
|
break;
|
|
2724
2791
|
case t.steps.length - 1:
|
|
2725
|
-
|
|
2792
|
+
z.value = !1, U.value = !1;
|
|
2726
2793
|
break;
|
|
2727
2794
|
default:
|
|
2728
|
-
|
|
2795
|
+
z.value = !1, j.value = !1;
|
|
2729
2796
|
break;
|
|
2730
2797
|
}
|
|
2731
|
-
},
|
|
2732
|
-
return l({ showLoading:
|
|
2733
|
-
const
|
|
2734
|
-
return n(),
|
|
2798
|
+
}, oe = V(() => t.steps.map((F) => ({ title: F, disabled: !0 })));
|
|
2799
|
+
return l({ showLoading: f, hideLoading: i }), (F, he) => {
|
|
2800
|
+
const R = L("el-input"), N = L("j-button"), H = L("el-space"), A = L("el-step"), _ = L("el-steps"), K = L("el-drawer"), Se = it("loading");
|
|
2801
|
+
return n(), h(K, {
|
|
2735
2802
|
modelValue: d.value,
|
|
2736
|
-
"onUpdate:modelValue": he[0] || (he[0] = (
|
|
2803
|
+
"onUpdate:modelValue": he[0] || (he[0] = (P) => d.value = P),
|
|
2737
2804
|
class: "j-drawer",
|
|
2738
2805
|
"append-to-body": !0,
|
|
2739
2806
|
direction: e.direction,
|
|
2740
|
-
size:
|
|
2807
|
+
size: m.value,
|
|
2741
2808
|
"with-header": !1,
|
|
2742
2809
|
"wrapper-closable": !0,
|
|
2743
2810
|
"destroy-on-close": e.destroyOnClose,
|
|
2744
2811
|
modal: e.mask,
|
|
2745
2812
|
"before-close": e.beforeClose,
|
|
2746
2813
|
"close-on-click-modal": !0,
|
|
2747
|
-
onClosed:
|
|
2814
|
+
onClosed: p
|
|
2748
2815
|
}, {
|
|
2749
2816
|
default: B(() => [
|
|
2750
2817
|
Re((n(), $("div", {
|
|
2751
|
-
class:
|
|
2752
|
-
"element-loading-text":
|
|
2818
|
+
class: Me(["j-drawer--warpper", { "j-drawer--warpper-hasSteps": e.isStep }]),
|
|
2819
|
+
"element-loading-text": r.value
|
|
2753
2820
|
}, [
|
|
2754
2821
|
J("div", {
|
|
2755
2822
|
class: "j-drawer--body",
|
|
2756
|
-
style:
|
|
2823
|
+
style: ve({
|
|
2757
2824
|
"padding-bottom": e.showCloseBtn || e.hasSaveBtn || e.buttons.length > 0 ? "48px" : "0"
|
|
2758
2825
|
})
|
|
2759
2826
|
}, [
|
|
2760
|
-
q(
|
|
2761
|
-
J("div",
|
|
2762
|
-
|
|
2827
|
+
q(R, { style: { position: "absolute", top: "-200px" } }),
|
|
2828
|
+
J("div", Wl, [
|
|
2829
|
+
ee(F.$slots, "default")
|
|
2763
2830
|
]),
|
|
2764
|
-
e.hasBtns ? (n(), $("div",
|
|
2765
|
-
q(
|
|
2831
|
+
e.hasBtns ? (n(), $("div", Hl, [
|
|
2832
|
+
q(H, { size: 8 }, {
|
|
2766
2833
|
default: B(() => [
|
|
2767
|
-
e.isStep ? (n(),
|
|
2834
|
+
e.isStep ? (n(), h(N, {
|
|
2768
2835
|
key: 0,
|
|
2769
2836
|
size: "mini",
|
|
2770
|
-
disabled:
|
|
2771
|
-
label:
|
|
2837
|
+
disabled: z.value,
|
|
2838
|
+
label: E(a)("上一步"),
|
|
2772
2839
|
onClick: S
|
|
2773
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2774
|
-
e.isStep ? (n(),
|
|
2840
|
+
}, null, 8, ["disabled", "label"])) : M("", !0),
|
|
2841
|
+
e.isStep ? (n(), h(N, {
|
|
2775
2842
|
key: 1,
|
|
2776
2843
|
size: "mini",
|
|
2777
2844
|
disabled: j.value,
|
|
2778
|
-
loading:
|
|
2779
|
-
label:
|
|
2780
|
-
onClick:
|
|
2781
|
-
}, null, 8, ["disabled", "loading", "label"])) :
|
|
2782
|
-
!e.isStep && e.showCloseBtn ? (n(),
|
|
2845
|
+
loading: y.value,
|
|
2846
|
+
label: E(a)("下一步"),
|
|
2847
|
+
onClick: pe
|
|
2848
|
+
}, null, 8, ["disabled", "loading", "label"])) : M("", !0),
|
|
2849
|
+
!e.isStep && e.showCloseBtn ? (n(), h(N, {
|
|
2783
2850
|
key: 2,
|
|
2784
2851
|
size: "mini",
|
|
2785
|
-
label:
|
|
2786
|
-
onClick:
|
|
2787
|
-
}, null, 8, ["label"])) :
|
|
2788
|
-
(n(!0), $(
|
|
2789
|
-
key:
|
|
2790
|
-
label:
|
|
2791
|
-
danger:
|
|
2792
|
-
ghost:
|
|
2793
|
-
type:
|
|
2794
|
-
icon:
|
|
2795
|
-
onClick: (
|
|
2852
|
+
label: E(a)("取消"),
|
|
2853
|
+
onClick: u
|
|
2854
|
+
}, null, 8, ["label"])) : M("", !0),
|
|
2855
|
+
(n(!0), $(te, null, se(e.buttons, (P) => (n(), h(N, {
|
|
2856
|
+
key: P.prop,
|
|
2857
|
+
label: P.label,
|
|
2858
|
+
danger: P.danger,
|
|
2859
|
+
ghost: P.ghost,
|
|
2860
|
+
type: P.type,
|
|
2861
|
+
icon: P.icon,
|
|
2862
|
+
onClick: (ge) => v(P)
|
|
2796
2863
|
}, null, 8, ["label", "danger", "ghost", "type", "icon", "onClick"]))), 128)),
|
|
2797
|
-
e.hasSaveBtn ? (n(),
|
|
2864
|
+
e.hasSaveBtn ? (n(), h(N, {
|
|
2798
2865
|
key: 3,
|
|
2799
2866
|
size: "mini",
|
|
2800
2867
|
type: "primary",
|
|
2801
|
-
disabled:
|
|
2802
|
-
label:
|
|
2803
|
-
onClick:
|
|
2804
|
-
}, null, 8, ["disabled", "label"])) :
|
|
2868
|
+
disabled: U.value && e.isStep,
|
|
2869
|
+
label: E(a)(e.btnText),
|
|
2870
|
+
onClick: b
|
|
2871
|
+
}, null, 8, ["disabled", "label"])) : M("", !0)
|
|
2805
2872
|
]),
|
|
2806
2873
|
_: 1
|
|
2807
2874
|
})
|
|
2808
|
-
])) :
|
|
2875
|
+
])) : M("", !0)
|
|
2809
2876
|
], 4),
|
|
2810
|
-
J("div",
|
|
2811
|
-
J("div",
|
|
2812
|
-
J("span", null,
|
|
2877
|
+
J("div", Pl, [
|
|
2878
|
+
J("div", Yl, [
|
|
2879
|
+
J("span", null, de(E(a)(e.title)), 1),
|
|
2813
2880
|
J("span", Xl, [
|
|
2814
|
-
e.subtitle ? (n(),
|
|
2881
|
+
e.subtitle ? (n(), h(Ue(e.subtitle()), { key: 0 })) : M("", !0)
|
|
2815
2882
|
])
|
|
2816
2883
|
]),
|
|
2817
2884
|
e.showCloseBtn ? (n(), $("div", ql, [
|
|
2818
|
-
q(
|
|
2885
|
+
q(N, {
|
|
2819
2886
|
type: "text",
|
|
2820
2887
|
icon: "material-symbols-light:close-rounded",
|
|
2821
|
-
onClick:
|
|
2888
|
+
onClick: u
|
|
2822
2889
|
})
|
|
2823
|
-
])) :
|
|
2890
|
+
])) : M("", !0)
|
|
2824
2891
|
]),
|
|
2825
2892
|
e.isStep ? (n(), $("div", Gl, [
|
|
2826
2893
|
J("div", {
|
|
2827
|
-
style:
|
|
2894
|
+
style: ve({ maxWidth: `${200 * oe.value.length}px`, width: "100%" })
|
|
2828
2895
|
}, [
|
|
2829
|
-
q(
|
|
2896
|
+
q(_, {
|
|
2830
2897
|
simple: "",
|
|
2831
|
-
active:
|
|
2898
|
+
active: G.value,
|
|
2832
2899
|
space: 160,
|
|
2833
2900
|
"finish-status": "success"
|
|
2834
2901
|
}, {
|
|
2835
2902
|
default: B(() => [
|
|
2836
|
-
(n(!0), $(
|
|
2837
|
-
key:
|
|
2838
|
-
title:
|
|
2903
|
+
(n(!0), $(te, null, se(oe.value, (P, ge) => (n(), h(A, {
|
|
2904
|
+
key: ge,
|
|
2905
|
+
title: E(a)(P.title)
|
|
2839
2906
|
}, null, 8, ["title"]))), 128))
|
|
2840
2907
|
]),
|
|
2841
2908
|
_: 1
|
|
2842
2909
|
}, 8, ["active"])
|
|
2843
2910
|
], 4)
|
|
2844
|
-
])) :
|
|
2911
|
+
])) : M("", !0)
|
|
2845
2912
|
], 10, Jl)), [
|
|
2846
2913
|
[Se, s.value]
|
|
2847
2914
|
])
|
|
@@ -2850,7 +2917,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2850
2917
|
}, 8, ["modelValue", "direction", "size", "destroy-on-close", "modal", "before-close"]);
|
|
2851
2918
|
};
|
|
2852
2919
|
}
|
|
2853
|
-
}), Ql =
|
|
2920
|
+
}), Ql = le(Kl), Zl = /* @__PURE__ */ Z({
|
|
2854
2921
|
name: "JLayer",
|
|
2855
2922
|
__name: "layer",
|
|
2856
2923
|
props: {
|
|
@@ -2949,33 +3016,33 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2949
3016
|
},
|
|
2950
3017
|
emits: ["ok", "closed", "cancel"],
|
|
2951
3018
|
setup(e, { expose: l, emit: o }) {
|
|
2952
|
-
const t = o, a = x(!1), c = x(""), s = x(),
|
|
2953
|
-
c.value =
|
|
2954
|
-
},
|
|
3019
|
+
const t = o, a = x(!1), c = x(""), s = x(), r = x(0), m = x(""), d = x(), f = (z, j, U) => {
|
|
3020
|
+
c.value = z, d.value = U, m.value = j || "modal", a.value = !0;
|
|
3021
|
+
}, i = () => {
|
|
2955
3022
|
a.value = !1;
|
|
2956
|
-
},
|
|
2957
|
-
t("ok",
|
|
2958
|
-
},
|
|
2959
|
-
|
|
2960
|
-
},
|
|
3023
|
+
}, p = (z, j) => {
|
|
3024
|
+
t("ok", z, j);
|
|
3025
|
+
}, b = () => {
|
|
3026
|
+
r.value = 0, t("closed");
|
|
3027
|
+
}, u = () => {
|
|
2961
3028
|
t("cancel");
|
|
2962
|
-
}, v = (
|
|
2963
|
-
s.value && s.value.showLoading(
|
|
2964
|
-
},
|
|
3029
|
+
}, v = (z) => {
|
|
3030
|
+
s.value && s.value.showLoading(z);
|
|
3031
|
+
}, y = () => {
|
|
2965
3032
|
s.value && s.value.hideLoading();
|
|
2966
3033
|
};
|
|
2967
3034
|
return st("jcode_layer_provide", {
|
|
2968
|
-
stepActive:
|
|
2969
|
-
}), l({ open:
|
|
2970
|
-
const
|
|
2971
|
-
return
|
|
3035
|
+
stepActive: r
|
|
3036
|
+
}), l({ open: f, close: i, showLoading: v, hideLoading: y }), (z, j) => {
|
|
3037
|
+
const U = L("j-dialog-full"), ae = L("j-drawer"), G = L("j-dialog");
|
|
3038
|
+
return m.value === "full" ? (n(), h(U, {
|
|
2972
3039
|
key: 0,
|
|
2973
3040
|
ref_key: "modalRef",
|
|
2974
3041
|
ref: s,
|
|
2975
3042
|
visible: a.value,
|
|
2976
3043
|
"onUpdate:visible": j[0] || (j[0] = (S) => a.value = S),
|
|
2977
|
-
"step-active":
|
|
2978
|
-
"onUpdate:stepActive": j[1] || (j[1] = (S) =>
|
|
3044
|
+
"step-active": r.value,
|
|
3045
|
+
"onUpdate:stepActive": j[1] || (j[1] = (S) => r.value = S),
|
|
2979
3046
|
title: c.value,
|
|
2980
3047
|
"before-close": e.beforeClose,
|
|
2981
3048
|
"is-step": e.isStep,
|
|
@@ -2988,22 +3055,22 @@ const Gt = /* @__PURE__ */ K({
|
|
|
2988
3055
|
"has-save-btn": e.hasSaveBtn,
|
|
2989
3056
|
"has-header": e.hasHeader,
|
|
2990
3057
|
subtitle: d.value,
|
|
2991
|
-
onOk:
|
|
2992
|
-
onClosed:
|
|
2993
|
-
onCancel:
|
|
3058
|
+
onOk: p,
|
|
3059
|
+
onClosed: b,
|
|
3060
|
+
onCancel: u
|
|
2994
3061
|
}, {
|
|
2995
3062
|
default: B(() => [
|
|
2996
|
-
|
|
3063
|
+
ee(z.$slots, "default")
|
|
2997
3064
|
]),
|
|
2998
3065
|
_: 3
|
|
2999
|
-
}, 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"])) :
|
|
3066
|
+
}, 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"])) : m.value === "drawer" ? (n(), h(ae, {
|
|
3000
3067
|
key: 1,
|
|
3001
3068
|
ref_key: "modalRef",
|
|
3002
3069
|
ref: s,
|
|
3003
3070
|
visible: a.value,
|
|
3004
3071
|
"onUpdate:visible": j[2] || (j[2] = (S) => a.value = S),
|
|
3005
|
-
"step-active":
|
|
3006
|
-
"onUpdate:stepActive": j[3] || (j[3] = (S) =>
|
|
3072
|
+
"step-active": r.value,
|
|
3073
|
+
"onUpdate:stepActive": j[3] || (j[3] = (S) => r.value = S),
|
|
3007
3074
|
"is-step": e.isStep,
|
|
3008
3075
|
steps: e.steps,
|
|
3009
3076
|
"validate-steps": e.validateSteps,
|
|
@@ -3014,22 +3081,22 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3014
3081
|
"has-save-btn": e.hasSaveBtn,
|
|
3015
3082
|
"has-header": e.hasHeader,
|
|
3016
3083
|
subtitle: d.value,
|
|
3017
|
-
onOk:
|
|
3018
|
-
onClosed:
|
|
3019
|
-
onCancel:
|
|
3084
|
+
onOk: p,
|
|
3085
|
+
onClosed: b,
|
|
3086
|
+
onCancel: u
|
|
3020
3087
|
}, {
|
|
3021
3088
|
default: B(() => [
|
|
3022
|
-
|
|
3089
|
+
ee(z.$slots, "default")
|
|
3023
3090
|
]),
|
|
3024
3091
|
_: 3
|
|
3025
|
-
}, 8, ["visible", "step-active", "is-step", "steps", "validate-steps", "has-btns", "btn-text", "destroy-on-close", "buttons", "has-save-btn", "has-header", "subtitle"])) : (n(),
|
|
3092
|
+
}, 8, ["visible", "step-active", "is-step", "steps", "validate-steps", "has-btns", "btn-text", "destroy-on-close", "buttons", "has-save-btn", "has-header", "subtitle"])) : (n(), h(G, {
|
|
3026
3093
|
key: 2,
|
|
3027
3094
|
ref_key: "modalRef",
|
|
3028
3095
|
ref: s,
|
|
3029
3096
|
visible: a.value,
|
|
3030
3097
|
"onUpdate:visible": j[4] || (j[4] = (S) => a.value = S),
|
|
3031
|
-
"step-active":
|
|
3032
|
-
"onUpdate:stepActive": j[5] || (j[5] = (S) =>
|
|
3098
|
+
"step-active": r.value,
|
|
3099
|
+
"onUpdate:stepActive": j[5] || (j[5] = (S) => r.value = S),
|
|
3033
3100
|
width: e.width,
|
|
3034
3101
|
height: e.height,
|
|
3035
3102
|
title: c.value,
|
|
@@ -3043,113 +3110,113 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3043
3110
|
steps: e.steps,
|
|
3044
3111
|
"validate-steps": e.validateSteps,
|
|
3045
3112
|
subtitle: d.value,
|
|
3046
|
-
onOk:
|
|
3047
|
-
onClosed:
|
|
3048
|
-
onCancel:
|
|
3113
|
+
onOk: p,
|
|
3114
|
+
onClosed: b,
|
|
3115
|
+
onCancel: u
|
|
3049
3116
|
}, {
|
|
3050
3117
|
default: B(() => [
|
|
3051
|
-
|
|
3118
|
+
ee(z.$slots, "default")
|
|
3052
3119
|
]),
|
|
3053
3120
|
_: 3
|
|
3054
3121
|
}, 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"]));
|
|
3055
3122
|
};
|
|
3056
3123
|
}
|
|
3057
|
-
}), _l =
|
|
3124
|
+
}), _l = le(Zl), eo = /* @__PURE__ */ Z({
|
|
3058
3125
|
name: "JDynamicLayer",
|
|
3059
3126
|
__name: "dynamic-layer",
|
|
3060
3127
|
setup(e, { expose: l }) {
|
|
3061
|
-
const o = x(), t = x(600), a = x(400), c = x(!0), s = x(!0),
|
|
3128
|
+
const o = x(), t = x(600), a = x(400), c = x(!0), s = x(!0), r = x(!0), m = x(""), d = x([]), f = x(!0), i = x(), p = at(), b = x(), { getPageName: u } = Ve("jcode_auth_page_provide", {
|
|
3062
3129
|
getPageName: () => ""
|
|
3063
3130
|
}), v = () => {
|
|
3064
|
-
const
|
|
3065
|
-
return
|
|
3066
|
-
},
|
|
3067
|
-
if (
|
|
3131
|
+
const R = u();
|
|
3132
|
+
return R || (typeof p.value == "string" ? p.value : "");
|
|
3133
|
+
}, y = x(!1), z = x([]), j = async (R) => {
|
|
3134
|
+
if (i.value?.validateSteps) {
|
|
3068
3135
|
Je(!0);
|
|
3069
|
-
const
|
|
3070
|
-
return Je(!1),
|
|
3136
|
+
const N = i.value.validateSteps(R);
|
|
3137
|
+
return Je(!1), N;
|
|
3071
3138
|
}
|
|
3072
3139
|
return !0;
|
|
3073
|
-
},
|
|
3074
|
-
let
|
|
3075
|
-
const
|
|
3076
|
-
if (
|
|
3077
|
-
if (
|
|
3078
|
-
const
|
|
3079
|
-
d.value =
|
|
3140
|
+
}, U = () => i.value?.beforeClose ? i.value.beforeClose() : !0;
|
|
3141
|
+
let ae, G, S, pe = 0;
|
|
3142
|
+
const ne = async (R) => {
|
|
3143
|
+
if (i.value) {
|
|
3144
|
+
if (pe = 0, i.value.getConfig) {
|
|
3145
|
+
const N = i.value.getConfig();
|
|
3146
|
+
d.value = N.buttons || [], y.value = N.isStep, z.value = N.steps || [];
|
|
3080
3147
|
} else
|
|
3081
|
-
d.value = [],
|
|
3082
|
-
if (
|
|
3148
|
+
d.value = [], y.value = !1, z.value = [];
|
|
3149
|
+
if (i.value.open)
|
|
3083
3150
|
try {
|
|
3084
|
-
const { buttons:
|
|
3085
|
-
|
|
3151
|
+
const { buttons: N } = await i.value.open(R, o.value, () => {
|
|
3152
|
+
ae && ae();
|
|
3086
3153
|
}) || {};
|
|
3087
|
-
if (
|
|
3088
|
-
const
|
|
3089
|
-
|
|
3154
|
+
if (N && N.length > 0) {
|
|
3155
|
+
const H = [];
|
|
3156
|
+
H.push(...d.value), H.push(...N), d.value = H;
|
|
3090
3157
|
}
|
|
3091
|
-
} catch (
|
|
3092
|
-
o.value.close(), console.error(
|
|
3158
|
+
} catch (N) {
|
|
3159
|
+
o.value.close(), console.error(N);
|
|
3093
3160
|
}
|
|
3094
3161
|
o.value.hideLoading();
|
|
3095
3162
|
} else {
|
|
3096
|
-
if (
|
|
3163
|
+
if (pe > 600) {
|
|
3097
3164
|
console.warn("表单组件加载超时"), o.value.hideLoading();
|
|
3098
3165
|
return;
|
|
3099
3166
|
}
|
|
3100
|
-
|
|
3101
|
-
await
|
|
3167
|
+
pe++, setTimeout(async () => {
|
|
3168
|
+
await ne(R);
|
|
3102
3169
|
}, 100);
|
|
3103
3170
|
}
|
|
3104
|
-
},
|
|
3105
|
-
|
|
3106
|
-
o.value.showLoading("加载中"), await
|
|
3171
|
+
}, Y = (R) => {
|
|
3172
|
+
p.value = R?.name, t.value = R?.width || 600, a.value = R?.height || 400, c.value = R?.hasBtns !== !1, s.value = R?.hasSaveBtn !== !1, r.value = R?.hasHeader !== !1, R?.destroyOnClose !== !1 && (f.value = !0), b.value = R?.config || {}, m.value = R?.btnText || "保存", ae = R?.afterOk || null, G = R?.afterClose || null, S = R?.afterCancel || null, o.value.open(R.title, R.type, R.subtitle), Ce(async () => {
|
|
3173
|
+
o.value.showLoading("加载中"), await ne(R.param || {});
|
|
3107
3174
|
});
|
|
3108
|
-
},
|
|
3109
|
-
if (
|
|
3175
|
+
}, oe = async () => {
|
|
3176
|
+
if (i.value?.ok) {
|
|
3110
3177
|
Je(!0);
|
|
3111
|
-
const
|
|
3112
|
-
|
|
3178
|
+
const R = await i.value.ok();
|
|
3179
|
+
R && (o.value.close(), ae && await ae(R)), Je(!1);
|
|
3113
3180
|
}
|
|
3114
|
-
},
|
|
3115
|
-
|
|
3181
|
+
}, F = () => {
|
|
3182
|
+
i.value?.closed && i.value.closed(), G && G();
|
|
3116
3183
|
}, he = () => {
|
|
3117
3184
|
S && S();
|
|
3118
3185
|
};
|
|
3119
3186
|
return st("jcode_auth_page_provide", {
|
|
3120
3187
|
getPageName: v
|
|
3121
|
-
}), l({ open:
|
|
3122
|
-
const
|
|
3123
|
-
return n(),
|
|
3188
|
+
}), l({ open: Y }), (R, N) => {
|
|
3189
|
+
const H = L("j-layer");
|
|
3190
|
+
return n(), h(H, {
|
|
3124
3191
|
ref_key: "layerRef",
|
|
3125
3192
|
ref: o,
|
|
3126
3193
|
width: t.value,
|
|
3127
3194
|
height: a.value,
|
|
3128
|
-
"before-close":
|
|
3195
|
+
"before-close": U,
|
|
3129
3196
|
"validate-steps": j,
|
|
3130
|
-
"is-step":
|
|
3131
|
-
steps:
|
|
3197
|
+
"is-step": y.value,
|
|
3198
|
+
steps: z.value,
|
|
3132
3199
|
"has-btns": c.value,
|
|
3133
3200
|
buttons: d.value,
|
|
3134
|
-
"btn-text":
|
|
3135
|
-
"destroy-on-close":
|
|
3201
|
+
"btn-text": m.value,
|
|
3202
|
+
"destroy-on-close": f.value,
|
|
3136
3203
|
"has-save-btn": s.value,
|
|
3137
|
-
"has-header":
|
|
3138
|
-
onOk:
|
|
3139
|
-
onClosed:
|
|
3204
|
+
"has-header": r.value,
|
|
3205
|
+
onOk: oe,
|
|
3206
|
+
onClosed: F,
|
|
3140
3207
|
onCancel: he
|
|
3141
3208
|
}, {
|
|
3142
3209
|
default: B(() => [
|
|
3143
|
-
(n(),
|
|
3210
|
+
(n(), h(Ue(p.value), ke({
|
|
3144
3211
|
ref_key: "componentRef",
|
|
3145
|
-
ref:
|
|
3146
|
-
},
|
|
3212
|
+
ref: i
|
|
3213
|
+
}, b.value), null, 16))
|
|
3147
3214
|
]),
|
|
3148
3215
|
_: 1
|
|
3149
3216
|
}, 8, ["width", "height", "is-step", "steps", "has-btns", "buttons", "btn-text", "destroy-on-close", "has-save-btn", "has-header"]);
|
|
3150
3217
|
};
|
|
3151
3218
|
}
|
|
3152
|
-
}), to =
|
|
3219
|
+
}), to = le(eo), lo = /* @__PURE__ */ Z({
|
|
3153
3220
|
name: "JInputTag",
|
|
3154
3221
|
__name: "input-tag",
|
|
3155
3222
|
props: {
|
|
@@ -3163,45 +3230,45 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3163
3230
|
},
|
|
3164
3231
|
emits: ["update:modelValue", "change", "select", "search"],
|
|
3165
3232
|
setup(e, { emit: l }) {
|
|
3166
|
-
const o = e, t = l, a = x(), c =
|
|
3233
|
+
const o = e, t = l, a = x(), c = V(
|
|
3167
3234
|
() => ze(o.modelValue) ? [] : o.modelValue?.split(",") || []
|
|
3168
|
-
), s =
|
|
3169
|
-
let
|
|
3170
|
-
return
|
|
3171
|
-
}) || [] : o.colors),
|
|
3172
|
-
|
|
3173
|
-
},
|
|
3235
|
+
), s = V(() => o.isStyleLoop ? c.value?.map((f, i) => {
|
|
3236
|
+
let p = o.colors[i % o.colors.length] || {};
|
|
3237
|
+
return p = { ...p, borderWidth: (p.borderWidth || 0) + "px" }, p;
|
|
3238
|
+
}) || [] : o.colors), r = (f) => {
|
|
3239
|
+
m(), t("select", f);
|
|
3240
|
+
}, m = () => {
|
|
3174
3241
|
a.value && (c.value.push(a.value), a.value = "", t("update:modelValue", c.value.join(",")), t("change", { value: c.value.join(",") }));
|
|
3175
|
-
}, d = (
|
|
3176
|
-
c.value.splice(
|
|
3242
|
+
}, d = (f) => {
|
|
3243
|
+
c.value.splice(f, 1), t("update:modelValue", c.value.join(",")), t("change", { value: c.value.join(",") });
|
|
3177
3244
|
};
|
|
3178
|
-
return (
|
|
3179
|
-
const
|
|
3180
|
-
return n(),
|
|
3245
|
+
return (f, i) => {
|
|
3246
|
+
const p = L("el-tag"), b = L("el-space"), u = L("j-autocomplete");
|
|
3247
|
+
return n(), h(u, {
|
|
3181
3248
|
modelValue: a.value,
|
|
3182
|
-
"onUpdate:modelValue":
|
|
3249
|
+
"onUpdate:modelValue": i[0] || (i[0] = (v) => a.value = v),
|
|
3183
3250
|
class: "j-input-tag",
|
|
3184
3251
|
options: e.options,
|
|
3185
3252
|
style: { width: "100%" },
|
|
3186
3253
|
readonly: e.readonly,
|
|
3187
3254
|
placeholder: e.placeholder,
|
|
3188
3255
|
size: e.size,
|
|
3189
|
-
onSelect:
|
|
3190
|
-
onKeyup: jt(
|
|
3256
|
+
onSelect: r,
|
|
3257
|
+
onKeyup: jt(m, ["enter"])
|
|
3191
3258
|
}, {
|
|
3192
3259
|
prefix: B(() => [
|
|
3193
|
-
q(
|
|
3260
|
+
q(b, null, {
|
|
3194
3261
|
default: B(() => [
|
|
3195
|
-
(n(!0), $(
|
|
3196
|
-
key:
|
|
3262
|
+
(n(!0), $(te, null, se(c.value, (v, y) => (n(), h(p, {
|
|
3263
|
+
key: y,
|
|
3197
3264
|
type: "info",
|
|
3198
3265
|
closable: !e.readonly,
|
|
3199
|
-
style:
|
|
3266
|
+
style: ve(s.value[y] || {}),
|
|
3200
3267
|
size: e.size,
|
|
3201
|
-
onClose: Be((
|
|
3268
|
+
onClose: Be((z) => d(y), ["prevent"])
|
|
3202
3269
|
}, {
|
|
3203
3270
|
default: B(() => [
|
|
3204
|
-
|
|
3271
|
+
je(de(v), 1)
|
|
3205
3272
|
]),
|
|
3206
3273
|
_: 2
|
|
3207
3274
|
}, 1032, ["closable", "style", "size", "onClose"]))), 128))
|
|
@@ -3213,7 +3280,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3213
3280
|
}, 8, ["modelValue", "options", "readonly", "placeholder", "size"]);
|
|
3214
3281
|
};
|
|
3215
3282
|
}
|
|
3216
|
-
}), oo =
|
|
3283
|
+
}), oo = le(lo), ao = /* @__PURE__ */ Z({
|
|
3217
3284
|
name: "JRate",
|
|
3218
3285
|
__name: "rate",
|
|
3219
3286
|
props: {
|
|
@@ -3229,21 +3296,21 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3229
3296
|
},
|
|
3230
3297
|
emits: ["update:modelValue", "change"],
|
|
3231
3298
|
setup(e, { emit: l }) {
|
|
3232
|
-
const o = e, t = l, a =
|
|
3299
|
+
const o = e, t = l, a = V({
|
|
3233
3300
|
get() {
|
|
3234
3301
|
return Number(o.modelValue);
|
|
3235
3302
|
},
|
|
3236
|
-
set(
|
|
3237
|
-
t("update:modelValue",
|
|
3303
|
+
set(m) {
|
|
3304
|
+
t("update:modelValue", m), t("change", { value: m });
|
|
3238
3305
|
}
|
|
3239
|
-
}), c =
|
|
3240
|
-
s.value =
|
|
3306
|
+
}), c = V(() => o.texts?.map((m) => m.value) || []), s = x(0), r = (m) => {
|
|
3307
|
+
s.value = m;
|
|
3241
3308
|
};
|
|
3242
|
-
return (
|
|
3243
|
-
const
|
|
3244
|
-
return n(),
|
|
3309
|
+
return (m, d) => {
|
|
3310
|
+
const f = L("el-rate");
|
|
3311
|
+
return n(), h(f, {
|
|
3245
3312
|
modelValue: a.value,
|
|
3246
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
3313
|
+
"onUpdate:modelValue": d[0] || (d[0] = (i) => a.value = i),
|
|
3247
3314
|
size: e.size,
|
|
3248
3315
|
max: e.max,
|
|
3249
3316
|
"allow-half": e.allowHalf,
|
|
@@ -3252,11 +3319,11 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3252
3319
|
"show-text": e.showText,
|
|
3253
3320
|
texts: c.value,
|
|
3254
3321
|
"show-score": e.showScore,
|
|
3255
|
-
onHoverChange:
|
|
3322
|
+
onHoverChange: r
|
|
3256
3323
|
}, null, 8, ["modelValue", "size", "max", "allow-half", "clearable", "disabled", "show-text", "texts", "show-score"]);
|
|
3257
3324
|
};
|
|
3258
3325
|
}
|
|
3259
|
-
}), no =
|
|
3326
|
+
}), no = le(ao), io = /* @__PURE__ */ Z({
|
|
3260
3327
|
name: "JSlider",
|
|
3261
3328
|
__name: "slider",
|
|
3262
3329
|
props: {
|
|
@@ -3286,7 +3353,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3286
3353
|
},
|
|
3287
3354
|
emits: ["update:modelValue", "change"],
|
|
3288
3355
|
setup(e, { emit: l }) {
|
|
3289
|
-
const o = e, t = l, a =
|
|
3356
|
+
const o = e, t = l, a = V({
|
|
3290
3357
|
get() {
|
|
3291
3358
|
return Number(o.modelValue);
|
|
3292
3359
|
},
|
|
@@ -3295,10 +3362,10 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3295
3362
|
}
|
|
3296
3363
|
});
|
|
3297
3364
|
return (c, s) => {
|
|
3298
|
-
const
|
|
3299
|
-
return n(),
|
|
3365
|
+
const r = L("el-slider");
|
|
3366
|
+
return n(), h(r, {
|
|
3300
3367
|
modelValue: a.value,
|
|
3301
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
3368
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => a.value = m),
|
|
3302
3369
|
min: e.min,
|
|
3303
3370
|
max: e.max,
|
|
3304
3371
|
disabled: e.readonly,
|
|
@@ -3325,13 +3392,13 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3325
3392
|
}, 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"]);
|
|
3326
3393
|
};
|
|
3327
3394
|
}
|
|
3328
|
-
}),
|
|
3395
|
+
}), so = le(io), Xe = (e) => e < 1024 ? Pe(e) + " B" : e >= 1024 && e < 1048576 ? Pe(e / 1024) + " KB" : e >= 1048576 && e < 1073741824 ? Pe(e / 1024 / 1024) + " MB" : e >= 1073741824 ? Pe(e / 1024 / 1024 / 1024) + " GB" : "", uo = (e) => {
|
|
3329
3396
|
const l = window.open("_blank");
|
|
3330
3397
|
l && (l.location = e);
|
|
3331
3398
|
}, ro = {
|
|
3332
3399
|
key: 1,
|
|
3333
3400
|
style: { position: "relative", width: "72px", height: "72px", overflow: "hidden" }
|
|
3334
|
-
}, co = ["src"], fo = { class: "j-upload-dragItem-content" }, po = { class: "j-upload-dragItem-mask" }, mo = ["src"], vo = { class: "j-upload-imgItem-mask" }, go = { class: "j-upload-item-content" },
|
|
3401
|
+
}, co = ["src"], fo = { class: "j-upload-dragItem-content" }, po = { class: "j-upload-dragItem-mask" }, mo = ["src"], vo = { class: "j-upload-imgItem-mask" }, go = { class: "j-upload-item-content" }, ht = /* @__PURE__ */ Z({
|
|
3335
3402
|
__name: "list",
|
|
3336
3403
|
props: {
|
|
3337
3404
|
isUploadImg: {
|
|
@@ -3378,12 +3445,12 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3378
3445
|
t: (o) => o
|
|
3379
3446
|
});
|
|
3380
3447
|
return (o, t) => {
|
|
3381
|
-
const a =
|
|
3448
|
+
const a = L("j-icon"), c = L("el-text"), s = L("j-button"), r = L("el-progress"), m = L("el-link");
|
|
3382
3449
|
return n(), $("div", {
|
|
3383
|
-
class:
|
|
3450
|
+
class: Me(["j-upload-list", { "j-upload-image-list": e.isUploadImg, "j-upload-drag-list": e.drag }])
|
|
3384
3451
|
}, [
|
|
3385
|
-
e.drag ? (n(), $(
|
|
3386
|
-
e.showFileList ? (n(!0), $(
|
|
3452
|
+
e.drag ? (n(), $(te, { key: 0 }, [
|
|
3453
|
+
e.showFileList ? (n(!0), $(te, { key: 0 }, se(e.list, (d) => (n(), $("div", {
|
|
3387
3454
|
key: d.id,
|
|
3388
3455
|
class: "j-upload-dragItem"
|
|
3389
3456
|
}, [
|
|
@@ -3393,36 +3460,36 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3393
3460
|
style: { width: "100%" },
|
|
3394
3461
|
alt: ""
|
|
3395
3462
|
}, null, 8, co)
|
|
3396
|
-
])) : (n(),
|
|
3463
|
+
])) : (n(), h(a, {
|
|
3397
3464
|
key: 0,
|
|
3398
3465
|
icon: "file-text",
|
|
3399
|
-
style:
|
|
3466
|
+
style: ve({ color: d.color ? `var(${d.color})` : void 0 }),
|
|
3400
3467
|
size: 72
|
|
3401
3468
|
}, null, 8, ["style"])),
|
|
3402
3469
|
J("div", fo, [
|
|
3403
3470
|
q(c, { ellipsis: "" }, {
|
|
3404
3471
|
default: B(() => [
|
|
3405
|
-
|
|
3472
|
+
je(de(`${E(l)(d.name)}${d.status === "unUpload" ? "(" + E(l)("未传") + ")" : ""}`), 1)
|
|
3406
3473
|
]),
|
|
3407
3474
|
_: 2
|
|
3408
3475
|
}, 1024),
|
|
3409
3476
|
J("div", null, [
|
|
3410
|
-
d.status === "uploading" ? (n(),
|
|
3477
|
+
d.status === "uploading" ? (n(), h(c, { key: 0 }, {
|
|
3411
3478
|
default: B(() => [
|
|
3412
|
-
|
|
3479
|
+
je(de(E(Xe)(d.uploadSize)) + "/", 1)
|
|
3413
3480
|
]),
|
|
3414
3481
|
_: 2
|
|
3415
|
-
}, 1024)) :
|
|
3482
|
+
}, 1024)) : M("", !0),
|
|
3416
3483
|
q(c, null, {
|
|
3417
3484
|
default: B(() => [
|
|
3418
|
-
|
|
3485
|
+
je(de(E(Xe)(d.size)), 1)
|
|
3419
3486
|
]),
|
|
3420
3487
|
_: 2
|
|
3421
3488
|
}, 1024)
|
|
3422
3489
|
])
|
|
3423
3490
|
]),
|
|
3424
3491
|
Re(J("div", po, [
|
|
3425
|
-
d.status === "done" || d.status === "unUpload" ? (n(),
|
|
3492
|
+
d.status === "done" || d.status === "unUpload" ? (n(), h(s, {
|
|
3426
3493
|
key: 0,
|
|
3427
3494
|
type: "link"
|
|
3428
3495
|
}, {
|
|
@@ -3430,31 +3497,31 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3430
3497
|
q(a, {
|
|
3431
3498
|
icon: "eye",
|
|
3432
3499
|
size: 24,
|
|
3433
|
-
onClick: Be((
|
|
3500
|
+
onClick: Be((f) => e.previewFile(d), ["stop"])
|
|
3434
3501
|
}, null, 8, ["onClick"])
|
|
3435
3502
|
]),
|
|
3436
3503
|
_: 2
|
|
3437
|
-
}, 1024)) :
|
|
3438
|
-
!e.readonly && (d.status === "done" || d.status === "unUpload") ? (n(),
|
|
3504
|
+
}, 1024)) : M("", !0),
|
|
3505
|
+
!e.readonly && (d.status === "done" || d.status === "unUpload") ? (n(), h(s, {
|
|
3439
3506
|
key: 1,
|
|
3440
3507
|
icon: "delete",
|
|
3441
3508
|
type: "link",
|
|
3442
3509
|
danger: "",
|
|
3443
|
-
onClick: Be((
|
|
3444
|
-
}, null, 8, ["onClick"])) :
|
|
3510
|
+
onClick: Be((f) => e.deleteFile(d), ["stop", "prevent"])
|
|
3511
|
+
}, null, 8, ["onClick"])) : M("", !0)
|
|
3445
3512
|
], 512), [
|
|
3446
|
-
[
|
|
3513
|
+
[tt, d.status === "error"]
|
|
3447
3514
|
]),
|
|
3448
|
-
d.status === "uploading" ? (n(),
|
|
3515
|
+
d.status === "uploading" ? (n(), h(r, {
|
|
3449
3516
|
key: 2,
|
|
3450
3517
|
"stroke-width": 4,
|
|
3451
3518
|
style: { position: "absolute", bottom: "-4px", left: "0", margin: "0 !important" },
|
|
3452
3519
|
percent: d.percent,
|
|
3453
3520
|
"show-text": !1
|
|
3454
|
-
}, null, 8, ["percent"])) :
|
|
3455
|
-
]))), 128)) :
|
|
3456
|
-
|
|
3457
|
-
], 64)) : e.isUploadImg ? (n(!0), $(
|
|
3521
|
+
}, null, 8, ["percent"])) : M("", !0)
|
|
3522
|
+
]))), 128)) : M("", !0),
|
|
3523
|
+
ee(o.$slots, "default")
|
|
3524
|
+
], 64)) : e.isUploadImg ? (n(!0), $(te, { key: 1 }, se(e.list, (d) => (n(), $("div", {
|
|
3458
3525
|
key: d.id,
|
|
3459
3526
|
class: "j-upload-imgItem"
|
|
3460
3527
|
}, [
|
|
@@ -3463,9 +3530,9 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3463
3530
|
src: d.url,
|
|
3464
3531
|
style: { width: "100%" },
|
|
3465
3532
|
alt: ""
|
|
3466
|
-
}, null, 8, mo)) :
|
|
3533
|
+
}, null, 8, mo)) : M("", !0),
|
|
3467
3534
|
Re(J("div", vo, [
|
|
3468
|
-
d.status === "done" || d.status === "unUpload" ? (n(),
|
|
3535
|
+
d.status === "done" || d.status === "unUpload" ? (n(), h(s, {
|
|
3469
3536
|
key: 0,
|
|
3470
3537
|
type: "link"
|
|
3471
3538
|
}, {
|
|
@@ -3473,12 +3540,12 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3473
3540
|
q(a, {
|
|
3474
3541
|
icon: "eye",
|
|
3475
3542
|
size: 24,
|
|
3476
|
-
onClick: Be((
|
|
3543
|
+
onClick: Be((f) => e.previewFile(d), ["stop"])
|
|
3477
3544
|
}, null, 8, ["onClick"])
|
|
3478
3545
|
]),
|
|
3479
3546
|
_: 2
|
|
3480
|
-
}, 1024)) :
|
|
3481
|
-
!e.readonly && (d.status === "done" || d.status === "unUpload") ? (n(),
|
|
3547
|
+
}, 1024)) : M("", !0),
|
|
3548
|
+
!e.readonly && (d.status === "done" || d.status === "unUpload") ? (n(), h(s, {
|
|
3482
3549
|
key: 1,
|
|
3483
3550
|
type: "link",
|
|
3484
3551
|
danger: ""
|
|
@@ -3487,75 +3554,75 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3487
3554
|
q(a, {
|
|
3488
3555
|
icon: "delete",
|
|
3489
3556
|
size: 24,
|
|
3490
|
-
onClick: Be((
|
|
3557
|
+
onClick: Be((f) => e.deleteFile(d), ["stop", "prevent"])
|
|
3491
3558
|
}, null, 8, ["onClick"])
|
|
3492
3559
|
]),
|
|
3493
3560
|
_: 2
|
|
3494
|
-
}, 1024)) :
|
|
3561
|
+
}, 1024)) : M("", !0)
|
|
3495
3562
|
], 512), [
|
|
3496
|
-
[
|
|
3563
|
+
[tt, d.status === "error"]
|
|
3497
3564
|
]),
|
|
3498
|
-
d.status === "uploading" ? (n(),
|
|
3565
|
+
d.status === "uploading" ? (n(), h(r, {
|
|
3499
3566
|
key: 1,
|
|
3500
3567
|
"stroke-width": 4,
|
|
3501
3568
|
percent: d.percent,
|
|
3502
3569
|
"show-text": !1
|
|
3503
|
-
}, null, 8, ["percent"])) :
|
|
3504
|
-
]))), 128)) : (n(!0), $(
|
|
3570
|
+
}, null, 8, ["percent"])) : M("", !0)
|
|
3571
|
+
]))), 128)) : (n(!0), $(te, { key: 2 }, se(e.list, (d) => (n(), $("div", {
|
|
3505
3572
|
key: d.id,
|
|
3506
3573
|
class: "j-upload-item"
|
|
3507
3574
|
}, [
|
|
3508
3575
|
q(a, {
|
|
3509
3576
|
icon: "file-text",
|
|
3510
|
-
style:
|
|
3577
|
+
style: ve({ color: d.color ? `var(${d.color})` : void 0 }),
|
|
3511
3578
|
size: 16
|
|
3512
3579
|
}, null, 8, ["style"]),
|
|
3513
3580
|
J("div", go, [
|
|
3514
|
-
q(
|
|
3581
|
+
q(m, {
|
|
3515
3582
|
type: "primary",
|
|
3516
3583
|
underline: "never",
|
|
3517
|
-
onClick: Be((
|
|
3584
|
+
onClick: Be((f) => e.previewFile(d), ["stop"])
|
|
3518
3585
|
}, {
|
|
3519
3586
|
default: B(() => [
|
|
3520
|
-
|
|
3587
|
+
je(de(`${E(l)(d.name)}${d.status === "unUpload" ? "(" + E(l)("未传") + ")" : ""}`), 1)
|
|
3521
3588
|
]),
|
|
3522
3589
|
_: 2
|
|
3523
3590
|
}, 1032, ["onClick"])
|
|
3524
3591
|
]),
|
|
3525
|
-
d.status === "uploading" ? (n(),
|
|
3592
|
+
d.status === "uploading" ? (n(), h(c, { key: 0 }, {
|
|
3526
3593
|
default: B(() => [
|
|
3527
|
-
|
|
3594
|
+
je(de(E(Xe)(d.uploadSize)) + "/", 1)
|
|
3528
3595
|
]),
|
|
3529
3596
|
_: 2
|
|
3530
|
-
}, 1024)) :
|
|
3597
|
+
}, 1024)) : M("", !0),
|
|
3531
3598
|
q(c, null, {
|
|
3532
3599
|
default: B(() => [
|
|
3533
|
-
|
|
3600
|
+
je(de(E(Xe)(d.size)), 1)
|
|
3534
3601
|
]),
|
|
3535
3602
|
_: 2
|
|
3536
3603
|
}, 1024),
|
|
3537
|
-
d.status === "done" && e.isShowSuccessIcon ? (n(),
|
|
3604
|
+
d.status === "done" && e.isShowSuccessIcon ? (n(), h(a, {
|
|
3538
3605
|
key: 1,
|
|
3539
3606
|
class: "j-upload-item-success",
|
|
3540
3607
|
icon: "check-circle",
|
|
3541
3608
|
size: 24
|
|
3542
|
-
})) :
|
|
3543
|
-
e.readonly ?
|
|
3609
|
+
})) : M("", !0),
|
|
3610
|
+
e.readonly ? M("", !0) : Re((n(), h(a, {
|
|
3544
3611
|
key: 2,
|
|
3545
3612
|
class: "j-upload-item-error",
|
|
3546
3613
|
icon: "delete",
|
|
3547
3614
|
size: 24,
|
|
3548
|
-
onClick: Be((
|
|
3615
|
+
onClick: Be((f) => e.deleteFile(d), ["stop", "prevent"])
|
|
3549
3616
|
}, null, 8, ["onClick"])), [
|
|
3550
|
-
[
|
|
3617
|
+
[tt, d.status === "error"]
|
|
3551
3618
|
]),
|
|
3552
|
-
d.status === "uploading" ? (n(),
|
|
3619
|
+
d.status === "uploading" ? (n(), h(r, {
|
|
3553
3620
|
key: 3,
|
|
3554
3621
|
style: { position: "absolute", bottom: "-4px", left: "0", margin: "0 !important" },
|
|
3555
3622
|
"stroke-width": 4,
|
|
3556
3623
|
percent: d.percent,
|
|
3557
3624
|
"show-text": !1
|
|
3558
|
-
}, null, 8, ["percent"])) :
|
|
3625
|
+
}, null, 8, ["percent"])) : M("", !0)
|
|
3559
3626
|
]))), 128))
|
|
3560
3627
|
], 2);
|
|
3561
3628
|
};
|
|
@@ -3570,7 +3637,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3570
3637
|
}, Co = ["src"], xo = {
|
|
3571
3638
|
key: 1,
|
|
3572
3639
|
class: "j-block"
|
|
3573
|
-
}, jo = ["src"], Bo = /* @__PURE__ */
|
|
3640
|
+
}, jo = ["src"], Bo = /* @__PURE__ */ Z({
|
|
3574
3641
|
name: "JUpload",
|
|
3575
3642
|
__name: "upload",
|
|
3576
3643
|
props: {
|
|
@@ -3745,41 +3812,41 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3745
3812
|
"notUploadChange"
|
|
3746
3813
|
],
|
|
3747
3814
|
setup(e, { emit: l }) {
|
|
3748
|
-
const o = e, t = l, { warning: a, error: c, createConfirm: s, t:
|
|
3815
|
+
const o = e, t = l, { warning: a, error: c, createConfirm: s, t: r, apiUrl: m, token: d } = Ve("jcode_app_provide", {
|
|
3749
3816
|
t: (k) => k
|
|
3750
|
-
}), { useFile:
|
|
3817
|
+
}), { useFile: f } = Ve("jcode_app_form_provide", {
|
|
3751
3818
|
useFile: () => ({})
|
|
3752
|
-
}), { fileChunkedUpload:
|
|
3819
|
+
}), { fileChunkedUpload: i, deleteFile: p } = f(), b = V(() => o.isUploadImg ? o.accept || "image/*" : o.accept), u = V(() => {
|
|
3753
3820
|
if (o.limit !== -1)
|
|
3754
3821
|
return o.limit;
|
|
3755
|
-
}), v =
|
|
3756
|
-
folderId: o.modelValue ||
|
|
3822
|
+
}), v = V(() => o.limit === -1 ? "" : `,${r("上传数量")}${o.limit}`), y = x(""), z = V(() => ({
|
|
3823
|
+
folderId: o.modelValue || y.value,
|
|
3757
3824
|
maxSize: o.maxSize,
|
|
3758
3825
|
sizeType: o.sizeType
|
|
3759
|
-
})), j = x([]),
|
|
3826
|
+
})), j = x([]), U = () => {
|
|
3760
3827
|
j.value = [...j.value];
|
|
3761
|
-
},
|
|
3828
|
+
}, ae = (k) => {
|
|
3762
3829
|
if (o.maxSize && o.sizeType) {
|
|
3763
|
-
let
|
|
3830
|
+
let D = k;
|
|
3764
3831
|
switch (o.sizeType) {
|
|
3765
3832
|
case "GB":
|
|
3766
|
-
|
|
3833
|
+
D = 1024 * 1024 * 1024 * o.maxSize;
|
|
3767
3834
|
break;
|
|
3768
3835
|
case "MB":
|
|
3769
|
-
|
|
3836
|
+
D = 1024 * 1024 * o.maxSize;
|
|
3770
3837
|
break;
|
|
3771
3838
|
case "KB":
|
|
3772
|
-
|
|
3839
|
+
D = 1024 * o.maxSize;
|
|
3773
3840
|
break;
|
|
3774
3841
|
default:
|
|
3775
|
-
|
|
3842
|
+
D = o.maxSize;
|
|
3776
3843
|
break;
|
|
3777
3844
|
}
|
|
3778
|
-
if (
|
|
3845
|
+
if (D < k)
|
|
3779
3846
|
return !1;
|
|
3780
3847
|
}
|
|
3781
3848
|
return !0;
|
|
3782
|
-
},
|
|
3849
|
+
}, G = {
|
|
3783
3850
|
doc: "file-word",
|
|
3784
3851
|
docx: "file-word",
|
|
3785
3852
|
xls: "file-excel",
|
|
@@ -3790,78 +3857,78 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3790
3857
|
json: "file-json"
|
|
3791
3858
|
}, S = (k) => {
|
|
3792
3859
|
if (k) {
|
|
3793
|
-
const
|
|
3794
|
-
return
|
|
3860
|
+
const D = k.split(".");
|
|
3861
|
+
return D[D.length - 1];
|
|
3795
3862
|
}
|
|
3796
3863
|
return "";
|
|
3797
|
-
},
|
|
3798
|
-
if (
|
|
3864
|
+
}, pe = (k, D) => {
|
|
3865
|
+
if (D && D.indexOf("image") > -1)
|
|
3799
3866
|
return "file-image";
|
|
3800
|
-
const
|
|
3801
|
-
return ["webp", "bmp", "jpg", "jpge", "png", "tif", "gif", "svg"].includes(
|
|
3802
|
-
},
|
|
3803
|
-
k.status = o.autoUpload ? "uploading" : "unUpload", k.uploadSize = 0, k.icon =
|
|
3804
|
-
},
|
|
3867
|
+
const Q = S(k);
|
|
3868
|
+
return ["webp", "bmp", "jpg", "jpge", "png", "tif", "gif", "svg"].includes(Q) ? "file-image" : G[Q] || "file-ufo";
|
|
3869
|
+
}, ne = (k) => {
|
|
3870
|
+
k.status = o.autoUpload ? "uploading" : "unUpload", k.uploadSize = 0, k.icon = pe(k.name, k.type), i || (k.icon = "file-text"), k.id = k.uid, k.url = window.URL.createObjectURL(k), k.date = Ye(), k.param = z.value;
|
|
3871
|
+
}, Y = (k) => {
|
|
3805
3872
|
t("start", { file: k, list: j.value });
|
|
3806
|
-
},
|
|
3807
|
-
k.percent =
|
|
3808
|
-
},
|
|
3809
|
-
k.status = "done", k.id += "1", k.uid += "1",
|
|
3810
|
-
}, he = (k,
|
|
3811
|
-
console.error(
|
|
3812
|
-
},
|
|
3873
|
+
}, oe = (k, D, Q) => {
|
|
3874
|
+
k.percent = Q, k.uploadSize = D, U();
|
|
3875
|
+
}, F = (k) => {
|
|
3876
|
+
k.status = "done", k.id += "1", k.uid += "1", U(), t("success", { file: k, list: j.value }), o.modelValue || (t("update:modelValue", y.value), t("change", { value: y.value }));
|
|
3877
|
+
}, he = (k, D) => {
|
|
3878
|
+
console.error(D, "简搭提醒您:文件上传错误!"), k.status = "error", U(), t("error", { file: k, list: j.value });
|
|
3879
|
+
}, R = (k) => {
|
|
3813
3880
|
if (j.value.push(k), k.status === "unUpload") {
|
|
3814
3881
|
t("notUploadChange", { value: k.url });
|
|
3815
3882
|
return;
|
|
3816
3883
|
}
|
|
3817
|
-
!o.isNotApi && o.upload ? o.upload(k) : !o.isNotApi &&
|
|
3818
|
-
onStart:
|
|
3819
|
-
onProgress:
|
|
3820
|
-
onSuccess:
|
|
3884
|
+
!o.isNotApi && o.upload ? o.upload(k) : !o.isNotApi && i ? i(k, {
|
|
3885
|
+
onStart: Y,
|
|
3886
|
+
onProgress: oe,
|
|
3887
|
+
onSuccess: F,
|
|
3821
3888
|
onError: he,
|
|
3822
3889
|
uploadCallback: o.uploadCallback
|
|
3823
|
-
}) :
|
|
3824
|
-
},
|
|
3825
|
-
if (!
|
|
3890
|
+
}) : F(k);
|
|
3891
|
+
}, N = (k) => {
|
|
3892
|
+
if (!ae(k.size))
|
|
3826
3893
|
return c && c("上传文件超出大小了"), !1;
|
|
3827
|
-
},
|
|
3828
|
-
|
|
3829
|
-
},
|
|
3894
|
+
}, H = (k) => {
|
|
3895
|
+
ne(k.file), R(k.file);
|
|
3896
|
+
}, A = (k) => new Promise((D) => {
|
|
3830
3897
|
s ? s({
|
|
3831
3898
|
title: "提示",
|
|
3832
3899
|
iconType: "warning",
|
|
3833
3900
|
content: `您确定删除【${k.name}】?`,
|
|
3834
3901
|
onOk: () => {
|
|
3835
|
-
|
|
3902
|
+
D(!0);
|
|
3836
3903
|
},
|
|
3837
3904
|
onCancel: () => {
|
|
3838
|
-
|
|
3905
|
+
D(!1);
|
|
3839
3906
|
}
|
|
3840
|
-
}) : (
|
|
3841
|
-
}),
|
|
3907
|
+
}) : (_(k), D(!0));
|
|
3908
|
+
}), _ = (k) => {
|
|
3842
3909
|
if (!o.isNotApi) {
|
|
3843
|
-
const
|
|
3844
|
-
|
|
3910
|
+
const D = k.response?.fileId || k.id;
|
|
3911
|
+
p && p(D);
|
|
3845
3912
|
}
|
|
3846
|
-
j.value = j.value.filter((
|
|
3847
|
-
},
|
|
3848
|
-
await
|
|
3849
|
-
}, Se = x(!1),
|
|
3913
|
+
j.value = j.value.filter((D) => D.id !== k.id), j.value.length === 0 && (t("update:modelValue", ""), t("change", { value: "" })), t("delete", { file: k, list: j.value });
|
|
3914
|
+
}, K = async (k) => {
|
|
3915
|
+
await A(k) && _(k);
|
|
3916
|
+
}, Se = x(!1), P = x(""), ge = x(""), Te = x(!1), Ie = x(!1);
|
|
3850
3917
|
let O = null;
|
|
3851
|
-
const
|
|
3918
|
+
const be = x(Ye(/* @__PURE__ */ new Date(), "YYYY-MM-DD")), me = (k) => {
|
|
3852
3919
|
if (k.isPreview === !1 && !o.isUploadImg) {
|
|
3853
3920
|
a && a("无权限预览!");
|
|
3854
3921
|
return;
|
|
3855
3922
|
}
|
|
3856
|
-
const
|
|
3857
|
-
switch (O = k, Se.value = !1,
|
|
3923
|
+
const D = k.name.split(".")[k.name.split(".").length - 1];
|
|
3924
|
+
switch (O = k, Se.value = !1, P.value = k.name, D.toLowerCase()) {
|
|
3858
3925
|
case "jpg":
|
|
3859
3926
|
case "gif":
|
|
3860
3927
|
case "png":
|
|
3861
3928
|
case "bmp":
|
|
3862
3929
|
case "jpeg":
|
|
3863
3930
|
case "svg":
|
|
3864
|
-
Se.value = !0,
|
|
3931
|
+
Se.value = !0, ge.value = k.url, Ie.value = !1, Te.value = !0;
|
|
3865
3932
|
break;
|
|
3866
3933
|
default:
|
|
3867
3934
|
if (o.isNotApi) {
|
|
@@ -3872,30 +3939,30 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3872
3939
|
a && a("当前文件还没上传成功,不支持预览!");
|
|
3873
3940
|
return;
|
|
3874
3941
|
}
|
|
3875
|
-
if (
|
|
3942
|
+
if (ge.value = ie(k), ge.value === "") {
|
|
3876
3943
|
a && a("当前文件不支持预览!");
|
|
3877
3944
|
return;
|
|
3878
3945
|
}
|
|
3879
3946
|
Ie.value = !0, Te.value = !0;
|
|
3880
3947
|
break;
|
|
3881
3948
|
}
|
|
3882
|
-
|
|
3883
|
-
},
|
|
3884
|
-
const
|
|
3885
|
-
if (!
|
|
3949
|
+
be.value = Ye(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss");
|
|
3950
|
+
}, ie = (k) => {
|
|
3951
|
+
const D = k.response?.fileId || k.id;
|
|
3952
|
+
if (!m)
|
|
3886
3953
|
return "";
|
|
3887
|
-
const
|
|
3888
|
-
return `${
|
|
3889
|
-
},
|
|
3954
|
+
const Q = Ye(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss") + "|" + D, ue = Xt.createAesEncryption({ key: "jianda" }).encrypt(Q).replace(/\//g, "|");
|
|
3955
|
+
return `${m}/system/annexesfile/preview/${ue}?token=${d?.value}`;
|
|
3956
|
+
}, ye = () => {
|
|
3890
3957
|
O.isDown === !1 && a && a("无权限下载!");
|
|
3891
|
-
const k = O.response?.fileId || O.id,
|
|
3892
|
-
uo(
|
|
3893
|
-
},
|
|
3958
|
+
const k = O.response?.fileId || O.id, D = `${m}/system/annexesfile/${k}?token=${d?.value}`;
|
|
3959
|
+
uo(D);
|
|
3960
|
+
}, xe = () => {
|
|
3894
3961
|
if (o.limit !== -1 && o.limit <= j.value.length)
|
|
3895
3962
|
return a && a(`当前限制选择${o.limit}个文件`), !1;
|
|
3896
3963
|
};
|
|
3897
|
-
return (k,
|
|
3898
|
-
const
|
|
3964
|
+
return (k, D) => {
|
|
3965
|
+
const Q = L("j-icon"), ue = L("j-button"), $e = L("el-popover"), Le = L("el-upload"), re = L("el-text"), _e = L("j-dialog-full"), g = it("loading");
|
|
3899
3966
|
return n(), $("div", yo, [
|
|
3900
3967
|
q(Le, {
|
|
3901
3968
|
action: "",
|
|
@@ -3903,46 +3970,46 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3903
3970
|
disabled: e.readonly,
|
|
3904
3971
|
"show-file-list": e.isUploadImg && !e.isLayer && e.showFileList,
|
|
3905
3972
|
"list-type": e.isUploadImg && !e.isLayer ? "picture-card" : void 0,
|
|
3906
|
-
accept:
|
|
3907
|
-
limit:
|
|
3973
|
+
accept: b.value,
|
|
3974
|
+
limit: u.value,
|
|
3908
3975
|
multiple: e.multiple,
|
|
3909
|
-
"before-upload":
|
|
3910
|
-
"http-request":
|
|
3976
|
+
"before-upload": N,
|
|
3977
|
+
"http-request": H,
|
|
3911
3978
|
"file-list": j.value,
|
|
3912
|
-
"before-remove":
|
|
3913
|
-
"on-remove":
|
|
3914
|
-
"on-preview":
|
|
3915
|
-
"on-exceed":
|
|
3979
|
+
"before-remove": A,
|
|
3980
|
+
"on-remove": _,
|
|
3981
|
+
"on-preview": me,
|
|
3982
|
+
"on-exceed": xe
|
|
3916
3983
|
}, {
|
|
3917
3984
|
default: B(() => [
|
|
3918
3985
|
e.isUploadImg && !e.isLayer && !e.readonly ? (n(), $("div", ho, [
|
|
3919
|
-
q(
|
|
3920
|
-
J("div", bo,
|
|
3921
|
-
])) : e.isLayer && e.showFileList && j.value.length > 0 && !Te.value ? (n(),
|
|
3986
|
+
q(Q, { icon: "material-symbols-light:add-2-rounded" }),
|
|
3987
|
+
J("div", bo, de(E(r)(e.placeholder)), 1)
|
|
3988
|
+
])) : e.isLayer && e.showFileList && j.value.length > 0 && !Te.value ? (n(), h($e, {
|
|
3922
3989
|
key: 1,
|
|
3923
3990
|
placement: "bottom",
|
|
3924
|
-
title: e.isUploadImg ?
|
|
3991
|
+
title: e.isUploadImg ? E(r)("图片列表") : E(r)("文件列表")
|
|
3925
3992
|
}, {
|
|
3926
3993
|
content: B(() => [
|
|
3927
|
-
q(
|
|
3928
|
-
style:
|
|
3994
|
+
q(ht, {
|
|
3995
|
+
style: ve({ width: e.isUploadImg ? void 0 : "400px" }),
|
|
3929
3996
|
list: j.value,
|
|
3930
|
-
"preview-file":
|
|
3931
|
-
"delete-file":
|
|
3997
|
+
"preview-file": me,
|
|
3998
|
+
"delete-file": K,
|
|
3932
3999
|
"is-upload-img": e.isUploadImg,
|
|
3933
4000
|
readonly: e.readonly
|
|
3934
4001
|
}, null, 8, ["style", "list", "is-upload-img", "readonly"])
|
|
3935
4002
|
]),
|
|
3936
4003
|
default: B(() => [
|
|
3937
|
-
q(
|
|
4004
|
+
q(ue, {
|
|
3938
4005
|
type: e.btnType,
|
|
3939
4006
|
size: e.btnSize,
|
|
3940
4007
|
icon: "material-symbols-light:upload-rounded",
|
|
3941
|
-
label: e.readonly ?
|
|
4008
|
+
label: e.readonly ? E(r)(e.btnText) : e.placeholder
|
|
3942
4009
|
}, null, 8, ["type", "size", "label"])
|
|
3943
4010
|
]),
|
|
3944
4011
|
_: 1
|
|
3945
|
-
}, 8, ["title"])) : e.readonly ?
|
|
4012
|
+
}, 8, ["title"])) : e.readonly ? M("", !0) : (n(), h(ue, {
|
|
3946
4013
|
key: 2,
|
|
3947
4014
|
type: e.btnType,
|
|
3948
4015
|
size: e.btnSize,
|
|
@@ -3953,57 +4020,57 @@ const Gt = /* @__PURE__ */ K({
|
|
|
3953
4020
|
_: 1
|
|
3954
4021
|
}, 8, ["drag", "disabled", "show-file-list", "list-type", "accept", "limit", "multiple", "file-list"]),
|
|
3955
4022
|
e.isTip ? (n(), $("div", wo, [
|
|
3956
|
-
q(
|
|
4023
|
+
q(re, null, {
|
|
3957
4024
|
default: B(() => [
|
|
3958
|
-
|
|
4025
|
+
je(de(`${E(r)("只能上传不超过{0}的{1}文件", `${e.maxSize}${e.sizeType}`, `${b.value || ""}`)},${v.value}`), 1)
|
|
3959
4026
|
]),
|
|
3960
4027
|
_: 1
|
|
3961
4028
|
})
|
|
3962
|
-
])) :
|
|
3963
|
-
!e.isLayer && !e.isUploadImg && e.showFileList && j.value.length > 0 ? (n(),
|
|
4029
|
+
])) : M("", !0),
|
|
4030
|
+
!e.isLayer && !e.isUploadImg && e.showFileList && j.value.length > 0 ? (n(), h(ht, {
|
|
3964
4031
|
key: 1,
|
|
3965
4032
|
style: { "margin-top": "4px" },
|
|
3966
4033
|
list: j.value,
|
|
3967
|
-
"preview-file":
|
|
3968
|
-
"delete-file":
|
|
4034
|
+
"preview-file": me,
|
|
4035
|
+
"delete-file": K,
|
|
3969
4036
|
readonly: e.readonly,
|
|
3970
4037
|
"is-show-success-icon": e.isShowSuccessIcon
|
|
3971
|
-
}, null, 8, ["list", "readonly", "is-show-success-icon"])) :
|
|
3972
|
-
q(
|
|
4038
|
+
}, null, 8, ["list", "readonly", "is-show-success-icon"])) : M("", !0),
|
|
4039
|
+
q(_e, {
|
|
3973
4040
|
visible: Te.value,
|
|
3974
|
-
"onUpdate:visible":
|
|
4041
|
+
"onUpdate:visible": D[1] || (D[1] = (I) => Te.value = I),
|
|
3975
4042
|
"btn-text": "下载",
|
|
3976
|
-
title: `${
|
|
4043
|
+
title: `${E(r)("文件预览")}【${P.value}】`,
|
|
3977
4044
|
"destroy-on-close": !0,
|
|
3978
|
-
"has-btns": !!
|
|
3979
|
-
onOk:
|
|
4045
|
+
"has-btns": !!E(m),
|
|
4046
|
+
onOk: ye
|
|
3980
4047
|
}, {
|
|
3981
4048
|
default: B(() => [
|
|
3982
|
-
Se.value &&
|
|
4049
|
+
Se.value && ge.value ? (n(), $("div", ko, [
|
|
3983
4050
|
J("img", {
|
|
3984
4051
|
width: "100%",
|
|
3985
4052
|
style: { "max-width": "1024px" },
|
|
3986
|
-
src:
|
|
4053
|
+
src: ge.value,
|
|
3987
4054
|
alt: ""
|
|
3988
4055
|
}, null, 8, Co)
|
|
3989
|
-
])) :
|
|
4056
|
+
])) : ge.value != "" ? Re((n(), $("div", xo, [
|
|
3990
4057
|
J("iframe", {
|
|
3991
4058
|
ref: "iframe",
|
|
3992
|
-
src:
|
|
4059
|
+
src: ge.value,
|
|
3993
4060
|
style: { width: "100%", height: "100%" },
|
|
3994
4061
|
frameborder: "0",
|
|
3995
|
-
onLoad:
|
|
4062
|
+
onLoad: D[0] || (D[0] = (I) => Ie.value = !1)
|
|
3996
4063
|
}, null, 40, jo)
|
|
3997
4064
|
])), [
|
|
3998
4065
|
[g, Ie.value]
|
|
3999
|
-
]) :
|
|
4066
|
+
]) : M("", !0)
|
|
4000
4067
|
]),
|
|
4001
4068
|
_: 1
|
|
4002
4069
|
}, 8, ["visible", "title", "has-btns"])
|
|
4003
4070
|
]);
|
|
4004
4071
|
};
|
|
4005
4072
|
}
|
|
4006
|
-
}), So =
|
|
4073
|
+
}), So = le(Bo), $o = /* @__PURE__ */ Z({
|
|
4007
4074
|
name: "JEcharts",
|
|
4008
4075
|
__name: "echarts",
|
|
4009
4076
|
props: {
|
|
@@ -4045,38 +4112,38 @@ const Gt = /* @__PURE__ */ K({
|
|
|
4045
4112
|
},
|
|
4046
4113
|
emits: ["click", "ready"],
|
|
4047
4114
|
setup(e, { expose: l, emit: o }) {
|
|
4048
|
-
const t = e, a = o, c = x(), s =
|
|
4049
|
-
let
|
|
4115
|
+
const t = e, a = o, c = x(), s = at();
|
|
4116
|
+
let r = null, m = null;
|
|
4050
4117
|
const d = async () => {
|
|
4051
|
-
c.value && (s.value = Lt.init(c.value, t.theme, t.initOptions),
|
|
4052
|
-
a("click",
|
|
4053
|
-
}),
|
|
4118
|
+
c.value && (s.value = Lt.init(c.value, t.theme, t.initOptions), f(t.option), s.value && s.value.on("click", (u) => {
|
|
4119
|
+
a("click", u);
|
|
4120
|
+
}), r = new ResizeObserver(() => {
|
|
4054
4121
|
s.value?.resize();
|
|
4055
|
-
}),
|
|
4056
|
-
},
|
|
4057
|
-
s.value && (
|
|
4058
|
-
s.value?.setOption(
|
|
4059
|
-
}, t.updateDelay) : s.value.setOption(
|
|
4122
|
+
}), r.observe(c.value), s.value && a("ready", s.value));
|
|
4123
|
+
}, f = (u) => {
|
|
4124
|
+
s.value && (m && clearTimeout(m), t.updateDelay > 0 ? m = setTimeout(() => {
|
|
4125
|
+
s.value?.setOption(u, t.notMerge);
|
|
4126
|
+
}, t.updateDelay) : s.value.setOption(u, t.notMerge));
|
|
4060
4127
|
};
|
|
4061
4128
|
return Oe(
|
|
4062
4129
|
() => t.option,
|
|
4063
|
-
(
|
|
4064
|
-
|
|
4130
|
+
(u) => {
|
|
4131
|
+
f(u);
|
|
4065
4132
|
},
|
|
4066
4133
|
{ deep: !0 }
|
|
4067
|
-
),
|
|
4134
|
+
), Ze(() => {
|
|
4068
4135
|
d();
|
|
4069
|
-
}),
|
|
4070
|
-
|
|
4136
|
+
}), nt(() => {
|
|
4137
|
+
m && clearTimeout(m), r && c.value && (r.unobserve(c.value), r.disconnect(), r = null), s.value && (s.value.dispose(), s.value = void 0);
|
|
4071
4138
|
}), l({
|
|
4072
4139
|
getInstance: () => s.value,
|
|
4073
|
-
resize: (
|
|
4074
|
-
s.value?.resize(
|
|
4140
|
+
resize: (u) => {
|
|
4141
|
+
s.value?.resize(u);
|
|
4075
4142
|
},
|
|
4076
4143
|
clear: () => {
|
|
4077
4144
|
s.value?.clear();
|
|
4078
4145
|
}
|
|
4079
|
-
}), (
|
|
4146
|
+
}), (u, v) => (n(), $("div", {
|
|
4080
4147
|
ref_key: "chartRef",
|
|
4081
4148
|
ref: c,
|
|
4082
4149
|
class: "j-echarts"
|
|
@@ -4087,7 +4154,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
4087
4154
|
for (const [t, a] of l)
|
|
4088
4155
|
o[t] = a;
|
|
4089
4156
|
return o;
|
|
4090
|
-
}, Vo = /* @__PURE__ */ zo($o, [["__scopeId", "data-v-d0771090"]]), To =
|
|
4157
|
+
}, Vo = /* @__PURE__ */ zo($o, [["__scopeId", "data-v-d0771090"]]), To = le(Vo), Lo = ["src"], Io = /* @__PURE__ */ Z({
|
|
4091
4158
|
name: "JBarcode",
|
|
4092
4159
|
__name: "barcode",
|
|
4093
4160
|
props: {
|
|
@@ -4124,19 +4191,19 @@ const Gt = /* @__PURE__ */ K({
|
|
|
4124
4191
|
logoCornerRadius: { default: 8 }
|
|
4125
4192
|
},
|
|
4126
4193
|
setup(e) {
|
|
4127
|
-
const l = e, o = x(), t = x(1), a = x(""), c =
|
|
4128
|
-
const
|
|
4129
|
-
return l.format === "qr" ? (
|
|
4194
|
+
const l = e, o = x(), t = x(1), a = x(""), c = V(() => {
|
|
4195
|
+
const r = {};
|
|
4196
|
+
return l.format === "qr" ? (r.text = l.modelValue + "", r.size = l.size, r.margin = l.margin, r.correctLevel = l.correctLevel, r.colorDark = l.color, r.colorLight = l.background, r.autoColor = l.autoColor, r.backgroundImage = l.backgroundImage, r.backgroundDimming = l.backgroundDimming, r.gifBackground = l.gifBackground, r.whiteMargin = l.whiteMargin, r.logoImage = l.logoImage, r.logoScale = l.logoScale, r.logoMargin = l.logoMargin, r.logoCornerRadius = l.logoCornerRadius) : (r.format = l.format, r.width = l.width, r.height = l.height, r.text = l.text, r.fontOptions = l.fontOptions, r.textAlign = l.textAlign, r.textPosition = l.textPosition, r.textMargin = l.textMargin, r.fontSize = l.fontSize, r.background = l.background, r.lineColor = l.color, r.margin = l.margin, r.marginTop = l.marginTop, r.marginRight = l.marginRight, r.marginBottom = l.marginBottom, r.marginLeft = l.marginLeft, r.displayValue = l.displayValue, r.flat = l.flat), r;
|
|
4130
4197
|
}), s = () => {
|
|
4131
4198
|
if (l.format === "qr") {
|
|
4132
4199
|
if (!window.AwesomeQR) {
|
|
4133
4200
|
console.error("缺少awesome-qr.js");
|
|
4134
4201
|
return;
|
|
4135
4202
|
}
|
|
4136
|
-
new window.AwesomeQR.AwesomeQR(c.value).draw().then((
|
|
4137
|
-
a.value =
|
|
4138
|
-
}).catch((
|
|
4139
|
-
console.error(
|
|
4203
|
+
new window.AwesomeQR.AwesomeQR(c.value).draw().then((r) => {
|
|
4204
|
+
a.value = r, t.value++;
|
|
4205
|
+
}).catch((r) => {
|
|
4206
|
+
console.error(r);
|
|
4140
4207
|
});
|
|
4141
4208
|
} else o.value ? ze(l.modelValue) || It(o.value, l.modelValue + "", c.value) : ze(l.modelValue) || setTimeout(() => {
|
|
4142
4209
|
s();
|
|
@@ -4152,14 +4219,14 @@ const Gt = /* @__PURE__ */ K({
|
|
|
4152
4219
|
{ immediate: !0 }
|
|
4153
4220
|
), Oe(c, () => {
|
|
4154
4221
|
s();
|
|
4155
|
-
}), (
|
|
4222
|
+
}), (r, m) => a.value || e.format != "qr" && !E(ze)(e.modelValue) ? (n(), $("img", {
|
|
4156
4223
|
key: t.value,
|
|
4157
4224
|
ref_key: "barcodeRef",
|
|
4158
4225
|
ref: o,
|
|
4159
4226
|
src: a.value
|
|
4160
|
-
}, null, 8, Lo)) :
|
|
4227
|
+
}, null, 8, Lo)) : M("", !0);
|
|
4161
4228
|
}
|
|
4162
|
-
}), Oo =
|
|
4229
|
+
}), Oo = le(Io), Mo = /* @__PURE__ */ Z({
|
|
4163
4230
|
name: "JCodeMirror",
|
|
4164
4231
|
__name: "code-mirror",
|
|
4165
4232
|
props: {
|
|
@@ -4173,22 +4240,22 @@ const Gt = /* @__PURE__ */ K({
|
|
|
4173
4240
|
},
|
|
4174
4241
|
emits: ["update:value", "change"],
|
|
4175
4242
|
setup(e, { expose: l, emit: o }) {
|
|
4176
|
-
const t = e, a = o, c = x(), s = x(),
|
|
4177
|
-
let
|
|
4243
|
+
const t = e, a = o, c = x(), s = x(), r = x("");
|
|
4244
|
+
let m;
|
|
4178
4245
|
const d = () => {
|
|
4179
|
-
const
|
|
4180
|
-
let
|
|
4181
|
-
return t.handleHint && (
|
|
4182
|
-
list:
|
|
4183
|
-
from: window.CodeMirror.Pos(
|
|
4184
|
-
to: window.CodeMirror.Pos(
|
|
4246
|
+
const u = m.getCursor(), v = m.getTokenAt(u), { end: y, start: z, string: j } = v;
|
|
4247
|
+
let U = [];
|
|
4248
|
+
return t.handleHint && (U = t.handleHint(j)), {
|
|
4249
|
+
list: U,
|
|
4250
|
+
from: window.CodeMirror.Pos(u.line, z),
|
|
4251
|
+
to: window.CodeMirror.Pos(u.line, y)
|
|
4185
4252
|
};
|
|
4186
|
-
},
|
|
4253
|
+
}, f = () => {
|
|
4187
4254
|
if (!window.CodeMirror) {
|
|
4188
4255
|
console.error("CodeMirror is not loaded yet");
|
|
4189
4256
|
return;
|
|
4190
4257
|
}
|
|
4191
|
-
const
|
|
4258
|
+
const u = {
|
|
4192
4259
|
lineNumbers: !0,
|
|
4193
4260
|
styleActiveLine: !0,
|
|
4194
4261
|
matchBrackets: !0,
|
|
@@ -4197,68 +4264,68 @@ const Gt = /* @__PURE__ */ K({
|
|
|
4197
4264
|
indentUnit: 2,
|
|
4198
4265
|
gutters: ["CodeMirror-lint-markers", "CodeMirror-linenumbers", "CodeMirror-foldgutter"]
|
|
4199
4266
|
}, v = window.CodeMirror;
|
|
4200
|
-
v.fold && v.fold.combine && v.fold.indent && v.fold.comment ?
|
|
4267
|
+
v.fold && v.fold.combine && v.fold.indent && v.fold.comment ? u.foldGutter = {
|
|
4201
4268
|
// eslint-disable-next-line new-cap
|
|
4202
4269
|
rangeFinder: new v.fold.combine(
|
|
4203
4270
|
v.fold.indent,
|
|
4204
4271
|
v.fold.comment
|
|
4205
4272
|
)
|
|
4206
|
-
} :
|
|
4273
|
+
} : u.gutters = ["CodeMirror-lint-markers", "CodeMirror-linenumbers"], t.mode === "text/x-vue" && (u.mode = {
|
|
4207
4274
|
name: "vue"
|
|
4208
|
-
}), t.isHint && (
|
|
4275
|
+
}), t.isHint && (u.hintOptions = {
|
|
4209
4276
|
hint: d,
|
|
4210
4277
|
completeSingle: !1
|
|
4211
|
-
}),
|
|
4278
|
+
}), m = window.CodeMirror.fromTextArea(c.value, u), r.value = t.value, m.setValue(t.value), m.on(
|
|
4212
4279
|
"change",
|
|
4213
|
-
(
|
|
4214
|
-
t.isHint &&
|
|
4215
|
-
const j =
|
|
4216
|
-
|
|
4280
|
+
(y, z) => {
|
|
4281
|
+
t.isHint && z.origin !== "complete" && /^(?!_)(?!.*?_$)[a-zA-Z0-9_\u4e00-\u9fa5]+$/g.test(z.text[0]) && y.showHint();
|
|
4282
|
+
const j = m.getValue();
|
|
4283
|
+
r.value = j, a("update:value", j), a("change", { value: j });
|
|
4217
4284
|
}
|
|
4218
4285
|
);
|
|
4219
|
-
},
|
|
4220
|
-
let
|
|
4221
|
-
|
|
4222
|
-
},
|
|
4223
|
-
const
|
|
4224
|
-
|
|
4225
|
-
},
|
|
4226
|
-
|
|
4286
|
+
}, i = () => {
|
|
4287
|
+
let u = Ot(t.value);
|
|
4288
|
+
u = u.replace(/{ JCODE_SASSID }/g, "{JCODE_SASSID}").replace(/{ JCODE_SASSID_NOTT }/g, "{JCODE_SASSID_NOTT}").replace(/{ JCODE_SASSID_NOTA }/g, "{JCODE_SASSID_NOTA}").replace(/@ /g, "@"), a("update:value", u), a("change", { value: u });
|
|
4289
|
+
}, p = () => {
|
|
4290
|
+
const u = m.getScrollInfo();
|
|
4291
|
+
m.scrollTo(u.left, u.height + u.top);
|
|
4292
|
+
}, b = new ResizeObserver(() => {
|
|
4293
|
+
m?.refresh();
|
|
4227
4294
|
});
|
|
4228
4295
|
return Oe(
|
|
4229
4296
|
() => t.value,
|
|
4230
|
-
(
|
|
4231
|
-
|
|
4232
|
-
|
|
4297
|
+
(u) => {
|
|
4298
|
+
u !== r.value && (r.value = u, m?.setValue(u), setTimeout(() => {
|
|
4299
|
+
m?.refresh(), t.isScrollToBottom && p();
|
|
4233
4300
|
}));
|
|
4234
4301
|
}
|
|
4235
4302
|
), Oe(
|
|
4236
4303
|
() => t.mode,
|
|
4237
|
-
(
|
|
4238
|
-
|
|
4304
|
+
(u) => {
|
|
4305
|
+
m?.setOption("mode", u);
|
|
4239
4306
|
}
|
|
4240
|
-
),
|
|
4241
|
-
let
|
|
4242
|
-
const v = 50,
|
|
4243
|
-
const
|
|
4244
|
-
j &&
|
|
4245
|
-
|
|
4246
|
-
}, 300),
|
|
4307
|
+
), Ze(() => {
|
|
4308
|
+
let u = 0;
|
|
4309
|
+
const v = 50, y = () => {
|
|
4310
|
+
const z = window.CodeMirror, j = z && z.fromTextArea, U = !z?.fold || z.fold.combine && z.fold.indent && z.fold.comment;
|
|
4311
|
+
j && U ? (f(), setTimeout(() => {
|
|
4312
|
+
m?.refresh();
|
|
4313
|
+
}, 300), b.observe(s.value)) : (u++, u < v ? setTimeout(y, 100) : console.error("CodeMirror failed to load after maximum retries"));
|
|
4247
4314
|
};
|
|
4248
|
-
|
|
4249
|
-
}),
|
|
4250
|
-
|
|
4315
|
+
y();
|
|
4316
|
+
}), nt(() => {
|
|
4317
|
+
m.off("change"), m = null;
|
|
4251
4318
|
}), l({
|
|
4252
4319
|
/**
|
|
4253
4320
|
* @zh sql格式化
|
|
4254
4321
|
* @public
|
|
4255
4322
|
*/
|
|
4256
|
-
sqlFormatter:
|
|
4257
|
-
}), (
|
|
4323
|
+
sqlFormatter: i
|
|
4324
|
+
}), (u, v) => (n(), $("div", {
|
|
4258
4325
|
ref_key: "codeWraperRef",
|
|
4259
4326
|
ref: s,
|
|
4260
4327
|
class: "j-code-mirror",
|
|
4261
|
-
style:
|
|
4328
|
+
style: ve({ height: e.height ? `${e.height}px` : "" })
|
|
4262
4329
|
}, [
|
|
4263
4330
|
J("textarea", {
|
|
4264
4331
|
ref_key: "codeRef",
|
|
@@ -4266,7 +4333,7 @@ const Gt = /* @__PURE__ */ K({
|
|
|
4266
4333
|
}, null, 512)
|
|
4267
4334
|
], 4));
|
|
4268
4335
|
}
|
|
4269
|
-
}),
|
|
4336
|
+
}), Do = le(Mo), Ao = /* @__PURE__ */ Z({
|
|
4270
4337
|
name: "JComp",
|
|
4271
4338
|
__name: "comp",
|
|
4272
4339
|
props: {
|
|
@@ -4332,56 +4399,56 @@ const Gt = /* @__PURE__ */ K({
|
|
|
4332
4399
|
},
|
|
4333
4400
|
emits: ["update:modelValue", "change"],
|
|
4334
4401
|
setup(e, { emit: l }) {
|
|
4335
|
-
const o = e, t = l, { formData: a, onChange: c } = Ve("jcode_form_provide", {}), s =
|
|
4336
|
-
() =>
|
|
4337
|
-
),
|
|
4402
|
+
const o = e, t = l, { formData: a, onChange: c } = Ve("jcode_form_provide", {}), s = V(
|
|
4403
|
+
() => rt(d.value) && !o.config?.notInput || o.config?.isInput
|
|
4404
|
+
), r = V({
|
|
4338
4405
|
get() {
|
|
4339
4406
|
return o.row ? o.modelValue : a ? a[o.id] : o.modelValue;
|
|
4340
4407
|
},
|
|
4341
|
-
set(
|
|
4342
|
-
o.row ? t("update:modelValue",
|
|
4408
|
+
set(p) {
|
|
4409
|
+
o.row ? t("update:modelValue", p) : a ? a[o.id] : t("update:modelValue", p);
|
|
4343
4410
|
}
|
|
4344
|
-
}),
|
|
4411
|
+
}), m = V(() => We({
|
|
4345
4412
|
config: o.config,
|
|
4346
4413
|
getCompConfig: o.getCompConfig,
|
|
4347
4414
|
formData: a,
|
|
4348
4415
|
row: o.row
|
|
4349
|
-
})), d =
|
|
4350
|
-
const
|
|
4351
|
-
return o.children.forEach((
|
|
4352
|
-
|
|
4353
|
-
}),
|
|
4354
|
-
}),
|
|
4355
|
-
o.config?.onChange && o.config?.onChange({ ...
|
|
4416
|
+
})), d = V(() => o.getCompType ? o.getCompType({ config: o.config, formData: a, row: o.row }) : o.type), f = V(() => {
|
|
4417
|
+
const p = {};
|
|
4418
|
+
return o.children.forEach((b) => {
|
|
4419
|
+
b.slot ? (p[b.slot] = p[b.slot] || [], p[b.slot].push(b)) : (p.default = p.default || [], p.default.push(b));
|
|
4420
|
+
}), p;
|
|
4421
|
+
}), i = (p) => {
|
|
4422
|
+
o.config?.onChange && o.config?.onChange({ ...p, formData: a, row: o.row, id: o.id }), c && c({ ...p, formData: a, row: o.row, id: o.id }), t("change", p);
|
|
4356
4423
|
};
|
|
4357
|
-
return (
|
|
4358
|
-
const
|
|
4359
|
-
return s.value ? (n(),
|
|
4360
|
-
modelValue:
|
|
4361
|
-
"onUpdate:modelValue":
|
|
4362
|
-
onChange:
|
|
4363
|
-
}),
|
|
4364
|
-
|
|
4365
|
-
name:
|
|
4424
|
+
return (p, b) => {
|
|
4425
|
+
const u = L("j-comp");
|
|
4426
|
+
return s.value ? (n(), h(Ue(d.value), ke({ key: 0 }, m.value, {
|
|
4427
|
+
modelValue: r.value,
|
|
4428
|
+
"onUpdate:modelValue": b[0] || (b[0] = (v) => r.value = v),
|
|
4429
|
+
onChange: i
|
|
4430
|
+
}), He({ _: 2 }, [
|
|
4431
|
+
se(f.value, (v, y) => ({
|
|
4432
|
+
name: y,
|
|
4366
4433
|
fn: B(() => [
|
|
4367
|
-
(n(!0), $(
|
|
4368
|
-
key:
|
|
4369
|
-
}, { ref_for: !0 },
|
|
4434
|
+
(n(!0), $(te, null, se(v, (z) => (n(), h(u, ke({
|
|
4435
|
+
key: z.id
|
|
4436
|
+
}, { ref_for: !0 }, z), null, 16))), 128))
|
|
4370
4437
|
])
|
|
4371
4438
|
}))
|
|
4372
|
-
]), 1040, ["modelValue"])) : (n(),
|
|
4373
|
-
|
|
4374
|
-
name:
|
|
4439
|
+
]), 1040, ["modelValue"])) : (n(), h(Ue(d.value), ke({ key: 1 }, m.value, { onChange: i }), He({ _: 2 }, [
|
|
4440
|
+
se(f.value, (v, y) => ({
|
|
4441
|
+
name: y,
|
|
4375
4442
|
fn: B(() => [
|
|
4376
|
-
(n(!0), $(
|
|
4377
|
-
key:
|
|
4378
|
-
}, { ref_for: !0 },
|
|
4443
|
+
(n(!0), $(te, null, se(v, (z) => (n(), h(u, ke({
|
|
4444
|
+
key: z.id
|
|
4445
|
+
}, { ref_for: !0 }, z), null, 16))), 128))
|
|
4379
4446
|
])
|
|
4380
4447
|
}))
|
|
4381
4448
|
]), 1040));
|
|
4382
4449
|
};
|
|
4383
4450
|
}
|
|
4384
|
-
}),
|
|
4451
|
+
}), Fo = le(Ao), No = Mt;
|
|
4385
4452
|
async function Ro(e, l, o) {
|
|
4386
4453
|
const t = { ...o };
|
|
4387
4454
|
delete t.ruleIndex, delete t.trigger;
|
|
@@ -4392,7 +4459,7 @@ async function Ro(e, l, o) {
|
|
|
4392
4459
|
try {
|
|
4393
4460
|
await a.validate({ [e]: l });
|
|
4394
4461
|
} catch (s) {
|
|
4395
|
-
s.errors ? c = s.errors.map(({ message:
|
|
4462
|
+
s.errors ? c = s.errors.map(({ message: r }) => r) : c = [t.message || "校验错误"];
|
|
4396
4463
|
}
|
|
4397
4464
|
return c.length > 0 ? c[0] : "";
|
|
4398
4465
|
}
|
|
@@ -4400,7 +4467,7 @@ async function Eo(e, l, o) {
|
|
|
4400
4467
|
const t = o.map((a, c) => ({
|
|
4401
4468
|
...a,
|
|
4402
4469
|
ruleIndex: c
|
|
4403
|
-
})).sort(({ warningOnly: a, ruleIndex: c }, { warningOnly: s, ruleIndex:
|
|
4470
|
+
})).sort(({ warningOnly: a, ruleIndex: c }, { warningOnly: s, ruleIndex: r }) => !!a == !!s ? c - r : a ? 1 : -1);
|
|
4404
4471
|
for (let a = 0; a < t.length; a += 1) {
|
|
4405
4472
|
const c = t[a];
|
|
4406
4473
|
"pattern" in c && (l += "");
|
|
@@ -4410,38 +4477,38 @@ async function Eo(e, l, o) {
|
|
|
4410
4477
|
}
|
|
4411
4478
|
}
|
|
4412
4479
|
function Uo(e, l) {
|
|
4413
|
-
const o = (c, s,
|
|
4414
|
-
Object.keys(s).forEach((
|
|
4415
|
-
let
|
|
4416
|
-
|
|
4417
|
-
const
|
|
4418
|
-
f,
|
|
4419
|
-
u ? s : void 0,
|
|
4480
|
+
const o = (c, s, r, m, d) => {
|
|
4481
|
+
Object.keys(s).forEach((f) => {
|
|
4482
|
+
let i = f;
|
|
4483
|
+
r && (i = `${r}.${f}`);
|
|
4484
|
+
const p = s[f], { rules: b, myGridtableId: u } = l(
|
|
4420
4485
|
i,
|
|
4486
|
+
r ? s : void 0,
|
|
4487
|
+
m,
|
|
4421
4488
|
d
|
|
4422
4489
|
);
|
|
4423
|
-
if (
|
|
4424
|
-
const v = t(
|
|
4490
|
+
if (b.length) {
|
|
4491
|
+
const v = t(i, p, b);
|
|
4425
4492
|
c.push(v);
|
|
4426
4493
|
}
|
|
4427
|
-
|
|
4428
|
-
o(c, v,
|
|
4494
|
+
u && p.forEach((v) => {
|
|
4495
|
+
o(c, v, u, p, r ? s : void 0);
|
|
4429
4496
|
});
|
|
4430
4497
|
});
|
|
4431
|
-
}, t = (c, s,
|
|
4498
|
+
}, t = (c, s, r) => Eo(c, s, r);
|
|
4432
4499
|
return {
|
|
4433
4500
|
validateForm: async () => {
|
|
4434
|
-
const c =
|
|
4501
|
+
const c = E(e), s = [];
|
|
4435
4502
|
o(s, c, "");
|
|
4436
|
-
const
|
|
4437
|
-
return
|
|
4438
|
-
d && (
|
|
4439
|
-
}),
|
|
4503
|
+
const r = await Promise.all(s), m = {};
|
|
4504
|
+
return r.forEach((d) => {
|
|
4505
|
+
d && (m[d.name] = { msg: d.errors });
|
|
4506
|
+
}), m;
|
|
4440
4507
|
},
|
|
4441
4508
|
validateField: t
|
|
4442
4509
|
};
|
|
4443
4510
|
}
|
|
4444
|
-
const Jo = /* @__PURE__ */
|
|
4511
|
+
const Jo = /* @__PURE__ */ Z({
|
|
4445
4512
|
name: "JForm",
|
|
4446
4513
|
__name: "form",
|
|
4447
4514
|
props: {
|
|
@@ -4473,331 +4540,331 @@ const Jo = /* @__PURE__ */ K({
|
|
|
4473
4540
|
},
|
|
4474
4541
|
emits: ["change"],
|
|
4475
4542
|
setup(e, { expose: l, emit: o }) {
|
|
4476
|
-
const t = e, a = o, { useData: c, existField: s, httpGet:
|
|
4543
|
+
const t = e, a = o, { useData: c, existField: s, httpGet: r, httpPost: m, success: d, warning: f, error: i, info: p, t: b } = Ve(
|
|
4477
4544
|
"jcode_app_form_provide",
|
|
4478
4545
|
{
|
|
4479
4546
|
t: (g) => g
|
|
4480
4547
|
}
|
|
4481
4548
|
);
|
|
4482
|
-
let
|
|
4483
|
-
c && (
|
|
4549
|
+
let u;
|
|
4550
|
+
c && (u = c());
|
|
4484
4551
|
const v = (g) => {
|
|
4485
|
-
|
|
4486
|
-
},
|
|
4487
|
-
() =>
|
|
4488
|
-
), S = Qe({}),
|
|
4489
|
-
let
|
|
4490
|
-
const
|
|
4552
|
+
i && i(g);
|
|
4553
|
+
}, y = x(!1), z = V(() => t.config?.gutter || 16), j = V(() => t.config?.span || 24), U = V(() => t.config?.labelWidth), ae = V(() => t.config?.labelPosition || "right"), G = V(
|
|
4554
|
+
() => ne.length === 1 && (ne[0].type === "j-tabs" || ne[0].type === "j-layout" || ne[0].config?.isAutoWindow)
|
|
4555
|
+
), S = Qe({}), pe = x({}), ne = [], Y = {};
|
|
4556
|
+
let oe = {}, F = {}, he = [], R = {};
|
|
4557
|
+
const N = (g) => {
|
|
4491
4558
|
a("change", g);
|
|
4492
|
-
},
|
|
4493
|
-
let
|
|
4494
|
-
const
|
|
4495
|
-
Object.keys(g).forEach((
|
|
4496
|
-
const C = g[
|
|
4497
|
-
I && (
|
|
4559
|
+
}, H = (g) => rt(Y[g]?.type) && !Y[g]?.config?.notInput || Y[g]?.config?.isInput, A = (g) => ["j-table", "j-input-rows", "j-input-cards"].includes(Y[g]?.type || "");
|
|
4560
|
+
let _;
|
|
4561
|
+
const K = (g, I) => {
|
|
4562
|
+
Object.keys(g).forEach((w) => {
|
|
4563
|
+
const C = g[w];
|
|
4564
|
+
I && (w = I + "." + w), C != null && typeof C == "object" && !vt(C) && K(C, w), S[w] = C;
|
|
4498
4565
|
});
|
|
4499
4566
|
}, Se = (g, I) => {
|
|
4500
|
-
let
|
|
4501
|
-
return
|
|
4502
|
-
},
|
|
4503
|
-
g.forEach((
|
|
4504
|
-
|
|
4505
|
-
const
|
|
4506
|
-
id:
|
|
4507
|
-
slot:
|
|
4508
|
-
type:
|
|
4509
|
-
getCompType:
|
|
4510
|
-
getCompConfig:
|
|
4567
|
+
let w = g.id;
|
|
4568
|
+
return w || (g.config?.table && g.config?.field ? w = `${g.config.table}.${g.config.field}` : g.config?.table ? w = g.config?.table : g.config?.field && (w = g.config?.field), I && A(I) && (w = `${I}.${w}`)), w || ut("j");
|
|
4569
|
+
}, P = (g, I, w, C = "") => {
|
|
4570
|
+
g.forEach((T) => {
|
|
4571
|
+
T.id = Se(T, C);
|
|
4572
|
+
const W = {
|
|
4573
|
+
id: T.id,
|
|
4574
|
+
slot: T.slot,
|
|
4575
|
+
type: T.type,
|
|
4576
|
+
getCompType: T.getCompType,
|
|
4577
|
+
getCompConfig: T.getCompConfig,
|
|
4511
4578
|
config: {},
|
|
4512
4579
|
children: []
|
|
4513
4580
|
};
|
|
4514
|
-
I.push(
|
|
4515
|
-
const { children: X } =
|
|
4516
|
-
|
|
4517
|
-
let
|
|
4518
|
-
C !== "" &&
|
|
4519
|
-
const
|
|
4520
|
-
if (
|
|
4521
|
-
!
|
|
4522
|
-
else if (
|
|
4523
|
-
|
|
4524
|
-
else if (
|
|
4525
|
-
!
|
|
4526
|
-
else if (
|
|
4527
|
-
S[
|
|
4528
|
-
else if (
|
|
4529
|
-
const
|
|
4530
|
-
(
|
|
4531
|
-
|
|
4532
|
-
}), S[
|
|
4581
|
+
I.push(W);
|
|
4582
|
+
const { children: X } = T;
|
|
4583
|
+
ot(W, T, ["children", "config"]), ot(W.config, T.config || {}, []), Y[T.id] && console.warn("有重复的组件id:" + T.id), Y[T.id] = W, t.readonly === !0 && (W.config.readonly = !0);
|
|
4584
|
+
let ce = !1, we;
|
|
4585
|
+
C !== "" && A(C) && (ce = !0, W.config = T.config || {}, W.config.parentTableId = C, we = Y[C]?.config?.table);
|
|
4586
|
+
const fe = W.config || {};
|
|
4587
|
+
if (H(T.id))
|
|
4588
|
+
!w && ce === !1 && (fe?.defaultValue === 0 ? S[T.id] = fe?.defaultValue : S[T.id] = fe?.defaultValue || void 0), fe.table && fe.field ? oe[`${fe.table}_${fe.field}`.toLowerCase()] = T.id : fe.field && (ce ? oe[`${we}_${fe.field}`.toLowerCase()] = T.id : oe[`${fe.field}`.toLowerCase()] = T.id);
|
|
4589
|
+
else if (ce && fe.field)
|
|
4590
|
+
oe[`${we}_${fe.field}`.toLowerCase()] = T.id;
|
|
4591
|
+
else if (A(T.id))
|
|
4592
|
+
!w && !fe.isSubTable && (S[T.id] = []), fe.table && (oe[fe.table.toLowerCase() || ""] = T.id), fe.isSubTable || he.push(W);
|
|
4593
|
+
else if (fe?.defaultValue)
|
|
4594
|
+
S[T.id] = fe?.defaultValue;
|
|
4595
|
+
else if (T.type === "collapse" && fe?.isExpand) {
|
|
4596
|
+
const et = [];
|
|
4597
|
+
(fe?.groups || []).forEach((kt) => {
|
|
4598
|
+
et.push(kt.i);
|
|
4599
|
+
}), S[T.id] = et;
|
|
4533
4600
|
}
|
|
4534
|
-
X && X.length > 0 &&
|
|
4601
|
+
X && X.length > 0 && P(X, W.children, w, W.id);
|
|
4535
4602
|
});
|
|
4536
|
-
},
|
|
4537
|
-
|
|
4538
|
-
const
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4603
|
+
}, ge = async (g, I) => {
|
|
4604
|
+
y.value = !1;
|
|
4605
|
+
const w = !!I;
|
|
4606
|
+
ne.splice(0, ne.length), oe = {}, F = {}, he = [], _ = I, Ge(S), w && K(I, ""), P(g, ne, w), R = Ke(S), Ce(() => {
|
|
4607
|
+
y.value = !0, Ce(() => {
|
|
4608
|
+
_e(t.config?.codeInit, {});
|
|
4542
4609
|
});
|
|
4543
4610
|
});
|
|
4544
|
-
}, Te = (g, I,
|
|
4611
|
+
}, Te = (g, I, w) => {
|
|
4545
4612
|
const C = [];
|
|
4546
|
-
return I.forEach((
|
|
4547
|
-
const
|
|
4548
|
-
Object.keys(
|
|
4549
|
-
if (!
|
|
4550
|
-
const
|
|
4551
|
-
if (
|
|
4552
|
-
|
|
4613
|
+
return I.forEach((T) => {
|
|
4614
|
+
const W = {};
|
|
4615
|
+
Object.keys(T).forEach((X) => {
|
|
4616
|
+
if (!w || w(X, T[X], g)) {
|
|
4617
|
+
const ce = D(X);
|
|
4618
|
+
if (ce?.type === "j-table")
|
|
4619
|
+
W[ce?.id || ""] = Te(X, T[X], w);
|
|
4553
4620
|
else {
|
|
4554
|
-
let
|
|
4555
|
-
|
|
4621
|
+
let we = oe[`${g}_${X}`.toLowerCase()] || X;
|
|
4622
|
+
we = we.indexOf(".") !== -1 ? we.split(".")[1] : we, W[we] = T[X];
|
|
4556
4623
|
}
|
|
4557
4624
|
}
|
|
4558
|
-
}), C.push(
|
|
4625
|
+
}), C.push(W);
|
|
4559
4626
|
}), C;
|
|
4560
4627
|
}, Ie = (g, I) => {
|
|
4561
|
-
Object.keys(g || {}).forEach((
|
|
4562
|
-
let C = g[
|
|
4563
|
-
const
|
|
4564
|
-
if (
|
|
4565
|
-
C && (
|
|
4566
|
-
if (!I || I(
|
|
4567
|
-
let X =
|
|
4568
|
-
|
|
4628
|
+
Object.keys(g || {}).forEach((w) => {
|
|
4629
|
+
let C = g[w];
|
|
4630
|
+
const T = D(w);
|
|
4631
|
+
if (T === void 0)
|
|
4632
|
+
C && (vt(C) && (C = C[0] || {}), typeof C == "object" ? Object.keys(C).forEach((W) => {
|
|
4633
|
+
if (!I || I(w, C[W], w)) {
|
|
4634
|
+
let X = W;
|
|
4635
|
+
w !== "main" && (X = `${w}_${W}`), F[X] = w, S[oe[X.toLowerCase()] || W] = C[W];
|
|
4569
4636
|
}
|
|
4570
|
-
}) : S[
|
|
4571
|
-
else if (
|
|
4637
|
+
}) : S[w] = C);
|
|
4638
|
+
else if (A(T.id || "")) {
|
|
4572
4639
|
if (!Array.isArray(C)) {
|
|
4573
|
-
console.warn("表格数据不是数组:" +
|
|
4640
|
+
console.warn("表格数据不是数组:" + w);
|
|
4574
4641
|
return;
|
|
4575
4642
|
}
|
|
4576
|
-
C?.length > 0 ? S[
|
|
4643
|
+
C?.length > 0 ? S[oe[w.toLowerCase()] || w] = Te(w, C, I) : S[oe[w.toLowerCase()] || w] = [];
|
|
4577
4644
|
} else
|
|
4578
|
-
(!I || I(
|
|
4579
|
-
}),
|
|
4580
|
-
const C =
|
|
4581
|
-
(C === void 0 || !["tabs", "collapse"].includes(C.type || "")) && Ut(
|
|
4645
|
+
(!I || I(w, C, w)) && (S[oe[w.toLowerCase()] || w] = C);
|
|
4646
|
+
}), _ && Object.keys(S).forEach((w) => {
|
|
4647
|
+
const C = D(w);
|
|
4648
|
+
(C === void 0 || !["tabs", "collapse"].includes(C.type || "")) && Ut(_, w, S[w]);
|
|
4582
4649
|
});
|
|
4583
4650
|
}, O = (g, I = !1) => {
|
|
4584
|
-
const
|
|
4651
|
+
const w = {};
|
|
4585
4652
|
return Object.keys(g).forEach((C) => {
|
|
4586
4653
|
if (C === "parentRow") return;
|
|
4587
|
-
const
|
|
4588
|
-
if (
|
|
4589
|
-
const
|
|
4654
|
+
const T = Y[C];
|
|
4655
|
+
if (T) {
|
|
4656
|
+
const W = T.config?.table, X = T.config?.field;
|
|
4590
4657
|
if (I)
|
|
4591
|
-
X ?
|
|
4592
|
-
else if (
|
|
4593
|
-
const
|
|
4594
|
-
g[C].forEach((
|
|
4595
|
-
|
|
4596
|
-
}),
|
|
4597
|
-
} else
|
|
4598
|
-
} else I ? C !== "_X_ROW_KEY" && C !== "_isHover" && (
|
|
4599
|
-
}),
|
|
4600
|
-
},
|
|
4601
|
-
let
|
|
4602
|
-
if (
|
|
4658
|
+
X ? w[X] = g[C] : w[C] = g[C];
|
|
4659
|
+
else if (A(C)) {
|
|
4660
|
+
const ce = [];
|
|
4661
|
+
g[C].forEach((we) => {
|
|
4662
|
+
ce.push(O(we, !0));
|
|
4663
|
+
}), w[W || C] = ce;
|
|
4664
|
+
} else W && X ? (w[W] = w[W] || {}, w[W][X] = g[C]) : X && (w[X] = g[C]);
|
|
4665
|
+
} else I ? C !== "_X_ROW_KEY" && C !== "_isHover" && (w[C] = g[C]) : F[C] ? (w[F[C]] = w[F[C]] || {}, w[F[C]][C.replace(`${F[C]}_`, "")] = g[C]) : w[C] = g[C];
|
|
4666
|
+
}), w;
|
|
4667
|
+
}, be = (g = !0) => g ? O(S) : S, me = (g, I, w, C) => {
|
|
4668
|
+
let T = Y[g];
|
|
4669
|
+
if (T == null) {
|
|
4603
4670
|
const X = g.split(".");
|
|
4604
|
-
|
|
4671
|
+
T = Y[X[X.length - 1]] || {};
|
|
4605
4672
|
}
|
|
4606
|
-
if (!
|
|
4673
|
+
if (!T)
|
|
4607
4674
|
return {};
|
|
4608
|
-
const
|
|
4675
|
+
const W = We({
|
|
4609
4676
|
config: t.config,
|
|
4610
|
-
getCompConfig:
|
|
4677
|
+
getCompConfig: T.getCompConfig,
|
|
4611
4678
|
formData: S,
|
|
4612
|
-
tableData:
|
|
4679
|
+
tableData: w,
|
|
4613
4680
|
row: I,
|
|
4614
4681
|
pRowData: C
|
|
4615
4682
|
});
|
|
4616
|
-
return
|
|
4617
|
-
},
|
|
4618
|
-
const
|
|
4619
|
-
if (
|
|
4620
|
-
const
|
|
4621
|
-
return X && (X.validator = async (
|
|
4622
|
-
if (
|
|
4623
|
-
const
|
|
4624
|
-
table:
|
|
4625
|
-
key:
|
|
4626
|
-
keyName:
|
|
4627
|
-
field:
|
|
4628
|
-
keyValue:
|
|
4629
|
-
value:
|
|
4630
|
-
paramNames:
|
|
4631
|
-
getParams:
|
|
4632
|
-
withProjectId:
|
|
4633
|
-
getValue:
|
|
4683
|
+
return W._componentId = T?.id, W;
|
|
4684
|
+
}, ie = (g, I, w, C) => {
|
|
4685
|
+
const T = me(g, I, w, C);
|
|
4686
|
+
if (T.isNotRule !== !0 && T.display !== !1) {
|
|
4687
|
+
const W = T.rule || [], X = W.find((ce) => ce.type === "only");
|
|
4688
|
+
return X && (X.validator = async (ce, we) => {
|
|
4689
|
+
if (we) {
|
|
4690
|
+
const fe = {
|
|
4691
|
+
table: ce.table,
|
|
4692
|
+
key: ce.key,
|
|
4693
|
+
keyName: ce.keyName,
|
|
4694
|
+
field: ce.field,
|
|
4695
|
+
keyValue: ce.getKeyValue ? ce.getKeyValue() : "",
|
|
4696
|
+
value: we,
|
|
4697
|
+
paramNames: ce.paramNames,
|
|
4698
|
+
getParams: ce.getParams,
|
|
4699
|
+
withProjectId: ce.withProjectId,
|
|
4700
|
+
getValue: ce.getValue,
|
|
4634
4701
|
formData: S
|
|
4635
4702
|
};
|
|
4636
|
-
if (!await s(
|
|
4637
|
-
throw
|
|
4703
|
+
if (!await s(fe))
|
|
4704
|
+
throw b(ce.message) || b("数据值重复");
|
|
4638
4705
|
}
|
|
4639
4706
|
}), {
|
|
4640
|
-
rules:
|
|
4641
|
-
myGridtableId:
|
|
4707
|
+
rules: W,
|
|
4708
|
+
myGridtableId: A(T._componentId) ? T._componentId : ""
|
|
4642
4709
|
};
|
|
4643
4710
|
}
|
|
4644
4711
|
return { rules: [], myGridtableId: "" };
|
|
4645
|
-
}, { validateForm:
|
|
4646
|
-
|
|
4647
|
-
const g = await
|
|
4648
|
-
return Object.keys(g).length > 0 ? (
|
|
4649
|
-
`${
|
|
4712
|
+
}, { validateForm: ye } = Uo(S, ie), xe = async () => {
|
|
4713
|
+
pe.value = {};
|
|
4714
|
+
const g = await ye();
|
|
4715
|
+
return Object.keys(g).length > 0 ? (pe.value = g, v(
|
|
4716
|
+
`${b(Y[Object.keys(g)[0]]?.config?.label)}:${b(g[Object.keys(g)[0]].msg)}`
|
|
4650
4717
|
), !1) : !0;
|
|
4651
4718
|
}, k = () => {
|
|
4652
|
-
|
|
4653
|
-
S[g] =
|
|
4719
|
+
pe.value = {}, Ge(S), Object.keys(R || {}).forEach((g) => {
|
|
4720
|
+
S[g] = R[g];
|
|
4654
4721
|
});
|
|
4655
|
-
},
|
|
4656
|
-
let I =
|
|
4657
|
-
return I === void 0 &&
|
|
4658
|
-
},
|
|
4722
|
+
}, D = (g) => {
|
|
4723
|
+
let I = Y[g];
|
|
4724
|
+
return I === void 0 && oe[g.toLowerCase()] && (I = Y[oe[g.toLowerCase()]]), I;
|
|
4725
|
+
}, Q = ({ id: g, i: I, value: w, type: C }) => {
|
|
4659
4726
|
if (C === "add")
|
|
4660
|
-
S[g].push(
|
|
4727
|
+
S[g].push(w);
|
|
4661
4728
|
else if (C === "delete")
|
|
4662
4729
|
S[g].splice(I, 1);
|
|
4663
4730
|
else {
|
|
4664
|
-
const
|
|
4665
|
-
|
|
4731
|
+
const T = D(g);
|
|
4732
|
+
T && (T.config.parentTableId ? S[T.config.parentTableId][I][g] = w : S[g] = w);
|
|
4666
4733
|
}
|
|
4667
|
-
},
|
|
4668
|
-
const
|
|
4669
|
-
if (
|
|
4670
|
-
if (
|
|
4671
|
-
const C = S[
|
|
4734
|
+
}, ue = ({ id: g, i: I }) => {
|
|
4735
|
+
const w = D(g);
|
|
4736
|
+
if (w) {
|
|
4737
|
+
if (w.config.parentTableId) {
|
|
4738
|
+
const C = S[w.config.parentTableId], T = w.id ? w.id.replace(`${w.config.parentTableId}.`, "") : "";
|
|
4672
4739
|
if (I != null)
|
|
4673
|
-
return (C[I] || {})[
|
|
4674
|
-
const
|
|
4740
|
+
return (C[I] || {})[T || ""];
|
|
4741
|
+
const W = [];
|
|
4675
4742
|
return C && C.forEach((X) => {
|
|
4676
|
-
|
|
4677
|
-
}),
|
|
4743
|
+
W.push(X[T || ""]);
|
|
4744
|
+
}), W;
|
|
4678
4745
|
}
|
|
4679
|
-
if (
|
|
4746
|
+
if (A(w.id || "")) {
|
|
4680
4747
|
const C = [];
|
|
4681
|
-
return S[
|
|
4682
|
-
C.push(O(
|
|
4748
|
+
return S[w.id || ""].forEach((T) => {
|
|
4749
|
+
C.push(O(T, !0));
|
|
4683
4750
|
}), C;
|
|
4684
4751
|
}
|
|
4685
|
-
return S[
|
|
4752
|
+
return S[w.id || ""];
|
|
4686
4753
|
}
|
|
4687
4754
|
if (S[g])
|
|
4688
4755
|
return S[g];
|
|
4689
4756
|
}, $e = async ({ id: g, i: I }) => {
|
|
4690
|
-
const
|
|
4691
|
-
if (C &&
|
|
4757
|
+
const w = ue({ id: g, i: I }), C = D(g);
|
|
4758
|
+
if (C && u?.getLabel)
|
|
4692
4759
|
if (I !== void 0) {
|
|
4693
|
-
const
|
|
4760
|
+
const T = w[I], W = S[C.config.parentTableId || ""][I], X = We({
|
|
4694
4761
|
config: t.config,
|
|
4695
4762
|
getCompConfig: C.getCompConfig,
|
|
4696
4763
|
formData: S,
|
|
4697
4764
|
// @ts-expect-error clone类型推断不完整,此处可安全传递
|
|
4698
4765
|
tableData: S[C.config.parentTableId || ""],
|
|
4699
|
-
row:
|
|
4766
|
+
row: W
|
|
4700
4767
|
});
|
|
4701
|
-
return await
|
|
4702
|
-
value:
|
|
4768
|
+
return await u?.getLabel({
|
|
4769
|
+
value: T,
|
|
4703
4770
|
config: X,
|
|
4704
4771
|
formData: S,
|
|
4705
4772
|
// @ts-expect-error clone类型推断不完整,此处可安全传递
|
|
4706
4773
|
tableData: S[C.config.parentTableId || ""],
|
|
4707
|
-
row:
|
|
4774
|
+
row: W
|
|
4708
4775
|
});
|
|
4709
4776
|
} else {
|
|
4710
|
-
const
|
|
4777
|
+
const T = We({
|
|
4711
4778
|
config: t.config,
|
|
4712
4779
|
getCompConfig: C.getCompConfig,
|
|
4713
4780
|
formData: S
|
|
4714
4781
|
});
|
|
4715
|
-
return await
|
|
4716
|
-
value:
|
|
4717
|
-
config:
|
|
4782
|
+
return await u?.getLabel({
|
|
4783
|
+
value: w,
|
|
4784
|
+
config: T,
|
|
4718
4785
|
formData: S
|
|
4719
4786
|
});
|
|
4720
4787
|
}
|
|
4721
|
-
return
|
|
4722
|
-
}, Le = async (g, I) =>
|
|
4788
|
+
return w;
|
|
4789
|
+
}, Le = async (g, I) => u?.loadViewDataList ? await u?.loadViewDataList(g, I, !1) : [], re = (g) => (g.set = Q, g.get = ue, g.setFormData = Ie, g.getFormData = be, g.getLabel = $e, g.getViewData = Le, g.getDateNow = (I) => Ht(/* @__PURE__ */ new Date(), I || "YYYY-MM-DD HH:mm:ss"), g.httpGet = r || (() => {
|
|
4723
4790
|
console.log("当前状态不支持");
|
|
4724
|
-
}), g.httpPost =
|
|
4791
|
+
}), g.httpPost = m || (() => {
|
|
4725
4792
|
console.log("当前状态不支持");
|
|
4726
4793
|
}), g.loading = (I) => {
|
|
4727
4794
|
Je(I);
|
|
4728
|
-
}, g.showMsg = ({ text: I, type:
|
|
4729
|
-
switch (
|
|
4795
|
+
}, g.showMsg = ({ text: I, type: w }) => {
|
|
4796
|
+
switch (w) {
|
|
4730
4797
|
case "success":
|
|
4731
4798
|
d && d(I);
|
|
4732
4799
|
break;
|
|
4733
4800
|
case "warning":
|
|
4734
|
-
|
|
4801
|
+
f && f(I);
|
|
4735
4802
|
break;
|
|
4736
4803
|
case "error":
|
|
4737
|
-
|
|
4804
|
+
i && i(I);
|
|
4738
4805
|
break;
|
|
4739
4806
|
case "info":
|
|
4740
|
-
|
|
4807
|
+
p && p(I);
|
|
4741
4808
|
break;
|
|
4742
4809
|
default:
|
|
4743
|
-
|
|
4810
|
+
p && p(I);
|
|
4744
4811
|
break;
|
|
4745
4812
|
}
|
|
4746
|
-
console.log("showMsg", I,
|
|
4747
|
-
}, g),
|
|
4813
|
+
console.log("showMsg", I, w);
|
|
4814
|
+
}, g), _e = async (g, I) => {
|
|
4748
4815
|
if (g && g.trim()) {
|
|
4749
4816
|
g = `async (jcode) => {${g}}`;
|
|
4750
|
-
const { res:
|
|
4751
|
-
|
|
4817
|
+
const { res: w, fn: C } = Et(g);
|
|
4818
|
+
w && await C(re(I));
|
|
4752
4819
|
}
|
|
4753
4820
|
};
|
|
4754
|
-
return t.schema &&
|
|
4821
|
+
return t.schema && ge(t.schema), st("jcode_form_provide", {
|
|
4755
4822
|
formData: S,
|
|
4756
|
-
errorFields:
|
|
4757
|
-
isAutoWindow:
|
|
4758
|
-
gutter:
|
|
4823
|
+
errorFields: pe,
|
|
4824
|
+
isAutoWindow: G,
|
|
4825
|
+
gutter: z,
|
|
4759
4826
|
span: j,
|
|
4760
|
-
labelWidth:
|
|
4761
|
-
onChange:
|
|
4827
|
+
labelWidth: U,
|
|
4828
|
+
onChange: N
|
|
4762
4829
|
}), l({
|
|
4763
|
-
init:
|
|
4830
|
+
init: ge,
|
|
4764
4831
|
reset: k,
|
|
4765
|
-
validate:
|
|
4766
|
-
setValue:
|
|
4767
|
-
getValue:
|
|
4832
|
+
validate: xe,
|
|
4833
|
+
setValue: Q,
|
|
4834
|
+
getValue: ue,
|
|
4768
4835
|
getLabel: $e,
|
|
4769
4836
|
setFormData: Ie,
|
|
4770
|
-
getFormData:
|
|
4837
|
+
getFormData: be
|
|
4771
4838
|
}), (g, I) => {
|
|
4772
|
-
const
|
|
4773
|
-
return
|
|
4839
|
+
const w = L("j-form-item"), C = L("el-row"), T = L("el-form");
|
|
4840
|
+
return y.value ? (n(), h(T, {
|
|
4774
4841
|
key: 0,
|
|
4775
|
-
class:
|
|
4776
|
-
"label-position":
|
|
4777
|
-
"label-width":
|
|
4842
|
+
class: Me([{ "j-block": e.isAutoSize }, "j-form"]),
|
|
4843
|
+
"label-position": ae.value,
|
|
4844
|
+
"label-width": U.value,
|
|
4778
4845
|
size: e.config?.size,
|
|
4779
4846
|
onSubmit: I[0] || (I[0] = Be(() => {
|
|
4780
4847
|
}, ["prevent"]))
|
|
4781
4848
|
}, {
|
|
4782
4849
|
default: B(() => [
|
|
4783
|
-
|
|
4850
|
+
G.value ? (n(), h(w, Bt(ke({ key: 0 }, ne[0])), null, 16)) : (n(), h(C, {
|
|
4784
4851
|
key: 1,
|
|
4785
|
-
gutter:
|
|
4852
|
+
gutter: z.value
|
|
4786
4853
|
}, {
|
|
4787
4854
|
default: B(() => [
|
|
4788
|
-
(n(), $(
|
|
4789
|
-
key:
|
|
4855
|
+
(n(), $(te, null, se(ne, (W) => q(w, ke({
|
|
4856
|
+
key: W.id,
|
|
4790
4857
|
ref_for: !0
|
|
4791
|
-
},
|
|
4858
|
+
}, W), null, 16)), 64))
|
|
4792
4859
|
]),
|
|
4793
4860
|
_: 1
|
|
4794
4861
|
}, 8, ["gutter"]))
|
|
4795
4862
|
]),
|
|
4796
4863
|
_: 1
|
|
4797
|
-
}, 8, ["class", "label-position", "label-width", "size"])) :
|
|
4864
|
+
}, 8, ["class", "label-position", "label-width", "size"])) : M("", !0);
|
|
4798
4865
|
};
|
|
4799
4866
|
}
|
|
4800
|
-
}),
|
|
4867
|
+
}), Wo = le(Jo), Ho = /* @__PURE__ */ Z({
|
|
4801
4868
|
name: "JFormItem",
|
|
4802
4869
|
__name: "form-item",
|
|
4803
4870
|
props: {
|
|
@@ -4849,63 +4916,63 @@ const Jo = /* @__PURE__ */ K({
|
|
|
4849
4916
|
const l = e, { formData: o, errorFields: t, isAutoWindow: a, span: c, labelWidth: s } = Ve(
|
|
4850
4917
|
"jcode_form_provide",
|
|
4851
4918
|
{}
|
|
4852
|
-
), { t:
|
|
4853
|
-
t: (
|
|
4854
|
-
}),
|
|
4919
|
+
), { t: r } = Ve("jcode_app_provide", {
|
|
4920
|
+
t: (u) => u
|
|
4921
|
+
}), m = V(() => We({
|
|
4855
4922
|
config: l.config,
|
|
4856
4923
|
getCompConfig: l.getCompConfig,
|
|
4857
4924
|
formData: o
|
|
4858
|
-
})), d =
|
|
4859
|
-
const
|
|
4860
|
-
return
|
|
4925
|
+
})), d = V(() => l.getCompType ? l.getCompType({ config: l.config, formData: o }) : l.type), f = V(() => rt(d.value) && !m.value?.notInput || m.value?.isInput), i = V(() => m.value?.labelWidth || s.value), p = V(() => (m.value?.rule || []).some((v) => v.required === !0)), b = V(() => {
|
|
4926
|
+
const u = t.value[l.id];
|
|
4927
|
+
return u ? u.msg : "";
|
|
4861
4928
|
});
|
|
4862
|
-
return (
|
|
4863
|
-
const
|
|
4864
|
-
return
|
|
4929
|
+
return (u, v) => {
|
|
4930
|
+
const y = L("j-comp"), z = L("el-form-item"), j = L("el-col");
|
|
4931
|
+
return m.value.display !== !1 && !E(a) ? (n(), h(j, {
|
|
4865
4932
|
key: 0,
|
|
4866
|
-
span:
|
|
4867
|
-
style:
|
|
4868
|
-
...
|
|
4933
|
+
span: m.value.span || E(c),
|
|
4934
|
+
style: ve({
|
|
4935
|
+
...m.value.colStyle || {}
|
|
4869
4936
|
}),
|
|
4870
|
-
class:
|
|
4937
|
+
class: Me(m.value.colClass || {})
|
|
4871
4938
|
}, {
|
|
4872
4939
|
default: B(() => [
|
|
4873
|
-
|
|
4940
|
+
f.value ? (n(), h(z, {
|
|
4874
4941
|
key: 0,
|
|
4875
|
-
label:
|
|
4876
|
-
"label-position":
|
|
4877
|
-
"label-width":
|
|
4878
|
-
required:
|
|
4879
|
-
error:
|
|
4942
|
+
label: E(r)(m.value.notShowLabel ? "" : m.value.label || ""),
|
|
4943
|
+
"label-position": m.value.labelPosition,
|
|
4944
|
+
"label-width": i.value,
|
|
4945
|
+
required: p.value,
|
|
4946
|
+
error: E(r)(b.value)
|
|
4880
4947
|
}, {
|
|
4881
4948
|
default: B(() => [
|
|
4882
|
-
q(
|
|
4949
|
+
q(y, {
|
|
4883
4950
|
id: e.id,
|
|
4884
4951
|
type: d.value,
|
|
4885
|
-
config:
|
|
4952
|
+
config: m.value,
|
|
4886
4953
|
children: e.children
|
|
4887
4954
|
}, null, 8, ["id", "type", "config", "children"])
|
|
4888
4955
|
]),
|
|
4889
4956
|
_: 1
|
|
4890
|
-
}, 8, ["label", "label-position", "label-width", "required", "error"])) : (n(), y
|
|
4957
|
+
}, 8, ["label", "label-position", "label-width", "required", "error"])) : (n(), h(y, {
|
|
4891
4958
|
key: 1,
|
|
4892
4959
|
id: e.id,
|
|
4893
4960
|
type: d.value,
|
|
4894
|
-
config:
|
|
4961
|
+
config: m.value,
|
|
4895
4962
|
children: e.children
|
|
4896
4963
|
}, null, 8, ["id", "type", "config", "children"]))
|
|
4897
4964
|
]),
|
|
4898
4965
|
_: 1
|
|
4899
|
-
}, 8, ["span", "style", "class"])) :
|
|
4966
|
+
}, 8, ["span", "style", "class"])) : m.value.display !== !1 ? (n(), h(y, {
|
|
4900
4967
|
key: 1,
|
|
4901
4968
|
id: e.id,
|
|
4902
4969
|
type: d.value,
|
|
4903
|
-
config:
|
|
4970
|
+
config: m.value,
|
|
4904
4971
|
children: e.children
|
|
4905
|
-
}, null, 8, ["id", "type", "config", "children"])) :
|
|
4972
|
+
}, null, 8, ["id", "type", "config", "children"])) : M("", !0);
|
|
4906
4973
|
};
|
|
4907
4974
|
}
|
|
4908
|
-
}),
|
|
4975
|
+
}), Po = le(Ho), Yo = { class: "j-page" }, Xo = /* @__PURE__ */ Z({
|
|
4909
4976
|
name: "JPage",
|
|
4910
4977
|
__name: "page",
|
|
4911
4978
|
props: {
|
|
@@ -4932,43 +4999,43 @@ const Jo = /* @__PURE__ */ K({
|
|
|
4932
4999
|
}
|
|
4933
5000
|
},
|
|
4934
5001
|
setup(e) {
|
|
4935
|
-
const l = e, o = x(!1), t = [], a = {}, c = Qe({}), s = (
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
const
|
|
4939
|
-
id:
|
|
4940
|
-
slot:
|
|
4941
|
-
type:
|
|
5002
|
+
const l = e, o = x(!1), t = [], a = {}, c = Qe({}), s = (m, d) => {
|
|
5003
|
+
m.forEach((f) => {
|
|
5004
|
+
f.id = f.id || ut("c");
|
|
5005
|
+
const i = {
|
|
5006
|
+
id: f.id,
|
|
5007
|
+
slot: f.slot,
|
|
5008
|
+
type: f.type,
|
|
4942
5009
|
config: {},
|
|
4943
5010
|
children: []
|
|
4944
|
-
}, { children:
|
|
4945
|
-
a[
|
|
5011
|
+
}, { children: p } = f;
|
|
5012
|
+
a[f.id] = i, ot(i.config, f.config || {}, ["defaultValue"]), f?.config?.defaultValue !== void 0 && (c.value[f.id] = f.config.defaultValue), d.push(i), p && p.length > 0 && s(p, i.children);
|
|
4946
5013
|
});
|
|
4947
|
-
},
|
|
4948
|
-
o.value = !1, t.splice(0, t.length), Ge(a), Ge(c), s(
|
|
5014
|
+
}, r = (m) => {
|
|
5015
|
+
o.value = !1, t.splice(0, t.length), Ge(a), Ge(c), s(m, t), Ce(() => {
|
|
4949
5016
|
o.value = !0;
|
|
4950
5017
|
});
|
|
4951
5018
|
};
|
|
4952
|
-
return l.schema &&
|
|
4953
|
-
const
|
|
4954
|
-
return n(), $("div",
|
|
4955
|
-
(n(), $(
|
|
4956
|
-
key:
|
|
4957
|
-
id:
|
|
4958
|
-
type:
|
|
4959
|
-
config:
|
|
4960
|
-
children:
|
|
5019
|
+
return l.schema && r(l.schema), (m, d) => {
|
|
5020
|
+
const f = L("j-comp");
|
|
5021
|
+
return n(), $("div", Yo, [
|
|
5022
|
+
(n(), $(te, null, se(t, (i) => q(f, {
|
|
5023
|
+
key: i.id,
|
|
5024
|
+
id: i.id,
|
|
5025
|
+
type: i.type,
|
|
5026
|
+
config: i.config,
|
|
5027
|
+
children: i.children
|
|
4961
5028
|
}, null, 8, ["id", "type", "config", "children"])), 64))
|
|
4962
5029
|
]);
|
|
4963
5030
|
};
|
|
4964
5031
|
}
|
|
4965
|
-
}), qo =
|
|
5032
|
+
}), qo = le(Xo), Go = [
|
|
4966
5033
|
Nt,
|
|
4967
5034
|
Kt,
|
|
4968
5035
|
Zt,
|
|
4969
5036
|
_t,
|
|
4970
5037
|
ll,
|
|
4971
|
-
|
|
5038
|
+
sl,
|
|
4972
5039
|
rl,
|
|
4973
5040
|
dl,
|
|
4974
5041
|
pl,
|
|
@@ -4982,14 +5049,14 @@ const Jo = /* @__PURE__ */ K({
|
|
|
4982
5049
|
to,
|
|
4983
5050
|
oo,
|
|
4984
5051
|
no,
|
|
4985
|
-
|
|
5052
|
+
so,
|
|
4986
5053
|
So,
|
|
4987
5054
|
To,
|
|
4988
5055
|
Oo,
|
|
4989
|
-
|
|
4990
|
-
|
|
5056
|
+
Do,
|
|
5057
|
+
Fo,
|
|
5058
|
+
Wo,
|
|
4991
5059
|
Po,
|
|
4992
|
-
Ho,
|
|
4993
5060
|
qo
|
|
4994
5061
|
], Ko = (e) => {
|
|
4995
5062
|
Go.forEach((l) => {
|
|
@@ -5007,15 +5074,15 @@ export {
|
|
|
5007
5074
|
Kt as JButtons,
|
|
5008
5075
|
rl as JCascaderSelect,
|
|
5009
5076
|
dl as JCheckbox,
|
|
5010
|
-
|
|
5011
|
-
|
|
5077
|
+
Do as JCodeMirror,
|
|
5078
|
+
Fo as JComp,
|
|
5012
5079
|
Ll as JDialog,
|
|
5013
5080
|
Ul as JDialogFull,
|
|
5014
5081
|
Ql as JDrawer,
|
|
5015
5082
|
to as JDynamicLayer,
|
|
5016
5083
|
To as JEcharts,
|
|
5017
|
-
|
|
5018
|
-
|
|
5084
|
+
Wo as JForm,
|
|
5085
|
+
Po as JFormItem,
|
|
5019
5086
|
_t as JIcon,
|
|
5020
5087
|
Zt as JInput,
|
|
5021
5088
|
oo as JInputTag,
|
|
@@ -5025,25 +5092,25 @@ export {
|
|
|
5025
5092
|
qo as JPage,
|
|
5026
5093
|
ll as JRadio,
|
|
5027
5094
|
no as JRate,
|
|
5028
|
-
|
|
5029
|
-
|
|
5095
|
+
sl as JSelect,
|
|
5096
|
+
so as JSlider,
|
|
5030
5097
|
Bl as JTable,
|
|
5031
5098
|
So as JUpload,
|
|
5032
|
-
|
|
5099
|
+
ut as buildShortUUID,
|
|
5033
5100
|
Ge as clearJson,
|
|
5034
|
-
|
|
5101
|
+
ot as clone,
|
|
5035
5102
|
Ke as deepClone,
|
|
5036
5103
|
fa as default,
|
|
5037
|
-
|
|
5038
|
-
|
|
5104
|
+
Ye as formatToDate,
|
|
5105
|
+
Ht as formatToDateTime,
|
|
5039
5106
|
Je as fullScreenLoading,
|
|
5040
|
-
|
|
5107
|
+
We as getCompConfig,
|
|
5041
5108
|
Et as getFunction,
|
|
5042
|
-
|
|
5109
|
+
rt as getIsInputComp,
|
|
5043
5110
|
Rt as getObjType,
|
|
5044
|
-
|
|
5111
|
+
vt as isArray,
|
|
5045
5112
|
ze as isNullOrEmpty,
|
|
5046
5113
|
da as myAesDecrypt,
|
|
5047
5114
|
Ut as set,
|
|
5048
|
-
|
|
5115
|
+
Pe as toDecimal
|
|
5049
5116
|
};
|