z-ui-pc 1.2.2 → 1.2.3
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/index.d.ts +7 -3
- package/dist/index.js +603 -601
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -194,50 +194,50 @@ const Ga = {
|
|
|
194
194
|
disabled: { type: Boolean, default: !1 }
|
|
195
195
|
},
|
|
196
196
|
setup(t) {
|
|
197
|
-
const e = Oe(), o = N(() => e.formItems.find((
|
|
198
|
-
e.updateFormData(t.prop, le(
|
|
197
|
+
const e = Oe(), o = N(() => e.formItems.find((r) => r.prop === t.prop)), n = (r) => {
|
|
198
|
+
e.updateFormData(t.prop, le(r));
|
|
199
199
|
}, a = () => o.value?.parseColumnEvent(() => {
|
|
200
200
|
e.emit(ue.CHANGE);
|
|
201
201
|
}) ?? {}, u = N({
|
|
202
202
|
get() {
|
|
203
203
|
return e.activeGroupColumnsMap.get(o.value?.prop)?.dynamicExpression;
|
|
204
204
|
},
|
|
205
|
-
set(
|
|
205
|
+
set(r) {
|
|
206
206
|
const l = e.activeGroupColumnsMap.get(o.value?.prop);
|
|
207
|
-
l && (l.dynamicExpression =
|
|
207
|
+
l && (l.dynamicExpression = r);
|
|
208
208
|
}
|
|
209
209
|
}), s = N(() => {
|
|
210
|
-
const
|
|
210
|
+
const r = o.value?.attrs ?? {};
|
|
211
211
|
return t.disabled ? {
|
|
212
|
-
...
|
|
212
|
+
...r,
|
|
213
213
|
disabled: !0
|
|
214
|
-
} :
|
|
214
|
+
} : r;
|
|
215
215
|
});
|
|
216
|
-
return (
|
|
216
|
+
return (r, l) => o.value ? (f(), _("div", Ga, [
|
|
217
217
|
(f(), I(Po(o.value.getFormComponent), K(s.value, {
|
|
218
218
|
"dynamic-expression": u.value,
|
|
219
|
-
"onUpdate:dynamicExpression": l[0] || (l[0] = (
|
|
220
|
-
"model-value": d(e).formData[
|
|
219
|
+
"onUpdate:dynamicExpression": l[0] || (l[0] = (c) => u.value = c),
|
|
220
|
+
"model-value": d(e).formData[r.prop]
|
|
221
221
|
}, me(a()), {
|
|
222
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
222
|
+
"onUpdate:modelValue": l[1] || (l[1] = (c) => n(c))
|
|
223
223
|
}), null, 16, ["dynamic-expression", "model-value"]))
|
|
224
224
|
])) : R("", !0);
|
|
225
225
|
}
|
|
226
226
|
}), qo = /* @__PURE__ */ Z(Na, [["__scopeId", "data-v-78cd4e80"]]), Jo = () => {
|
|
227
227
|
const t = () => document.body, e = [];
|
|
228
|
-
function o(a, u, s,
|
|
229
|
-
let l,
|
|
230
|
-
if (typeof a == "string" ? (l = t(),
|
|
228
|
+
function o(a, u, s, r) {
|
|
229
|
+
let l, c, i, m;
|
|
230
|
+
if (typeof a == "string" ? (l = t(), c = a, i = u, m = s) : (l = a, c = u, i = s, m = r), !l)
|
|
231
231
|
return () => {
|
|
232
232
|
};
|
|
233
|
-
l.addEventListener(
|
|
234
|
-
const D = { target: l, event:
|
|
233
|
+
l.addEventListener(c, i, m);
|
|
234
|
+
const D = { target: l, event: c, fn: i, options: m };
|
|
235
235
|
return e.push(D), () => {
|
|
236
|
-
l.removeEventListener(
|
|
236
|
+
l.removeEventListener(c, i, m), e.splice(e.indexOf(D), 1);
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
239
|
const n = () => {
|
|
240
|
-
e.forEach(({ target: a, event: u, fn: s, options:
|
|
240
|
+
e.forEach(({ target: a, event: u, fn: s, options: r }) => a.removeEventListener(u, s, r)), e.length = 0;
|
|
241
241
|
};
|
|
242
242
|
return nt(n), bt() && yt(n), {
|
|
243
243
|
stop: n,
|
|
@@ -253,15 +253,15 @@ const Ga = {
|
|
|
253
253
|
};
|
|
254
254
|
}, xa = () => {
|
|
255
255
|
const t = Oe(), { keywords: e, searchInputRef: o } = Jt(), n = G([]), a = N(
|
|
256
|
-
() => (s) => t.activeGroupSelectedColumns.find((
|
|
256
|
+
() => (s) => t.activeGroupSelectedColumns.find((r) => r.prop === s)?.checked || !1
|
|
257
257
|
), u = aa(() => {
|
|
258
258
|
if (!e.value) {
|
|
259
259
|
n.value = [];
|
|
260
260
|
return;
|
|
261
261
|
}
|
|
262
262
|
n.value = t.columns.filter((s) => {
|
|
263
|
-
const
|
|
264
|
-
return
|
|
263
|
+
const r = s.advancedFilterLabel || s.label;
|
|
264
|
+
return r && r.toLowerCase().includes(e.value.toLowerCase());
|
|
265
265
|
});
|
|
266
266
|
});
|
|
267
267
|
return {
|
|
@@ -294,8 +294,8 @@ const Ga = {
|
|
|
294
294
|
() => {
|
|
295
295
|
if (L.isFunction(t.options)) {
|
|
296
296
|
const s = t.options();
|
|
297
|
-
en(s) ? (n.value = !0, s.then((
|
|
298
|
-
u(
|
|
297
|
+
en(s) ? (n.value = !0, s.then((r) => {
|
|
298
|
+
u(r);
|
|
299
299
|
})) : u(s);
|
|
300
300
|
} else
|
|
301
301
|
u(t.options);
|
|
@@ -350,15 +350,15 @@ const Ga = {
|
|
|
350
350
|
ve((h) => ({
|
|
351
351
|
"375bdcec": D.value
|
|
352
352
|
}));
|
|
353
|
-
const o = t, n = e, { parseOptions: a, loadingOptions: u } = it(o), { value: s } = we(o, n),
|
|
353
|
+
const o = t, n = e, { parseOptions: a, loadingOptions: u } = it(o), { value: s } = we(o, n), r = N(() => L.omit(o.on, ["blur", "change"])), l = N(() => be(L.omit(o, ["on", "options", "modelValue"]))), c = () => {
|
|
354
354
|
n("change", s.value);
|
|
355
355
|
};
|
|
356
|
-
let
|
|
356
|
+
let i;
|
|
357
357
|
const m = async (h) => {
|
|
358
|
-
h ?
|
|
358
|
+
h ? i = le(s.value) : (await Y(), zo(i, s.value) || c(), i = void 0), o.on.visibleChange?.(h);
|
|
359
359
|
}, D = N(() => o.width || "100%"), p = (h, C) => {
|
|
360
360
|
const A = Reflect.get(o.on, h);
|
|
361
|
-
A && A(C),
|
|
361
|
+
A && A(C), c(), i = le(o.props.multiple ? C ?? [] : C);
|
|
362
362
|
};
|
|
363
363
|
return (h, C) => {
|
|
364
364
|
const A = B("el-cascader");
|
|
@@ -367,7 +367,7 @@ const Ga = {
|
|
|
367
367
|
"onUpdate:modelValue": C[0] || (C[0] = (F) => _e(s) ? s.value = F : null),
|
|
368
368
|
class: "z-cascader",
|
|
369
369
|
loading: d(u)
|
|
370
|
-
}, l.value, { options: d(a) }, me(
|
|
370
|
+
}, l.value, { options: d(a) }, me(r.value), {
|
|
371
371
|
onVisibleChange: m,
|
|
372
372
|
onClear: C[1] || (C[1] = (F) => p("clear", F)),
|
|
373
373
|
onRemoveTag: C[2] || (C[2] = (F) => p("removeTag", F))
|
|
@@ -452,7 +452,7 @@ const Ga = {
|
|
|
452
452
|
}),
|
|
453
453
|
emits: /* @__PURE__ */ pe(["update:modelValue", "change"], ["update:dynamicExpression"]),
|
|
454
454
|
setup(t, { emit: e }) {
|
|
455
|
-
const o = t, n = Ee(t, "dynamicExpression"), a = e, { value: u } = we(o, a), { pushDynamicExpression: s, updateDynamicExpression:
|
|
455
|
+
const o = t, n = Ee(t, "dynamicExpression"), a = e, { value: u } = we(o, a), { pushDynamicExpression: s, updateDynamicExpression: r } = Pa(n), l = N(
|
|
456
456
|
() => be(
|
|
457
457
|
L.omit(o, [
|
|
458
458
|
"on",
|
|
@@ -464,10 +464,10 @@ const Ga = {
|
|
|
464
464
|
"popperClass"
|
|
465
465
|
])
|
|
466
466
|
)
|
|
467
|
-
),
|
|
467
|
+
), c = N(() => {
|
|
468
468
|
if (o.useDefaultTimeToDay)
|
|
469
469
|
return [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)];
|
|
470
|
-
}),
|
|
470
|
+
}), i = (p, h) => {
|
|
471
471
|
if (!p)
|
|
472
472
|
return p;
|
|
473
473
|
const C = o.format || "", A = Ce(p).format(C);
|
|
@@ -478,10 +478,10 @@ const Ga = {
|
|
|
478
478
|
const h = p ?? "";
|
|
479
479
|
if (Array.isArray(h)) {
|
|
480
480
|
const [C, A] = h;
|
|
481
|
-
a("update:modelValue", [
|
|
481
|
+
a("update:modelValue", [i(C), i(A, !0)]);
|
|
482
482
|
} else
|
|
483
|
-
a("update:modelValue",
|
|
484
|
-
|
|
483
|
+
a("update:modelValue", i(h, !0));
|
|
484
|
+
r();
|
|
485
485
|
},
|
|
486
486
|
/* clear 事件会触发 emit */
|
|
487
487
|
change: L.debounce(() => {
|
|
@@ -504,7 +504,7 @@ const Ga = {
|
|
|
504
504
|
return f(), I(C, K(l.value, {
|
|
505
505
|
"popper-class": `z-base-date-popper ${o.popperClass || ""}`,
|
|
506
506
|
"model-value": d(u),
|
|
507
|
-
"default-time":
|
|
507
|
+
"default-time": c.value,
|
|
508
508
|
shortcuts: D.value
|
|
509
509
|
}, me(m.value)), null, 16, ["popper-class", "model-value", "default-time", "shortcuts"]);
|
|
510
510
|
};
|
|
@@ -573,19 +573,19 @@ const Ga = {
|
|
|
573
573
|
}),
|
|
574
574
|
emits: /* @__PURE__ */ pe(["update:modelValue", "change"], ["update:dynamicExpression"]),
|
|
575
575
|
setup(t, { emit: e }) {
|
|
576
|
-
const o = t, n = Ee(t, "dynamicExpression"), a = e, u = N(() => be(L.omit(o, ["options", "on", "modelValue"]))), { value: s } = we(o, a), { parseOptions:
|
|
577
|
-
o.defaultSelectFirst && !s.value?.length &&
|
|
578
|
-
}),
|
|
576
|
+
const o = t, n = Ee(t, "dynamicExpression"), a = e, u = N(() => be(L.omit(o, ["options", "on", "modelValue"]))), { value: s } = we(o, a), { parseOptions: r, loadingOptions: l } = it(o, () => {
|
|
577
|
+
o.defaultSelectFirst && !s.value?.length && r.value.length && a("update:modelValue", ["", "", r.value[0]?.value ?? ""]);
|
|
578
|
+
}), c = () => {
|
|
579
579
|
Y().then(() => {
|
|
580
580
|
a("change", s.value);
|
|
581
581
|
});
|
|
582
|
-
},
|
|
582
|
+
}, i = N({
|
|
583
583
|
get() {
|
|
584
584
|
return o.modelValue[2];
|
|
585
585
|
},
|
|
586
586
|
set(A) {
|
|
587
587
|
const [F, v] = o.modelValue;
|
|
588
|
-
s.value = [F, v, A], F && v &&
|
|
588
|
+
s.value = [F, v, A], F && v && c(), m(n.value, A);
|
|
589
589
|
}
|
|
590
590
|
}), m = (A, F) => {
|
|
591
591
|
if (A) {
|
|
@@ -602,7 +602,7 @@ const Ga = {
|
|
|
602
602
|
},
|
|
603
603
|
set(A) {
|
|
604
604
|
const F = le(s.value), v = o.whenEmptyDateClearSelect && !A ? "" : s.value?.[2], w = [...A || ["", ""], v];
|
|
605
|
-
s.value = w, zo(F, w) ||
|
|
605
|
+
s.value = w, zo(F, w) || c();
|
|
606
606
|
}
|
|
607
607
|
}), p = N(() => {
|
|
608
608
|
if (!o.disabledSelectByEmptyData)
|
|
@@ -641,8 +641,8 @@ const Ga = {
|
|
|
641
641
|
]),
|
|
642
642
|
x("div", Oa, [
|
|
643
643
|
g(b, K({
|
|
644
|
-
modelValue:
|
|
645
|
-
"onUpdate:modelValue": F[2] || (F[2] = (w) =>
|
|
644
|
+
modelValue: i.value,
|
|
645
|
+
"onUpdate:modelValue": F[2] || (F[2] = (w) => i.value = w)
|
|
646
646
|
}, C.value ?? {}, {
|
|
647
647
|
style: { width: A.selectWidth },
|
|
648
648
|
disabled: p.value ?? A.disabled,
|
|
@@ -650,7 +650,7 @@ const Ga = {
|
|
|
650
650
|
loading: d(l)
|
|
651
651
|
}), {
|
|
652
652
|
default: y(() => [
|
|
653
|
-
(f(!0), _(H, null, $(d(
|
|
653
|
+
(f(!0), _(H, null, $(d(r), (w) => (f(), I(v, K({
|
|
654
654
|
key: w.value
|
|
655
655
|
}, { ref_for: !0 }, w), null, 16))), 128))
|
|
656
656
|
]),
|
|
@@ -668,10 +668,10 @@ const Ga = {
|
|
|
668
668
|
return (n, a) => {
|
|
669
669
|
const u = B("el-input"), s = ee("paste-trim");
|
|
670
670
|
return J((f(), I(u, { class: "base-input" }, Ye({ _: 2 }, [
|
|
671
|
-
$(o.value, (
|
|
672
|
-
name:
|
|
671
|
+
$(o.value, (r) => ({
|
|
672
|
+
name: r,
|
|
673
673
|
fn: y(() => [
|
|
674
|
-
ne(n.$slots,
|
|
674
|
+
ne(n.$slots, r)
|
|
675
675
|
])
|
|
676
676
|
}))
|
|
677
677
|
]), 1024)), [
|
|
@@ -722,26 +722,26 @@ const Ga = {
|
|
|
722
722
|
() => be(L.omit(o, ["on", "modelValue", "precision", "max", "min"]))
|
|
723
723
|
);
|
|
724
724
|
let s = o.modelValue;
|
|
725
|
-
const
|
|
725
|
+
const r = (D) => {
|
|
726
726
|
let p = D;
|
|
727
727
|
isNaN(Number(p)) && (p = s), s !== p && (s = p), a.value = s;
|
|
728
728
|
}, l = () => {
|
|
729
729
|
let D = "^\\d+$";
|
|
730
730
|
return o.precision && (D = `^\\d+(\\.)?(\\d{1,${o.precision}})?$`), new RegExp(D);
|
|
731
|
-
},
|
|
732
|
-
|
|
733
|
-
},
|
|
731
|
+
}, c = () => {
|
|
732
|
+
r(parseFloat(s)), o.on?.change?.(s), n("change", s);
|
|
733
|
+
}, i = (D) => {
|
|
734
734
|
if (typeof D != "number" && !D) {
|
|
735
|
-
|
|
735
|
+
r(D);
|
|
736
736
|
return;
|
|
737
737
|
}
|
|
738
738
|
const { min: p, max: h } = o;
|
|
739
739
|
if (D && !l().test(D)) {
|
|
740
|
-
|
|
740
|
+
r(s);
|
|
741
741
|
return;
|
|
742
742
|
}
|
|
743
743
|
const C = Number(D), A = typeof p < "u" && C < p, F = typeof h < "u" && C > h;
|
|
744
|
-
|
|
744
|
+
r(F ? h : A ? p : D), o.on?.input?.(s);
|
|
745
745
|
}, m = N(() => L.omit(o.on, ["change", "input"]));
|
|
746
746
|
return (D, p) => {
|
|
747
747
|
const h = B("el-input"), C = ee("paste-trim");
|
|
@@ -750,8 +750,8 @@ const Ga = {
|
|
|
750
750
|
modelValue: d(a),
|
|
751
751
|
"onUpdate:modelValue": p[0] || (p[0] = (A) => _e(a) ? a.value = A : null)
|
|
752
752
|
}, me(m.value), {
|
|
753
|
-
onInput:
|
|
754
|
-
onChange:
|
|
753
|
+
onInput: i,
|
|
754
|
+
onChange: c
|
|
755
755
|
}), {
|
|
756
756
|
suffix: y(() => [
|
|
757
757
|
ne(D.$slots, "suffix", {}, void 0, !0)
|
|
@@ -804,17 +804,17 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
804
804
|
const o = t, n = e, { value: a } = we(o, n), u = () => a.value?.map?.((v) => {
|
|
805
805
|
const b = parseFloat(String(v));
|
|
806
806
|
return isNaN(b) ? void 0 : b;
|
|
807
|
-
}) ?? [], s = N(() => L.omit(o.on, ["focus", "input", "change"])),
|
|
807
|
+
}) ?? [], s = N(() => L.omit(o.on, ["focus", "input", "change"])), r = (v) => {
|
|
808
808
|
if (Reflect.has(o.on, v)) {
|
|
809
809
|
const b = Reflect.get(o.on, v);
|
|
810
810
|
L.isFunction(b) && b(a.value);
|
|
811
811
|
}
|
|
812
|
-
}, { startAsyncTask: l, taskComplete:
|
|
813
|
-
let
|
|
812
|
+
}, { startAsyncTask: l, taskComplete: c } = eo();
|
|
813
|
+
let i;
|
|
814
814
|
const m = () => {
|
|
815
|
-
|
|
815
|
+
i && (clearTimeout(i), c()), i = void 0;
|
|
816
816
|
}, D = () => {
|
|
817
|
-
m(),
|
|
817
|
+
m(), r("focus");
|
|
818
818
|
}, p = () => {
|
|
819
819
|
let v = "^\\d+$";
|
|
820
820
|
return o.precision && (v = `^\\d+(\\.)?(\\d{1,${o.precision}})?$`), new RegExp(v);
|
|
@@ -835,8 +835,8 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
835
835
|
const T = Number(v), E = typeof w < "u" && T < w, O = typeof k < "u" && T > k;
|
|
836
836
|
O || E ? (S.splice(b, 1, O ? k : w), C(S)) : h[b] = v;
|
|
837
837
|
}, F = () => {
|
|
838
|
-
l(),
|
|
839
|
-
|
|
838
|
+
l(), i = setTimeout(() => {
|
|
839
|
+
r("change"), n("change", u()), c();
|
|
840
840
|
}, 200), C(u());
|
|
841
841
|
};
|
|
842
842
|
return nt(() => {
|
|
@@ -879,15 +879,15 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
879
879
|
},
|
|
880
880
|
emits: ["update:modelValue"],
|
|
881
881
|
setup(t, { emit: e }) {
|
|
882
|
-
const o = t, n = e, { parseOptions: a, loadingOptions: u } = it(o), { value: s } = we(o, n),
|
|
883
|
-
return (
|
|
882
|
+
const o = t, n = e, { parseOptions: a, loadingOptions: u } = it(o), { value: s } = we(o, n), r = N(() => be(Re(o, ["on", "options", "modelValue"]))), l = (c) => be(Re(c, ["label", "leaf", "children"]));
|
|
883
|
+
return (c, i) => {
|
|
884
884
|
const m = B("el-radio"), D = B("el-radio-group"), p = ee("loading");
|
|
885
|
-
return J((f(), I(D, K(
|
|
885
|
+
return J((f(), I(D, K(r.value, {
|
|
886
886
|
modelValue: d(s),
|
|
887
|
-
"onUpdate:modelValue":
|
|
887
|
+
"onUpdate:modelValue": i[0] || (i[0] = (h) => _e(s) ? s.value = h : null)
|
|
888
888
|
}), {
|
|
889
889
|
default: y(() => [
|
|
890
|
-
ne(
|
|
890
|
+
ne(c.$slots, "default", {}, () => [
|
|
891
891
|
(f(!0), _(H, null, $(d(a), (h) => (f(), I(m, K({
|
|
892
892
|
key: h.value
|
|
893
893
|
}, { ref_for: !0 }, l(h)), {
|
|
@@ -940,9 +940,9 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
940
940
|
},
|
|
941
941
|
emits: ["update:modelValue", "suffixClick", "change"],
|
|
942
942
|
setup(t, { expose: e, emit: o }) {
|
|
943
|
-
const n = t, a = o, { value: u } = we(n, a), s = G(),
|
|
944
|
-
a("update:modelValue",
|
|
945
|
-
},
|
|
943
|
+
const n = t, a = o, { value: u } = we(n, a), s = G(), r = N(() => be(L.omit(n, ["on", "modelValue"]))), l = (i) => {
|
|
944
|
+
a("update:modelValue", i), a("change", i);
|
|
945
|
+
}, c = () => {
|
|
946
946
|
a("update:modelValue", ""), a("change", "");
|
|
947
947
|
};
|
|
948
948
|
return e({
|
|
@@ -950,12 +950,12 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
950
950
|
s.value?.focus();
|
|
951
951
|
},
|
|
952
952
|
inputRef: s
|
|
953
|
-
}), (
|
|
953
|
+
}), (i, m) => {
|
|
954
954
|
const D = B("el-icon"), p = B("el-input"), h = ee("paste-trim");
|
|
955
955
|
return J((f(), I(p, K({
|
|
956
956
|
ref_key: "inputRef",
|
|
957
957
|
ref: s
|
|
958
|
-
},
|
|
958
|
+
}, r.value, {
|
|
959
959
|
modelValue: d(u),
|
|
960
960
|
"onUpdate:modelValue": m[0] || (m[0] = (C) => _e(u) ? u.value = C : null),
|
|
961
961
|
clearable: !1,
|
|
@@ -965,7 +965,7 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
965
965
|
x("div", qa, [
|
|
966
966
|
d(u) ? (f(), I(D, {
|
|
967
967
|
key: 0,
|
|
968
|
-
onClick:
|
|
968
|
+
onClick: c
|
|
969
969
|
}, {
|
|
970
970
|
default: y(() => [
|
|
971
971
|
g(d(Qo))
|
|
@@ -1051,17 +1051,17 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
1051
1051
|
},
|
|
1052
1052
|
emits: ["update:modelValue"],
|
|
1053
1053
|
setup(t, { emit: e }) {
|
|
1054
|
-
ve((
|
|
1054
|
+
ve((i) => ({
|
|
1055
1055
|
"304fd598": l.value
|
|
1056
1056
|
}));
|
|
1057
|
-
const o = t, n = e, { parseOptions: a, loadingOptions: u } = it(o), { value: s } = we(o, n),
|
|
1058
|
-
return (
|
|
1057
|
+
const o = t, n = e, { parseOptions: a, loadingOptions: u } = it(o), { value: s } = we(o, n), r = N(() => be(L.omit(o, ["on", "options", "modelValue"]))), l = N(() => o.width || "100%"), c = Et();
|
|
1058
|
+
return (i, m) => {
|
|
1059
1059
|
const D = B("el-option"), p = B("el-select");
|
|
1060
|
-
return f(), I(p, K(
|
|
1060
|
+
return f(), I(p, K(r.value, {
|
|
1061
1061
|
modelValue: d(s),
|
|
1062
1062
|
"onUpdate:modelValue": m[0] || (m[0] = (h) => _e(s) ? s.value = h : null),
|
|
1063
1063
|
loading: d(u)
|
|
1064
|
-
}, me(
|
|
1064
|
+
}, me(i.on)), Ye({
|
|
1065
1065
|
default: y(() => [
|
|
1066
1066
|
(f(!0), _(H, null, $(d(a), (h) => (f(), I(D, K({
|
|
1067
1067
|
key: h.value
|
|
@@ -1074,10 +1074,10 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
1074
1074
|
]),
|
|
1075
1075
|
_: 2
|
|
1076
1076
|
}, [
|
|
1077
|
-
$(d(
|
|
1077
|
+
$(d(c), (h) => ({
|
|
1078
1078
|
name: h,
|
|
1079
1079
|
fn: y(() => [
|
|
1080
|
-
ne(
|
|
1080
|
+
ne(i.$slots, h, {}, void 0, !0)
|
|
1081
1081
|
])
|
|
1082
1082
|
}))
|
|
1083
1083
|
]), 1040, ["modelValue", "loading"]);
|
|
@@ -1147,17 +1147,17 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
1147
1147
|
setup(t, { emit: e }) {
|
|
1148
1148
|
const o = t, n = e, { value: a } = we(o, n), { parseOptions: u, loadingOptions: s } = it(o, () => {
|
|
1149
1149
|
o.defaultSelectFirst && !a.value?.length && u.value.length && n("update:modelValue", ["", u.value[0]?.value ?? ""]);
|
|
1150
|
-
}),
|
|
1150
|
+
}), r = N(() => {
|
|
1151
1151
|
const C = su(o.selectWidth, o.selectAttrs);
|
|
1152
1152
|
return Object.assign({}, C);
|
|
1153
1153
|
}), l = () => {
|
|
1154
1154
|
n("change", a.value);
|
|
1155
|
-
},
|
|
1155
|
+
}, c = N(() => u.value.find((A) => A.value === a.value[1])?.placeholder ?? o.placeholder), i = N(
|
|
1156
1156
|
() => u.value.find((C) => C.value === a.value[1])
|
|
1157
1157
|
), m = (C) => {
|
|
1158
1158
|
const [, A] = a.value;
|
|
1159
1159
|
let F = C;
|
|
1160
|
-
|
|
1160
|
+
i.value?.type === "id" && (F = ru(C)), n("update:modelValue", [F, A || ""]);
|
|
1161
1161
|
}, D = () => {
|
|
1162
1162
|
const C = a.value[0];
|
|
1163
1163
|
m(""), (o.changeOnSelect || C) && l();
|
|
@@ -1180,9 +1180,9 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
1180
1180
|
]
|
|
1181
1181
|
}, p.value, {
|
|
1182
1182
|
"model-value": d(a)[0],
|
|
1183
|
-
placeholder:
|
|
1183
|
+
placeholder: c.value,
|
|
1184
1184
|
clearable: !1,
|
|
1185
|
-
maxlength:
|
|
1185
|
+
maxlength: i.value?.maxlength ?? p.value.maxlength,
|
|
1186
1186
|
"onUpdate:modelValue": m,
|
|
1187
1187
|
onChange: l
|
|
1188
1188
|
}), {
|
|
@@ -1209,8 +1209,8 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
1209
1209
|
g(b, K({
|
|
1210
1210
|
modelValue: d(a)[1],
|
|
1211
1211
|
"onUpdate:modelValue": A[0] || (A[0] = (S) => d(a)[1] = S)
|
|
1212
|
-
},
|
|
1213
|
-
disabled:
|
|
1212
|
+
}, r.value, {
|
|
1213
|
+
disabled: r.value.disabled ?? C.disabled,
|
|
1214
1214
|
loading: d(s),
|
|
1215
1215
|
onChange: D
|
|
1216
1216
|
}), {
|
|
@@ -1247,9 +1247,9 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
1247
1247
|
ve((m) => ({
|
|
1248
1248
|
"45fbcfb6": d(l)
|
|
1249
1249
|
}));
|
|
1250
|
-
const { keywords: e, advancedFormBuilder: o, searchResult: n, itemIsChecked: a, search: u, searchInputRef: s } = xa(), { nextZIndex:
|
|
1251
|
-
e.value && !
|
|
1252
|
-
|
|
1250
|
+
const { keywords: e, advancedFormBuilder: o, searchResult: n, itemIsChecked: a, search: u, searchInputRef: s } = xa(), { nextZIndex: r } = Kt(), l = r(), c = G({}), i = () => {
|
|
1251
|
+
e.value && !c.value.height && o.startColumnSearch((m) => {
|
|
1252
|
+
c.value = m;
|
|
1253
1253
|
}), u();
|
|
1254
1254
|
};
|
|
1255
1255
|
return (m, D) => {
|
|
@@ -1263,14 +1263,14 @@ const Xe = [], pt = [], eo = () => ({
|
|
|
1263
1263
|
"onUpdate:modelValue": D[0] || (D[0] = (b) => _e(e) ? e.value = b : null),
|
|
1264
1264
|
clearable: "",
|
|
1265
1265
|
placeholder: "可搜索列名称",
|
|
1266
|
-
onInput:
|
|
1266
|
+
onInput: i
|
|
1267
1267
|
}, null, 8, ["modelValue"])
|
|
1268
1268
|
]),
|
|
1269
|
-
d(e) &&
|
|
1269
|
+
d(e) && c.value.height ? (f(), _("div", {
|
|
1270
1270
|
key: 0,
|
|
1271
1271
|
class: "search_result",
|
|
1272
1272
|
style: ot({
|
|
1273
|
-
height: `${
|
|
1273
|
+
height: `${c.value.height}px`
|
|
1274
1274
|
})
|
|
1275
1275
|
}, [
|
|
1276
1276
|
d(n).length ? (f(), I(F, {
|
|
@@ -1334,7 +1334,7 @@ function Au() {
|
|
|
1334
1334
|
(function(o, n) {
|
|
1335
1335
|
t.exports = n();
|
|
1336
1336
|
})(vu, (function() {
|
|
1337
|
-
var o, n, a = 1e3, u = 6e4, s = 36e5,
|
|
1337
|
+
var o, n, a = 1e3, u = 6e4, s = 36e5, r = 864e5, l = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, c = 31536e6, i = 2628e6, m = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, D = { years: c, months: i, days: r, hours: s, minutes: u, seconds: a, milliseconds: 1, weeks: 6048e5 }, p = function(S) {
|
|
1338
1338
|
return S instanceof w;
|
|
1339
1339
|
}, h = function(S, T, E) {
|
|
1340
1340
|
return new w(S, E, T.$l);
|
|
@@ -1375,7 +1375,7 @@ function Au() {
|
|
|
1375
1375
|
}), 0);
|
|
1376
1376
|
}, T.parseFromMilliseconds = function() {
|
|
1377
1377
|
var E = this.$ms;
|
|
1378
|
-
this.$d.years = F(E /
|
|
1378
|
+
this.$d.years = F(E / c), E %= c, this.$d.months = F(E / i), E %= i, this.$d.days = F(E / r), E %= r, this.$d.hours = F(E / s), E %= s, this.$d.minutes = F(E / u), E %= u, this.$d.seconds = F(E / a), E %= a, this.$d.milliseconds = E;
|
|
1379
1379
|
}, T.toISOString = function() {
|
|
1380
1380
|
var E = b(this.$d.years, "Y"), O = b(this.$d.months, "M"), V = +this.$d.days || 0;
|
|
1381
1381
|
this.$d.weeks && (V += 7 * this.$d.weeks);
|
|
@@ -1943,8 +1943,8 @@ const Nu = (t) => {
|
|
|
1943
1943
|
}, Ru = (t) => Array.isArray(t), Mu = (t, e) => {
|
|
1944
1944
|
const o = kt(e, Je), n = new Map(o.columns.map((a) => [a.prop, a]));
|
|
1945
1945
|
return t.forEach(({ prop: a, checked: u }, s) => {
|
|
1946
|
-
const
|
|
1947
|
-
|
|
1946
|
+
const r = n.get(a);
|
|
1947
|
+
r && (r.checked = !!u, u && (r.sort = s + 1));
|
|
1948
1948
|
}), {
|
|
1949
1949
|
useGroup: o.groupName,
|
|
1950
1950
|
groups: [o]
|
|
@@ -1959,12 +1959,12 @@ const Nu = (t) => {
|
|
|
1959
1959
|
}, dn = (t, e) => {
|
|
1960
1960
|
if (Ru(t))
|
|
1961
1961
|
return Mu(t, e);
|
|
1962
|
-
const { groups: o = [], useGroup: n = Ct } = t, a = [], u = kt(e, Ct).columns, s = (
|
|
1963
|
-
const { groupName: l, columns:
|
|
1962
|
+
const { groups: o = [], useGroup: n = Ct } = t, a = [], u = kt(e, Ct).columns, s = (r) => {
|
|
1963
|
+
const { groupName: l, columns: c } = r, i = new Map(c.map((m) => [m.prop, m]));
|
|
1964
1964
|
a.push({
|
|
1965
1965
|
groupName: l,
|
|
1966
1966
|
columns: u.map((m) => {
|
|
1967
|
-
const { readonly: D } = m, p =
|
|
1967
|
+
const { readonly: D } = m, p = i.get(m.prop);
|
|
1968
1968
|
return p ? {
|
|
1969
1969
|
...p,
|
|
1970
1970
|
value: oo(p),
|
|
@@ -1989,7 +1989,7 @@ const Nu = (t) => {
|
|
|
1989
1989
|
};
|
|
1990
1990
|
}), u = G(a.value?.groupNames?.[0] ?? ""), s = (p) => a.value.formItems[p].every(
|
|
1991
1991
|
(h) => !!e.activeGroupColumnsMap.get(h.prop)?.checked
|
|
1992
|
-
),
|
|
1992
|
+
), r = (p) => {
|
|
1993
1993
|
const h = a.value.formItems[p], C = h.filter(
|
|
1994
1994
|
(A) => !!e.activeGroupColumnsMap.get(A.prop)?.checked
|
|
1995
1995
|
).length;
|
|
@@ -1998,13 +1998,13 @@ const Nu = (t) => {
|
|
|
1998
1998
|
a.value.formItems[p].forEach((C) => {
|
|
1999
1999
|
e.updateActiveGroupColumnChecked(C.prop, h);
|
|
2000
2000
|
});
|
|
2001
|
-
},
|
|
2001
|
+
}, c = (p) => !!e.activeGroupColumnsMap.get(p)?.checked, i = (p, h) => `${h ? "#" : ""}${bo}${p}`, m = (p) => {
|
|
2002
2002
|
p.preventDefault();
|
|
2003
2003
|
}, D = (p) => {
|
|
2004
2004
|
u.value = p ? p.replace(`#${bo}`, "") : a.value?.groupNames?.[0] ?? "";
|
|
2005
2005
|
};
|
|
2006
2006
|
return e.on(ue.UPDATE_ACTIVE_GROUP, () => {
|
|
2007
|
-
n.value?.scrollTo(
|
|
2007
|
+
n.value?.scrollTo(i(a.value.groupNames[0], !0));
|
|
2008
2008
|
}), (p, h) => {
|
|
2009
2009
|
const C = B("el-anchor-link"), A = B("el-checkbox"), F = B("el-col"), v = B("el-row"), b = B("el-form"), w = ee("ellipsis");
|
|
2010
2010
|
return f(), _("div", Pu, [
|
|
@@ -2025,7 +2025,7 @@ const Nu = (t) => {
|
|
|
2025
2025
|
(f(!0), _(H, null, $(a.value.groupNames, (k) => (f(), I(C, {
|
|
2026
2026
|
key: k,
|
|
2027
2027
|
class: te(["group-item", { "is-active": k === u.value }]),
|
|
2028
|
-
href:
|
|
2028
|
+
href: i(k, !0)
|
|
2029
2029
|
}, {
|
|
2030
2030
|
default: y(() => [
|
|
2031
2031
|
U(j(k), 1)
|
|
@@ -2050,14 +2050,14 @@ const Nu = (t) => {
|
|
|
2050
2050
|
default: y(() => [
|
|
2051
2051
|
(f(!0), _(H, null, $(a.value.groupNames, (k) => (f(), _(H, { key: k }, [
|
|
2052
2052
|
g(F, {
|
|
2053
|
-
id:
|
|
2053
|
+
id: i(k),
|
|
2054
2054
|
class: "advanced-filter-form__item advanced-filter-form__group-title",
|
|
2055
2055
|
span: 24
|
|
2056
2056
|
}, {
|
|
2057
2057
|
default: y(() => [
|
|
2058
2058
|
g(A, {
|
|
2059
2059
|
"model-value": s(k),
|
|
2060
|
-
indeterminate:
|
|
2060
|
+
indeterminate: r(k),
|
|
2061
2061
|
onChange: (S) => l(k, S)
|
|
2062
2062
|
}, {
|
|
2063
2063
|
default: y(() => [
|
|
@@ -2076,7 +2076,7 @@ const Nu = (t) => {
|
|
|
2076
2076
|
default: y(() => [
|
|
2077
2077
|
g(A, {
|
|
2078
2078
|
disabled: S.readonly,
|
|
2079
|
-
"model-value":
|
|
2079
|
+
"model-value": c(S.prop),
|
|
2080
2080
|
onChange: (T) => d(e).updateActiveGroupColumnChecked(S.prop, T)
|
|
2081
2081
|
}, {
|
|
2082
2082
|
default: y(() => [
|
|
@@ -2124,7 +2124,7 @@ const Nu = (t) => {
|
|
|
2124
2124
|
return u?.advancedFilterLabel || u?.label || "";
|
|
2125
2125
|
});
|
|
2126
2126
|
return (a, u) => {
|
|
2127
|
-
const s = B("el-icon"),
|
|
2127
|
+
const s = B("el-icon"), r = ee("ellipsis");
|
|
2128
2128
|
return f(), _("div", zu, [
|
|
2129
2129
|
g(d(Pe), {
|
|
2130
2130
|
modelValue: o.value,
|
|
@@ -2143,11 +2143,11 @@ const Nu = (t) => {
|
|
|
2143
2143
|
J((f(), _("span", Hu, [
|
|
2144
2144
|
U(j(n.value(l.prop)), 1)
|
|
2145
2145
|
])), [
|
|
2146
|
-
[
|
|
2146
|
+
[r]
|
|
2147
2147
|
]),
|
|
2148
2148
|
l.readonly ? R("", !0) : (f(), _("div", Uu, [
|
|
2149
2149
|
g(s, {
|
|
2150
|
-
onClick: (
|
|
2150
|
+
onClick: (c) => d(e).updateActiveGroupColumnChecked(l.prop, !1)
|
|
2151
2151
|
}, {
|
|
2152
2152
|
default: y(() => [
|
|
2153
2153
|
g(d(Yt))
|
|
@@ -2188,7 +2188,7 @@ const Nu = (t) => {
|
|
|
2188
2188
|
x("div", {
|
|
2189
2189
|
class: "reset-btn",
|
|
2190
2190
|
onClick: s[0] || (s[0] = //@ts-ignore
|
|
2191
|
-
(...
|
|
2191
|
+
(...r) => d(e).resetActiveGroupColumnsStatus && d(e).resetActiveGroupColumnsStatus(...r))
|
|
2192
2192
|
}, "重置")
|
|
2193
2193
|
]),
|
|
2194
2194
|
(f(), I(Qu, {
|
|
@@ -2245,13 +2245,13 @@ async function pn(t, e, o) {
|
|
|
2245
2245
|
if (a === "confirm") {
|
|
2246
2246
|
if (n)
|
|
2247
2247
|
return;
|
|
2248
|
-
const
|
|
2248
|
+
const r = (l) => {
|
|
2249
2249
|
u.confirmButtonLoading = l, u.cancelButtonLoading = l;
|
|
2250
2250
|
};
|
|
2251
2251
|
try {
|
|
2252
|
-
|
|
2252
|
+
r(!0), await e(), n = !0, s();
|
|
2253
2253
|
} finally {
|
|
2254
|
-
|
|
2254
|
+
r(!1);
|
|
2255
2255
|
}
|
|
2256
2256
|
} else
|
|
2257
2257
|
s();
|
|
@@ -2282,16 +2282,16 @@ const Ju = { class: "advanced-filter-tab-item__footer" }, es = /* @__PURE__ */ M
|
|
|
2282
2282
|
setup(t) {
|
|
2283
2283
|
const e = Ee(t, "modelValue"), o = G(), n = Oe(), a = N(() => e.value === Je), u = G(e.value), s = async () => {
|
|
2284
2284
|
await qu(`确定删除${e.value}吗?`) && n.removeGroup(e.value);
|
|
2285
|
-
},
|
|
2285
|
+
}, r = () => {
|
|
2286
2286
|
o.value?.hide(), u.value = e.value;
|
|
2287
2287
|
}, l = () => {
|
|
2288
2288
|
if (!u.value)
|
|
2289
2289
|
return ye("名称不能为空");
|
|
2290
2290
|
if (n.groups.some((m) => m.groupName !== e.value && m.groupName === u.value))
|
|
2291
2291
|
return ye("名称不能重复");
|
|
2292
|
-
n.updateGroupName(e.value, u.value),
|
|
2293
|
-
},
|
|
2294
|
-
await Y(),
|
|
2292
|
+
n.updateGroupName(e.value, u.value), r();
|
|
2293
|
+
}, c = G(), i = async () => {
|
|
2294
|
+
await Y(), c.value?.focus();
|
|
2295
2295
|
};
|
|
2296
2296
|
return (m, D) => {
|
|
2297
2297
|
const p = B("el-icon"), h = B("el-input"), C = B("el-button"), A = B("el-popover");
|
|
@@ -2312,7 +2312,7 @@ const Ju = { class: "advanced-filter-tab-item__footer" }, es = /* @__PURE__ */ M
|
|
|
2312
2312
|
width: "240px",
|
|
2313
2313
|
"popper-class": "advanced-filter-tab-item__popover",
|
|
2314
2314
|
trigger: "click",
|
|
2315
|
-
onShow:
|
|
2315
|
+
onShow: i
|
|
2316
2316
|
}, {
|
|
2317
2317
|
reference: y(() => [
|
|
2318
2318
|
g(p, null, {
|
|
@@ -2325,7 +2325,7 @@ const Ju = { class: "advanced-filter-tab-item__footer" }, es = /* @__PURE__ */ M
|
|
|
2325
2325
|
default: y(() => [
|
|
2326
2326
|
g(h, {
|
|
2327
2327
|
ref_key: "inputRef",
|
|
2328
|
-
ref:
|
|
2328
|
+
ref: c,
|
|
2329
2329
|
modelValue: u.value,
|
|
2330
2330
|
"onUpdate:modelValue": D[0] || (D[0] = (F) => u.value = F),
|
|
2331
2331
|
placeholder: "请输入分组名称",
|
|
@@ -2334,7 +2334,7 @@ const Ju = { class: "advanced-filter-tab-item__footer" }, es = /* @__PURE__ */ M
|
|
|
2334
2334
|
onKeyup: Bt(l, ["enter"])
|
|
2335
2335
|
}, null, 8, ["modelValue"]),
|
|
2336
2336
|
x("div", Ju, [
|
|
2337
|
-
g(C, { onClick:
|
|
2337
|
+
g(C, { onClick: r }, {
|
|
2338
2338
|
default: y(() => [...D[2] || (D[2] = [
|
|
2339
2339
|
U("取消", -1)
|
|
2340
2340
|
])]),
|
|
@@ -2667,13 +2667,13 @@ class mn {
|
|
|
2667
2667
|
groups: e.map(
|
|
2668
2668
|
({ groupName: n, columns: a }) => ({
|
|
2669
2669
|
groupName: n,
|
|
2670
|
-
columns: a.map(({ prop: u, sort: s, value:
|
|
2670
|
+
columns: a.map(({ prop: u, sort: s, value: r, checked: l, dynamicExpression: c }) => ({
|
|
2671
2671
|
prop: u,
|
|
2672
2672
|
/* 有sort存在则代表是勾选的数据 */
|
|
2673
2673
|
sort: s,
|
|
2674
2674
|
/* 如果有动态数据,则不保存原 value/dynamicExpression */
|
|
2675
|
-
value: l ?
|
|
2676
|
-
dynamicExpression: l ?
|
|
2675
|
+
value: l ? c ? void 0 : r : void 0,
|
|
2676
|
+
dynamicExpression: l ? c : void 0
|
|
2677
2677
|
}))
|
|
2678
2678
|
})
|
|
2679
2679
|
),
|
|
@@ -2688,7 +2688,7 @@ class mn {
|
|
|
2688
2688
|
return this.advancedFilterGroup.useGroup = this.activeGroupName, this.groups.forEach((o) => {
|
|
2689
2689
|
const n = o.columns, a = e.get(o.groupName)?.columns ?? [];
|
|
2690
2690
|
if (a.length) {
|
|
2691
|
-
const u = new Map(a.map((s,
|
|
2691
|
+
const u = new Map(a.map((s, r) => [s.prop, r + 1]));
|
|
2692
2692
|
n.forEach((s) => {
|
|
2693
2693
|
s.sort = u.get(s.prop) ?? void 0;
|
|
2694
2694
|
});
|
|
@@ -2833,12 +2833,12 @@ class cs {
|
|
|
2833
2833
|
getFormatData(e) {
|
|
2834
2834
|
const o = L.cloneDeep(this.formData ?? {});
|
|
2835
2835
|
return e.reduce((n, a) => {
|
|
2836
|
-
const { format: u, prop: s } = a,
|
|
2836
|
+
const { format: u, prop: s } = a, r = Reflect.get(o, s);
|
|
2837
2837
|
if (u && typeof u == "function") {
|
|
2838
|
-
const l = u(
|
|
2838
|
+
const l = u(r, o, a);
|
|
2839
2839
|
l && typeof L.isPlainObject(l) && Object.assign(n, l);
|
|
2840
2840
|
} else
|
|
2841
|
-
Reflect.set(n, s,
|
|
2841
|
+
Reflect.set(n, s, r);
|
|
2842
2842
|
return n;
|
|
2843
2843
|
}, {});
|
|
2844
2844
|
}
|
|
@@ -2940,10 +2940,10 @@ class Dn {
|
|
|
2940
2940
|
parseColumns(e) {
|
|
2941
2941
|
const { initialFormData: o } = this.config;
|
|
2942
2942
|
return L.isEmpty(o) ? e : e.map((n) => {
|
|
2943
|
-
const { defaultValue: a, ...u } = n, s = u.prop,
|
|
2943
|
+
const { defaultValue: a, ...u } = n, s = u.prop, r = Reflect.get(o, s);
|
|
2944
2944
|
return {
|
|
2945
2945
|
...u,
|
|
2946
|
-
defaultValue: Reflect.has(o, s) ?
|
|
2946
|
+
defaultValue: Reflect.has(o, s) ? r : a
|
|
2947
2947
|
};
|
|
2948
2948
|
});
|
|
2949
2949
|
}
|
|
@@ -3006,26 +3006,26 @@ class Dn {
|
|
|
3006
3006
|
resetFormDataTo(e, o = "auto", n) {
|
|
3007
3007
|
const a = this.columns.length;
|
|
3008
3008
|
for (let u = 0; u < a; ++u) {
|
|
3009
|
-
const { tag: s, prop:
|
|
3010
|
-
if (s &&
|
|
3011
|
-
const l = Reflect.get(e,
|
|
3012
|
-
if (Reflect.has(e,
|
|
3013
|
-
this.updateFormData(
|
|
3009
|
+
const { tag: s, prop: r } = this.columns[u];
|
|
3010
|
+
if (s && r) {
|
|
3011
|
+
const l = Reflect.get(e, r), c = Reflect.get(this.formData, r);
|
|
3012
|
+
if (Reflect.has(e, r)) {
|
|
3013
|
+
this.updateFormData(r, l);
|
|
3014
3014
|
continue;
|
|
3015
3015
|
}
|
|
3016
3016
|
if (o === "empty") {
|
|
3017
|
-
this.updateFormData(
|
|
3017
|
+
this.updateFormData(r, void 0);
|
|
3018
3018
|
continue;
|
|
3019
3019
|
}
|
|
3020
|
-
const
|
|
3020
|
+
const i = n || (() => {
|
|
3021
3021
|
});
|
|
3022
3022
|
if (o === "custom") {
|
|
3023
|
-
this.updateFormData(
|
|
3023
|
+
this.updateFormData(r, i(r, c));
|
|
3024
3024
|
continue;
|
|
3025
3025
|
}
|
|
3026
3026
|
if (o === "auto") {
|
|
3027
3027
|
const m = Reflect.get(ps, s);
|
|
3028
|
-
m && L.isFunction(m) ? this.updateFormData(
|
|
3028
|
+
m && L.isFunction(m) ? this.updateFormData(r, m(c)) : this.updateFormData(r, i(r, c));
|
|
3029
3029
|
}
|
|
3030
3030
|
}
|
|
3031
3031
|
}
|
|
@@ -3161,8 +3161,8 @@ class ms extends Dn {
|
|
|
3161
3161
|
for (let a = 0; a < n; ++a) {
|
|
3162
3162
|
const u = this.activeGroupColumns[a], s = o.get(u.prop);
|
|
3163
3163
|
if (s) {
|
|
3164
|
-
const
|
|
3165
|
-
u.value = le(e ?
|
|
3164
|
+
const r = this.formData[u.prop];
|
|
3165
|
+
u.value = le(e ? r ?? s.defaultValue : r);
|
|
3166
3166
|
}
|
|
3167
3167
|
}
|
|
3168
3168
|
}
|
|
@@ -3222,12 +3222,12 @@ function $e(t, e) {
|
|
|
3222
3222
|
let n;
|
|
3223
3223
|
const a = (s) => {
|
|
3224
3224
|
o.value = s;
|
|
3225
|
-
}, u = (s) => new Promise((
|
|
3225
|
+
}, u = (s) => new Promise((r) => {
|
|
3226
3226
|
a(!0);
|
|
3227
3227
|
const l = s();
|
|
3228
3228
|
en(l) ? l.finally(() => {
|
|
3229
|
-
a(!1),
|
|
3230
|
-
}) : (a(!1),
|
|
3229
|
+
a(!1), r();
|
|
3230
|
+
}) : (a(!1), r());
|
|
3231
3231
|
});
|
|
3232
3232
|
return e && ut(() => {
|
|
3233
3233
|
o.value ? n = pa.service({
|
|
@@ -3246,16 +3246,16 @@ const Ds = {
|
|
|
3246
3246
|
setup(t) {
|
|
3247
3247
|
const e = G(!1), { setAdvancedFormBuilder: o, advancedFormBuilder: n } = Ia(), a = () => {
|
|
3248
3248
|
e.value = !1, n.value?.destroy(), n.value = void 0;
|
|
3249
|
-
}, { onTaskAllComplete: u } = eo(), [s,
|
|
3249
|
+
}, { onTaskAllComplete: u } = eo(), [s, r] = $e(), l = () => {
|
|
3250
3250
|
s.value = !0, u(() => {
|
|
3251
|
-
|
|
3251
|
+
r(async () => {
|
|
3252
3252
|
await Y(), n.value?.advancedSaveValidate() && (n.value?.updateActiveGroupColumnsValue(!1), await n.value?.saveAdvancedFilterData(), n.value && (t.formBuilder.updateGroupsByAdvancedFilter(
|
|
3253
3253
|
dn(n.value.columnManagement.getFormatSaveGroups(), t.formBuilder.columns)
|
|
3254
3254
|
), await Y()), n.value?.emit(ue.SAVE_CONFIG), t.formBuilder.emit(ue.SAVE_CONFIG), Xu("操作成功"));
|
|
3255
3255
|
});
|
|
3256
3256
|
});
|
|
3257
|
-
}, [
|
|
3258
|
-
|
|
3257
|
+
}, [c, i] = $e(), m = (D) => {
|
|
3258
|
+
i(async () => {
|
|
3259
3259
|
o(
|
|
3260
3260
|
new ms([], {
|
|
3261
3261
|
pageId: t.formBuilder.config.pageId
|
|
@@ -3266,7 +3266,7 @@ const Ds = {
|
|
|
3266
3266
|
});
|
|
3267
3267
|
};
|
|
3268
3268
|
return t.formBuilder.on(ue.OPEN_CONFIG_DIALOG, (D) => {
|
|
3269
|
-
|
|
3269
|
+
c.value = !0, e.value = !0, setTimeout(() => {
|
|
3270
3270
|
m(D);
|
|
3271
3271
|
});
|
|
3272
3272
|
}), (D, p) => {
|
|
@@ -3301,7 +3301,7 @@ const Ds = {
|
|
|
3301
3301
|
}, 8, ["loading"])
|
|
3302
3302
|
]),
|
|
3303
3303
|
default: y(() => [
|
|
3304
|
-
d(
|
|
3304
|
+
d(c) ? (f(), _("div", Ds, [
|
|
3305
3305
|
x("div", fs, [
|
|
3306
3306
|
g(h, { class: "is-loading" }, {
|
|
3307
3307
|
default: y(() => [
|
|
@@ -3312,7 +3312,7 @@ const Ds = {
|
|
|
3312
3312
|
p[1] || (p[1] = x("div", { class: "text" }, "加载中", -1))
|
|
3313
3313
|
])
|
|
3314
3314
|
])) : R("", !0),
|
|
3315
|
-
d(n) && e.value && !d(
|
|
3315
|
+
d(n) && e.value && !d(c) ? (f(), I(us, {
|
|
3316
3316
|
key: 1,
|
|
3317
3317
|
"advanced-form-builder": d(n)
|
|
3318
3318
|
}, null, 8, ["advanced-form-builder"])) : R("", !0)
|
|
@@ -3327,7 +3327,7 @@ const Ds = {
|
|
|
3327
3327
|
F && Reflect.set(n.value, F, C);
|
|
3328
3328
|
}, u = G(!1), s = () => {
|
|
3329
3329
|
u.value = !u.value;
|
|
3330
|
-
},
|
|
3330
|
+
}, r = G(!1), l = G([]), c = 5, i = async () => {
|
|
3331
3331
|
if (on(e.value?.$el))
|
|
3332
3332
|
return;
|
|
3333
3333
|
t.hiddenProps.clear();
|
|
@@ -3344,7 +3344,7 @@ const Ds = {
|
|
|
3344
3344
|
const k = C.get(w);
|
|
3345
3345
|
if (k) {
|
|
3346
3346
|
const { top: S } = k.getBoundingClientRect() ?? {};
|
|
3347
|
-
v ? Math.abs(S - v) >
|
|
3347
|
+
v ? Math.abs(S - v) > c ? t.hiddenProps.add(w) : t.hiddenProps.delete(w) : (v = S, t.hiddenProps.delete(w));
|
|
3348
3348
|
} else
|
|
3349
3349
|
t.hiddenProps.add(w);
|
|
3350
3350
|
}
|
|
@@ -3355,10 +3355,10 @@ const Ds = {
|
|
|
3355
3355
|
if (A && F) {
|
|
3356
3356
|
const v = C.get(A.prop), b = C.get(F.prop);
|
|
3357
3357
|
if (v && b) {
|
|
3358
|
-
const { top: w } = v.getBoundingClientRect() ?? {}, { top: k } = b.getBoundingClientRect() ?? {}, S = Math.abs(w - k) >
|
|
3359
|
-
|
|
3358
|
+
const { top: w } = v.getBoundingClientRect() ?? {}, { top: k } = b.getBoundingClientRect() ?? {}, S = Math.abs(w - k) > c;
|
|
3359
|
+
r.value = !S;
|
|
3360
3360
|
}
|
|
3361
|
-
v && !b && (
|
|
3361
|
+
v && !b && (r.value = !1);
|
|
3362
3362
|
}
|
|
3363
3363
|
};
|
|
3364
3364
|
let m = !0;
|
|
@@ -3369,7 +3369,7 @@ const Ds = {
|
|
|
3369
3369
|
sort: C.sort
|
|
3370
3370
|
})).concat([t.config.hideExpandBtn, u.value]),
|
|
3371
3371
|
() => {
|
|
3372
|
-
!t.config.hideExpandBtn && t.columns &&
|
|
3372
|
+
!t.config.hideExpandBtn && t.columns && i(), e.value && n.value && t.formInstanceManagement.init(e, n);
|
|
3373
3373
|
},
|
|
3374
3374
|
{ flush: "post", deep: !0 }
|
|
3375
3375
|
);
|
|
@@ -3385,7 +3385,7 @@ const Ds = {
|
|
|
3385
3385
|
} else
|
|
3386
3386
|
t.columnManagement.showAllFormItems();
|
|
3387
3387
|
o.value = !1, await Y(), t.config.hideExpandBtn ? D() : (p = new ResizeObserver(() => {
|
|
3388
|
-
m && requestAnimationFrame(
|
|
3388
|
+
m && requestAnimationFrame(i);
|
|
3389
3389
|
}), e.value && p.observe(e.value.$el));
|
|
3390
3390
|
};
|
|
3391
3391
|
return Jn(() => {
|
|
@@ -3405,7 +3405,7 @@ const Ds = {
|
|
|
3405
3405
|
updateExpand: s,
|
|
3406
3406
|
isExpand: u,
|
|
3407
3407
|
baseFormRef: e,
|
|
3408
|
-
autoHiddenExpand:
|
|
3408
|
+
autoHiddenExpand: r,
|
|
3409
3409
|
colRefs: l,
|
|
3410
3410
|
loadingConfigColumns: o
|
|
3411
3411
|
};
|
|
@@ -3417,7 +3417,7 @@ const Ds = {
|
|
|
3417
3417
|
},
|
|
3418
3418
|
emits: ["change"],
|
|
3419
3419
|
setup(t, { emit: e }) {
|
|
3420
|
-
const o = e, { baseFormRef: n, isExpand: a, autoHiddenExpand: u, colRefs: s, loadingConfigColumns:
|
|
3420
|
+
const o = e, { baseFormRef: n, isExpand: a, autoHiddenExpand: u, colRefs: s, loadingConfigColumns: r, collectionRef: l, updateExpand: c } = hs(t.formBuilder), { configManagement: i, config: m } = t.formBuilder, D = (A, F) => F ? Uo(F) ? `${Object.keys(A).reduce((b, w) => (b.push(`${w}:${Reflect.get(A, w)}`), b), []).join(";")} ${F}` : { ...A, ...F } : A, p = N(
|
|
3421
3421
|
() => (A) => A.parseColumnEvent((...F) => {
|
|
3422
3422
|
t.formBuilder.emit(ue.CHANGE), o("change", ...F);
|
|
3423
3423
|
})
|
|
@@ -3440,18 +3440,18 @@ const Ds = {
|
|
|
3440
3440
|
])
|
|
3441
3441
|
}, [
|
|
3442
3442
|
J((f(), _("div", Cs, [
|
|
3443
|
-
d(
|
|
3443
|
+
d(r) ? R("", !0) : (f(), I(k, K({
|
|
3444
3444
|
key: 0,
|
|
3445
3445
|
ref_key: "baseFormRef",
|
|
3446
3446
|
ref: n,
|
|
3447
3447
|
class: "base-form__form"
|
|
3448
|
-
}, d(
|
|
3448
|
+
}, d(i).getFormAttrs, {
|
|
3449
3449
|
model: A.formBuilder.formData,
|
|
3450
3450
|
onSubmit: F[0] || (F[0] = de(() => {
|
|
3451
3451
|
}, ["prevent"]))
|
|
3452
3452
|
}), {
|
|
3453
3453
|
default: y(() => [
|
|
3454
|
-
g(w, K({ class: "base-form__row" }, d(
|
|
3454
|
+
g(w, K({ class: "base-form__row" }, d(i).getRowAttrs, {
|
|
3455
3455
|
style: D({ marginLeft: "0", marginRight: "0" }, d(m).rowAttrs?.style)
|
|
3456
3456
|
}), {
|
|
3457
3457
|
default: y(() => [
|
|
@@ -3490,7 +3490,7 @@ const Ds = {
|
|
|
3490
3490
|
_: 1
|
|
3491
3491
|
}, 16, ["model"]))
|
|
3492
3492
|
])), [
|
|
3493
|
-
[T, d(
|
|
3493
|
+
[T, d(r)]
|
|
3494
3494
|
]),
|
|
3495
3495
|
d(m).hideExpandBtn ? R("", !0) : (f(), _(H, { key: 0 }, [
|
|
3496
3496
|
d(u) ? R("", !0) : (f(), _("div", {
|
|
@@ -3498,7 +3498,7 @@ const Ds = {
|
|
|
3498
3498
|
class: te(["expand-btn", { "expand-btn__expand": d(a) }]),
|
|
3499
3499
|
style: ot({ display: A.formBuilder.getShowColumns.length ? "" : "none" }),
|
|
3500
3500
|
onClick: F[1] || (F[1] = //@ts-ignore
|
|
3501
|
-
(...E) => d(
|
|
3501
|
+
(...E) => d(c) && d(c)(...E))
|
|
3502
3502
|
}, [
|
|
3503
3503
|
g(S, null, {
|
|
3504
3504
|
default: y(() => [
|
|
@@ -3534,7 +3534,7 @@ const Ds = {
|
|
|
3534
3534
|
return st(() => {
|
|
3535
3535
|
!o.value && t.steps.length && (o.value = t.steps[0].value);
|
|
3536
3536
|
}), (a, u) => (f(), _("div", bs, [
|
|
3537
|
-
(f(!0), _(H, null, $(a.steps, (s,
|
|
3537
|
+
(f(!0), _(H, null, $(a.steps, (s, r) => (f(), _("div", {
|
|
3538
3538
|
key: s.value,
|
|
3539
3539
|
class: te(["z-base-step__step-item", { "is-active": s.value === o.value }]),
|
|
3540
3540
|
onClick: (l) => n("change", s.value)
|
|
@@ -3547,7 +3547,7 @@ const Ds = {
|
|
|
3547
3547
|
}, null, 8, ["content"]),
|
|
3548
3548
|
U(" " + j(s.label), 1)
|
|
3549
3549
|
]),
|
|
3550
|
-
|
|
3550
|
+
r !== a.steps.length - 1 ? (f(), _("div", Es)) : R("", !0)
|
|
3551
3551
|
], 10, ys))), 128))
|
|
3552
3552
|
]));
|
|
3553
3553
|
}
|
|
@@ -3641,19 +3641,19 @@ const Ds = {
|
|
|
3641
3641
|
}));
|
|
3642
3642
|
}), wt(() => {
|
|
3643
3643
|
u?.disconnect();
|
|
3644
|
-
}), (s,
|
|
3645
|
-
const l = B("el-tag"),
|
|
3646
|
-
return f(), _("div", Vs, [g(
|
|
3644
|
+
}), (s, r) => {
|
|
3645
|
+
const l = B("el-tag"), c = B("el-tooltip");
|
|
3646
|
+
return f(), _("div", Vs, [g(c, {
|
|
3647
3647
|
disabled: !o.value.length || !a.value,
|
|
3648
3648
|
effect: "light",
|
|
3649
3649
|
placement: "top",
|
|
3650
3650
|
"popper-class": "z-show-to-tags__tooltip"
|
|
3651
3651
|
}, {
|
|
3652
|
-
content: y(() => [x("div", Ps, [(f(!0), _(H, null, $(o.value, (
|
|
3653
|
-
key:
|
|
3652
|
+
content: y(() => [x("div", Ps, [(f(!0), _(H, null, $(o.value, (i) => (f(), I(l, {
|
|
3653
|
+
key: i,
|
|
3654
3654
|
type: "primary"
|
|
3655
3655
|
}, {
|
|
3656
|
-
default: y(() => [U(j(
|
|
3656
|
+
default: y(() => [U(j(i), 1)]),
|
|
3657
3657
|
_: 2
|
|
3658
3658
|
}, 1024))), 128))])]),
|
|
3659
3659
|
default: y(() => [x("div", Rs, [x("div", {
|
|
@@ -3681,7 +3681,7 @@ const Ds = {
|
|
|
3681
3681
|
const o = e, n = (u) => ["config-columns__btn-item", u === t.groupId ? "config-columns__btn-item--active" : ""], a = (u) => {
|
|
3682
3682
|
const {
|
|
3683
3683
|
id: s,
|
|
3684
|
-
name:
|
|
3684
|
+
name: r
|
|
3685
3685
|
} = u;
|
|
3686
3686
|
return g(B("el-dropdown-item"), {
|
|
3687
3687
|
class: n(s),
|
|
@@ -3691,7 +3691,7 @@ const Ds = {
|
|
|
3691
3691
|
}, {
|
|
3692
3692
|
default: () => [J(g("div", {
|
|
3693
3693
|
class: "config-columns__btn-item-name"
|
|
3694
|
-
}, [
|
|
3694
|
+
}, [r]), [[ee("ellipsis")]]), g("div", {
|
|
3695
3695
|
class: "config-columns__btn-operation"
|
|
3696
3696
|
}, [g(B("el-icon"), {
|
|
3697
3697
|
class: "edit-icon",
|
|
@@ -3702,17 +3702,17 @@ const Ds = {
|
|
|
3702
3702
|
});
|
|
3703
3703
|
};
|
|
3704
3704
|
return (u, s) => {
|
|
3705
|
-
const
|
|
3705
|
+
const r = B("el-dropdown-menu"), l = B("el-dropdown");
|
|
3706
3706
|
return f(), I(l, {
|
|
3707
3707
|
"popper-class": "config-columns__btn-popper",
|
|
3708
3708
|
trigger: "hover",
|
|
3709
3709
|
placement: "bottom-end"
|
|
3710
3710
|
}, {
|
|
3711
|
-
dropdown: y(() => [g(
|
|
3712
|
-
default: y(() => [(f(!0), _(H, null, $(u.columnGroups, (
|
|
3713
|
-
id:
|
|
3714
|
-
key:
|
|
3715
|
-
name:
|
|
3711
|
+
dropdown: y(() => [g(r, null, {
|
|
3712
|
+
default: y(() => [(f(!0), _(H, null, $(u.columnGroups, (c) => (f(), I(a, {
|
|
3713
|
+
id: c.id,
|
|
3714
|
+
key: c.id,
|
|
3715
|
+
name: c.groupName
|
|
3716
3716
|
}, null, 8, ["id", "name"]))), 128))]),
|
|
3717
3717
|
_: 1
|
|
3718
3718
|
})]),
|
|
@@ -3806,9 +3806,9 @@ function Ws(t) {
|
|
|
3806
3806
|
_render: a,
|
|
3807
3807
|
renderToOptions: u,
|
|
3808
3808
|
onClick: s,
|
|
3809
|
-
emptyClick:
|
|
3809
|
+
emptyClick: r,
|
|
3810
3810
|
emptyValue: l,
|
|
3811
|
-
prop:
|
|
3811
|
+
prop: c
|
|
3812
3812
|
} = e;
|
|
3813
3813
|
if (a) {
|
|
3814
3814
|
const {
|
|
@@ -3822,12 +3822,12 @@ function Ws(t) {
|
|
|
3822
3822
|
const v = a(Le, t.data ?? {}, Reflect.get(p, F) ?? {});
|
|
3823
3823
|
return typeof v != "number" && (!v || v === An) ? Vt : v;
|
|
3824
3824
|
}
|
|
3825
|
-
const
|
|
3826
|
-
if (!
|
|
3827
|
-
return
|
|
3828
|
-
const m = Reflect.get(t.data,
|
|
3825
|
+
const i = l ?? Vt;
|
|
3826
|
+
if (!c)
|
|
3827
|
+
return i;
|
|
3828
|
+
const m = Reflect.get(t.data, c);
|
|
3829
3829
|
if (u) {
|
|
3830
|
-
const p = u.find((C) => C.value === m), h = p?.label ??
|
|
3830
|
+
const p = u.find((C) => C.value === m), h = p?.label ?? i;
|
|
3831
3831
|
return p?._color ? g("span", {
|
|
3832
3832
|
key: m,
|
|
3833
3833
|
style: {
|
|
@@ -3849,9 +3849,9 @@ function Ws(t) {
|
|
|
3849
3849
|
}, $s(m) ? m : {
|
|
3850
3850
|
default: () => [m]
|
|
3851
3851
|
});
|
|
3852
|
-
return
|
|
3852
|
+
return r ? p : D ? i : p;
|
|
3853
3853
|
}
|
|
3854
|
-
return D ?
|
|
3854
|
+
return D ? i : m;
|
|
3855
3855
|
}
|
|
3856
3856
|
function Ys(t) {
|
|
3857
3857
|
const {
|
|
@@ -3867,13 +3867,13 @@ function Ys(t) {
|
|
|
3867
3867
|
const Ge = (t) => typeof t == "boolean" ? t ? "left" : void 0 : t, js = (t) => {
|
|
3868
3868
|
const e = {}, o = t.length;
|
|
3869
3869
|
for (let n = 0; n < o; ++n) {
|
|
3870
|
-
const { groupName: a = no, prop: u, label: s, defaultChecked:
|
|
3870
|
+
const { groupName: a = no, prop: u, label: s, defaultChecked: r, readonly: l, fixed: c } = t[n];
|
|
3871
3871
|
if (!u || !s)
|
|
3872
3872
|
continue;
|
|
3873
|
-
let
|
|
3874
|
-
|
|
3875
|
-
const m = { prop: u, label: s, defaultChecked:
|
|
3876
|
-
l && (m.defaultChecked = !0, m.readonly = !0),
|
|
3873
|
+
let i = Reflect.get(e, a);
|
|
3874
|
+
i || Reflect.set(e, a, i = []);
|
|
3875
|
+
const m = { prop: u, label: s, defaultChecked: r, fixed: Ge(c) };
|
|
3876
|
+
l && (m.defaultChecked = !0, m.readonly = !0), i.push(m);
|
|
3877
3877
|
}
|
|
3878
3878
|
return e;
|
|
3879
3879
|
}, Ks = (t, e) => {
|
|
@@ -3894,24 +3894,24 @@ class Bo {
|
|
|
3894
3894
|
this.columnMap = o, this.groupName = e.groupName, this.id = e.id, this.active = !!e.active;
|
|
3895
3895
|
const n = le(this.columnMap);
|
|
3896
3896
|
let a = 0;
|
|
3897
|
-
const u = e.columns.filter((s) => s.prop && this.columnMap.has(s.prop)).map((s,
|
|
3897
|
+
const u = e.columns.filter((s) => s.prop && this.columnMap.has(s.prop)).map((s, r) => {
|
|
3898
3898
|
const l = !!s.checked;
|
|
3899
|
-
return n.has(s.prop) && n.delete(s.prop), a = Math.max(a,
|
|
3899
|
+
return n.has(s.prop) && n.delete(s.prop), a = Math.max(a, r), {
|
|
3900
3900
|
checked: l,
|
|
3901
3901
|
prop: s.prop,
|
|
3902
3902
|
fixed: Ge(s.fixed),
|
|
3903
|
-
index: l ?
|
|
3903
|
+
index: l ? r : -1,
|
|
3904
3904
|
readonly: !!this.columnMap.get(s.prop)?.readonly
|
|
3905
3905
|
};
|
|
3906
3906
|
});
|
|
3907
3907
|
n.size && n.forEach((s) => {
|
|
3908
3908
|
if (s.prop) {
|
|
3909
|
-
const
|
|
3909
|
+
const r = !!s.defaultChecked;
|
|
3910
3910
|
u.push({
|
|
3911
|
-
checked:
|
|
3911
|
+
checked: r,
|
|
3912
3912
|
prop: s.prop,
|
|
3913
3913
|
fixed: Ge(s.fixed),
|
|
3914
|
-
index:
|
|
3914
|
+
index: r ? ++a : -1,
|
|
3915
3915
|
readonly: !!s.readonly
|
|
3916
3916
|
});
|
|
3917
3917
|
}
|
|
@@ -3984,9 +3984,9 @@ class Js {
|
|
|
3984
3984
|
const u = a ? JSON.parse(a) : [];
|
|
3985
3985
|
if (u.length) {
|
|
3986
3986
|
let s;
|
|
3987
|
-
this.groups = u.reduce((l,
|
|
3988
|
-
const
|
|
3989
|
-
return e &&
|
|
3987
|
+
this.groups = u.reduce((l, c) => {
|
|
3988
|
+
const i = new Bo(c, this.columnsMap);
|
|
3989
|
+
return e && i.id === e && (s = i), l.push(i), l;
|
|
3990
3990
|
}, []), !this.groups.find((l) => l.id === Fe) && this.groups.unshift(
|
|
3991
3991
|
this.getNewGroup(
|
|
3992
3992
|
o.systemGroupName || Ht,
|
|
@@ -4091,15 +4091,15 @@ class Js {
|
|
|
4091
4091
|
async build() {
|
|
4092
4092
|
if (this.groups.length) {
|
|
4093
4093
|
const e = this.groups.map((o) => {
|
|
4094
|
-
const { groupName: n, columns: a, id: u } = o, s = a.filter((
|
|
4095
|
-
prop:
|
|
4096
|
-
checked:
|
|
4097
|
-
fixed:
|
|
4094
|
+
const { groupName: n, columns: a, id: u } = o, s = a.filter((c) => !c.fixed), r = a.filter((c) => c.fixed), l = (c) => Me(c, "index").map((i) => ({
|
|
4095
|
+
prop: i.prop,
|
|
4096
|
+
checked: i.checked,
|
|
4097
|
+
fixed: i.fixed ? Ge(i.fixed) : void 0
|
|
4098
4098
|
}));
|
|
4099
4099
|
return {
|
|
4100
4100
|
groupName: n,
|
|
4101
4101
|
id: u,
|
|
4102
|
-
columns: l(s).concat(l(
|
|
4102
|
+
columns: l(s).concat(l(r)),
|
|
4103
4103
|
active: this.activeId === u
|
|
4104
4104
|
};
|
|
4105
4105
|
});
|
|
@@ -4126,7 +4126,7 @@ const yn = Symbol(
|
|
|
4126
4126
|
zTableCustomBuilder: d(Mo(yn))
|
|
4127
4127
|
}), tl = () => {
|
|
4128
4128
|
const { zTableCustomBuilder: t } = ze(), { keywords: e, searchInputRef: o } = Jt(), n = G([]), a = N(
|
|
4129
|
-
() => new Map(t.activeGroupSelectedColumns.map((
|
|
4129
|
+
() => new Map(t.activeGroupSelectedColumns.map((r) => [r.prop, r]))
|
|
4130
4130
|
);
|
|
4131
4131
|
return {
|
|
4132
4132
|
searchInputRef: o,
|
|
@@ -4137,8 +4137,8 @@ const yn = Symbol(
|
|
|
4137
4137
|
search: () => {
|
|
4138
4138
|
t.activeGroup && (n.value = t.search(e.value));
|
|
4139
4139
|
},
|
|
4140
|
-
updateColumnChecked: (
|
|
4141
|
-
t.activeGroup?.updateColumnChecked(
|
|
4140
|
+
updateColumnChecked: (r, l) => {
|
|
4141
|
+
t.activeGroup?.updateColumnChecked(r.prop, l);
|
|
4142
4142
|
}
|
|
4143
4143
|
};
|
|
4144
4144
|
}, ol = { class: "custom-column-search__container" }, nl = { class: "search-input" }, al = {
|
|
@@ -4148,11 +4148,11 @@ const yn = Symbol(
|
|
|
4148
4148
|
name: "CustomColumnsSearch",
|
|
4149
4149
|
__name: "index",
|
|
4150
4150
|
setup(t) {
|
|
4151
|
-
ve((
|
|
4151
|
+
ve((c) => ({
|
|
4152
4152
|
"34a01dce": d(l)
|
|
4153
4153
|
}));
|
|
4154
|
-
const { keywords: e, checkedColumnsMap: o, search: n, searchResult: a, updateColumnChecked: u, searchInputRef: s } = tl(), { nextZIndex:
|
|
4155
|
-
return (
|
|
4154
|
+
const { keywords: e, checkedColumnsMap: o, search: n, searchResult: a, updateColumnChecked: u, searchInputRef: s } = tl(), { nextZIndex: r } = Kt(), l = r();
|
|
4155
|
+
return (c, i) => {
|
|
4156
4156
|
const m = B("ZEmpty"), D = B("el-checkbox"), p = B("el-col"), h = B("el-row"), C = ee("ellipsis");
|
|
4157
4157
|
return f(), _("div", ol, [
|
|
4158
4158
|
x("div", nl, [
|
|
@@ -4160,7 +4160,7 @@ const yn = Symbol(
|
|
|
4160
4160
|
ref_key: "searchInputRef",
|
|
4161
4161
|
ref: s,
|
|
4162
4162
|
modelValue: d(e),
|
|
4163
|
-
"onUpdate:modelValue":
|
|
4163
|
+
"onUpdate:modelValue": i[0] || (i[0] = (A) => _e(e) ? e.value = A : null),
|
|
4164
4164
|
clearable: "",
|
|
4165
4165
|
placeholder: "可搜索列名称",
|
|
4166
4166
|
onInput: d(n)
|
|
@@ -4223,16 +4223,16 @@ const cl = /* @__PURE__ */ M({
|
|
|
4223
4223
|
const {
|
|
4224
4224
|
groupName: u,
|
|
4225
4225
|
anchorId: s
|
|
4226
|
-
} = Ne(n),
|
|
4227
|
-
const D =
|
|
4228
|
-
return D > 0 && D <
|
|
4229
|
-
}),
|
|
4226
|
+
} = Ne(n), r = e.columns.filter((D) => D.prop && Xs(D) === u), l = N(() => new Map(e.activeGroupSelectedColumns.map((D) => [D.prop, D]))), c = N(() => {
|
|
4227
|
+
const D = r.filter((p) => l.value.has(p.prop)).length;
|
|
4228
|
+
return D > 0 && D < r.length;
|
|
4229
|
+
}), i = N({
|
|
4230
4230
|
get() {
|
|
4231
|
-
return
|
|
4231
|
+
return r.every((D) => l.value.has(D.prop));
|
|
4232
4232
|
},
|
|
4233
4233
|
set(D) {
|
|
4234
|
-
const p = new Map(
|
|
4235
|
-
e.activeGroup && (
|
|
4234
|
+
const p = new Map(r.map((h) => [h.prop, h]));
|
|
4235
|
+
e.activeGroup && (c.value ? e.activeGroup.columns.forEach((h) => {
|
|
4236
4236
|
p.has(h.prop) && !h.checked && !h.readonly && e.activeGroup?.updateColumnChecked(h.prop, !0);
|
|
4237
4237
|
}) : e.activeGroup.columns.forEach((h) => {
|
|
4238
4238
|
p.has(h.prop) && !h.readonly && h.checked !== D && e.activeGroup?.updateColumnChecked(h.prop, D);
|
|
@@ -4247,9 +4247,9 @@ const cl = /* @__PURE__ */ M({
|
|
|
4247
4247
|
id: s,
|
|
4248
4248
|
class: "custom-column-group-content__group-item-title"
|
|
4249
4249
|
}, [g(B("el-checkbox"), {
|
|
4250
|
-
indeterminate:
|
|
4251
|
-
modelValue:
|
|
4252
|
-
"onUpdate:modelValue": (D) =>
|
|
4250
|
+
indeterminate: c.value,
|
|
4251
|
+
modelValue: i.value,
|
|
4252
|
+
"onUpdate:modelValue": (D) => i.value = D
|
|
4253
4253
|
}, {
|
|
4254
4254
|
default: () => [J(g("div", {
|
|
4255
4255
|
class: "select-item__label"
|
|
@@ -4257,7 +4257,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4257
4257
|
})]), g(B("el-row"), {
|
|
4258
4258
|
gutter: 16,
|
|
4259
4259
|
class: "custom-column-group-content__group-item-columns"
|
|
4260
|
-
}, il(a =
|
|
4260
|
+
}, il(a = r.map((D) => g(B("el-col"), {
|
|
4261
4261
|
key: D.prop,
|
|
4262
4262
|
span: 8
|
|
4263
4263
|
}, {
|
|
@@ -4300,33 +4300,33 @@ const cl = /* @__PURE__ */ M({
|
|
|
4300
4300
|
zTableCustomBuilder: e
|
|
4301
4301
|
} = ze(), o = N({
|
|
4302
4302
|
get() {
|
|
4303
|
-
return Me(e.activeGroupSelectedColumns.filter((
|
|
4303
|
+
return Me(e.activeGroupSelectedColumns.filter((c) => !c.fixed), "index");
|
|
4304
4304
|
},
|
|
4305
|
-
set(
|
|
4306
|
-
e.updateActiveGroupColumnSort(
|
|
4305
|
+
set(c) {
|
|
4306
|
+
e.updateActiveGroupColumnSort(c);
|
|
4307
4307
|
}
|
|
4308
4308
|
}), n = N({
|
|
4309
4309
|
get() {
|
|
4310
|
-
return Me(e.activeGroupSelectedColumns.filter((
|
|
4310
|
+
return Me(e.activeGroupSelectedColumns.filter((c) => c.fixed), "index");
|
|
4311
4311
|
},
|
|
4312
|
-
set(
|
|
4313
|
-
e.updateActiveGroupColumnSort(
|
|
4312
|
+
set(c) {
|
|
4313
|
+
e.updateActiveGroupColumnSort(c);
|
|
4314
4314
|
}
|
|
4315
|
-
}), a = N(() => e.activeGroupSelectedColumns.filter((
|
|
4316
|
-
const m = e.activeGroupSelectedColumns.find((D) => D.prop ===
|
|
4317
|
-
m && (m.fixed =
|
|
4318
|
-
},
|
|
4319
|
-
if (e.activeGroup?.updateColumnChecked(
|
|
4320
|
-
const
|
|
4321
|
-
|
|
4315
|
+
}), a = N(() => e.activeGroupSelectedColumns.filter((c) => c.fixed).length < _o), u = (c) => e.columns.find((i) => i.prop === c.prop)?.label, s = (c, i) => {
|
|
4316
|
+
const m = e.activeGroupSelectedColumns.find((D) => D.prop === c.prop);
|
|
4317
|
+
m && (m.fixed = i, m.index = e.activeGroup?.getNextIndex || m.index);
|
|
4318
|
+
}, r = (c) => {
|
|
4319
|
+
if (e.activeGroup?.updateColumnChecked(c.prop, !1), c.fixed) {
|
|
4320
|
+
const i = e.columns.find((m) => m.prop === c.prop);
|
|
4321
|
+
i && (c.fixed = i.fixed);
|
|
4322
4322
|
}
|
|
4323
|
-
}, l = (
|
|
4323
|
+
}, l = (c) => {
|
|
4324
4324
|
const {
|
|
4325
|
-
column:
|
|
4325
|
+
column: i,
|
|
4326
4326
|
fixed: m,
|
|
4327
4327
|
className: D,
|
|
4328
4328
|
isFixed: p
|
|
4329
|
-
} = Ne(
|
|
4329
|
+
} = Ne(c), h = a.value || !m;
|
|
4330
4330
|
return g("div", {
|
|
4331
4331
|
class: `custom-column-group-selected__column-item ${D}`
|
|
4332
4332
|
}, [g("img", {
|
|
@@ -4334,26 +4334,26 @@ const cl = /* @__PURE__ */ M({
|
|
|
4334
4334
|
alt: "..."
|
|
4335
4335
|
}, null), J(g("span", {
|
|
4336
4336
|
class: "select-item__label"
|
|
4337
|
-
}, [u(
|
|
4337
|
+
}, [u(i)]), [[ee("ellipsis")]]), g("div", {
|
|
4338
4338
|
class: "select-item__icon"
|
|
4339
4339
|
}, [g("img", {
|
|
4340
4340
|
class: h ? "" : "not-lock",
|
|
4341
4341
|
src: p ? _n : pl,
|
|
4342
4342
|
alt: "锁",
|
|
4343
|
-
onClick: () => h && s(
|
|
4344
|
-
}, null),
|
|
4345
|
-
onClick: () =>
|
|
4343
|
+
onClick: () => h && s(i, m)
|
|
4344
|
+
}, null), i.readonly ? g(B("el-icon"), null, null) : g(B("el-icon"), {
|
|
4345
|
+
onClick: () => r(i)
|
|
4346
4346
|
}, {
|
|
4347
4347
|
default: () => [g(Yt, null, null)]
|
|
4348
4348
|
})])]);
|
|
4349
4349
|
};
|
|
4350
|
-
return (
|
|
4350
|
+
return (c, i) => (f(), _("div", ml, [x("div", Dl, [U(" 已选 " + j(d(e).activeGroupSelectedColumns.length) + " 个 ", 1), x("div", {
|
|
4351
4351
|
class: "reset-btn",
|
|
4352
|
-
onClick:
|
|
4352
|
+
onClick: i[0] || (i[0] = //@ts-ignore
|
|
4353
4353
|
(...m) => d(e).resetActiveGroupColumnsStatus && d(e).resetActiveGroupColumnsStatus(...m))
|
|
4354
4354
|
}, "重置")]), x("div", fl, [x("div", gl, [g(d(Pe), {
|
|
4355
4355
|
modelValue: n.value,
|
|
4356
|
-
"onUpdate:modelValue":
|
|
4356
|
+
"onUpdate:modelValue": i[1] || (i[1] = (m) => n.value = m),
|
|
4357
4357
|
animation: 150,
|
|
4358
4358
|
draggable: ".custom-column-group-selected__fixed-column-item"
|
|
4359
4359
|
}, {
|
|
@@ -4366,7 +4366,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4366
4366
|
_: 1
|
|
4367
4367
|
}, 8, ["modelValue"])]), x("div", hl, " 最多可横向锁定" + j(d(_o)) + "列 ", 1), x("div", Cl, [g(d(Pe), {
|
|
4368
4368
|
modelValue: o.value,
|
|
4369
|
-
"onUpdate:modelValue":
|
|
4369
|
+
"onUpdate:modelValue": i[2] || (i[2] = (m) => o.value = m),
|
|
4370
4370
|
animation: 150,
|
|
4371
4371
|
"ghost-class": "ghost",
|
|
4372
4372
|
draggable: ".custom-column-group-selected__un-fixed-column-item"
|
|
@@ -4383,26 +4383,26 @@ const cl = /* @__PURE__ */ M({
|
|
|
4383
4383
|
}), Al = /* @__PURE__ */ Z(vl, [["__scopeId", "data-v-1c0fabd5"]]), En = (t) => {
|
|
4384
4384
|
const e = N(() => d(t)), o = G(e.value?.[0]?.anchorId || "");
|
|
4385
4385
|
let n = !1;
|
|
4386
|
-
const a = async (
|
|
4387
|
-
o.value =
|
|
4388
|
-
const l = document.getElementById(
|
|
4386
|
+
const a = async (r) => {
|
|
4387
|
+
o.value = r;
|
|
4388
|
+
const l = document.getElementById(r);
|
|
4389
4389
|
l && (n = !0, await Y(), l.scrollIntoView({ block: "start", behavior: "smooth" }));
|
|
4390
4390
|
};
|
|
4391
4391
|
let u;
|
|
4392
4392
|
return {
|
|
4393
4393
|
activeAnchorId: o,
|
|
4394
4394
|
updateActiveAnchorIdByClick: a,
|
|
4395
|
-
handleContentScroll: (
|
|
4395
|
+
handleContentScroll: (r) => {
|
|
4396
4396
|
if (n) {
|
|
4397
4397
|
u && clearTimeout(u), u = setTimeout(() => {
|
|
4398
4398
|
n = !1;
|
|
4399
4399
|
}, 100);
|
|
4400
4400
|
return;
|
|
4401
4401
|
}
|
|
4402
|
-
const l =
|
|
4402
|
+
const l = r.target;
|
|
4403
4403
|
if (!l) return;
|
|
4404
|
-
const
|
|
4405
|
-
let
|
|
4404
|
+
const c = l.getBoundingClientRect();
|
|
4405
|
+
let i = "", m = Number.POSITIVE_INFINITY;
|
|
4406
4406
|
if (l.scrollTop + l.clientHeight >= l.scrollHeight - 1) {
|
|
4407
4407
|
const D = e.value.at(-1)?.anchorId;
|
|
4408
4408
|
D && o.value !== D && (o.value = D);
|
|
@@ -4411,9 +4411,9 @@ const cl = /* @__PURE__ */ M({
|
|
|
4411
4411
|
e.value.forEach(({ anchorId: D }) => {
|
|
4412
4412
|
const p = document.getElementById(D);
|
|
4413
4413
|
if (!p) return;
|
|
4414
|
-
const C = p.getBoundingClientRect().top -
|
|
4415
|
-
C >= 0 && C < m && (m = C,
|
|
4416
|
-
}), o.value =
|
|
4414
|
+
const C = p.getBoundingClientRect().top - c.top;
|
|
4415
|
+
C >= 0 && C < m && (m = C, i = D);
|
|
4416
|
+
}), o.value = i;
|
|
4417
4417
|
}
|
|
4418
4418
|
};
|
|
4419
4419
|
}, Fl = { class: "custom-column-group-body__container" }, bl = { class: "custom-column-group-body__left" }, yl = { class: "custom-column-group-body__left-bottom" }, _l = { class: "custom-column-group-body__anchor" }, El = ["onClick"], Bl = { class: "custom-column-group-body__right" }, wl = /* @__PURE__ */ M({
|
|
@@ -4422,7 +4422,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4422
4422
|
setup(t) {
|
|
4423
4423
|
const { zTableCustomBuilder: e } = ze(), { activeAnchorId: o, updateActiveAnchorIdByClick: n, handleContentScroll: a } = En(e.anchors);
|
|
4424
4424
|
return (u, s) => {
|
|
4425
|
-
const
|
|
4425
|
+
const r = ee("ellipsis");
|
|
4426
4426
|
return f(), _("div", Fl, [
|
|
4427
4427
|
x("div", bl, [
|
|
4428
4428
|
s[1] || (s[1] = x("div", { class: "custom-column__title" }, "自定义列", -1)),
|
|
@@ -4436,11 +4436,11 @@ const cl = /* @__PURE__ */ M({
|
|
|
4436
4436
|
"is-active": l.anchorId === d(o)
|
|
4437
4437
|
}
|
|
4438
4438
|
]),
|
|
4439
|
-
onClick: (
|
|
4439
|
+
onClick: (c) => d(n)(l.anchorId)
|
|
4440
4440
|
}, [
|
|
4441
4441
|
U(j(l.anchorName), 1)
|
|
4442
4442
|
], 10, El)), [
|
|
4443
|
-
[
|
|
4443
|
+
[r]
|
|
4444
4444
|
])), 128))
|
|
4445
4445
|
]),
|
|
4446
4446
|
x("div", {
|
|
@@ -4474,7 +4474,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4474
4474
|
setup(t) {
|
|
4475
4475
|
const e = Ee(t, "modelValue"), { zTableCustomBuilder: o } = ze(), n = G(e.value), a = G(), u = () => {
|
|
4476
4476
|
a.value?.hide();
|
|
4477
|
-
}, s = G(),
|
|
4477
|
+
}, s = G(), r = async () => {
|
|
4478
4478
|
await Y(), s.value?.focus();
|
|
4479
4479
|
}, l = () => {
|
|
4480
4480
|
if (!n.value)
|
|
@@ -4483,7 +4483,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4483
4483
|
return ye("名称不能重复");
|
|
4484
4484
|
o.updateGroupName(n.value, t.id), u();
|
|
4485
4485
|
};
|
|
4486
|
-
return (
|
|
4486
|
+
return (c, i) => {
|
|
4487
4487
|
const m = B("el-icon"), D = B("el-input"), p = B("el-button");
|
|
4488
4488
|
return f(), _(H, null, [
|
|
4489
4489
|
g(d(ma), {
|
|
@@ -4492,7 +4492,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4492
4492
|
width: "240px",
|
|
4493
4493
|
"popper-class": "z-table-custom-column-group-item__popover",
|
|
4494
4494
|
trigger: "click",
|
|
4495
|
-
onShow:
|
|
4495
|
+
onShow: r
|
|
4496
4496
|
}, {
|
|
4497
4497
|
reference: y(() => [
|
|
4498
4498
|
g(m, null, {
|
|
@@ -4507,7 +4507,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4507
4507
|
ref_key: "inputRef",
|
|
4508
4508
|
ref: s,
|
|
4509
4509
|
modelValue: n.value,
|
|
4510
|
-
"onUpdate:modelValue":
|
|
4510
|
+
"onUpdate:modelValue": i[0] || (i[0] = (h) => n.value = h),
|
|
4511
4511
|
placeholder: "请输入分组名称",
|
|
4512
4512
|
maxlength: "8",
|
|
4513
4513
|
"show-word-limit": "",
|
|
@@ -4515,7 +4515,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4515
4515
|
}, null, 8, ["modelValue"]),
|
|
4516
4516
|
x("div", Tl, [
|
|
4517
4517
|
g(p, { onClick: u }, {
|
|
4518
|
-
default: y(() => [...
|
|
4518
|
+
default: y(() => [...i[2] || (i[2] = [
|
|
4519
4519
|
U("取消", -1)
|
|
4520
4520
|
])]),
|
|
4521
4521
|
_: 1
|
|
@@ -4524,7 +4524,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4524
4524
|
type: "primary",
|
|
4525
4525
|
onClick: l
|
|
4526
4526
|
}, {
|
|
4527
|
-
default: y(() => [...
|
|
4527
|
+
default: y(() => [...i[3] || (i[3] = [
|
|
4528
4528
|
U("确认", -1)
|
|
4529
4529
|
])]),
|
|
4530
4530
|
_: 1
|
|
@@ -4535,7 +4535,7 @@ const cl = /* @__PURE__ */ M({
|
|
|
4535
4535
|
}, 512),
|
|
4536
4536
|
g(m, {
|
|
4537
4537
|
class: "group-item__delete-icon",
|
|
4538
|
-
onClick:
|
|
4538
|
+
onClick: i[1] || (i[1] = de((h) => d(o).deleteGroup(c.id), ["stop"]))
|
|
4539
4539
|
}, {
|
|
4540
4540
|
default: y(() => [
|
|
4541
4541
|
g(d(rt))
|
|
@@ -4645,29 +4645,29 @@ const Io = (t) => {
|
|
|
4645
4645
|
at(() => {
|
|
4646
4646
|
o.value.length ? At.value.set(e, o.value) : At.value.delete(e);
|
|
4647
4647
|
});
|
|
4648
|
-
const { mount: n } = Pl(), a = ga(), u = (l,
|
|
4648
|
+
const { mount: n } = Pl(), a = ga(), u = (l, c) => {
|
|
4649
4649
|
if (l) {
|
|
4650
|
-
const
|
|
4651
|
-
if (
|
|
4652
|
-
if (
|
|
4653
|
-
o.value[
|
|
4650
|
+
const i = o.value.findIndex((m) => m.id === l);
|
|
4651
|
+
if (i > -1)
|
|
4652
|
+
if (c)
|
|
4653
|
+
o.value[i].cleanup(), o.value.splice(i, 1);
|
|
4654
4654
|
else {
|
|
4655
|
-
for (let m =
|
|
4655
|
+
for (let m = i; m < o.value.length; m++)
|
|
4656
4656
|
o.value[m].cleanup();
|
|
4657
|
-
o.value.splice(
|
|
4657
|
+
o.value.splice(i);
|
|
4658
4658
|
}
|
|
4659
4659
|
} else
|
|
4660
|
-
o.value.forEach((
|
|
4661
|
-
|
|
4660
|
+
o.value.forEach((i) => {
|
|
4661
|
+
i.cleanup();
|
|
4662
4662
|
}), o.value = [];
|
|
4663
|
-
}, s = async (l,
|
|
4663
|
+
}, s = async (l, c, i, m) => {
|
|
4664
4664
|
const D = Va(l) ? ta({
|
|
4665
4665
|
loader: l,
|
|
4666
4666
|
delay: 0
|
|
4667
4667
|
// 立即加载
|
|
4668
4668
|
}) : l;
|
|
4669
4669
|
await Y();
|
|
4670
|
-
const p =
|
|
4670
|
+
const p = i ?? ko(), h = document.createElement("div");
|
|
4671
4671
|
return new Promise((C, A) => {
|
|
4672
4672
|
const F = m?.notCloseBeforeRouteChange ? null : _t(
|
|
4673
4673
|
() => a.fullPath,
|
|
@@ -4676,7 +4676,7 @@ const Io = (t) => {
|
|
|
4676
4676
|
}
|
|
4677
4677
|
), { unmount: v } = n(
|
|
4678
4678
|
Le(D, {
|
|
4679
|
-
...
|
|
4679
|
+
...c,
|
|
4680
4680
|
modelValue: !0,
|
|
4681
4681
|
"onUpdate:modelValue": (b) => {
|
|
4682
4682
|
b || Y(() => {
|
|
@@ -4709,7 +4709,7 @@ const Io = (t) => {
|
|
|
4709
4709
|
return {
|
|
4710
4710
|
openDialog: s,
|
|
4711
4711
|
closeDialog: u,
|
|
4712
|
-
openDialogIgnoreRouteChange: (l,
|
|
4712
|
+
openDialogIgnoreRouteChange: (l, c, i, m) => s(l, c, i, { ...m, notCloseBeforeRouteChange: !0 })
|
|
4713
4713
|
};
|
|
4714
4714
|
}, Ll = /* @__PURE__ */ M({
|
|
4715
4715
|
name: "ZTableCustomColumnsDialog",
|
|
@@ -4724,9 +4724,9 @@ const Io = (t) => {
|
|
|
4724
4724
|
s(async () => {
|
|
4725
4725
|
await n.value?.init(t.activeId, t.columnConfig);
|
|
4726
4726
|
});
|
|
4727
|
-
const [
|
|
4727
|
+
const [r, l] = $e(), c = () => {
|
|
4728
4728
|
o(tt.CANCEL);
|
|
4729
|
-
},
|
|
4729
|
+
}, i = () => {
|
|
4730
4730
|
l(async () => {
|
|
4731
4731
|
if (n.value?.validate()) {
|
|
4732
4732
|
const m = await n.value?.build();
|
|
@@ -4751,8 +4751,8 @@ const Io = (t) => {
|
|
|
4751
4751
|
}, {
|
|
4752
4752
|
footer: y(() => [
|
|
4753
4753
|
g(p, {
|
|
4754
|
-
loading: d(u) || d(
|
|
4755
|
-
onClick:
|
|
4754
|
+
loading: d(u) || d(r),
|
|
4755
|
+
onClick: c
|
|
4756
4756
|
}, {
|
|
4757
4757
|
default: y(() => [...D[1] || (D[1] = [
|
|
4758
4758
|
U("取消", -1)
|
|
@@ -4760,9 +4760,9 @@ const Io = (t) => {
|
|
|
4760
4760
|
_: 1
|
|
4761
4761
|
}, 8, ["loading"]),
|
|
4762
4762
|
g(p, {
|
|
4763
|
-
loading: d(u) || d(
|
|
4763
|
+
loading: d(u) || d(r),
|
|
4764
4764
|
type: "primary",
|
|
4765
|
-
onClick:
|
|
4765
|
+
onClick: i
|
|
4766
4766
|
}, {
|
|
4767
4767
|
default: y(() => [...D[2] || (D[2] = [
|
|
4768
4768
|
U("确定", -1)
|
|
@@ -4780,9 +4780,9 @@ const Io = (t) => {
|
|
|
4780
4780
|
};
|
|
4781
4781
|
}
|
|
4782
4782
|
}), Ol = (t) => {
|
|
4783
|
-
const e = G([]), o = async (
|
|
4784
|
-
e.value.forEach((
|
|
4785
|
-
|
|
4783
|
+
const e = G([]), o = async (c) => {
|
|
4784
|
+
e.value.forEach((i) => {
|
|
4785
|
+
i.id === c ? i.active = !0 : Reflect.deleteProperty(i, "active");
|
|
4786
4786
|
});
|
|
4787
4787
|
try {
|
|
4788
4788
|
await ce.saveViewConfig({
|
|
@@ -4790,40 +4790,40 @@ const Io = (t) => {
|
|
|
4790
4790
|
type: 2,
|
|
4791
4791
|
config: JSON.stringify(e.value)
|
|
4792
4792
|
});
|
|
4793
|
-
} catch (
|
|
4794
|
-
console.log(
|
|
4793
|
+
} catch (i) {
|
|
4794
|
+
console.log(i);
|
|
4795
4795
|
}
|
|
4796
4796
|
}, n = async () => {
|
|
4797
4797
|
if (t.columnConfig?.pageId) {
|
|
4798
|
-
const
|
|
4799
|
-
if (
|
|
4800
|
-
const [{ config:
|
|
4801
|
-
e.value =
|
|
4798
|
+
const c = await ce.loadViewConfig({ pageId: t.columnConfig.pageId, type: 2 });
|
|
4799
|
+
if (c?.length) {
|
|
4800
|
+
const [{ config: i }] = c;
|
|
4801
|
+
e.value = i ? JSON.parse(i) : [];
|
|
4802
4802
|
}
|
|
4803
4803
|
}
|
|
4804
|
-
}, a = (
|
|
4805
|
-
groupName:
|
|
4804
|
+
}, a = (c) => ({
|
|
4805
|
+
groupName: c && e.value.find((m) => m.id === c)?.groupName || "",
|
|
4806
4806
|
groupData: js(t.columns)
|
|
4807
|
-
}), u = (
|
|
4807
|
+
}), u = (c) => Ks(t.columns, c);
|
|
4808
4808
|
return {
|
|
4809
4809
|
initGroupData: n,
|
|
4810
4810
|
getGroupedColumnInfo: a,
|
|
4811
|
-
getCheckedColumnsById: (
|
|
4812
|
-
if (
|
|
4813
|
-
const
|
|
4814
|
-
if (
|
|
4815
|
-
return u(
|
|
4811
|
+
getCheckedColumnsById: (c) => {
|
|
4812
|
+
if (c) {
|
|
4813
|
+
const i = e.value.find((m) => m.id === c)?.columns;
|
|
4814
|
+
if (i)
|
|
4815
|
+
return u(i);
|
|
4816
4816
|
}
|
|
4817
|
-
return t.columns.filter((
|
|
4818
|
-
(
|
|
4819
|
-
prop:
|
|
4820
|
-
checked: !!(
|
|
4821
|
-
fixed: Ge(
|
|
4817
|
+
return t.columns.filter((i) => i.prop).map(
|
|
4818
|
+
(i) => ({
|
|
4819
|
+
prop: i.prop,
|
|
4820
|
+
checked: !!(i.readonly || i.defaultChecked),
|
|
4821
|
+
fixed: Ge(i.fixed)
|
|
4822
4822
|
})
|
|
4823
4823
|
);
|
|
4824
4824
|
},
|
|
4825
|
-
saveConfigColumns: async (
|
|
4826
|
-
const D = new Map(
|
|
4825
|
+
saveConfigColumns: async (c, i, m) => {
|
|
4826
|
+
const D = new Map(c.map((C, A) => [C.prop, { ...C, index: A }])), p = t.columns.filter((C) => C.prop && C.label), h = L.sortBy(p, (C) => D.get(C.prop)?.index ?? -1).map(
|
|
4827
4827
|
(C) => ({
|
|
4828
4828
|
prop: C.prop,
|
|
4829
4829
|
checked: D.has(C.prop),
|
|
@@ -4831,14 +4831,14 @@ const Io = (t) => {
|
|
|
4831
4831
|
})
|
|
4832
4832
|
);
|
|
4833
4833
|
if (m) {
|
|
4834
|
-
const { id: C, groupName: A } =
|
|
4835
|
-
F ? (F.columns = h, F.groupName = A) : e.value.push({ ...
|
|
4834
|
+
const { id: C, groupName: A } = i, F = e.value.find((v) => v.id === C);
|
|
4835
|
+
F ? (F.columns = h, F.groupName = A) : e.value.push({ ...i, columns: h }), await o(C);
|
|
4836
4836
|
}
|
|
4837
4837
|
return u(h);
|
|
4838
4838
|
},
|
|
4839
|
-
deleteGroupByGroupId: (
|
|
4840
|
-
const
|
|
4841
|
-
|
|
4839
|
+
deleteGroupByGroupId: (c) => {
|
|
4840
|
+
const i = e.value.findIndex((m) => m.id === c);
|
|
4841
|
+
i > -1 && e.value.splice(i, 1), o(c);
|
|
4842
4842
|
},
|
|
4843
4843
|
columnGroups: e,
|
|
4844
4844
|
saveViewConfig: o
|
|
@@ -4850,21 +4850,21 @@ const Io = (t) => {
|
|
|
4850
4850
|
deleteGroupByGroupId: a,
|
|
4851
4851
|
columnGroups: u,
|
|
4852
4852
|
saveViewConfig: s
|
|
4853
|
-
} = Ol(t), { openDialog:
|
|
4853
|
+
} = Ol(t), { openDialog: r } = Bn(), l = G(!0), c = G(t.columnConfig?.groupId ?? Fe), i = G([]), m = (v) => {
|
|
4854
4854
|
const b = new Map(v.map((k, S) => [k.prop, { ...k, index: S }])), w = L.sortBy(
|
|
4855
4855
|
t.columns.filter((k) => b.get(k.prop)?.checked || !k.prop),
|
|
4856
4856
|
(k) => b.get(k.prop)?.index ?? -1
|
|
4857
4857
|
);
|
|
4858
|
-
|
|
4858
|
+
i.value = w.map(
|
|
4859
4859
|
(k) => ({
|
|
4860
4860
|
...k,
|
|
4861
4861
|
fixed: k.prop ? b.get(k.prop)?.fixed : k.fixed
|
|
4862
4862
|
})
|
|
4863
4863
|
);
|
|
4864
4864
|
}, D = (v, b, w) => {
|
|
4865
|
-
|
|
4865
|
+
c.value = v, m(b ?? n(v)), !w && s(v);
|
|
4866
4866
|
}, p = (v) => {
|
|
4867
|
-
|
|
4867
|
+
r(Ll, {
|
|
4868
4868
|
activeId: v,
|
|
4869
4869
|
columnConfig: {
|
|
4870
4870
|
// FIXME:目前内部逻辑有些地方可能会涉及到因为prop为空的问题,所以暂时在这屏蔽掉
|
|
@@ -4876,7 +4876,7 @@ const Io = (t) => {
|
|
|
4876
4876
|
}).catch(() => {
|
|
4877
4877
|
});
|
|
4878
4878
|
}, h = () => {
|
|
4879
|
-
|
|
4879
|
+
i.value = t.columns.filter(({ type: v, defaultChecked: b, readonly: w, prop: k }) => w || v && Reflect.has(ft, v) || !k ? !0 : !!b);
|
|
4880
4880
|
};
|
|
4881
4881
|
(async () => {
|
|
4882
4882
|
if (t.columnConfig?.pageId)
|
|
@@ -4903,21 +4903,21 @@ const Io = (t) => {
|
|
|
4903
4903
|
const A = (v) => {
|
|
4904
4904
|
p(v);
|
|
4905
4905
|
}, F = async (v) => {
|
|
4906
|
-
await a(v), v ===
|
|
4906
|
+
await a(v), v === c.value && D(Fe);
|
|
4907
4907
|
};
|
|
4908
4908
|
return _t(
|
|
4909
4909
|
() => t.columns,
|
|
4910
4910
|
() => {
|
|
4911
|
-
t.columnConfig?.pageId ? m(n(
|
|
4911
|
+
t.columnConfig?.pageId ? m(n(c.value)) : h();
|
|
4912
4912
|
},
|
|
4913
4913
|
{
|
|
4914
4914
|
deep: !0,
|
|
4915
4915
|
flush: "post"
|
|
4916
4916
|
}
|
|
4917
4917
|
), {
|
|
4918
|
-
configColumns:
|
|
4918
|
+
configColumns: i,
|
|
4919
4919
|
loadingConfigColumns: l,
|
|
4920
|
-
groupId:
|
|
4920
|
+
groupId: c,
|
|
4921
4921
|
columnGroups: u,
|
|
4922
4922
|
openConfigColumnDialog: p,
|
|
4923
4923
|
changeGroupId: D,
|
|
@@ -4931,15 +4931,15 @@ const Io = (t) => {
|
|
|
4931
4931
|
loadingConfigColumns: a,
|
|
4932
4932
|
columnGroups: u,
|
|
4933
4933
|
changeGroupId: s,
|
|
4934
|
-
openConfigColumnDialog:
|
|
4934
|
+
openConfigColumnDialog: r,
|
|
4935
4935
|
editGroupByGroupId: l,
|
|
4936
|
-
deleteGroupByGroupId:
|
|
4937
|
-
} = zl(t, e),
|
|
4936
|
+
deleteGroupByGroupId: c
|
|
4937
|
+
} = zl(t, e), i = G(), m = G(), D = G({
|
|
4938
4938
|
current: 1,
|
|
4939
4939
|
size: t.paginationProps?.pageSize || Eo.pageSize,
|
|
4940
4940
|
total: 0
|
|
4941
4941
|
}), p = N(() => ({ ...Eo, ...t.paginationProps })), h = G(""), C = () => {
|
|
4942
|
-
const V =
|
|
4942
|
+
const V = i.value?.getBoundingClientRect();
|
|
4943
4943
|
h.value = `${V?.width}px`;
|
|
4944
4944
|
}, A = new ResizeObserver(() => requestAnimationFrame(C)), F = G([]), v = N(() => {
|
|
4945
4945
|
const V = L.omit(t, [
|
|
@@ -4987,11 +4987,11 @@ const Io = (t) => {
|
|
|
4987
4987
|
E.value++;
|
|
4988
4988
|
};
|
|
4989
4989
|
return st(() => {
|
|
4990
|
-
|
|
4990
|
+
i.value && A.observe(i.value);
|
|
4991
4991
|
}), nt(() => {
|
|
4992
4992
|
A?.disconnect();
|
|
4993
4993
|
}), {
|
|
4994
|
-
baseTableContainerRef:
|
|
4994
|
+
baseTableContainerRef: i,
|
|
4995
4995
|
baseTableRef: m,
|
|
4996
4996
|
pagination: D,
|
|
4997
4997
|
getPaginationProps: p,
|
|
@@ -5009,10 +5009,10 @@ const Io = (t) => {
|
|
|
5009
5009
|
columnGroups: u,
|
|
5010
5010
|
changeGroupId: s,
|
|
5011
5011
|
loadData: T,
|
|
5012
|
-
openConfigColumnDialog:
|
|
5012
|
+
openConfigColumnDialog: r,
|
|
5013
5013
|
resetColumnsWidth: O,
|
|
5014
5014
|
editGroupByGroupId: l,
|
|
5015
|
-
deleteGroupByGroupId:
|
|
5015
|
+
deleteGroupByGroupId: c
|
|
5016
5016
|
};
|
|
5017
5017
|
}, wn = [
|
|
5018
5018
|
"select",
|
|
@@ -5053,11 +5053,11 @@ const Io = (t) => {
|
|
|
5053
5053
|
return;
|
|
5054
5054
|
}
|
|
5055
5055
|
const u = () => Be(n) ? d(n()) : d(n), s = () => {
|
|
5056
|
-
t = new ResizeObserver(([
|
|
5056
|
+
t = new ResizeObserver(([c]) => a(c));
|
|
5057
5057
|
const l = u();
|
|
5058
5058
|
l && t.observe(l);
|
|
5059
|
-
}, { stop:
|
|
5060
|
-
u() && (s(),
|
|
5059
|
+
}, { stop: r } = ut(() => {
|
|
5060
|
+
u() && (s(), r?.());
|
|
5061
5061
|
});
|
|
5062
5062
|
}, o = () => {
|
|
5063
5063
|
t?.disconnect();
|
|
@@ -5076,11 +5076,11 @@ const Io = (t) => {
|
|
|
5076
5076
|
},
|
|
5077
5077
|
emits: ["find", "hidden"],
|
|
5078
5078
|
setup(t, { emit: e }) {
|
|
5079
|
-
const o = e, n = G(0), a = G(""), u = G(!1), s = G(), { on:
|
|
5079
|
+
const o = e, n = G(0), a = G(""), u = G(!1), s = G(), { on: r } = Jo(), l = (C) => {
|
|
5080
5080
|
n.value = C, o("find", a.value, C);
|
|
5081
|
-
},
|
|
5081
|
+
}, c = ua(() => {
|
|
5082
5082
|
l(0);
|
|
5083
|
-
}, 500),
|
|
5083
|
+
}, 500), i = () => {
|
|
5084
5084
|
const C = n.value > 0 ? n.value - 1 : t.count - 1;
|
|
5085
5085
|
l(C);
|
|
5086
5086
|
}, m = () => {
|
|
@@ -5092,7 +5092,7 @@ const Io = (t) => {
|
|
|
5092
5092
|
u.value = !1, a.value = "", n.value = 0, o("hidden");
|
|
5093
5093
|
}, h = N(() => t.count ? n.value + 1 : 0);
|
|
5094
5094
|
return st(() => {
|
|
5095
|
-
|
|
5095
|
+
r("keydown", (C) => {
|
|
5096
5096
|
const A = C.target, F = s.value?.$el?.contains?.(A), { key: v, metaKey: b, ctrlKey: w, shiftKey: k } = C;
|
|
5097
5097
|
switch (v) {
|
|
5098
5098
|
// ctrl + shift + f
|
|
@@ -5104,7 +5104,7 @@ const Io = (t) => {
|
|
|
5104
5104
|
p();
|
|
5105
5105
|
break;
|
|
5106
5106
|
case "ArrowUp":
|
|
5107
|
-
F && C.preventDefault(),
|
|
5107
|
+
F && C.preventDefault(), i();
|
|
5108
5108
|
break;
|
|
5109
5109
|
case "ArrowDown":
|
|
5110
5110
|
F && C.preventDefault(), m();
|
|
@@ -5121,7 +5121,7 @@ const Io = (t) => {
|
|
|
5121
5121
|
modelValue: a.value,
|
|
5122
5122
|
"onUpdate:modelValue": A[0] || (A[0] = (v) => a.value = v),
|
|
5123
5123
|
placeholder: "请输入搜索关键字",
|
|
5124
|
-
onInput: d(
|
|
5124
|
+
onInput: d(c),
|
|
5125
5125
|
onKeydown: Bt(m, ["enter"])
|
|
5126
5126
|
}, {
|
|
5127
5127
|
append: y(() => [
|
|
@@ -5129,7 +5129,7 @@ const Io = (t) => {
|
|
|
5129
5129
|
x("div", $l, [
|
|
5130
5130
|
g(F, {
|
|
5131
5131
|
class: te(C.count ? "is-active" : "is-disable"),
|
|
5132
|
-
onClick:
|
|
5132
|
+
onClick: i
|
|
5133
5133
|
}, {
|
|
5134
5134
|
default: y(() => [
|
|
5135
5135
|
g(d(ia))
|
|
@@ -5161,54 +5161,54 @@ const Io = (t) => {
|
|
|
5161
5161
|
}
|
|
5162
5162
|
}), Sn = /* @__PURE__ */ Z(Wl, [["__scopeId", "data-v-fc1828f9"]]), Tn = (t) => {
|
|
5163
5163
|
const e = G(0), o = () => {
|
|
5164
|
-
const
|
|
5165
|
-
if (
|
|
5166
|
-
const m =
|
|
5164
|
+
const c = [], i = t.value?.$el?.querySelector(".el-table__inner-wrapper");
|
|
5165
|
+
if (i) {
|
|
5166
|
+
const m = i.querySelectorAll(".el-table__header-wrapper");
|
|
5167
5167
|
if (m.length) {
|
|
5168
5168
|
const p = Array.from(m).filter((h) => {
|
|
5169
5169
|
const { display: C } = getComputedStyle(h);
|
|
5170
5170
|
return C !== "none";
|
|
5171
5171
|
}).pop()?.querySelectorAll(".el-table__cell");
|
|
5172
5172
|
if (p?.length) {
|
|
5173
|
-
const h = Array.from(p), [C] = h, A = h.find((E) => !E.classList.contains("el-table-fixed-column--left")), F = A?.getBoundingClientRect().left ?? 0, v =
|
|
5173
|
+
const h = Array.from(p), [C] = h, A = h.find((E) => !E.classList.contains("el-table-fixed-column--left")), F = A?.getBoundingClientRect().left ?? 0, v = i.getBoundingClientRect().left;
|
|
5174
5174
|
let b = Math.abs(F - v);
|
|
5175
5175
|
if (C !== A) {
|
|
5176
5176
|
const E = h.findLastIndex((X) => X.classList.contains("el-table-fixed-column--left")), O = h[E], { left: V, width: z } = O.getBoundingClientRect();
|
|
5177
5177
|
b = V + z - F;
|
|
5178
5178
|
}
|
|
5179
|
-
const { width: w } = t.value.$el.getBoundingClientRect(), k =
|
|
5179
|
+
const { width: w } = t.value.$el.getBoundingClientRect(), k = i.querySelector(".el-scrollbar__thumb"), S = k ? k.getBoundingClientRect().width : 0, T = S ? S / 2 : 0;
|
|
5180
5180
|
h.forEach((E) => {
|
|
5181
5181
|
const { top: O, left: V } = E.getBoundingClientRect();
|
|
5182
|
-
|
|
5182
|
+
c.push({ element: E, rect: { top: O, left: V + b - w / 2 - T } });
|
|
5183
5183
|
});
|
|
5184
5184
|
}
|
|
5185
5185
|
}
|
|
5186
5186
|
}
|
|
5187
|
-
return
|
|
5188
|
-
}, n = (
|
|
5189
|
-
a.forEach((
|
|
5190
|
-
}, s = ({ element:
|
|
5191
|
-
|
|
5192
|
-
|
|
5187
|
+
return c;
|
|
5188
|
+
}, n = (c, i) => c.toLowerCase().includes(i.toLowerCase()), a = [], u = () => {
|
|
5189
|
+
a.forEach((c) => c()), e.value = 0, a.length = 0;
|
|
5190
|
+
}, s = ({ element: c }) => {
|
|
5191
|
+
c.classList.add("el-table__cell__search-result"), a.push(() => {
|
|
5192
|
+
c.classList.remove("el-table__cell__search-result");
|
|
5193
5193
|
});
|
|
5194
|
-
},
|
|
5195
|
-
const { top:
|
|
5196
|
-
t.value.scrollTo(m,
|
|
5194
|
+
}, r = ({ rect: c }) => {
|
|
5195
|
+
const { top: i, left: m } = c;
|
|
5196
|
+
t.value.scrollTo(m, i);
|
|
5197
5197
|
};
|
|
5198
5198
|
return {
|
|
5199
5199
|
count: e,
|
|
5200
|
-
find: (
|
|
5201
|
-
if (u(),
|
|
5200
|
+
find: (c, i) => {
|
|
5201
|
+
if (u(), c) {
|
|
5202
5202
|
const m = o();
|
|
5203
5203
|
if (m?.length) {
|
|
5204
5204
|
const D = m.filter(({ element: p }) => {
|
|
5205
5205
|
const h = p.textContent;
|
|
5206
|
-
return h ? n(h,
|
|
5206
|
+
return h ? n(h, c) : !1;
|
|
5207
5207
|
});
|
|
5208
5208
|
if (D.length) {
|
|
5209
5209
|
D.forEach(s);
|
|
5210
|
-
const p = D[
|
|
5211
|
-
p &&
|
|
5210
|
+
const p = D[i];
|
|
5211
|
+
p && r(p), e.value = D.length;
|
|
5212
5212
|
}
|
|
5213
5213
|
}
|
|
5214
5214
|
}
|
|
@@ -5222,12 +5222,12 @@ const Io = (t) => {
|
|
|
5222
5222
|
const o = [], n = (s) => {
|
|
5223
5223
|
o.includes(s) || o.push(s);
|
|
5224
5224
|
}, a = new IntersectionObserver(([s]) => {
|
|
5225
|
-
let
|
|
5225
|
+
let r = "top";
|
|
5226
5226
|
if (!s.isIntersecting) {
|
|
5227
|
-
const l = s.boundingClientRect,
|
|
5228
|
-
l.bottom <=
|
|
5227
|
+
const l = s.boundingClientRect, c = s.rootBounds, i = c ? c.top : 0, m = c ? c.bottom : window.innerHeight;
|
|
5228
|
+
l.bottom <= i ? r = "top" : l.top >= m && (r = "bottom");
|
|
5229
5229
|
}
|
|
5230
|
-
o.forEach((l) => l(s.isIntersecting,
|
|
5230
|
+
o.forEach((l) => l(s.isIntersecting, r));
|
|
5231
5231
|
}, e);
|
|
5232
5232
|
return a.observe(t), {
|
|
5233
5233
|
onWatchVisible: n,
|
|
@@ -5317,7 +5317,7 @@ const Io = (t) => {
|
|
|
5317
5317
|
}), A(), b?.();
|
|
5318
5318
|
}
|
|
5319
5319
|
};
|
|
5320
|
-
},
|
|
5320
|
+
}, r = (D, p, h, C) => {
|
|
5321
5321
|
const { update: A, reset: F } = s(D, h);
|
|
5322
5322
|
p((v, b) => {
|
|
5323
5323
|
!v && h && b === "top" ? A(C) : F();
|
|
@@ -5329,24 +5329,24 @@ const Io = (t) => {
|
|
|
5329
5329
|
const { onWatchVisible: h, onStopWatchVisible: C } = Jl(D, { root: p }), { baseTableOperationElement: A, baseTableRef: F } = e;
|
|
5330
5330
|
if (!A.value)
|
|
5331
5331
|
return;
|
|
5332
|
-
|
|
5332
|
+
r(A.value, h, p);
|
|
5333
5333
|
const v = or(d(F)?.$el), { top: b } = p.getBoundingClientRect(), { height: w } = A.value.getBoundingClientRect();
|
|
5334
5334
|
v.forEach(
|
|
5335
|
-
(k) =>
|
|
5335
|
+
(k) => r(k, h, p, {
|
|
5336
5336
|
top: `${b + w}px`
|
|
5337
5337
|
})
|
|
5338
5338
|
), n.push(C);
|
|
5339
|
-
},
|
|
5339
|
+
}, c = (D) => {
|
|
5340
5340
|
e = D ?? e;
|
|
5341
5341
|
const { baseTableOperationElement: p } = e;
|
|
5342
5342
|
p.value && l(tr(p.value, "base-table-watch-sticky__operation"));
|
|
5343
|
-
},
|
|
5343
|
+
}, i = () => {
|
|
5344
5344
|
n.forEach((D) => D()), n.length = 0;
|
|
5345
5345
|
};
|
|
5346
|
-
return wt(
|
|
5347
|
-
start:
|
|
5346
|
+
return wt(i), {
|
|
5347
|
+
start: c,
|
|
5348
5348
|
reset: async () => {
|
|
5349
|
-
|
|
5349
|
+
i(), await Y(), c();
|
|
5350
5350
|
}
|
|
5351
5351
|
};
|
|
5352
5352
|
}, nr = {
|
|
@@ -5452,12 +5452,12 @@ const Io = (t) => {
|
|
|
5452
5452
|
"591cf24b": io.value,
|
|
5453
5453
|
"4f27adb5": d(D)
|
|
5454
5454
|
}));
|
|
5455
|
-
const n = t, a = Ee(t, "selectList"), u = o, s = Et(), { baseTableEventMap:
|
|
5455
|
+
const n = t, a = Ee(t, "selectList"), u = o, s = Et(), { baseTableEventMap: r } = Ul(u, (P, ...Q) => {
|
|
5456
5456
|
P === "selection-change" && (a.value = Q[0]);
|
|
5457
5457
|
}), {
|
|
5458
5458
|
baseTableRef: l,
|
|
5459
|
-
baseTableContainerRef:
|
|
5460
|
-
pagination:
|
|
5459
|
+
baseTableContainerRef: c,
|
|
5460
|
+
pagination: i,
|
|
5461
5461
|
getPaginationProps: m,
|
|
5462
5462
|
paginationWidth: D,
|
|
5463
5463
|
tableData: p,
|
|
@@ -5482,7 +5482,7 @@ const Io = (t) => {
|
|
|
5482
5482
|
const fe = () => {
|
|
5483
5483
|
Ue || (z(), u("paginationChange"));
|
|
5484
5484
|
}, je = async (P = !0) => {
|
|
5485
|
-
Ue = !0, P && Object.assign(
|
|
5485
|
+
Ue = !0, P && Object.assign(i.value, {
|
|
5486
5486
|
current: 1
|
|
5487
5487
|
}), await Y(), await z(), u("refreshed"), await Y(), Ue = !1;
|
|
5488
5488
|
}, so = G(), { start: Ln, reset: On } = In({
|
|
@@ -5497,7 +5497,7 @@ const Io = (t) => {
|
|
|
5497
5497
|
} finally {
|
|
5498
5498
|
Gt.value = !0;
|
|
5499
5499
|
}
|
|
5500
|
-
}, Hn = () =>
|
|
5500
|
+
}, Hn = () => i.value, ro = N(() => L.omit(i.value, "total")), Un = at(() => {
|
|
5501
5501
|
!b.value && Gt.value && (u("loaded"), n.stickyHeader && Y(Ln), Un());
|
|
5502
5502
|
}), Zn = N(() => (P) => {
|
|
5503
5503
|
const Q = n.enableDragProps;
|
|
@@ -5555,7 +5555,7 @@ const Io = (t) => {
|
|
|
5555
5555
|
return f(), _(H, null, [
|
|
5556
5556
|
x("div", {
|
|
5557
5557
|
ref_key: "baseTableContainerRef",
|
|
5558
|
-
ref:
|
|
5558
|
+
ref: c,
|
|
5559
5559
|
class: te([
|
|
5560
5560
|
"base-table__container z-table",
|
|
5561
5561
|
{
|
|
@@ -5674,7 +5674,7 @@ const Io = (t) => {
|
|
|
5674
5674
|
"header-cell-style": d(Zs),
|
|
5675
5675
|
data: d(p),
|
|
5676
5676
|
"show-overflow-tooltip": ""
|
|
5677
|
-
}, me(d(
|
|
5677
|
+
}, me(d(r))), {
|
|
5678
5678
|
empty: y(() => [
|
|
5679
5679
|
ne(P.$slots, "empty", {}, () => [
|
|
5680
5680
|
g(jo)
|
|
@@ -5724,11 +5724,11 @@ const Io = (t) => {
|
|
|
5724
5724
|
})
|
|
5725
5725
|
}, [
|
|
5726
5726
|
g(co, K(d(m), {
|
|
5727
|
-
"current-page": d(
|
|
5728
|
-
"onUpdate:currentPage": Q[3] || (Q[3] = (oe) => d(
|
|
5729
|
-
"page-size": d(
|
|
5730
|
-
"onUpdate:pageSize": Q[4] || (Q[4] = (oe) => d(
|
|
5731
|
-
total: d(
|
|
5727
|
+
"current-page": d(i).current,
|
|
5728
|
+
"onUpdate:currentPage": Q[3] || (Q[3] = (oe) => d(i).current = oe),
|
|
5729
|
+
"page-size": d(i).size,
|
|
5730
|
+
"onUpdate:pageSize": Q[4] || (Q[4] = (oe) => d(i).size = oe),
|
|
5731
|
+
total: d(i).total,
|
|
5732
5732
|
onChange: fe
|
|
5733
5733
|
}), null, 16, ["current-page", "page-size", "total"])
|
|
5734
5734
|
], 2)
|
|
@@ -5768,19 +5768,19 @@ const Io = (t) => {
|
|
|
5768
5768
|
const u = t.showColumns;
|
|
5769
5769
|
if (!u.length)
|
|
5770
5770
|
return [];
|
|
5771
|
-
const s = /* @__PURE__ */ new Map(),
|
|
5772
|
-
for (let
|
|
5773
|
-
const
|
|
5771
|
+
const s = /* @__PURE__ */ new Map(), r = [], l = u.length;
|
|
5772
|
+
for (let c = 0; c < l; ++c) {
|
|
5773
|
+
const i = u[c], { parentProp: m } = i.props;
|
|
5774
5774
|
if (m) {
|
|
5775
5775
|
let D = s.get(m);
|
|
5776
|
-
D || s.set(m, D = []), D.push(
|
|
5776
|
+
D || s.set(m, D = []), D.push(i);
|
|
5777
5777
|
} else
|
|
5778
|
-
|
|
5778
|
+
r.push({ column: i, subColumns: [] });
|
|
5779
5779
|
}
|
|
5780
|
-
return s.size &&
|
|
5781
|
-
const { column:
|
|
5782
|
-
m && (
|
|
5783
|
-
}),
|
|
5780
|
+
return s.size && r.forEach((c) => {
|
|
5781
|
+
const { column: i } = c, m = s.get(i.props.prop);
|
|
5782
|
+
m && (c.subColumns = m);
|
|
5783
|
+
}), r;
|
|
5784
5784
|
});
|
|
5785
5785
|
return {
|
|
5786
5786
|
elTableRef: e,
|
|
@@ -5812,18 +5812,18 @@ const Io = (t) => {
|
|
|
5812
5812
|
}), {
|
|
5813
5813
|
header: y(({
|
|
5814
5814
|
column: s,
|
|
5815
|
-
$index:
|
|
5815
|
+
$index: r
|
|
5816
5816
|
}) => [g(e, null, {
|
|
5817
5817
|
default: y(() => [g(d(Zt), {
|
|
5818
5818
|
column: o.column.props,
|
|
5819
5819
|
"header-column": s,
|
|
5820
|
-
index:
|
|
5820
|
+
index: r
|
|
5821
5821
|
}, null, 8, ["column", "header-column", "index"])]),
|
|
5822
5822
|
_: 2
|
|
5823
5823
|
}, 1024)]),
|
|
5824
5824
|
default: y(({
|
|
5825
5825
|
row: s,
|
|
5826
|
-
$index:
|
|
5826
|
+
$index: r
|
|
5827
5827
|
}) => [o.children?.length ? (f(!0), _(H, {
|
|
5828
5828
|
key: 0
|
|
5829
5829
|
}, $(o.children, (l) => (f(), I(a, {
|
|
@@ -5837,7 +5837,7 @@ const Io = (t) => {
|
|
|
5837
5837
|
row: s,
|
|
5838
5838
|
data: {
|
|
5839
5839
|
...s,
|
|
5840
|
-
$index:
|
|
5840
|
+
$index: r,
|
|
5841
5841
|
$tableData: o.tableBuilder.data,
|
|
5842
5842
|
$defaultSort: o.tableBuilder.elTableAttrs.defaultSort,
|
|
5843
5843
|
$rowKey: o.tableBuilder.elTableAttrs.rowKey
|
|
@@ -5866,27 +5866,27 @@ const Io = (t) => {
|
|
|
5866
5866
|
} = mr(t.tableBuilder), {
|
|
5867
5867
|
count: u,
|
|
5868
5868
|
find: s,
|
|
5869
|
-
clear:
|
|
5870
|
-
} = Tn(n), l = () => Object.keys(t.slots).filter((
|
|
5871
|
-
name:
|
|
5872
|
-
}) => (ce.getZTableV2DefaultSlotRenderByName(
|
|
5873
|
-
return (
|
|
5869
|
+
clear: r
|
|
5870
|
+
} = Tn(n), l = () => Object.keys(t.slots).filter((i) => !["empty", "append", "_"].includes(i)), c = ({
|
|
5871
|
+
name: i
|
|
5872
|
+
}) => (ce.getZTableV2DefaultSlotRenderByName(i) ?? t.slots[i])?.();
|
|
5873
|
+
return (i, m) => {
|
|
5874
5874
|
const D = B("el-table");
|
|
5875
5875
|
return f(), _(H, null, [g(D, K({
|
|
5876
5876
|
ref: d(e),
|
|
5877
5877
|
class: ["render-el-table__table", "z-table-v2__table", {
|
|
5878
|
-
"el-table__outside-border":
|
|
5879
|
-
"is-empty__table": !
|
|
5878
|
+
"el-table__outside-border": i.tableBuilder.config.border,
|
|
5879
|
+
"is-empty__table": !i.tableBuilder.data.length
|
|
5880
5880
|
}]
|
|
5881
|
-
},
|
|
5882
|
-
data:
|
|
5883
|
-
}, me(
|
|
5881
|
+
}, i.tableBuilder.elTableAttrs, {
|
|
5882
|
+
data: i.tableBuilder.data
|
|
5883
|
+
}, me(i.tableBuilder.getTableRegisterEvents(i.emit)), {
|
|
5884
5884
|
onSelectionChange: d(o)
|
|
5885
5885
|
}), Ye({
|
|
5886
|
-
empty: y(() => [g(
|
|
5886
|
+
empty: y(() => [g(c, {
|
|
5887
5887
|
name: "empty"
|
|
5888
5888
|
})]),
|
|
5889
|
-
append: y(() => [g(
|
|
5889
|
+
append: y(() => [g(c, {
|
|
5890
5890
|
name: "append"
|
|
5891
5891
|
})]),
|
|
5892
5892
|
default: y(() => [(f(!0), _(H, null, $(d(a), ({
|
|
@@ -5895,19 +5895,19 @@ const Io = (t) => {
|
|
|
5895
5895
|
}) => (f(), I(Dr, {
|
|
5896
5896
|
key: p.prop,
|
|
5897
5897
|
column: p,
|
|
5898
|
-
"table-builder":
|
|
5898
|
+
"table-builder": i.tableBuilder,
|
|
5899
5899
|
count: d(u),
|
|
5900
5900
|
children: h
|
|
5901
5901
|
}, null, 8, ["column", "table-builder", "count", "children"]))), 128))]),
|
|
5902
5902
|
_: 2
|
|
5903
5903
|
}, [$(l(), (p) => ({
|
|
5904
5904
|
name: p,
|
|
5905
|
-
fn: y(() => [ne(
|
|
5906
|
-
}))]), 1040, ["class", "data", "onSelectionChange"]),
|
|
5905
|
+
fn: y(() => [ne(i.$slots, p, {}, void 0, !0)])
|
|
5906
|
+
}))]), 1040, ["class", "data", "onSelectionChange"]), i.tableBuilder.config.enableColumnSearch ? (f(), I(Sn, {
|
|
5907
5907
|
key: 0,
|
|
5908
5908
|
count: d(u),
|
|
5909
5909
|
onFind: d(s),
|
|
5910
|
-
onHidden: d(
|
|
5910
|
+
onHidden: d(r)
|
|
5911
5911
|
}, null, 8, ["count", "onFind", "onHidden"])) : R("", !0)], 64);
|
|
5912
5912
|
};
|
|
5913
5913
|
}
|
|
@@ -5917,36 +5917,36 @@ const Io = (t) => {
|
|
|
5917
5917
|
}, Cr = (t) => {
|
|
5918
5918
|
const e = (s) => {
|
|
5919
5919
|
const {
|
|
5920
|
-
rowKey:
|
|
5920
|
+
rowKey: r = "id"
|
|
5921
5921
|
} = t.config;
|
|
5922
|
-
return typeof
|
|
5923
|
-
}, o = (s,
|
|
5924
|
-
const l = he(
|
|
5922
|
+
return typeof r == "function" ? r(s) : Reflect.get(s, r);
|
|
5923
|
+
}, o = (s, r) => {
|
|
5924
|
+
const l = he(r.width) ?? he(s.width) ?? he(r.minWidth) ?? he(s.minWidth) ?? hr, c = he(r.minWidth) ?? he(s.minWidth), i = he(r.maxWidth) ?? he(s.maxWidth);
|
|
5925
5925
|
let m = l;
|
|
5926
|
-
return
|
|
5927
|
-
}, n = (s,
|
|
5928
|
-
const
|
|
5929
|
-
return
|
|
5930
|
-
}, a = (s,
|
|
5931
|
-
t.updateSelectList(s),
|
|
5926
|
+
return c && (m = Math.max(m, c)), i && (m = Math.min(m, i)), m;
|
|
5927
|
+
}, n = (s, r, l) => {
|
|
5928
|
+
const c = he(r.minWidth) ?? he(s.minWidth);
|
|
5929
|
+
return c ? Math.max(c, l) : l;
|
|
5930
|
+
}, a = (s, r, l) => {
|
|
5931
|
+
t.updateSelectList(s), r === "select" ? t.triggerEvent("select", s, l) : t.triggerEvent("select-all", s), t.triggerEvent("selection-change", s);
|
|
5932
5932
|
};
|
|
5933
5933
|
return {
|
|
5934
5934
|
columns: N(() => t.showColumns.map((s) => {
|
|
5935
5935
|
const {
|
|
5936
|
-
label:
|
|
5936
|
+
label: r,
|
|
5937
5937
|
prop: l,
|
|
5938
|
-
props:
|
|
5938
|
+
props: c
|
|
5939
5939
|
} = s, {
|
|
5940
|
-
type:
|
|
5940
|
+
type: i,
|
|
5941
5941
|
contentRender: m,
|
|
5942
5942
|
_render: D,
|
|
5943
5943
|
headerRender: p,
|
|
5944
5944
|
renderHeader: h,
|
|
5945
5945
|
showOverflowTooltip: C
|
|
5946
|
-
} =
|
|
5947
|
-
return
|
|
5946
|
+
} = c, A = m || D, F = p || h, v = Re(s.tableV2ColumnAttrs, ["title", "width", "cellRenderer", "headerCellRenderer", "dataKey"]), b = o(c, v), w = n(c, v, b);
|
|
5947
|
+
return i === "selection" ? {
|
|
5948
5948
|
...v,
|
|
5949
|
-
title:
|
|
5949
|
+
title: r,
|
|
5950
5950
|
dataKey: l,
|
|
5951
5951
|
width: b,
|
|
5952
5952
|
minWidth: w,
|
|
@@ -5972,9 +5972,9 @@ const Io = (t) => {
|
|
|
5972
5972
|
}
|
|
5973
5973
|
}, null);
|
|
5974
5974
|
}
|
|
5975
|
-
} :
|
|
5975
|
+
} : i === "index" ? {
|
|
5976
5976
|
...v,
|
|
5977
|
-
title:
|
|
5977
|
+
title: r,
|
|
5978
5978
|
dataKey: l,
|
|
5979
5979
|
width: b,
|
|
5980
5980
|
minWidth: w,
|
|
@@ -5991,7 +5991,7 @@ const Io = (t) => {
|
|
|
5991
5991
|
}, null) : void 0
|
|
5992
5992
|
} : {
|
|
5993
5993
|
...v,
|
|
5994
|
-
title:
|
|
5994
|
+
title: r,
|
|
5995
5995
|
dataKey: l,
|
|
5996
5996
|
width: b,
|
|
5997
5997
|
minWidth: w,
|
|
@@ -6032,10 +6032,10 @@ const Io = (t) => {
|
|
|
6032
6032
|
() => o.value,
|
|
6033
6033
|
() => {
|
|
6034
6034
|
if (o.value) {
|
|
6035
|
-
const { width: l, height:
|
|
6035
|
+
const { width: l, height: c } = o.value.getBoundingClientRect();
|
|
6036
6036
|
n.value = {
|
|
6037
6037
|
width: l,
|
|
6038
|
-
height:
|
|
6038
|
+
height: c
|
|
6039
6039
|
};
|
|
6040
6040
|
}
|
|
6041
6041
|
}
|
|
@@ -6074,7 +6074,7 @@ const Io = (t) => {
|
|
|
6074
6074
|
fixed: t.tableBuilder.elVirtualTableAttrs.fixed ?? !0,
|
|
6075
6075
|
scrollbarAlwaysOn: t.tableBuilder.elVirtualTableAttrs.scrollbarAlwaysOn ?? !0
|
|
6076
6076
|
}));
|
|
6077
|
-
return (s,
|
|
6077
|
+
return (s, r) => {
|
|
6078
6078
|
const l = B("el-table-v2");
|
|
6079
6079
|
return f(), _("div", {
|
|
6080
6080
|
ref_key: "containerRef",
|
|
@@ -6131,10 +6131,10 @@ const Zt = (t) => {
|
|
|
6131
6131
|
contentRender: a,
|
|
6132
6132
|
_render: u,
|
|
6133
6133
|
renderToOptions: s,
|
|
6134
|
-
onClick:
|
|
6134
|
+
onClick: r,
|
|
6135
6135
|
emptyClick: l,
|
|
6136
|
-
emptyValue:
|
|
6137
|
-
prop:
|
|
6136
|
+
emptyValue: c,
|
|
6137
|
+
prop: i
|
|
6138
6138
|
} = e, m = a || u;
|
|
6139
6139
|
if (Be(m)) {
|
|
6140
6140
|
const {
|
|
@@ -6148,10 +6148,10 @@ const Zt = (t) => {
|
|
|
6148
6148
|
const w = m(Le, n ?? {}, Reflect.get(C, b) ?? {});
|
|
6149
6149
|
return typeof w != "number" && (!w || w === Ut) ? Go : w;
|
|
6150
6150
|
}
|
|
6151
|
-
const D =
|
|
6152
|
-
if (!
|
|
6151
|
+
const D = c ?? Ut;
|
|
6152
|
+
if (!i)
|
|
6153
6153
|
return D;
|
|
6154
|
-
const p = Reflect.get(n,
|
|
6154
|
+
const p = Reflect.get(n, i);
|
|
6155
6155
|
if (s) {
|
|
6156
6156
|
const C = s.find((F) => F.value === p), A = C?.label ?? D;
|
|
6157
6157
|
if (C?._color || C?._status) {
|
|
@@ -6164,11 +6164,11 @@ const Zt = (t) => {
|
|
|
6164
6164
|
}
|
|
6165
6165
|
return A;
|
|
6166
6166
|
}
|
|
6167
|
-
const h = tn(p) || p ==
|
|
6168
|
-
if (
|
|
6167
|
+
const h = tn(p) || p == c;
|
|
6168
|
+
if (r) {
|
|
6169
6169
|
const C = g(ao, {
|
|
6170
6170
|
key: p,
|
|
6171
|
-
onClick: () =>
|
|
6171
|
+
onClick: () => r?.(t.data)
|
|
6172
6172
|
}, br(p) ? p : {
|
|
6173
6173
|
default: () => [p]
|
|
6174
6174
|
});
|
|
@@ -6207,12 +6207,12 @@ const Er = /* @__PURE__ */ M({
|
|
|
6207
6207
|
const {
|
|
6208
6208
|
groupName: a,
|
|
6209
6209
|
anchorId: u
|
|
6210
|
-
} = Ne(o), s = t.zTableV2CustomColumnBuilder.allCustomColumns.filter((m) => m.props.prop && t.zTableV2CustomColumnBuilder.getColumnDefaultClassifyName(m) === a),
|
|
6211
|
-
const m = s.filter((D) =>
|
|
6210
|
+
} = Ne(o), s = t.zTableV2CustomColumnBuilder.allCustomColumns.filter((m) => m.props.prop && t.zTableV2CustomColumnBuilder.getColumnDefaultClassifyName(m) === a), r = N(() => new Map(t.zTableV2CustomColumnBuilder.activeGroupSelectedColumns.map((m) => [m.prop, m]))), l = N(() => {
|
|
6211
|
+
const m = s.filter((D) => r.value.has(D.props.prop)).length;
|
|
6212
6212
|
return m > 0 && m < s.length;
|
|
6213
|
-
}),
|
|
6213
|
+
}), c = N({
|
|
6214
6214
|
get() {
|
|
6215
|
-
return s.every((m) =>
|
|
6215
|
+
return s.every((m) => r.value.has(m.props.prop));
|
|
6216
6216
|
},
|
|
6217
6217
|
set(m) {
|
|
6218
6218
|
const D = new Map(s.map((p) => [p.props.prop, p]));
|
|
@@ -6222,7 +6222,7 @@ const Er = /* @__PURE__ */ M({
|
|
|
6222
6222
|
D.has(p.prop) && !p.readonly && p.checked !== m && t.zTableV2CustomColumnBuilder.activeGroup?.updateColumnChecked(p.prop, m);
|
|
6223
6223
|
}));
|
|
6224
6224
|
}
|
|
6225
|
-
}),
|
|
6225
|
+
}), i = (m, D) => {
|
|
6226
6226
|
t.zTableV2CustomColumnBuilder.activeGroup?.updateColumnChecked(m.props.prop, D);
|
|
6227
6227
|
};
|
|
6228
6228
|
return g("div", {
|
|
@@ -6232,8 +6232,8 @@ const Er = /* @__PURE__ */ M({
|
|
|
6232
6232
|
class: "custom-column-content__group-item-title"
|
|
6233
6233
|
}, [g(B("el-checkbox"), {
|
|
6234
6234
|
indeterminate: l.value,
|
|
6235
|
-
modelValue:
|
|
6236
|
-
"onUpdate:modelValue": (m) =>
|
|
6235
|
+
modelValue: c.value,
|
|
6236
|
+
"onUpdate:modelValue": (m) => c.value = m
|
|
6237
6237
|
}, xo(a) ? a : {
|
|
6238
6238
|
default: () => [a]
|
|
6239
6239
|
})]), g(B("el-row"), {
|
|
@@ -6245,8 +6245,8 @@ const Er = /* @__PURE__ */ M({
|
|
|
6245
6245
|
}, {
|
|
6246
6246
|
default: () => [g(B("el-checkbox"), {
|
|
6247
6247
|
disabled: m.props.readonly,
|
|
6248
|
-
"model-value":
|
|
6249
|
-
onChange: (D) =>
|
|
6248
|
+
"model-value": r.value.has(m.props.prop),
|
|
6249
|
+
onChange: (D) => i(m, D)
|
|
6250
6250
|
}, {
|
|
6251
6251
|
default: () => [m.props.label]
|
|
6252
6252
|
})]
|
|
@@ -6291,18 +6291,18 @@ const Er = /* @__PURE__ */ M({
|
|
|
6291
6291
|
set(l) {
|
|
6292
6292
|
t.zTableV2CustomColumnBuilder.updateActiveGroupColumnSort(l);
|
|
6293
6293
|
}
|
|
6294
|
-
}), n = N(() => t.zTableV2CustomColumnBuilder.activeGroupSelectedColumns.filter((l) => l.fixed).length < 5), a = (l) => t.zTableV2CustomColumnBuilder.allColumns.find((
|
|
6295
|
-
const
|
|
6296
|
-
|
|
6294
|
+
}), n = N(() => t.zTableV2CustomColumnBuilder.activeGroupSelectedColumns.filter((l) => l.fixed).length < 5), a = (l) => t.zTableV2CustomColumnBuilder.allColumns.find((c) => c.props.prop === l.prop)?.props?.label, u = (l, c) => {
|
|
6295
|
+
const i = t.zTableV2CustomColumnBuilder.activeGroupSelectedColumns.find((m) => m.prop === l.prop);
|
|
6296
|
+
i && (i.fixed = n.value ? c : i.fixed, i.fixed ? i.index = -1 : i.index = t.zTableV2CustomColumnBuilder.activeGroup?.getNextIndex || i.index);
|
|
6297
6297
|
}, s = (l) => {
|
|
6298
6298
|
if (t.zTableV2CustomColumnBuilder.activeGroup?.updateColumnChecked(l.prop, !1), l.fixed) {
|
|
6299
|
-
const
|
|
6300
|
-
|
|
6299
|
+
const c = t.zTableV2CustomColumnBuilder.allColumns.find((i) => i.props.prop === l.prop);
|
|
6300
|
+
c && (l.fixed = c.props.fixed);
|
|
6301
6301
|
}
|
|
6302
|
-
},
|
|
6302
|
+
}, r = (l) => {
|
|
6303
6303
|
const {
|
|
6304
|
-
column:
|
|
6305
|
-
fixed:
|
|
6304
|
+
column: c,
|
|
6305
|
+
fixed: i,
|
|
6306
6306
|
className: m
|
|
6307
6307
|
} = Ne(l);
|
|
6308
6308
|
return g("div", {
|
|
@@ -6312,49 +6312,49 @@ const Er = /* @__PURE__ */ M({
|
|
|
6312
6312
|
alt: "..."
|
|
6313
6313
|
}, null), J(g("span", {
|
|
6314
6314
|
class: "select-item__label"
|
|
6315
|
-
}, [a(
|
|
6315
|
+
}, [a(c)]), [[ee("ellipsis")]]), g("div", {
|
|
6316
6316
|
class: "select-item__icon"
|
|
6317
6317
|
}, [g("img", {
|
|
6318
6318
|
class: n.value ? "" : "not-lock",
|
|
6319
6319
|
src: _n,
|
|
6320
6320
|
alt: "锁",
|
|
6321
|
-
onClick: () => u(
|
|
6322
|
-
}, null),
|
|
6323
|
-
onClick: () => s(
|
|
6321
|
+
onClick: () => u(c, i)
|
|
6322
|
+
}, null), c.readonly ? null : g(B("el-icon"), {
|
|
6323
|
+
onClick: () => s(c)
|
|
6324
6324
|
}, {
|
|
6325
6325
|
default: () => [g(Yt, null, null)]
|
|
6326
6326
|
})])]);
|
|
6327
6327
|
};
|
|
6328
|
-
return (l,
|
|
6328
|
+
return (l, c) => (f(), _("div", wr, [x("div", Sr, [U(" 已选 " + j(l.zTableV2CustomColumnBuilder.activeGroupSelectedColumns.length) + " 个 ", 1), x("div", {
|
|
6329
6329
|
class: "reset-btn",
|
|
6330
|
-
onClick:
|
|
6331
|
-
(...
|
|
6330
|
+
onClick: c[0] || (c[0] = //@ts-ignore
|
|
6331
|
+
(...i) => l.zTableV2CustomColumnBuilder.resetActiveGroupColumnsStatus && l.zTableV2CustomColumnBuilder.resetActiveGroupColumnsStatus(...i))
|
|
6332
6332
|
}, "重置")]), x("div", Tr, [x("div", kr, [g(d(Pe), {
|
|
6333
6333
|
modelValue: o.value,
|
|
6334
|
-
"onUpdate:modelValue":
|
|
6334
|
+
"onUpdate:modelValue": c[1] || (c[1] = (i) => o.value = i),
|
|
6335
6335
|
animation: 150,
|
|
6336
6336
|
draggable: ".custom-column-selected__fixed-column-item"
|
|
6337
6337
|
}, {
|
|
6338
|
-
default: y(() => [(f(!0), _(H, null, $(o.value, (
|
|
6339
|
-
key:
|
|
6338
|
+
default: y(() => [(f(!0), _(H, null, $(o.value, (i) => (f(), I(r, {
|
|
6339
|
+
key: i.prop,
|
|
6340
6340
|
"class-name": "custom-column-selected__fixed-column-item",
|
|
6341
|
-
column:
|
|
6341
|
+
column: i
|
|
6342
6342
|
}, null, 8, ["column"]))), 128))]),
|
|
6343
6343
|
_: 1
|
|
6344
|
-
}, 8, ["modelValue"])]),
|
|
6344
|
+
}, 8, ["modelValue"])]), c[3] || (c[3] = x("div", {
|
|
6345
6345
|
class: "custom-column-selected__fixed-tips"
|
|
6346
6346
|
}, "最多可横向锁定5列", -1)), x("div", Ir, [g(d(Pe), {
|
|
6347
6347
|
modelValue: e.value,
|
|
6348
|
-
"onUpdate:modelValue":
|
|
6348
|
+
"onUpdate:modelValue": c[2] || (c[2] = (i) => e.value = i),
|
|
6349
6349
|
animation: 150,
|
|
6350
6350
|
"ghost-class": "ghost",
|
|
6351
6351
|
draggable: ".custom-column-selected__un-fixed-column-item"
|
|
6352
6352
|
}, {
|
|
6353
|
-
default: y(() => [(f(!0), _(H, null, $(e.value, (
|
|
6354
|
-
key:
|
|
6353
|
+
default: y(() => [(f(!0), _(H, null, $(e.value, (i) => (f(), I(r, {
|
|
6354
|
+
key: i.prop,
|
|
6355
6355
|
"class-name": "custom-column-selected__un-fixed-column-item",
|
|
6356
6356
|
fixed: "left",
|
|
6357
|
-
column:
|
|
6357
|
+
column: i
|
|
6358
6358
|
}, null, 8, ["column"]))), 128))]),
|
|
6359
6359
|
_: 1
|
|
6360
6360
|
}, 8, ["modelValue"])])])]));
|
|
@@ -6382,7 +6382,7 @@ const Er = /* @__PURE__ */ M({
|
|
|
6382
6382
|
"is-active": s.anchorId === d(e)
|
|
6383
6383
|
}
|
|
6384
6384
|
]),
|
|
6385
|
-
onClick: (
|
|
6385
|
+
onClick: (r) => d(o)(s.anchorId)
|
|
6386
6386
|
}, j(s.anchorName), 11, Pr))), 128))
|
|
6387
6387
|
]),
|
|
6388
6388
|
x("div", {
|
|
@@ -6417,15 +6417,15 @@ const Er = /* @__PURE__ */ M({
|
|
|
6417
6417
|
n.value?.hide();
|
|
6418
6418
|
}, u = G(), s = async () => {
|
|
6419
6419
|
await Y(), u.value?.focus();
|
|
6420
|
-
},
|
|
6420
|
+
}, r = () => {
|
|
6421
6421
|
if (!o.value)
|
|
6422
6422
|
return ye("名称不能为空");
|
|
6423
6423
|
if (t.zTableV2CustomColumnBuilder.groupNameSome(o.value))
|
|
6424
6424
|
return ye("名称不能重复");
|
|
6425
6425
|
t.zTableV2CustomColumnBuilder.updateGroupName(o.value, e.value), a();
|
|
6426
6426
|
};
|
|
6427
|
-
return (l,
|
|
6428
|
-
const
|
|
6427
|
+
return (l, c) => {
|
|
6428
|
+
const i = B("el-icon"), m = B("el-input"), D = B("el-button"), p = B("el-popover");
|
|
6429
6429
|
return f(), _(H, null, [
|
|
6430
6430
|
g(p, {
|
|
6431
6431
|
ref_key: "popoverRef",
|
|
@@ -6436,7 +6436,7 @@ const Er = /* @__PURE__ */ M({
|
|
|
6436
6436
|
onShow: s
|
|
6437
6437
|
}, {
|
|
6438
6438
|
reference: y(() => [
|
|
6439
|
-
g(
|
|
6439
|
+
g(i, null, {
|
|
6440
6440
|
default: y(() => [
|
|
6441
6441
|
g(d(lt))
|
|
6442
6442
|
]),
|
|
@@ -6448,24 +6448,24 @@ const Er = /* @__PURE__ */ M({
|
|
|
6448
6448
|
ref_key: "inputRef",
|
|
6449
6449
|
ref: u,
|
|
6450
6450
|
modelValue: o.value,
|
|
6451
|
-
"onUpdate:modelValue":
|
|
6451
|
+
"onUpdate:modelValue": c[0] || (c[0] = (h) => o.value = h),
|
|
6452
6452
|
placeholder: "请输入分组名称",
|
|
6453
6453
|
maxlength: "8",
|
|
6454
6454
|
"show-word-limit": "",
|
|
6455
|
-
onKeyup: Bt(
|
|
6455
|
+
onKeyup: Bt(r, ["enter"])
|
|
6456
6456
|
}, null, 8, ["modelValue"]),
|
|
6457
6457
|
x("div", Hr, [
|
|
6458
6458
|
g(D, { onClick: a }, {
|
|
6459
|
-
default: y(() => [...
|
|
6459
|
+
default: y(() => [...c[2] || (c[2] = [
|
|
6460
6460
|
U("取消", -1)
|
|
6461
6461
|
])]),
|
|
6462
6462
|
_: 1
|
|
6463
6463
|
}),
|
|
6464
6464
|
g(D, {
|
|
6465
6465
|
type: "primary",
|
|
6466
|
-
onClick:
|
|
6466
|
+
onClick: r
|
|
6467
6467
|
}, {
|
|
6468
|
-
default: y(() => [...
|
|
6468
|
+
default: y(() => [...c[3] || (c[3] = [
|
|
6469
6469
|
U("确认", -1)
|
|
6470
6470
|
])]),
|
|
6471
6471
|
_: 1
|
|
@@ -6474,9 +6474,9 @@ const Er = /* @__PURE__ */ M({
|
|
|
6474
6474
|
]),
|
|
6475
6475
|
_: 1
|
|
6476
6476
|
}, 512),
|
|
6477
|
-
g(
|
|
6477
|
+
g(i, {
|
|
6478
6478
|
class: "group-item__delete-icon",
|
|
6479
|
-
onClick:
|
|
6479
|
+
onClick: c[1] || (c[1] = de((h) => l.zTableV2CustomColumnBuilder.deleteGroup(e.value), ["stop"]))
|
|
6480
6480
|
}, {
|
|
6481
6481
|
default: y(() => [
|
|
6482
6482
|
g(d(rt))
|
|
@@ -6540,17 +6540,17 @@ const Er = /* @__PURE__ */ M({
|
|
|
6540
6540
|
zTableV2CustomColumnBuilder: {}
|
|
6541
6541
|
},
|
|
6542
6542
|
setup(t) {
|
|
6543
|
-
ve((
|
|
6543
|
+
ve((c) => ({
|
|
6544
6544
|
"418d063a": d(l)
|
|
6545
6545
|
}));
|
|
6546
6546
|
const { keywords: e, searchInputRef: o } = Jt(), n = G([]), a = () => {
|
|
6547
6547
|
n.value = t.zTableV2CustomColumnBuilder.search(e.value);
|
|
6548
6548
|
}, u = N(
|
|
6549
|
-
() => new Map(t.zTableV2CustomColumnBuilder.activeGroupSelectedColumns.map((
|
|
6550
|
-
), s = (
|
|
6551
|
-
t.zTableV2CustomColumnBuilder.activeGroup?.updateColumnChecked(
|
|
6552
|
-
}, { nextZIndex:
|
|
6553
|
-
return (
|
|
6549
|
+
() => new Map(t.zTableV2CustomColumnBuilder.activeGroupSelectedColumns.map((c) => [c.prop, c]))
|
|
6550
|
+
), s = (c, i) => {
|
|
6551
|
+
t.zTableV2CustomColumnBuilder.activeGroup?.updateColumnChecked(c.props.prop, i);
|
|
6552
|
+
}, { nextZIndex: r } = Kt(), l = r();
|
|
6553
|
+
return (c, i) => {
|
|
6554
6554
|
const m = B("ZEmpty"), D = B("el-checkbox"), p = B("el-col"), h = B("el-row"), C = ee("ellipsis");
|
|
6555
6555
|
return f(), _("div", Yr, [
|
|
6556
6556
|
x("div", jr, [
|
|
@@ -6558,7 +6558,7 @@ const Er = /* @__PURE__ */ M({
|
|
|
6558
6558
|
ref_key: "searchInputRef",
|
|
6559
6559
|
ref: o,
|
|
6560
6560
|
modelValue: d(e),
|
|
6561
|
-
"onUpdate:modelValue":
|
|
6561
|
+
"onUpdate:modelValue": i[0] || (i[0] = (A) => _e(e) ? e.value = A : null),
|
|
6562
6562
|
clearable: "",
|
|
6563
6563
|
placeholder: "可搜索列名称",
|
|
6564
6564
|
onInput: a
|
|
@@ -6622,13 +6622,13 @@ class Qt {
|
|
|
6622
6622
|
const xn = (t) => t.filter(
|
|
6623
6623
|
(e) => e.prop && e.label && (e.props.type ? !Reflect.has(qe, e.props.type) : !0)
|
|
6624
6624
|
), Vn = (t) => xn(t).reduce((e, o, n) => {
|
|
6625
|
-
const { defaultChecked: a, prop: u, fixed: s, readonly:
|
|
6625
|
+
const { defaultChecked: a, prop: u, fixed: s, readonly: r } = o.props;
|
|
6626
6626
|
return e.push({
|
|
6627
|
-
checked:
|
|
6627
|
+
checked: r ? !0 : !!a,
|
|
6628
6628
|
prop: u,
|
|
6629
6629
|
index: n,
|
|
6630
6630
|
fixed: s,
|
|
6631
|
-
readonly:
|
|
6631
|
+
readonly: r
|
|
6632
6632
|
}), e;
|
|
6633
6633
|
}, []), $t = (t, e) => {
|
|
6634
6634
|
if (!Array.isArray(e) || !e.length)
|
|
@@ -6751,14 +6751,14 @@ class ei {
|
|
|
6751
6751
|
groups: []
|
|
6752
6752
|
};
|
|
6753
6753
|
return this.groups.length && (e.groups = this.groups.map((o) => {
|
|
6754
|
-
const { groupName: n, columns: a } = o, u = a.filter((l) => !l.fixed), s = a.filter((l) => l.fixed),
|
|
6755
|
-
prop:
|
|
6756
|
-
checked:
|
|
6757
|
-
fixed:
|
|
6754
|
+
const { groupName: n, columns: a } = o, u = a.filter((l) => !l.fixed), s = a.filter((l) => l.fixed), r = (l) => Me(l, "index").map((c) => ({
|
|
6755
|
+
prop: c.prop,
|
|
6756
|
+
checked: c.checked,
|
|
6757
|
+
fixed: c.fixed || void 0
|
|
6758
6758
|
}));
|
|
6759
6759
|
return {
|
|
6760
6760
|
groupName: n,
|
|
6761
|
-
columns:
|
|
6761
|
+
columns: r(u).concat(r(s))
|
|
6762
6762
|
};
|
|
6763
6763
|
})), e;
|
|
6764
6764
|
}
|
|
@@ -6781,10 +6781,10 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
6781
6781
|
s(() => {
|
|
6782
6782
|
a.value.init(t.groupName);
|
|
6783
6783
|
});
|
|
6784
|
-
const
|
|
6784
|
+
const r = () => {
|
|
6785
6785
|
n(tt.CANCEL);
|
|
6786
|
-
}, [l,
|
|
6787
|
-
|
|
6786
|
+
}, [l, c] = $e(), i = () => {
|
|
6787
|
+
c(async () => {
|
|
6788
6788
|
if (a.value.validate()) {
|
|
6789
6789
|
const m = a.value.build();
|
|
6790
6790
|
await ce.saveViewConfig({
|
|
@@ -6809,7 +6809,7 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
6809
6809
|
footer: y(() => [
|
|
6810
6810
|
g(p, {
|
|
6811
6811
|
loading: d(l),
|
|
6812
|
-
onClick:
|
|
6812
|
+
onClick: r
|
|
6813
6813
|
}, {
|
|
6814
6814
|
default: y(() => [...D[1] || (D[1] = [
|
|
6815
6815
|
U("取消", -1)
|
|
@@ -6819,7 +6819,7 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
6819
6819
|
g(p, {
|
|
6820
6820
|
loading: d(l),
|
|
6821
6821
|
type: "primary",
|
|
6822
|
-
onClick:
|
|
6822
|
+
onClick: i
|
|
6823
6823
|
}, {
|
|
6824
6824
|
default: y(() => [...D[2] || (D[2] = [
|
|
6825
6825
|
U("确定", -1)
|
|
@@ -6866,23 +6866,23 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
6866
6866
|
});
|
|
6867
6867
|
};
|
|
6868
6868
|
return (n, a) => {
|
|
6869
|
-
const u = B("el-icon"), s = B("el-dropdown-item"),
|
|
6869
|
+
const u = B("el-icon"), s = B("el-dropdown-item"), r = B("el-dropdown-menu"), l = B("el-dropdown"), c = ee("ellipsis");
|
|
6870
6870
|
return f(), I(l, {
|
|
6871
6871
|
"popper-class": "z-table-v2-custom-column__popper",
|
|
6872
6872
|
trigger: "hover",
|
|
6873
6873
|
placement: "bottom-start"
|
|
6874
6874
|
}, {
|
|
6875
|
-
dropdown: y(() => [g(
|
|
6876
|
-
default: y(() => [(f(!0), _(H, null, $(n.tableBuilder.tableCustomColumnManager.groups, (
|
|
6877
|
-
key:
|
|
6875
|
+
dropdown: y(() => [g(r, null, {
|
|
6876
|
+
default: y(() => [(f(!0), _(H, null, $(n.tableBuilder.tableCustomColumnManager.groups, (i) => (f(), I(s, {
|
|
6877
|
+
key: i.groupName,
|
|
6878
6878
|
class: te(["z-table-v2-custom-column__item", {
|
|
6879
|
-
"is-active":
|
|
6879
|
+
"is-active": i.groupName === n.tableBuilder.activeGroup
|
|
6880
6880
|
}]),
|
|
6881
|
-
onClick: de((m) => n.tableBuilder.updateActiveGroup(
|
|
6881
|
+
onClick: de((m) => n.tableBuilder.updateActiveGroup(i.groupName), ["stop"])
|
|
6882
6882
|
}, {
|
|
6883
|
-
default: y(() => [J((f(), _("div", ni, [U(j(
|
|
6883
|
+
default: y(() => [J((f(), _("div", ni, [U(j(i.groupName), 1)])), [[c]]), g(u, {
|
|
6884
6884
|
class: "z-table-v2-custom-column__edit-icon",
|
|
6885
|
-
onClick: de((m) => o(
|
|
6885
|
+
onClick: de((m) => o(i.groupName), ["stop"])
|
|
6886
6886
|
}, {
|
|
6887
6887
|
default: y(() => [g(d(lt))]),
|
|
6888
6888
|
_: 2
|
|
@@ -7134,13 +7134,13 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7134
7134
|
!Ve(w) && !Ve(b) && t.triggerEvent("drag-change", { oldIndex: b, newIndex: w }, t.data);
|
|
7135
7135
|
}, s = (v) => {
|
|
7136
7136
|
t.updatePagination({ current: v });
|
|
7137
|
-
},
|
|
7137
|
+
}, r = (v) => {
|
|
7138
7138
|
t.updatePagination({ size: v });
|
|
7139
7139
|
}, l = (v) => {
|
|
7140
7140
|
const { rowKey: b = "id" } = t.config;
|
|
7141
7141
|
return typeof b == "function" ? b(v) : Reflect.get(v, b);
|
|
7142
|
-
},
|
|
7143
|
-
|
|
7142
|
+
}, c = G(), { onResize: i } = uo(), m = G(""), D = G({ left: "0", top: "0", width: "100%", height: "100%" });
|
|
7143
|
+
i(
|
|
7144
7144
|
() => e.value,
|
|
7145
7145
|
() => {
|
|
7146
7146
|
if (e.value) {
|
|
@@ -7166,13 +7166,13 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7166
7166
|
const { start: C } = In(), A = G(!1);
|
|
7167
7167
|
t.registerEvent("init", async () => {
|
|
7168
7168
|
A.value = !0, await Y(), n.value.stickyHeader && !n.value.enableVirtualScroll && C({
|
|
7169
|
-
baseTableOperationElement:
|
|
7169
|
+
baseTableOperationElement: c,
|
|
7170
7170
|
baseTableRef: t.rawElTableInstance,
|
|
7171
7171
|
stickyTriggerSelector: t.config.stickyTriggerSelector
|
|
7172
7172
|
});
|
|
7173
7173
|
});
|
|
7174
7174
|
const F = G("");
|
|
7175
|
-
return
|
|
7175
|
+
return i(
|
|
7176
7176
|
() => t.elTableInstance?.$el,
|
|
7177
7177
|
() => {
|
|
7178
7178
|
const { left: v } = t.elTableInstance?.$el.getBoundingClientRect() ?? { left: 0 };
|
|
@@ -7187,11 +7187,11 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7187
7187
|
onDrag: a,
|
|
7188
7188
|
dragChange: u,
|
|
7189
7189
|
updateCurrentPage: s,
|
|
7190
|
-
updatePageSize:
|
|
7190
|
+
updatePageSize: r,
|
|
7191
7191
|
getRowKey: l,
|
|
7192
7192
|
paginationWidth: m,
|
|
7193
7193
|
loadingRect: D,
|
|
7194
|
-
zTableV2OperationElement:
|
|
7194
|
+
zTableV2OperationElement: c,
|
|
7195
7195
|
zTableV2BodyRef: p,
|
|
7196
7196
|
isInitialized: A,
|
|
7197
7197
|
tableScrollLeft: F
|
|
@@ -7221,10 +7221,10 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7221
7221
|
zTableV2ContainerRef: a,
|
|
7222
7222
|
config: u,
|
|
7223
7223
|
onDrag: s,
|
|
7224
|
-
dragChange:
|
|
7224
|
+
dragChange: r,
|
|
7225
7225
|
updateCurrentPage: l,
|
|
7226
|
-
updatePageSize:
|
|
7227
|
-
getPaginationProps:
|
|
7226
|
+
updatePageSize: c,
|
|
7227
|
+
getPaginationProps: i,
|
|
7228
7228
|
paginationWidth: m,
|
|
7229
7229
|
loadingRect: D,
|
|
7230
7230
|
zTableV2OperationElement: p,
|
|
@@ -7322,7 +7322,7 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7322
7322
|
handle: `.${d(Gn)}`,
|
|
7323
7323
|
animation: v.tableBuilder.config.draggableAttrs?.animation ?? 150,
|
|
7324
7324
|
onEnded: d(s),
|
|
7325
|
-
onChange: d(
|
|
7325
|
+
onChange: d(r),
|
|
7326
7326
|
"onUpdate:modelValue": b[3] || (b[3] = (T) => {
|
|
7327
7327
|
v.tableBuilder.updateTableData(T);
|
|
7328
7328
|
})
|
|
@@ -7342,12 +7342,12 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7342
7342
|
d(u).fixedPagination ? `is-fixed fixed-to-${d(u).fixedPagination === "right" ? "right" : "left"}` : ""
|
|
7343
7343
|
])
|
|
7344
7344
|
}, [
|
|
7345
|
-
g(k, K(d(
|
|
7345
|
+
g(k, K(d(i), {
|
|
7346
7346
|
"current-page": v.tableBuilder.pagination.current,
|
|
7347
7347
|
"page-size": v.tableBuilder.pagination.size,
|
|
7348
7348
|
total: v.tableBuilder.pagination.total,
|
|
7349
7349
|
"onUpdate:currentPage": d(l),
|
|
7350
|
-
"onUpdate:pageSize": d(
|
|
7350
|
+
"onUpdate:pageSize": d(c)
|
|
7351
7351
|
}, me(v.tableBuilder.getPaginationEvents(o)), {
|
|
7352
7352
|
onChange: b[4] || (b[4] = () => !v.tableBuilder.loading && v.tableBuilder.refresh())
|
|
7353
7353
|
}), null, 16, ["current-page", "page-size", "total", "onUpdate:currentPage", "onUpdate:pageSize"])
|
|
@@ -7375,7 +7375,7 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7375
7375
|
o("click");
|
|
7376
7376
|
};
|
|
7377
7377
|
return (a, u) => {
|
|
7378
|
-
const s = B("el-icon"),
|
|
7378
|
+
const s = B("el-icon"), r = B("el-tooltip"), l = B("el-form-item");
|
|
7379
7379
|
return f(), I(l, {
|
|
7380
7380
|
class: "z-tips-form-item__form-item",
|
|
7381
7381
|
prop: a.prop
|
|
@@ -7383,7 +7383,7 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7383
7383
|
label: y(() => [
|
|
7384
7384
|
x("div", Di, [
|
|
7385
7385
|
U(j(a.label) + " ", 1),
|
|
7386
|
-
a.content ? (f(), I(
|
|
7386
|
+
a.content ? (f(), I(r, {
|
|
7387
7387
|
key: 0,
|
|
7388
7388
|
content: a.content,
|
|
7389
7389
|
placement: "top",
|
|
@@ -7452,8 +7452,8 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7452
7452
|
});
|
|
7453
7453
|
}, s = (l) => {
|
|
7454
7454
|
l.style.maxHeight = "", l.style.opacity = "";
|
|
7455
|
-
},
|
|
7456
|
-
return (l,
|
|
7455
|
+
}, r = N(() => !Ve(t.visible));
|
|
7456
|
+
return (l, c) => (f(), I(Oo, {
|
|
7457
7457
|
name: "z-transition-fade-height",
|
|
7458
7458
|
onBeforeEnter: e,
|
|
7459
7459
|
onEnter: o,
|
|
@@ -7463,7 +7463,7 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7463
7463
|
onAfterLeave: s
|
|
7464
7464
|
}, {
|
|
7465
7465
|
default: y(() => [
|
|
7466
|
-
!
|
|
7466
|
+
!r.value || l.visible ? (f(), _("div", Ci, [
|
|
7467
7467
|
ne(l.$slots, "default", {}, void 0, !0)
|
|
7468
7468
|
])) : R("", !0)
|
|
7469
7469
|
]),
|
|
@@ -7542,12 +7542,12 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7542
7542
|
if (document.execCommand)
|
|
7543
7543
|
document.execCommand("insertText", !1, a);
|
|
7544
7544
|
else {
|
|
7545
|
-
const { selectionStart: u, selectionEnd: s, value:
|
|
7545
|
+
const { selectionStart: u, selectionEnd: s, value: r } = t, l = r.length;
|
|
7546
7546
|
if (l) {
|
|
7547
|
-
t.value =
|
|
7548
|
-
const
|
|
7547
|
+
t.value = r.substring(0, u ?? 0) + a + r.substring(s ?? l);
|
|
7548
|
+
const c = (u ?? 0) + a.length;
|
|
7549
7549
|
Y().then(() => {
|
|
7550
|
-
t.setSelectionRange(
|
|
7550
|
+
t.setSelectionRange(c, c);
|
|
7551
7551
|
});
|
|
7552
7552
|
} else
|
|
7553
7553
|
t.value = a;
|
|
@@ -7557,10 +7557,10 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7557
7557
|
mounted(t) {
|
|
7558
7558
|
const e = async (n) => {
|
|
7559
7559
|
const a = n.target, u = a.selectionStart || -1, s = [];
|
|
7560
|
-
let
|
|
7561
|
-
a.value = a.value.replace(/\s/g, (
|
|
7560
|
+
let r = !1;
|
|
7561
|
+
a.value = a.value.replace(/\s/g, (c, i) => (i < u && s.push(i), r = !0, ""));
|
|
7562
7562
|
const l = u - s.length;
|
|
7563
|
-
|
|
7563
|
+
r && (Ft(a), await Y()), a.setSelectionRange(l, l);
|
|
7564
7564
|
};
|
|
7565
7565
|
t._inputHandler = e, t.addEventListener("input", e);
|
|
7566
7566
|
const o = async (n) => {
|
|
@@ -7568,14 +7568,14 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7568
7568
|
let a = ((Reflect.get(n, "clipboardData") || Reflect.get(window, "clipboardData"))?.getData("text/plain") || "").replace(/\s/g, "");
|
|
7569
7569
|
if (!a)
|
|
7570
7570
|
return;
|
|
7571
|
-
const u = n.target, { selectionStart: s = 0, selectionEnd:
|
|
7572
|
-
let
|
|
7573
|
-
|
|
7574
|
-
const
|
|
7575
|
-
if (a = a.substring(0,
|
|
7576
|
-
const m = l.substring(0, s ?? 0) + a + l.substring(
|
|
7571
|
+
const u = n.target, { selectionStart: s = 0, selectionEnd: r = 0, value: l } = u;
|
|
7572
|
+
let c = u.maxLength;
|
|
7573
|
+
c < 0 && (c = Number.MAX_SAFE_INTEGER);
|
|
7574
|
+
const i = l.length;
|
|
7575
|
+
if (a = a.substring(0, c - (i - ((r ?? 0) - (s ?? 0)))), i < c || s !== r) {
|
|
7576
|
+
const m = l.substring(0, s ?? 0) + a + l.substring(r ?? i);
|
|
7577
7577
|
if (!document.execCommand?.("insertText", !1, a)) {
|
|
7578
|
-
if (
|
|
7578
|
+
if (i) {
|
|
7579
7579
|
u.setRangeText(m);
|
|
7580
7580
|
const p = (s ?? 0) + a.length;
|
|
7581
7581
|
await Y(), u.setSelectionRange(p, p);
|
|
@@ -7606,10 +7606,10 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7606
7606
|
const e = t.querySelector(".el-input__wrapper > input") || t, o = () => {
|
|
7607
7607
|
const a = e.value, u = wo(a);
|
|
7608
7608
|
if (a !== u) {
|
|
7609
|
-
const s = e.selectionStart,
|
|
7609
|
+
const s = e.selectionStart, r = e.selectionEnd;
|
|
7610
7610
|
e.value = u;
|
|
7611
7611
|
const l = a.length - u.length;
|
|
7612
|
-
s &&
|
|
7612
|
+
s && r && e.setSelectionRange(s - l, r - l), Ft(e);
|
|
7613
7613
|
}
|
|
7614
7614
|
};
|
|
7615
7615
|
e.addEventListener("input", o), t._handleInput = o;
|
|
@@ -7637,7 +7637,7 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7637
7637
|
webkitLineClamp: "",
|
|
7638
7638
|
webkitBoxOrient: ""
|
|
7639
7639
|
}), n = a.outerHTML;
|
|
7640
|
-
const { top: u, bottom: s } = W.value.rect,
|
|
7640
|
+
const { top: u, bottom: s } = W.value.rect, r = window.innerHeight || document.documentElement.clientHeight, l = Math.max(u, r - s, 56);
|
|
7641
7641
|
W.value.maxHeight = `${l - 28}px`, W.value.placement = u === l ? "top" : "bottom";
|
|
7642
7642
|
} else
|
|
7643
7643
|
n = t.outerHTML;
|
|
@@ -7655,7 +7655,7 @@ const ti = { class: "custom-column__container" }, oi = /* @__PURE__ */ M({
|
|
|
7655
7655
|
}, Ii = (t) => ({
|
|
7656
7656
|
...ki,
|
|
7657
7657
|
...t ?? {}
|
|
7658
|
-
}), Gi = "1.2.
|
|
7658
|
+
}), Gi = "1.2.3", Ni = {
|
|
7659
7659
|
version: Gi
|
|
7660
7660
|
};
|
|
7661
7661
|
function gc(t, e, o) {
|
|
@@ -7821,17 +7821,17 @@ class Mi {
|
|
|
7821
7821
|
*/
|
|
7822
7822
|
initCustomColumns(e) {
|
|
7823
7823
|
const o = new Map(this.tableColumns.map((s) => [s.props.prop, s])), n = this.tableColumns.reduce(
|
|
7824
|
-
(s,
|
|
7824
|
+
(s, r, l) => {
|
|
7825
7825
|
const {
|
|
7826
|
-
props: { type:
|
|
7827
|
-
} =
|
|
7828
|
-
return (
|
|
7826
|
+
props: { type: c, prop: i }
|
|
7827
|
+
} = r;
|
|
7828
|
+
return (c && Reflect.has(qe, c) || !i) && Reflect.set(s, l, r), s;
|
|
7829
7829
|
},
|
|
7830
7830
|
{}
|
|
7831
|
-
), a = e.reduce((s,
|
|
7832
|
-
const { readonly: l, prop:
|
|
7833
|
-
if (
|
|
7834
|
-
const D = o.get(
|
|
7831
|
+
), a = e.reduce((s, r) => {
|
|
7832
|
+
const { readonly: l, prop: c, checked: i, fixed: m } = r;
|
|
7833
|
+
if (i || l) {
|
|
7834
|
+
const D = o.get(c);
|
|
7835
7835
|
D && s.push(new Mt({ ...D.props, readonly: l, fixed: m }));
|
|
7836
7836
|
}
|
|
7837
7837
|
return s;
|
|
@@ -7931,20 +7931,20 @@ class Li {
|
|
|
7931
7931
|
const o = Vn(this.tableBuilder.columns);
|
|
7932
7932
|
let n = !1, a = 0;
|
|
7933
7933
|
e.forEach((u) => {
|
|
7934
|
-
const s = new Map(u.columns.map((l) => [l.prop, l])),
|
|
7934
|
+
const s = new Map(u.columns.map((l) => [l.prop, l])), r = new Qt({
|
|
7935
7935
|
groupName: u.groupName,
|
|
7936
7936
|
columns: o.map((l) => {
|
|
7937
|
-
const
|
|
7938
|
-
return
|
|
7937
|
+
const c = s.get(l.prop);
|
|
7938
|
+
return c ? {
|
|
7939
7939
|
...l,
|
|
7940
|
-
index:
|
|
7940
|
+
index: c.checked ? ++a : void 0
|
|
7941
7941
|
} : {
|
|
7942
7942
|
...l,
|
|
7943
7943
|
index: l.checked ? ++a : void 0
|
|
7944
7944
|
};
|
|
7945
7945
|
})
|
|
7946
7946
|
});
|
|
7947
|
-
|
|
7947
|
+
r.groupName === this.defaultGroupName && (n = !0), this.groups.push(r), Reflect.get(u, "active") && this.updateActiveGroup(u.groupName);
|
|
7948
7948
|
}), !n && this.createGroup(this.defaultGroupName, "top");
|
|
7949
7949
|
}
|
|
7950
7950
|
/**
|
|
@@ -8048,16 +8048,16 @@ class Oi {
|
|
|
8048
8048
|
try {
|
|
8049
8049
|
const o = this.tableBuilder.config.loadMethod;
|
|
8050
8050
|
if (Be(o)) {
|
|
8051
|
-
const { data: n, total: a, records: u, count: s } = await o(Re(e, "total")) ?? {},
|
|
8052
|
-
if (!
|
|
8053
|
-
const
|
|
8054
|
-
if (e.current >
|
|
8051
|
+
const { data: n, total: a, records: u, count: s } = await o(Re(e, "total")) ?? {}, r = n || u || [], l = Number(a || s || 0), c = !l || isNaN(l);
|
|
8052
|
+
if (!r.length && e.current > 1 && !c) {
|
|
8053
|
+
const i = Math.ceil(l / e.size);
|
|
8054
|
+
if (e.current > i)
|
|
8055
8055
|
return this.updatePagination({
|
|
8056
|
-
current:
|
|
8056
|
+
current: i
|
|
8057
8057
|
}), this.loadData(e);
|
|
8058
8058
|
}
|
|
8059
|
-
this.update(
|
|
8060
|
-
total:
|
|
8059
|
+
this.update(r), this.updatePagination({
|
|
8060
|
+
total: c ? 0 : l
|
|
8061
8061
|
}), await Y(), this.tableBuilder.triggerEvent("loaded");
|
|
8062
8062
|
} else
|
|
8063
8063
|
this.stopEffect = at(() => {
|
|
@@ -8119,9 +8119,9 @@ class zi {
|
|
|
8119
8119
|
if (this.emitFnc || (this.emitFnc = e), !Array.isArray(o) || !o?.length)
|
|
8120
8120
|
return {};
|
|
8121
8121
|
const a = n || ((s) => s), u = new Set(Object.keys(this.events));
|
|
8122
|
-
return o.reduce((s,
|
|
8123
|
-
this.events[
|
|
8124
|
-
|
|
8122
|
+
return o.reduce((s, r) => (u.has(r) && Reflect.set(s, a(r), (...l) => {
|
|
8123
|
+
this.events[r].forEach((c) => {
|
|
8124
|
+
c.paused || c.callback(...l), e(r, ...l);
|
|
8125
8125
|
});
|
|
8126
8126
|
}), s), {});
|
|
8127
8127
|
}
|
|
@@ -8181,7 +8181,7 @@ class zi {
|
|
|
8181
8181
|
else {
|
|
8182
8182
|
const a = this.idEventMap.get(e);
|
|
8183
8183
|
if (a) {
|
|
8184
|
-
const u = this.events[a], s = u.findIndex((
|
|
8184
|
+
const u = this.events[a], s = u.findIndex((r) => r.id === e);
|
|
8185
8185
|
s > -1 && u.splice(s, 1);
|
|
8186
8186
|
}
|
|
8187
8187
|
}
|
|
@@ -8443,33 +8443,35 @@ class Hi {
|
|
|
8443
8443
|
const Ui = (t, e) => {
|
|
8444
8444
|
if (!Array.isArray(t))
|
|
8445
8445
|
throw new Error("columns must be an array.");
|
|
8446
|
-
const o = G(
|
|
8446
|
+
const { formBuilder: o, ...n } = e || {}, a = G(
|
|
8447
8447
|
new Hi(
|
|
8448
|
-
t.map((
|
|
8449
|
-
const
|
|
8448
|
+
t.map((r) => {
|
|
8449
|
+
const l = {
|
|
8450
8450
|
defaultChecked: !0,
|
|
8451
8451
|
// 如果设置了 _render 则不显示 showOverflowTooltip
|
|
8452
|
-
showOverflowTooltip: !
|
|
8452
|
+
showOverflowTooltip: !r._render || !Reflect.has(r, "contentRender")
|
|
8453
8453
|
};
|
|
8454
|
-
return
|
|
8454
|
+
return r.prop ? { ...l, ...r } : r;
|
|
8455
8455
|
}),
|
|
8456
|
-
|
|
8456
|
+
n
|
|
8457
8457
|
)
|
|
8458
|
-
),
|
|
8459
|
-
|
|
8460
|
-
},
|
|
8461
|
-
|
|
8458
|
+
), u = (r, l) => {
|
|
8459
|
+
a.value.registerEvent(r, l);
|
|
8460
|
+
}, s = (r) => {
|
|
8461
|
+
a.value.refresh(r);
|
|
8462
8462
|
};
|
|
8463
|
-
return {
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8463
|
+
return o && o.onChange(() => {
|
|
8464
|
+
s();
|
|
8465
|
+
}), {
|
|
8466
|
+
tableBuilder: d(a),
|
|
8467
|
+
registerEvent: u,
|
|
8468
|
+
refresh: s
|
|
8467
8469
|
};
|
|
8468
8470
|
}, bc = (t, e) => Ui(t, { ...e, enableVirtualScroll: !0 }), yc = () => {
|
|
8469
|
-
const t = na("listenElementRef"), e = () => t?.value || document.body, o = [], n = (u, s,
|
|
8470
|
-
o.push({ event: u, fn: s, options:
|
|
8471
|
+
const t = na("listenElementRef"), e = () => t?.value || document.body, o = [], n = (u, s, r) => {
|
|
8472
|
+
o.push({ event: u, fn: s, options: r }), e().addEventListener(u, s, r);
|
|
8471
8473
|
}, a = () => {
|
|
8472
|
-
o.forEach(({ event: u, fn: s, options:
|
|
8474
|
+
o.forEach(({ event: u, fn: s, options: r }) => e().removeEventListener(u, s, r)), o.length = 0;
|
|
8473
8475
|
};
|
|
8474
8476
|
return nt(a), bt() && yt(a), {
|
|
8475
8477
|
stops: a,
|