@kayak-sj/design 1.0.63 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/k-form/composables/useKFormFields.d.ts +1 -1
- package/dist/components/k-form/types.d.ts +7 -3
- package/dist/index.js +314 -307
- package/package.json +4 -4
- package/src/styles/components/_k-form.scss +46 -4
- package/src/styles/tokens/_css-vars.scss +2 -2
- package/src/styles/tokens/_semantic.scss +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./chunks/componentRegistry-03Qq9Fqk.js";
|
|
2
2
|
import { t as _ } from "./chunks/_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
-
import { a as v, d as y, i as b, l as
|
|
4
|
-
import { Fragment as S, Transition as
|
|
3
|
+
import { a as v, d as y, i as b, l as x, n as ee, r as te, u as ne } from "./chunks/editorValue-DSKvW8ty.js";
|
|
4
|
+
import { Fragment as S, Transition as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as k, createTextVNode as A, createVNode as j, defineComponent as M, guardReactiveProps as re, h as N, inject as ie, mergeDefaults as ae, mergeProps as P, nextTick as F, normalizeClass as I, normalizeProps as oe, normalizeStyle as se, onBeforeUnmount as ce, onMounted as le, openBlock as L, provide as ue, reactive as de, ref as R, renderList as z, renderSlot as B, resolveComponent as fe, resolveDirective as pe, resolveDynamicComponent as me, shallowRef as he, toDisplayString as V, toRef as H, toValue as U, unref as W, useAttrs as ge, useSlots as G, useTemplateRef as _e, watch as K, withCtx as q, withDirectives as ve, withModifiers as ye } from "vue";
|
|
5
5
|
import { ElButton as be, ElCard as xe, ElCheckbox as Se, ElCollapse as Ce, ElCollapseItem as we, ElDivider as Te, ElForm as Ee, ElFormItem as De, ElIcon as Oe, ElMessage as ke, ElPagination as Ae, ElPopover as je, ElRadio as Me, ElTable as Ne, ElTableColumn as J, ElTooltip as Pe } from "element-plus";
|
|
6
6
|
import Fe from "dayjs";
|
|
7
7
|
import { useLocalStorage as Ie, useResizeObserver as Le } from "@vueuse/core";
|
|
@@ -21,11 +21,11 @@ var He = Object.defineProperty, Ue = (e, t) => {
|
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/utils/createStubComponent.ts
|
|
23
23
|
function We(e) {
|
|
24
|
-
return
|
|
24
|
+
return M({
|
|
25
25
|
name: e,
|
|
26
26
|
inheritAttrs: !0,
|
|
27
27
|
setup(t, { attrs: n, slots: r }) {
|
|
28
|
-
return () =>
|
|
28
|
+
return () => N("div", {
|
|
29
29
|
class: "k-design-stub",
|
|
30
30
|
"data-component": e,
|
|
31
31
|
...n
|
|
@@ -34,11 +34,11 @@ function We(e) {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
function Ge(e) {
|
|
37
|
-
return
|
|
37
|
+
return M({
|
|
38
38
|
name: `LucideStub_${e}`,
|
|
39
39
|
inheritAttrs: !0,
|
|
40
40
|
setup(t, { attrs: n }) {
|
|
41
|
-
return () =>
|
|
41
|
+
return () => N("span", {
|
|
42
42
|
class: "k-icon k-icon--stub",
|
|
43
43
|
style: {
|
|
44
44
|
display: "inline-flex",
|
|
@@ -69,7 +69,7 @@ function qe(e) {
|
|
|
69
69
|
return e.value?.$el ?? null;
|
|
70
70
|
}
|
|
71
71
|
function Je(e) {
|
|
72
|
-
let t = R(Math.max(1, e.colLength.value)), n =
|
|
72
|
+
let t = R(Math.max(1, e.colLength.value)), n = w(() => qe(e.formRef));
|
|
73
73
|
function r() {
|
|
74
74
|
if (!e.enabled.value) {
|
|
75
75
|
t.value = Math.max(1, e.colLength.value);
|
|
@@ -90,7 +90,7 @@ function Je(e) {
|
|
|
90
90
|
e.enabled,
|
|
91
91
|
n
|
|
92
92
|
], async () => {
|
|
93
|
-
await
|
|
93
|
+
await F(), r();
|
|
94
94
|
}, { immediate: !0 }), { effectiveCols: t };
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
@@ -139,7 +139,7 @@ function Qe(e) {
|
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region src/components/k-form/composables/useKFormFields.ts
|
|
141
141
|
function $e(e) {
|
|
142
|
-
let t =
|
|
142
|
+
let t = ie(l, null), n = w(() => e.formConfigs.value.filter((e) => e.display === void 0 || e.display)), r = w(() => e.layout.value.hideLabel ? n.value.map((e) => {
|
|
143
143
|
let t = Y(e);
|
|
144
144
|
return t.componentProps ||= {}, typeof t.component == "string" && [
|
|
145
145
|
"Input",
|
|
@@ -220,7 +220,7 @@ function rt(e, t) {
|
|
|
220
220
|
return n == null ? et(e) : tt(e, n, t);
|
|
221
221
|
}
|
|
222
222
|
function it(e) {
|
|
223
|
-
let t =
|
|
223
|
+
let t = de({}), n = {}, r = null, i = w(() => {
|
|
224
224
|
let t = /* @__PURE__ */ new Map();
|
|
225
225
|
return e.formConfigs.value.forEach((e) => t.set(e.id, e)), t;
|
|
226
226
|
});
|
|
@@ -230,7 +230,7 @@ function it(e) {
|
|
|
230
230
|
component: "Input"
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
-
let o =
|
|
233
|
+
let o = w(() => {
|
|
234
234
|
let t = "", n = "";
|
|
235
235
|
return e.formConfigs.value.forEach((e) => {
|
|
236
236
|
t += `${e.id}\0`, n += `${e.id}:${e.display === !1 ? 0 : 1}\0`;
|
|
@@ -385,7 +385,7 @@ function st(e) {
|
|
|
385
385
|
}
|
|
386
386
|
//#endregion
|
|
387
387
|
//#region src/components/k-form/KFormField.vue
|
|
388
|
-
var ct = /* @__PURE__ */
|
|
388
|
+
var ct = /* @__PURE__ */ M({
|
|
389
389
|
name: "KFormField",
|
|
390
390
|
__name: "KFormField",
|
|
391
391
|
props: {
|
|
@@ -397,7 +397,7 @@ var ct = /* @__PURE__ */ j({
|
|
|
397
397
|
},
|
|
398
398
|
emits: ["update:modelValue"],
|
|
399
399
|
setup(e, { emit: t }) {
|
|
400
|
-
let n = e, r = t, i =
|
|
400
|
+
let n = e, r = t, i = w(() => st(n.item.component)), a = w(() => at(n.item.component) ? n.item.component : ""), o = w(() => {
|
|
401
401
|
let e = { ...n.item.componentProps ?? {} };
|
|
402
402
|
return delete e.value, delete e.onChange, delete e.style, delete e.readonly, delete e.disabled, [
|
|
403
403
|
"Complex",
|
|
@@ -407,7 +407,7 @@ var ct = /* @__PURE__ */ j({
|
|
|
407
407
|
...e,
|
|
408
408
|
componentType: a.value
|
|
409
409
|
};
|
|
410
|
-
}), s =
|
|
410
|
+
}), s = w(() => {
|
|
411
411
|
if (![
|
|
412
412
|
"Complex",
|
|
413
413
|
"ScrollSelect",
|
|
@@ -417,7 +417,7 @@ var ct = /* @__PURE__ */ j({
|
|
|
417
417
|
function c(e) {
|
|
418
418
|
r("update:modelValue", e);
|
|
419
419
|
}
|
|
420
|
-
return (t, n) => (
|
|
420
|
+
return (t, n) => (L(), T(me(i.value), P({
|
|
421
421
|
"model-value": e.modelValue,
|
|
422
422
|
options: s.value,
|
|
423
423
|
readonly: e.readonly,
|
|
@@ -433,13 +433,13 @@ var ct = /* @__PURE__ */ j({
|
|
|
433
433
|
key: 0,
|
|
434
434
|
class: "k-form__row-fill",
|
|
435
435
|
"aria-hidden": "true"
|
|
436
|
-
}, dt = /* @__PURE__ */
|
|
436
|
+
}, dt = /* @__PURE__ */ M({
|
|
437
437
|
name: "KForm",
|
|
438
438
|
inheritAttrs: !1,
|
|
439
439
|
__name: "KForm",
|
|
440
440
|
props: {
|
|
441
441
|
formConfigs: {},
|
|
442
|
-
colLength: { default:
|
|
442
|
+
colLength: { default: 1 },
|
|
443
443
|
inline: {
|
|
444
444
|
type: Boolean,
|
|
445
445
|
default: !1
|
|
@@ -468,7 +468,7 @@ var ct = /* @__PURE__ */ j({
|
|
|
468
468
|
emits: ["update:modelValue", "change"],
|
|
469
469
|
setup(e, { expose: t, emit: n }) {
|
|
470
470
|
let i = G(), a = e, o = n, s = ge(), c = R(), l = R({});
|
|
471
|
-
|
|
471
|
+
ue(r, l);
|
|
472
472
|
function u(e) {
|
|
473
473
|
if (e == null || e === "") return;
|
|
474
474
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
@@ -488,29 +488,29 @@ var ct = /* @__PURE__ */ j({
|
|
|
488
488
|
function f(e) {
|
|
489
489
|
return at(e.component) && e.component === "DatePicker";
|
|
490
490
|
}
|
|
491
|
-
let p =
|
|
491
|
+
let p = w(() => a.labelWidth ? a.labelWidth : a.autoLayout ? "120px" : "110px"), m = w(() => ({
|
|
492
492
|
colLength: a.colLength,
|
|
493
493
|
inline: a.inline,
|
|
494
494
|
labelWidth: p.value,
|
|
495
495
|
labelPosition: a.labelPosition,
|
|
496
496
|
autoLayout: a.autoLayout,
|
|
497
497
|
hideLabel: a.hideLabel
|
|
498
|
-
})), h =
|
|
498
|
+
})), h = w(() => ({
|
|
499
499
|
"k-form--inline-layout": a.inline,
|
|
500
500
|
"k-form--query-layout": a.autoLayout,
|
|
501
501
|
"k-form--grid-layout": !a.autoLayout && !a.inline
|
|
502
|
-
})), g =
|
|
502
|
+
})), g = w(() => !a.autoLayout && !a.inline), { effectiveCols: _ } = Je({
|
|
503
503
|
formRef: c,
|
|
504
|
-
colLength:
|
|
504
|
+
colLength: w(() => a.colLength),
|
|
505
505
|
labelWidth: p,
|
|
506
506
|
enabled: g
|
|
507
|
-
}), v =
|
|
507
|
+
}), v = w(() => ({
|
|
508
508
|
"--k-form-cols": String(a.colLength),
|
|
509
509
|
"--k-form-effective-cols": String(_.value),
|
|
510
510
|
"--k-form-label-width": p.value,
|
|
511
511
|
"--k-form-grid-min-col": "calc(var(--k-form-label-width) + var(--k-form-control-min-width))",
|
|
512
|
-
"--k-form-min-width": "calc(var(--k-form-label-width) + var(--k-form-control-
|
|
513
|
-
})), y =
|
|
512
|
+
"--k-form-min-width": "calc(var(--k-form-label-width) + var(--k-form-control-min-width) + var(--k-form-padding-x) * 2)"
|
|
513
|
+
})), y = w(() => a.modelValue !== void 0), b = it({
|
|
514
514
|
formConfigs: H(a, "formConfigs"),
|
|
515
515
|
data: H(a, "data"),
|
|
516
516
|
modelValue: H(a, "modelValue"),
|
|
@@ -519,29 +519,32 @@ var ct = /* @__PURE__ */ j({
|
|
|
519
519
|
o("change", e), y.value && o("update:modelValue", e);
|
|
520
520
|
}
|
|
521
521
|
});
|
|
522
|
-
function
|
|
522
|
+
function x() {
|
|
523
523
|
let e = {};
|
|
524
524
|
a.formConfigs.forEach((t) => {
|
|
525
525
|
f(t) && (e[`kitDate-${t.id}`] = u(b.formModel[t.id]));
|
|
526
526
|
}), l.value = e;
|
|
527
527
|
}
|
|
528
|
-
let { normalizedConfigs:
|
|
528
|
+
let { normalizedConfigs: ee, getFieldOptions: te, resolveItemRules: ne, itemStyle: C, itemDisplay: M, isItemReadonly: re, isItemDisabled: N } = $e({
|
|
529
529
|
formConfigs: H(a, "formConfigs"),
|
|
530
530
|
layout: m,
|
|
531
531
|
formReadonly: H(a, "readonly")
|
|
532
532
|
});
|
|
533
|
-
K(() => a.formConfigs, () =>
|
|
533
|
+
K(() => a.formConfigs, () => x(), {
|
|
534
534
|
immediate: !0,
|
|
535
535
|
deep: !0
|
|
536
|
-
}), K(() => b.formModel, () =>
|
|
536
|
+
}), K(() => b.formModel, () => x(), { deep: !0 });
|
|
537
|
+
function ie(e) {
|
|
538
|
+
return typeof e == "number" ? `${e}px` : e;
|
|
539
|
+
}
|
|
537
540
|
function ae(e) {
|
|
538
|
-
let t =
|
|
539
|
-
|
|
540
|
-
...re(e),
|
|
541
|
+
let t = M(e), n = {
|
|
542
|
+
...C(e) ?? {},
|
|
541
543
|
...t ? { display: t } : {}
|
|
542
544
|
};
|
|
545
|
+
return e.controlWidth && e.controlWidth !== "full" && (n["--k-form-field-control-max"] = ie(e.controlWidth)), n;
|
|
543
546
|
}
|
|
544
|
-
let oe =
|
|
547
|
+
let oe = w(() => {
|
|
545
548
|
let e = { ...s };
|
|
546
549
|
return delete e.readonly, {
|
|
547
550
|
inline: a.inline && !a.autoLayout,
|
|
@@ -550,105 +553,109 @@ var ct = /* @__PURE__ */ j({
|
|
|
550
553
|
...e
|
|
551
554
|
};
|
|
552
555
|
});
|
|
553
|
-
function
|
|
556
|
+
function ce(e, t) {
|
|
554
557
|
b.updateFieldValue(e, t), f(e) && d(e.id, t), le(e);
|
|
555
558
|
}
|
|
556
559
|
function le(e) {
|
|
557
560
|
if (!c.value) return;
|
|
558
|
-
let t = e.validatePeers ?? [], n =
|
|
559
|
-
!n && !t.length ||
|
|
561
|
+
let t = e.validatePeers ?? [], n = ne(e).length > 0;
|
|
562
|
+
!n && !t.length || F(() => {
|
|
560
563
|
n && c.value?.validateField(e.id).catch(() => {});
|
|
561
564
|
for (let e of t) c.value?.validateField(e).catch(() => {});
|
|
562
565
|
});
|
|
563
566
|
}
|
|
564
|
-
async function
|
|
567
|
+
async function de() {
|
|
565
568
|
let e = b.getVisibleFieldsValue();
|
|
566
569
|
if (!c.value) return e;
|
|
567
570
|
try {
|
|
568
|
-
return await c.value.validate() === !1 ? a.ignoreValidate ? (c.value.clearValidate(), e) : (
|
|
571
|
+
return await c.value.validate() === !1 ? a.ignoreValidate ? (c.value.clearValidate(), e) : (fe(), null) : e;
|
|
569
572
|
} catch {
|
|
570
|
-
return a.ignoreValidate ? (c.value.clearValidate(), e) : (
|
|
573
|
+
return a.ignoreValidate ? (c.value.clearValidate(), e) : (fe(), null);
|
|
571
574
|
}
|
|
572
575
|
}
|
|
573
|
-
function
|
|
576
|
+
function fe() {
|
|
574
577
|
((c.value?.$el)?.querySelector(".el-form-item.is-error") ?? document.querySelector(".k-form .el-form-item.is-error"))?.scrollIntoView({
|
|
575
578
|
block: "center",
|
|
576
579
|
behavior: "smooth"
|
|
577
580
|
});
|
|
578
581
|
}
|
|
579
|
-
function
|
|
582
|
+
function pe(e) {
|
|
580
583
|
return b.getFieldsValue(e);
|
|
581
584
|
}
|
|
582
|
-
function
|
|
585
|
+
function me() {
|
|
583
586
|
return b.getVisibleFieldsValue();
|
|
584
587
|
}
|
|
585
|
-
function
|
|
588
|
+
function he(e) {
|
|
586
589
|
b.setFieldsValue(e);
|
|
587
590
|
}
|
|
588
|
-
function
|
|
591
|
+
function U() {
|
|
589
592
|
c.value?.resetFields(), b.resetFormModel();
|
|
590
593
|
}
|
|
591
|
-
function
|
|
594
|
+
function _e(e) {
|
|
592
595
|
b.resetFieldsValue(e), e.forEach((e) => c.value?.clearValidate(e));
|
|
593
596
|
}
|
|
594
|
-
function
|
|
597
|
+
function ve() {
|
|
595
598
|
c.value?.clearValidate();
|
|
596
599
|
}
|
|
597
|
-
function
|
|
600
|
+
function be() {
|
|
598
601
|
return c.value;
|
|
599
602
|
}
|
|
600
|
-
let
|
|
603
|
+
let xe = /* @__PURE__ */ new Set([
|
|
601
604
|
"Editor",
|
|
602
605
|
"Upload",
|
|
603
606
|
"Radio",
|
|
604
607
|
"Checkbox",
|
|
605
608
|
"Tag"
|
|
606
609
|
]);
|
|
607
|
-
function xe(e) {
|
|
608
|
-
return e.newLineStart ? !at(e.component) || be.has(e.component) ? !0 : e.component === "DatePicker" && String(e.componentProps?.type ?? "").includes("range") : !1;
|
|
609
|
-
}
|
|
610
610
|
function Se(e) {
|
|
611
|
-
return !!e.newLineStart
|
|
611
|
+
return e.controlWidth === "full" ? !0 : e.controlWidth != null && e.controlWidth !== "full" ? !!e.newLineStart : e.newLineStart ? e.slot || !at(e.component) || xe.has(e.component) ? !0 : e.component === "DatePicker" && String(e.componentProps?.type ?? "").includes("range") : !1;
|
|
612
|
+
}
|
|
613
|
+
function Ce(e) {
|
|
614
|
+
return _.value <= 1 ? !1 : !!e.newLineStart && !Se(e);
|
|
615
|
+
}
|
|
616
|
+
function we(e) {
|
|
617
|
+
return !!(e.controlWidth && e.controlWidth !== "full");
|
|
612
618
|
}
|
|
613
619
|
return t({
|
|
614
|
-
validateFields:
|
|
615
|
-
getFieldsValue:
|
|
616
|
-
getParams:
|
|
617
|
-
setFieldsValue:
|
|
618
|
-
resetForm:
|
|
619
|
-
resetFieldsValue:
|
|
620
|
-
getFormRef:
|
|
621
|
-
clearValidate:
|
|
622
|
-
}), (e, t) => (
|
|
620
|
+
validateFields: de,
|
|
621
|
+
getFieldsValue: pe,
|
|
622
|
+
getParams: me,
|
|
623
|
+
setFieldsValue: he,
|
|
624
|
+
resetForm: U,
|
|
625
|
+
resetFieldsValue: _e,
|
|
626
|
+
getFormRef: be,
|
|
627
|
+
clearValidate: ve
|
|
628
|
+
}), (e, t) => (L(), T(W(Ee), P({
|
|
623
629
|
ref_key: "formRef",
|
|
624
630
|
ref: c,
|
|
625
631
|
class: ["k-form", h.value],
|
|
626
632
|
style: v.value,
|
|
627
633
|
model: W(b).formModel
|
|
628
634
|
}, oe.value, { onSubmit: t[0] ||= ye(() => {}, ["prevent"]) }), {
|
|
629
|
-
default: q(() => [(
|
|
635
|
+
default: q(() => [(L(!0), D(S, null, z(W(ee), (n) => (L(), D(S, { key: n.id }, [j(W(De), {
|
|
630
636
|
"data-label": n.label || "",
|
|
631
637
|
"data-field-id": n.id,
|
|
632
638
|
label: n.label ? `${n.label}:` : void 0,
|
|
633
639
|
prop: n.id,
|
|
634
|
-
rules: W(
|
|
635
|
-
class:
|
|
636
|
-
"k-form__item--readonly": W(
|
|
637
|
-
"k-form__item--disabled": W(
|
|
638
|
-
"k-form__item--full-row":
|
|
639
|
-
"k-form__item--row-start":
|
|
640
|
+
rules: W(ne)(n),
|
|
641
|
+
class: I(["k-form__item", [n.class, {
|
|
642
|
+
"k-form__item--readonly": W(re)(n),
|
|
643
|
+
"k-form__item--disabled": W(N)(n),
|
|
644
|
+
"k-form__item--full-row": Se(n),
|
|
645
|
+
"k-form__item--row-start": Ce(n),
|
|
646
|
+
"k-form__item--control-width": we(n),
|
|
640
647
|
"k-form__item--choice": W(at)(n.component) && (n.component === "Radio" || n.component === "Checkbox" || n.component === "Tag")
|
|
641
648
|
}]]),
|
|
642
|
-
style:
|
|
643
|
-
},
|
|
644
|
-
default: q(() => [!n.slot || !W(i)[n.id] ? (
|
|
649
|
+
style: se(ae(n))
|
|
650
|
+
}, k({
|
|
651
|
+
default: q(() => [!n.slot || !W(i)[n.id] ? (L(), T(ct, {
|
|
645
652
|
key: 0,
|
|
646
653
|
item: n,
|
|
647
654
|
"model-value": W(b).formModel[n.id],
|
|
648
|
-
options: W(
|
|
649
|
-
readonly: W(
|
|
650
|
-
disabled: W(
|
|
651
|
-
"onUpdate:modelValue": (e) =>
|
|
655
|
+
options: W(te)(n),
|
|
656
|
+
readonly: W(re)(n),
|
|
657
|
+
disabled: W(N)(n),
|
|
658
|
+
"onUpdate:modelValue": (e) => ce(n, e)
|
|
652
659
|
}, null, 8, [
|
|
653
660
|
"item",
|
|
654
661
|
"model-value",
|
|
@@ -659,23 +666,23 @@ var ct = /* @__PURE__ */ j({
|
|
|
659
666
|
])) : B(e.$slots, n.id, {
|
|
660
667
|
item: n,
|
|
661
668
|
value: W(b).formModel[n.id],
|
|
662
|
-
updateValue: (e) =>
|
|
669
|
+
updateValue: (e) => ce(n, e)
|
|
663
670
|
}, void 0, void 0, 1)]),
|
|
664
671
|
_: 2
|
|
665
672
|
}, [n.toolTip ? {
|
|
666
673
|
name: "label",
|
|
667
|
-
fn: q(() => [
|
|
674
|
+
fn: q(() => [j(W(Pe), {
|
|
668
675
|
effect: "dark",
|
|
669
676
|
placement: "bottom",
|
|
670
677
|
"popper-class": "k-form__tooltip"
|
|
671
678
|
}, {
|
|
672
|
-
content: q(() => [
|
|
673
|
-
default: q(() => [t[1] ||=
|
|
679
|
+
content: q(() => [O("span", { innerHTML: n.toolTip }, null, 8, lt)]),
|
|
680
|
+
default: q(() => [t[1] ||= O("span", {
|
|
674
681
|
class: "k-form__tip-icon",
|
|
675
682
|
"aria-hidden": "true"
|
|
676
683
|
}, "i", -1)]),
|
|
677
684
|
_: 2
|
|
678
|
-
}, 1024),
|
|
685
|
+
}, 1024), A(" " + V(n.label ? `${n.label}:` : ""), 1)]),
|
|
679
686
|
key: "0"
|
|
680
687
|
} : void 0]), 1032, [
|
|
681
688
|
"data-label",
|
|
@@ -685,7 +692,7 @@ var ct = /* @__PURE__ */ j({
|
|
|
685
692
|
"rules",
|
|
686
693
|
"class",
|
|
687
694
|
"style"
|
|
688
|
-
]),
|
|
695
|
+
]), Ce(n) && W(_) > 1 ? (L(), D("div", ut)) : E("", !0)], 64))), 128)), B(e.$slots, "default")]),
|
|
689
696
|
_: 3
|
|
690
697
|
}, 16, [
|
|
691
698
|
"class",
|
|
@@ -718,7 +725,7 @@ function pt(e, t) {
|
|
|
718
725
|
}
|
|
719
726
|
function mt(e, t, n = {}) {
|
|
720
727
|
let { excludeHidden: r = !1 } = n;
|
|
721
|
-
return
|
|
728
|
+
return w(() => {
|
|
722
729
|
let n = U(t), i = U(e).map((e) => pt(e, n));
|
|
723
730
|
return r ? i.filter((e) => e.display !== !1) : i;
|
|
724
731
|
});
|
|
@@ -748,7 +755,7 @@ var gt = { class: "k-handle-page" }, _t = {
|
|
|
748
755
|
}, bt = { class: "k-handle-page__loading-inner" }, xt = {
|
|
749
756
|
key: 1,
|
|
750
757
|
class: "k-handle-page__footer"
|
|
751
|
-
}, St = /* @__PURE__ */
|
|
758
|
+
}, St = /* @__PURE__ */ M({
|
|
752
759
|
name: "KHandlePage",
|
|
753
760
|
inheritAttrs: !1,
|
|
754
761
|
__name: "KHandlePage",
|
|
@@ -785,7 +792,7 @@ var gt = { class: "k-handle-page" }, _t = {
|
|
|
785
792
|
},
|
|
786
793
|
emits: ["cancel", "submit"],
|
|
787
794
|
setup(t, { emit: n }) {
|
|
788
|
-
let r = t, i = n, a = G(), o = R(!1), s =
|
|
795
|
+
let r = t, i = n, a = G(), o = R(!1), s = w(() => ({ gap: typeof r.gap == "number" ? `${r.gap}px` : r.gap })), c = w(() => r.cancelText === !1 ? "" : r.cancelText || "取消"), l = w(() => r.submitText === !1 ? "" : r.submitText || "确定"), u = w(() => r.cancelText !== !1), d = w(() => r.showSubmit && r.submitText !== !1), f = w(() => r.submitLoading || r.loading || o.value), p = w(() => !!a.header);
|
|
789
796
|
async function m() {
|
|
790
797
|
if (!f.value) {
|
|
791
798
|
if (r.onSubmit) {
|
|
@@ -800,36 +807,36 @@ var gt = { class: "k-handle-page" }, _t = {
|
|
|
800
807
|
i("submit");
|
|
801
808
|
}
|
|
802
809
|
}
|
|
803
|
-
return (n, r) => (
|
|
804
|
-
p.value ? (
|
|
805
|
-
|
|
806
|
-
default: q(() => [t.loading ? (
|
|
810
|
+
return (n, r) => (L(), D("div", gt, [
|
|
811
|
+
p.value ? (L(), D("header", _t, [B(n.$slots, "header")])) : E("", !0),
|
|
812
|
+
O("div", vt, [j(C, { name: "k-handle-page-loading" }, {
|
|
813
|
+
default: q(() => [t.loading ? (L(), D("div", yt, [O("div", bt, [j(W(Oe), {
|
|
807
814
|
class: "k-handle-page__loading-icon is-loading",
|
|
808
815
|
size: 32
|
|
809
816
|
}, {
|
|
810
|
-
default: q(() => [
|
|
817
|
+
default: q(() => [j(W(Re))]),
|
|
811
818
|
_: 1
|
|
812
|
-
}), r[1] ||=
|
|
819
|
+
}), r[1] ||= O("span", { class: "k-handle-page__loading-text" }, "加载中...", -1)])])) : E("", !0)]),
|
|
813
820
|
_: 1
|
|
814
|
-
}),
|
|
815
|
-
class:
|
|
816
|
-
style:
|
|
821
|
+
}), O("div", {
|
|
822
|
+
class: I(["k-handle-page__content", { "k-handle-page__content--loading": t.loading }]),
|
|
823
|
+
style: se(s.value)
|
|
817
824
|
}, [B(n.$slots, "default")], 6)]),
|
|
818
|
-
t.showFooter ? (
|
|
825
|
+
t.showFooter ? (L(), D("footer", xt, [B(n.$slots, "footer", {}, () => [u.value ? (L(), T(e, {
|
|
819
826
|
key: 0,
|
|
820
827
|
onClick: r[0] ||= (e) => i("cancel")
|
|
821
828
|
}, {
|
|
822
|
-
default: q(() => [
|
|
829
|
+
default: q(() => [A(V(c.value), 1)]),
|
|
823
830
|
_: 1
|
|
824
|
-
})) :
|
|
831
|
+
})) : E("", !0), d.value ? (L(), T(e, {
|
|
825
832
|
key: 1,
|
|
826
833
|
type: "primary",
|
|
827
834
|
loading: f.value,
|
|
828
835
|
onClick: m
|
|
829
836
|
}, {
|
|
830
|
-
default: q(() => [
|
|
837
|
+
default: q(() => [A(V(l.value), 1)]),
|
|
831
838
|
_: 1
|
|
832
|
-
}, 8, ["loading"])) :
|
|
839
|
+
}, 8, ["loading"])) : E("", !0)])])) : E("", !0)
|
|
833
840
|
]));
|
|
834
841
|
}
|
|
835
842
|
});
|
|
@@ -845,7 +852,7 @@ function Ct(e, t) {
|
|
|
845
852
|
n.value = !1;
|
|
846
853
|
}
|
|
847
854
|
}
|
|
848
|
-
return t?.immediate !== !1 &&
|
|
855
|
+
return t?.immediate !== !1 && le(() => {
|
|
849
856
|
r();
|
|
850
857
|
}), {
|
|
851
858
|
pageLoading: n,
|
|
@@ -877,7 +884,7 @@ function At() {
|
|
|
877
884
|
}
|
|
878
885
|
//#endregion
|
|
879
886
|
//#region src/components/k-icon/KIcon.vue
|
|
880
|
-
var jt = /*#__PURE__*/ _(/* @__PURE__ */
|
|
887
|
+
var jt = /*#__PURE__*/ _(/* @__PURE__ */ M({
|
|
881
888
|
name: "KIcon",
|
|
882
889
|
__name: "KIcon",
|
|
883
890
|
props: {
|
|
@@ -886,18 +893,18 @@ var jt = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
886
893
|
strokeWidth: { default: 2 }
|
|
887
894
|
},
|
|
888
895
|
setup(e) {
|
|
889
|
-
let t = e, n =
|
|
890
|
-
return (t, r) => n.value ? (
|
|
896
|
+
let t = e, n = w(() => Dt(t.name));
|
|
897
|
+
return (t, r) => n.value ? (L(), T(me(n.value), {
|
|
891
898
|
key: 0,
|
|
892
899
|
class: "k-icon",
|
|
893
900
|
size: e.size,
|
|
894
901
|
"stroke-width": e.strokeWidth
|
|
895
|
-
}, null, 8, ["size", "stroke-width"])) :
|
|
902
|
+
}, null, 8, ["size", "stroke-width"])) : E("", !0);
|
|
896
903
|
}
|
|
897
904
|
}), [["__scopeId", "data-v-6fd081ab"]]), Mt = { class: "k-link-button__item" }, Nt = {
|
|
898
905
|
key: 0,
|
|
899
906
|
class: "k-link-button__divider"
|
|
900
|
-
}, Pt = ["onClick"], Ft = /* @__PURE__ */
|
|
907
|
+
}, Pt = ["onClick"], Ft = /* @__PURE__ */ M({
|
|
901
908
|
name: "KLinkButton",
|
|
902
909
|
__name: "KLinkButton",
|
|
903
910
|
props: {
|
|
@@ -914,7 +921,7 @@ var jt = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
914
921
|
},
|
|
915
922
|
emits: ["click"],
|
|
916
923
|
setup(e, { emit: t }) {
|
|
917
|
-
let n = e, r = t, i =
|
|
924
|
+
let n = e, r = t, i = w(() => n.data.filter((e) => e.isDisplay !== !1));
|
|
918
925
|
function a(e) {
|
|
919
926
|
return n.disabled && e.label !== "查看";
|
|
920
927
|
}
|
|
@@ -930,23 +937,23 @@ var jt = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
930
937
|
function l(e) {
|
|
931
938
|
return typeof e.slot == "string" ? e.slot : "default";
|
|
932
939
|
}
|
|
933
|
-
return (t, n) => (
|
|
940
|
+
return (t, n) => (L(), D("div", {
|
|
934
941
|
class: "k-link-button",
|
|
935
|
-
style:
|
|
936
|
-
}, [(
|
|
942
|
+
style: se({ justifyContent: e.align })
|
|
943
|
+
}, [(L(!0), D(S, null, z(i.value, (e, n) => (L(), T(W(Pe), {
|
|
937
944
|
key: `${e.label}-${n}`,
|
|
938
945
|
content: e.tooltip,
|
|
939
946
|
placement: "top",
|
|
940
947
|
disabled: !e.tooltip
|
|
941
948
|
}, {
|
|
942
|
-
default: q(() => [
|
|
943
|
-
class:
|
|
949
|
+
default: q(() => [O("div", Mt, [n > 0 ? (L(), D("span", Nt)) : E("", !0), O("a", {
|
|
950
|
+
class: I(["k-link-button__btn", [o(e), { "k-link-button__btn--readonly": a(e) }]]),
|
|
944
951
|
onClick: ye((t) => s(e, n), ["prevent"])
|
|
945
|
-
}, [c(e) ? B(t.$slots, l(e), { item: e }, () => [
|
|
952
|
+
}, [c(e) ? B(t.$slots, l(e), { item: e }, () => [A(V(e.label), 1)], void 0, 0) : (L(), D(S, { key: 1 }, [A(V(e.label), 1)], 64))], 10, Pt)])]),
|
|
946
953
|
_: 2
|
|
947
954
|
}, 1032, ["content", "disabled"]))), 128))], 4));
|
|
948
955
|
}
|
|
949
|
-
}), It = /* @__PURE__ */
|
|
956
|
+
}), It = /* @__PURE__ */ M({
|
|
950
957
|
name: "KPagination",
|
|
951
958
|
__name: "KPagination",
|
|
952
959
|
props: {
|
|
@@ -966,7 +973,7 @@ var jt = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
966
973
|
] }
|
|
967
974
|
},
|
|
968
975
|
setup(e) {
|
|
969
|
-
return (t, n) => (
|
|
976
|
+
return (t, n) => (L(), T(W(Ae), P(t.$attrs, {
|
|
970
977
|
layout: e.layout,
|
|
971
978
|
"page-size": e.pageSize,
|
|
972
979
|
"page-sizes": e.pageSizes
|
|
@@ -976,7 +983,7 @@ var jt = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
976
983
|
"page-sizes"
|
|
977
984
|
]));
|
|
978
985
|
}
|
|
979
|
-
}), Lt = ["id"], Rt = { class: "k-long-page-panel__title" }, zt = { class: "k-long-page-panel__content" }, Bt = /*#__PURE__*/ _(/* @__PURE__ */
|
|
986
|
+
}), Lt = ["id"], Rt = { class: "k-long-page-panel__title" }, zt = { class: "k-long-page-panel__content" }, Bt = /*#__PURE__*/ _(/* @__PURE__ */ M({
|
|
980
987
|
name: "KLongPagePanel",
|
|
981
988
|
__name: "KLongPagePanel",
|
|
982
989
|
props: {
|
|
@@ -984,10 +991,10 @@ var jt = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
984
991
|
title: { default: "" }
|
|
985
992
|
},
|
|
986
993
|
setup(e) {
|
|
987
|
-
return (t, n) => (
|
|
994
|
+
return (t, n) => (L(), D("div", {
|
|
988
995
|
id: e.panelId || void 0,
|
|
989
996
|
class: "k-long-page-panel"
|
|
990
|
-
}, [
|
|
997
|
+
}, [O("div", Rt, V(e.title), 1), O("div", zt, [B(t.$slots, "default", {}, void 0, !0)])], 8, Lt));
|
|
991
998
|
}
|
|
992
999
|
}), [["__scopeId", "data-v-9d6e7832"]]), Vt = 4;
|
|
993
1000
|
function Ht(e) {
|
|
@@ -1012,7 +1019,7 @@ function Ht(e) {
|
|
|
1012
1019
|
function u() {
|
|
1013
1020
|
return i ? (i = !1, !0) : !1;
|
|
1014
1021
|
}
|
|
1015
|
-
return
|
|
1022
|
+
return ce(s), {
|
|
1016
1023
|
onPointerDown: l,
|
|
1017
1024
|
consumeClickIfDragged: u
|
|
1018
1025
|
};
|
|
@@ -1031,7 +1038,7 @@ function en(e) {
|
|
|
1031
1038
|
}
|
|
1032
1039
|
//#endregion
|
|
1033
1040
|
//#region src/components/k-long-page/KLongPage.vue?vue&type=script&setup=true&lang.ts
|
|
1034
|
-
var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__*/ _(/* @__PURE__ */
|
|
1041
|
+
var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__*/ _(/* @__PURE__ */ M({
|
|
1035
1042
|
name: "KLongPage",
|
|
1036
1043
|
__name: "KLongPage",
|
|
1037
1044
|
props: { panels: { default: () => [{
|
|
@@ -1045,18 +1052,18 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1045
1052
|
}
|
|
1046
1053
|
async function o(e) {
|
|
1047
1054
|
if (i()) return;
|
|
1048
|
-
await
|
|
1055
|
+
await F();
|
|
1049
1056
|
let n = t.value?.querySelector(`#${CSS.escape(e)}`);
|
|
1050
1057
|
(n?.querySelector(".k-long-page-panel__title") ?? n)?.scrollIntoView({
|
|
1051
1058
|
block: "start",
|
|
1052
1059
|
behavior: "smooth"
|
|
1053
1060
|
});
|
|
1054
1061
|
}
|
|
1055
|
-
return (i, s) => (
|
|
1062
|
+
return (i, s) => (L(), D("div", {
|
|
1056
1063
|
ref_key: "rootRef",
|
|
1057
1064
|
ref: t,
|
|
1058
1065
|
class: "k-long-page"
|
|
1059
|
-
}, [(
|
|
1066
|
+
}, [(L(!0), D(S, null, z(e.panels, (e) => (L(), T(Bt, {
|
|
1060
1067
|
key: e.name,
|
|
1061
1068
|
class: "k-long-page__panel",
|
|
1062
1069
|
"panel-id": e.name,
|
|
@@ -1064,19 +1071,19 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1064
1071
|
}, {
|
|
1065
1072
|
default: q(() => [B(i.$slots, e.name, {}, void 0, !0)]),
|
|
1066
1073
|
_: 2
|
|
1067
|
-
}, 1032, ["panel-id", "title"]))), 128)),
|
|
1074
|
+
}, 1032, ["panel-id", "title"]))), 128)), O("div", {
|
|
1068
1075
|
ref_key: "navRef",
|
|
1069
1076
|
ref: n,
|
|
1070
1077
|
class: "k-long-page__nav",
|
|
1071
1078
|
onPointerdown: s[0] ||= (...e) => W(r) && W(r)(...e)
|
|
1072
|
-
}, [(
|
|
1079
|
+
}, [(L(!0), D(S, null, z(e.panels, (e) => (L(), D("div", {
|
|
1073
1080
|
key: e.name,
|
|
1074
1081
|
class: "k-long-page__nav-item",
|
|
1075
1082
|
role: "button",
|
|
1076
1083
|
tabindex: "0",
|
|
1077
1084
|
onClick: (t) => o(e.name)
|
|
1078
1085
|
}, [
|
|
1079
|
-
|
|
1086
|
+
O("img", {
|
|
1080
1087
|
class: "k-long-page__nav-item-icon k-long-page__nav-item-icon--default",
|
|
1081
1088
|
src: a(e.name)[0],
|
|
1082
1089
|
alt: e.label,
|
|
@@ -1084,7 +1091,7 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1084
1091
|
height: "28",
|
|
1085
1092
|
draggable: "false"
|
|
1086
1093
|
}, null, 8, nn),
|
|
1087
|
-
|
|
1094
|
+
O("img", {
|
|
1088
1095
|
class: "k-long-page__nav-item-icon k-long-page__nav-item-icon--active",
|
|
1089
1096
|
src: a(e.name)[1],
|
|
1090
1097
|
alt: e.label,
|
|
@@ -1092,14 +1099,14 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1092
1099
|
height: "28",
|
|
1093
1100
|
draggable: "false"
|
|
1094
1101
|
}, null, 8, rn),
|
|
1095
|
-
|
|
1102
|
+
O("span", null, V(e.label), 1)
|
|
1096
1103
|
], 8, tn))), 128))], 544)], 512));
|
|
1097
1104
|
}
|
|
1098
|
-
}), [["__scopeId", "data-v-ac934c5d"]]), on = /* @__PURE__ */
|
|
1105
|
+
}), [["__scopeId", "data-v-ac934c5d"]]), on = /* @__PURE__ */ M({
|
|
1099
1106
|
name: "KCard",
|
|
1100
1107
|
__name: "KCard",
|
|
1101
1108
|
setup(e) {
|
|
1102
|
-
return (e, t) => (
|
|
1109
|
+
return (e, t) => (L(), T(W(xe), oe(re(e.$attrs)), k({
|
|
1103
1110
|
default: q(() => [B(e.$slots, "default")]),
|
|
1104
1111
|
_: 2
|
|
1105
1112
|
}, [e.$slots.header ? {
|
|
@@ -1115,7 +1122,7 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1115
1122
|
}), sn = {
|
|
1116
1123
|
key: 0,
|
|
1117
1124
|
class: "panel-head"
|
|
1118
|
-
}, cn = { class: "panel-head_left" }, ln = { class: "panel-content" }, un = /* @__PURE__ */
|
|
1125
|
+
}, cn = { class: "panel-head_left" }, ln = { class: "panel-content" }, un = /* @__PURE__ */ M({
|
|
1119
1126
|
name: "KPanel",
|
|
1120
1127
|
__name: "KPanel",
|
|
1121
1128
|
props: {
|
|
@@ -1134,16 +1141,16 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1134
1141
|
}
|
|
1135
1142
|
},
|
|
1136
1143
|
setup(e) {
|
|
1137
|
-
let t = e, n = R(t.unfold ? ["content"] : []), r =
|
|
1144
|
+
let t = e, n = R(t.unfold ? ["content"] : []), r = w(() => ({
|
|
1138
1145
|
panel: !0,
|
|
1139
1146
|
"panel-hover": t.hover
|
|
1140
1147
|
}));
|
|
1141
|
-
return (t, i) => (
|
|
1148
|
+
return (t, i) => (L(), D("div", { class: I(r.value) }, [e.isFold ? (L(), T(W(Ce), {
|
|
1142
1149
|
key: 0,
|
|
1143
1150
|
modelValue: n.value,
|
|
1144
1151
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e
|
|
1145
1152
|
}, {
|
|
1146
|
-
default: q(() => [
|
|
1153
|
+
default: q(() => [j(W(we), {
|
|
1147
1154
|
name: "content",
|
|
1148
1155
|
title: e.title
|
|
1149
1156
|
}, {
|
|
@@ -1151,12 +1158,12 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1151
1158
|
_: 3
|
|
1152
1159
|
}, 8, ["title"])]),
|
|
1153
1160
|
_: 3
|
|
1154
|
-
}, 8, ["modelValue"])) : (
|
|
1161
|
+
}, 8, ["modelValue"])) : (L(), D(S, { key: 1 }, [e.title || t.$slots.title ? (L(), D("div", sn, [O("div", cn, [B(t.$slots, "title", {}, () => [A(V(e.title), 1)])])])) : E("", !0), O("div", ln, [B(t.$slots, "default")])], 64))], 2));
|
|
1155
1162
|
}
|
|
1156
1163
|
}), dn = {
|
|
1157
1164
|
key: 0,
|
|
1158
1165
|
class: "k-panel-query__footer"
|
|
1159
|
-
}, fn = /* @__PURE__ */
|
|
1166
|
+
}, fn = /* @__PURE__ */ M({
|
|
1160
1167
|
name: "KPanelQueryActions",
|
|
1161
1168
|
__name: "KPanelQueryActions",
|
|
1162
1169
|
props: { footer: {
|
|
@@ -1166,33 +1173,33 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1166
1173
|
emits: ["query", "reset"],
|
|
1167
1174
|
setup(t, { emit: n }) {
|
|
1168
1175
|
let r = n;
|
|
1169
|
-
return (n, i) => t.footer ? (
|
|
1176
|
+
return (n, i) => t.footer ? (L(), D("div", dn, [j(e, {
|
|
1170
1177
|
type: "primary",
|
|
1171
1178
|
onClick: i[0] ||= (e) => r("query")
|
|
1172
1179
|
}, {
|
|
1173
|
-
default: q(() => [...i[4] ||= [
|
|
1180
|
+
default: q(() => [...i[4] ||= [A("查询", -1)]]),
|
|
1174
1181
|
_: 1
|
|
1175
|
-
}),
|
|
1182
|
+
}), j(e, {
|
|
1176
1183
|
class: "k-panel-query__btn-reset",
|
|
1177
1184
|
onClick: i[1] ||= (e) => r("reset")
|
|
1178
1185
|
}, {
|
|
1179
|
-
default: q(() => [...i[5] ||= [
|
|
1186
|
+
default: q(() => [...i[5] ||= [A("重置", -1)]]),
|
|
1180
1187
|
_: 1
|
|
1181
|
-
})])) : (
|
|
1188
|
+
})])) : (L(), D(S, { key: 1 }, [j(e, {
|
|
1182
1189
|
type: "primary",
|
|
1183
1190
|
onClick: i[2] ||= (e) => r("query")
|
|
1184
1191
|
}, {
|
|
1185
|
-
default: q(() => [...i[6] ||= [
|
|
1192
|
+
default: q(() => [...i[6] ||= [A("查询", -1)]]),
|
|
1186
1193
|
_: 1
|
|
1187
|
-
}),
|
|
1194
|
+
}), j(e, {
|
|
1188
1195
|
class: "k-panel-query__btn-reset",
|
|
1189
1196
|
onClick: i[3] ||= (e) => r("reset")
|
|
1190
1197
|
}, {
|
|
1191
|
-
default: q(() => [...i[7] ||= [
|
|
1198
|
+
default: q(() => [...i[7] ||= [A("重置", -1)]]),
|
|
1192
1199
|
_: 1
|
|
1193
1200
|
})], 64));
|
|
1194
1201
|
}
|
|
1195
|
-
}), pn = /* @__PURE__ */
|
|
1202
|
+
}), pn = /* @__PURE__ */ M({
|
|
1196
1203
|
name: "KPanelQueryForm",
|
|
1197
1204
|
__name: "KPanelQueryForm",
|
|
1198
1205
|
props: {
|
|
@@ -1220,7 +1227,7 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1220
1227
|
getParams: () => n.value?.getParams() ?? {},
|
|
1221
1228
|
resetForm: () => n.value?.resetForm(),
|
|
1222
1229
|
getFormRef: () => n.value?.getFormRef()
|
|
1223
|
-
}), (t, r) => (
|
|
1230
|
+
}), (t, r) => (L(), T(W(dt), {
|
|
1224
1231
|
ref_key: "formRef",
|
|
1225
1232
|
ref: n,
|
|
1226
1233
|
class: "k-panel-query-form",
|
|
@@ -1247,19 +1254,19 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1247
1254
|
}, _n = { class: "k-item_input" }, vn = {
|
|
1248
1255
|
key: 0,
|
|
1249
1256
|
class: "k-item k-panel-query__item-actions"
|
|
1250
|
-
}, yn = /* @__PURE__ */
|
|
1257
|
+
}, yn = /* @__PURE__ */ M({
|
|
1251
1258
|
name: "KPanelQueryItem",
|
|
1252
1259
|
__name: "KPanelQueryItem",
|
|
1253
1260
|
props: { formConfigs: {} },
|
|
1254
1261
|
setup(e, { expose: t }) {
|
|
1255
|
-
let n = e, r = G(), i =
|
|
1262
|
+
let n = e, r = G(), i = w(() => ({
|
|
1256
1263
|
colLength: 1,
|
|
1257
1264
|
inline: !0,
|
|
1258
1265
|
autoLayout: !1,
|
|
1259
1266
|
hideLabel: !1
|
|
1260
1267
|
})), a = it({
|
|
1261
1268
|
formConfigs: H(n, "formConfigs"),
|
|
1262
|
-
controlled:
|
|
1269
|
+
controlled: w(() => !1)
|
|
1263
1270
|
}), { normalizedConfigs: o, getFieldOptions: s } = $e({
|
|
1264
1271
|
formConfigs: H(n, "formConfigs"),
|
|
1265
1272
|
layout: i
|
|
@@ -1281,10 +1288,10 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1281
1288
|
getParams: u,
|
|
1282
1289
|
resetForm: d,
|
|
1283
1290
|
getFormRef: () => void 0
|
|
1284
|
-
}), (e, t) => (
|
|
1291
|
+
}), (e, t) => (L(), D("div", mn, [O("ul", hn, [(L(!0), D(S, null, z(W(o), (e) => (L(), D("li", {
|
|
1285
1292
|
key: e.id,
|
|
1286
|
-
class:
|
|
1287
|
-
}, [e.label ? (
|
|
1293
|
+
class: I(["k-item", { "k-item_flex": !!e.label }])
|
|
1294
|
+
}, [e.label ? (L(), D("label", gn, V(e.label), 1)) : E("", !0), O("div", _n, [j(ct, {
|
|
1288
1295
|
item: e,
|
|
1289
1296
|
"model-value": W(a).formModel[e.id],
|
|
1290
1297
|
options: W(s)(e),
|
|
@@ -1294,9 +1301,9 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1294
1301
|
"model-value",
|
|
1295
1302
|
"options",
|
|
1296
1303
|
"onUpdate:modelValue"
|
|
1297
|
-
])])], 2))), 128)), W(r).button ? (
|
|
1304
|
+
])])], 2))), 128)), W(r).button ? (L(), D("li", vn, [B(e.$slots, "button")])) : E("", !0)])]));
|
|
1298
1305
|
}
|
|
1299
|
-
}), bn = /* @__PURE__ */
|
|
1306
|
+
}), bn = /* @__PURE__ */ M({
|
|
1300
1307
|
name: "KPanelQuery",
|
|
1301
1308
|
__name: "KPanelQuery",
|
|
1302
1309
|
props: {
|
|
@@ -1350,7 +1357,7 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1350
1357
|
} : e;
|
|
1351
1358
|
}) : e;
|
|
1352
1359
|
}
|
|
1353
|
-
let c =
|
|
1360
|
+
let c = w(() => {
|
|
1354
1361
|
let e = r.form;
|
|
1355
1362
|
if (!e) return;
|
|
1356
1363
|
let t = e.formConfigs.length, n = e.colLength ?? (t > 0 ? Math.min(t, 3) : 3);
|
|
@@ -1360,13 +1367,13 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1360
1367
|
autoLayout: e.autoLayout ?? !0,
|
|
1361
1368
|
formConfigs: s(e.formConfigs)
|
|
1362
1369
|
};
|
|
1363
|
-
}), l =
|
|
1370
|
+
}), l = w(() => r.model === "item");
|
|
1364
1371
|
async function u() {
|
|
1365
1372
|
let e = await a.value?.validateFields();
|
|
1366
1373
|
e && i("query", e);
|
|
1367
1374
|
}
|
|
1368
1375
|
async function d() {
|
|
1369
|
-
a.value?.resetForm(), i("reset"), await
|
|
1376
|
+
a.value?.resetForm(), i("reset"), await F();
|
|
1370
1377
|
let e = await a.value?.validateFields();
|
|
1371
1378
|
e && i("query", e);
|
|
1372
1379
|
}
|
|
@@ -1381,62 +1388,62 @@ var tn = ["onClick"], nn = ["src", "alt"], rn = ["src", "alt"], an = /*#__PURE__
|
|
|
1381
1388
|
resetForm: p,
|
|
1382
1389
|
getFormRef: () => a.value?.getFormRef(),
|
|
1383
1390
|
submit: u
|
|
1384
|
-
}), (t, n) => (
|
|
1391
|
+
}), (t, n) => (L(), D("div", { class: I(["k-panel-query", {
|
|
1385
1392
|
"k-panel-query__form": e.model === "form" && !e.showPanel,
|
|
1386
1393
|
"k-panel-query__item": l.value
|
|
1387
|
-
}]) }, [e.showPanel ? (
|
|
1394
|
+
}]) }, [e.showPanel ? (L(), T(W(un), {
|
|
1388
1395
|
key: 1,
|
|
1389
1396
|
title: e.title,
|
|
1390
1397
|
"is-fold": e.isFold,
|
|
1391
1398
|
unfold: e.unfold,
|
|
1392
1399
|
hover: e.hover
|
|
1393
1400
|
}, {
|
|
1394
|
-
default: q(() => [c.value ? (
|
|
1401
|
+
default: q(() => [c.value ? (L(), D(S, { key: 0 }, [l.value ? (L(), T(yn, P({
|
|
1395
1402
|
key: 0,
|
|
1396
1403
|
ref_key: "formRef",
|
|
1397
1404
|
ref: a
|
|
1398
|
-
}, c.value),
|
|
1405
|
+
}, c.value), k({ _: 2 }, [e.hideButton ? void 0 : {
|
|
1399
1406
|
name: "button",
|
|
1400
|
-
fn: q(() => [
|
|
1407
|
+
fn: q(() => [j(fn, {
|
|
1401
1408
|
onQuery: u,
|
|
1402
1409
|
onReset: d
|
|
1403
1410
|
})]),
|
|
1404
1411
|
key: "0"
|
|
1405
|
-
}]), 1040)) : (
|
|
1412
|
+
}]), 1040)) : (L(), D(S, { key: 1 }, [j(pn, P({
|
|
1406
1413
|
ref_key: "formRef",
|
|
1407
1414
|
ref: a
|
|
1408
|
-
}, c.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ?
|
|
1415
|
+
}, c.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? E("", !0) : (L(), T(fn, {
|
|
1409
1416
|
key: 0,
|
|
1410
1417
|
footer: "",
|
|
1411
1418
|
onQuery: u,
|
|
1412
1419
|
onReset: d
|
|
1413
|
-
}))], 64))], 64)) :
|
|
1420
|
+
}))], 64))], 64)) : E("", !0)]),
|
|
1414
1421
|
_: 1
|
|
1415
1422
|
}, 8, [
|
|
1416
1423
|
"title",
|
|
1417
1424
|
"is-fold",
|
|
1418
1425
|
"unfold",
|
|
1419
1426
|
"hover"
|
|
1420
|
-
])) : (
|
|
1427
|
+
])) : (L(), D(S, { key: 0 }, [c.value ? (L(), D(S, { key: 0 }, [l.value ? (L(), T(yn, P({
|
|
1421
1428
|
key: 0,
|
|
1422
1429
|
ref_key: "formRef",
|
|
1423
1430
|
ref: a
|
|
1424
|
-
}, c.value),
|
|
1431
|
+
}, c.value), k({ _: 2 }, [e.hideButton ? void 0 : {
|
|
1425
1432
|
name: "button",
|
|
1426
|
-
fn: q(() => [
|
|
1433
|
+
fn: q(() => [j(fn, {
|
|
1427
1434
|
onQuery: u,
|
|
1428
1435
|
onReset: d
|
|
1429
1436
|
})]),
|
|
1430
1437
|
key: "0"
|
|
1431
|
-
}]), 1040)) : (
|
|
1438
|
+
}]), 1040)) : (L(), D(S, { key: 1 }, [j(pn, P({
|
|
1432
1439
|
ref_key: "formRef",
|
|
1433
1440
|
ref: a
|
|
1434
|
-
}, c.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ?
|
|
1441
|
+
}, c.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? E("", !0) : (L(), T(fn, {
|
|
1435
1442
|
key: 0,
|
|
1436
1443
|
footer: "",
|
|
1437
1444
|
onQuery: u,
|
|
1438
1445
|
onReset: d
|
|
1439
|
-
}))], 64))], 64)) :
|
|
1446
|
+
}))], 64))], 64)) : E("", !0)], 64))], 2));
|
|
1440
1447
|
}
|
|
1441
1448
|
});
|
|
1442
1449
|
//#endregion
|
|
@@ -1521,7 +1528,7 @@ function An(e) {
|
|
|
1521
1528
|
return e.type === "index" && !t.label && (t.label = "序号"), e.type === "expand" && (t.width = e.width ?? 50, delete t.minWidth), e.type !== "selection" && e.type !== "index" && e.type !== "operates" && e.type !== "radio" && e.type !== "expand" && (t.showOverflowTooltip = e.showOverflowTooltip ?? !0), t;
|
|
1522
1529
|
}
|
|
1523
1530
|
function jn(e = "--") {
|
|
1524
|
-
let t =
|
|
1531
|
+
let t = ie(l, null);
|
|
1525
1532
|
function n(n, r, i) {
|
|
1526
1533
|
let a = n.prop ? xn(r, n.prop) : void 0;
|
|
1527
1534
|
return Dn(n, r, i, e, n.dict && t && !Mn(a) ? t.getLabel(n.dict, a) : void 0);
|
|
@@ -1538,7 +1545,7 @@ function Q(e, t = 0) {
|
|
|
1538
1545
|
}
|
|
1539
1546
|
//#endregion
|
|
1540
1547
|
//#region src/components/k-table/KTableColumn.vue
|
|
1541
|
-
var Nn = /*#__PURE__*/ _(/* @__PURE__ */
|
|
1548
|
+
var Nn = /*#__PURE__*/ _(/* @__PURE__ */ M({
|
|
1542
1549
|
name: "KTableColumn",
|
|
1543
1550
|
__name: "KTableColumn",
|
|
1544
1551
|
props: {
|
|
@@ -1566,10 +1573,10 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1566
1573
|
function o(e) {
|
|
1567
1574
|
return e ?? "";
|
|
1568
1575
|
}
|
|
1569
|
-
let s =
|
|
1576
|
+
let s = w(() => An(n.column)), c = (e) => n.indexOffset + e + 1, l = w(() => {
|
|
1570
1577
|
let e = n.column.prop;
|
|
1571
1578
|
return !!(e && i[o(e)]);
|
|
1572
|
-
}), u =
|
|
1579
|
+
}), u = w(() => n.column.type === "operates" ? i.operates ? !0 : !!(n.column.prop && i[o(n.column.prop)]) : !1);
|
|
1573
1580
|
function d(e, t, n) {
|
|
1574
1581
|
r("operate-click", e, n, t), e.onClick?.(n, t);
|
|
1575
1582
|
}
|
|
@@ -1581,17 +1588,17 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1581
1588
|
}
|
|
1582
1589
|
return (t, n) => {
|
|
1583
1590
|
let m = fe("KTableColumn", !0);
|
|
1584
|
-
return e.column.type === "selection" ? (
|
|
1591
|
+
return e.column.type === "selection" ? (L(), T(W(J), P({
|
|
1585
1592
|
key: `${W(Q)(e.column, e.columnIndex)}:selection`,
|
|
1586
1593
|
type: "selection"
|
|
1587
|
-
}, s.value), null, 16)) : e.column.type === "index" ? (
|
|
1594
|
+
}, s.value), null, 16)) : e.column.type === "index" ? (L(), T(W(J), P({ key: `${W(Q)(e.column, e.columnIndex)}:index` }, s.value), {
|
|
1588
1595
|
default: q(({ $index: e }) => [B(t.$slots, "index", {
|
|
1589
1596
|
index: e,
|
|
1590
1597
|
displayIndex: c(e)
|
|
1591
|
-
}, () => [
|
|
1598
|
+
}, () => [A(V(c(e)), 1)], !0)]),
|
|
1592
1599
|
_: 3
|
|
1593
|
-
}, 16)) : e.column.type === "radio" ? (
|
|
1594
|
-
default: q(({ row: t }) => [
|
|
1600
|
+
}, 16)) : e.column.type === "radio" ? (L(), T(W(J), P({ key: `${W(Q)(e.column, e.columnIndex)}:radio` }, s.value), {
|
|
1601
|
+
default: q(({ row: t }) => [j(W(Me), {
|
|
1595
1602
|
class: "k-table-column__radio",
|
|
1596
1603
|
"model-value": e.radioSelected,
|
|
1597
1604
|
label: p(t),
|
|
@@ -1602,32 +1609,32 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1602
1609
|
"onUpdate:modelValue"
|
|
1603
1610
|
])]),
|
|
1604
1611
|
_: 1
|
|
1605
|
-
}, 16)) : e.column.type === "operates" ? (
|
|
1612
|
+
}, 16)) : e.column.type === "operates" ? (L(), T(W(J), P({ key: `${W(Q)(e.column, e.columnIndex)}:operates` }, s.value), {
|
|
1606
1613
|
default: q(({ row: n, column: r, $index: a }) => [u.value ? B(t.$slots, W(i).operates ? "operates" : o(e.column.prop), {
|
|
1607
1614
|
row: n,
|
|
1608
1615
|
column: r,
|
|
1609
1616
|
index: a
|
|
1610
|
-
}, void 0, !0, 0) : (
|
|
1617
|
+
}, void 0, !0, 0) : (L(), T(W(Ft), {
|
|
1611
1618
|
key: 1,
|
|
1612
1619
|
data: e.column.operates ?? [],
|
|
1613
1620
|
disabled: e.disabled,
|
|
1614
1621
|
"table-mode": "",
|
|
1615
1622
|
onClick: (e, t) => d(e, t, n)
|
|
1616
|
-
},
|
|
1623
|
+
}, k({ _: 2 }, [z(e.column.operates ?? [], (e) => ({
|
|
1617
1624
|
name: f(e),
|
|
1618
1625
|
fn: q(({ item: i }) => [B(t.$slots, f(e), {
|
|
1619
1626
|
row: n,
|
|
1620
1627
|
column: r,
|
|
1621
1628
|
index: a,
|
|
1622
1629
|
item: i
|
|
1623
|
-
}, () => [
|
|
1630
|
+
}, () => [A(V(i.label), 1)], !0)])
|
|
1624
1631
|
}))]), 1032, [
|
|
1625
1632
|
"data",
|
|
1626
1633
|
"disabled",
|
|
1627
1634
|
"onClick"
|
|
1628
1635
|
]))]),
|
|
1629
1636
|
_: 3
|
|
1630
|
-
}, 16)) : e.column.type === "expand" ? (
|
|
1637
|
+
}, 16)) : e.column.type === "expand" ? (L(), T(W(J), P({
|
|
1631
1638
|
key: `${W(Q)(e.column, e.columnIndex)}:expand`,
|
|
1632
1639
|
type: "expand"
|
|
1633
1640
|
}, s.value), {
|
|
@@ -1637,8 +1644,8 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1637
1644
|
index: r
|
|
1638
1645
|
}, void 0, !0)]),
|
|
1639
1646
|
_: 3
|
|
1640
|
-
}, 16)) : e.column.children?.length ? (
|
|
1641
|
-
default: q(() => [(
|
|
1647
|
+
}, 16)) : e.column.children?.length ? (L(), T(W(J), P({ key: `${W(Q)(e.column, e.columnIndex)}:group` }, s.value), {
|
|
1648
|
+
default: q(() => [(L(!0), D(S, null, z(e.column.children, (i, a) => (L(), T(m, {
|
|
1642
1649
|
key: W(Q)(i, a),
|
|
1643
1650
|
column: i,
|
|
1644
1651
|
"column-index": a,
|
|
@@ -1649,9 +1656,9 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1649
1656
|
"radio-selected": e.radioSelected,
|
|
1650
1657
|
onOperateClick: n[0] ||= (e, t, n) => r("operate-click", e, t, n),
|
|
1651
1658
|
onRadioSelect: n[1] ||= (e) => r("radio-select", e)
|
|
1652
|
-
},
|
|
1659
|
+
}, k({ _: 2 }, [z(t.$slots, (e, n) => ({
|
|
1653
1660
|
name: n,
|
|
1654
|
-
fn: q((e) => [B(t.$slots, n,
|
|
1661
|
+
fn: q((e) => [B(t.$slots, n, P({ ref_for: !0 }, e ?? {}), void 0, !0)])
|
|
1655
1662
|
}))]), 1032, [
|
|
1656
1663
|
"column",
|
|
1657
1664
|
"column-index",
|
|
@@ -1662,27 +1669,27 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1662
1669
|
"radio-selected"
|
|
1663
1670
|
]))), 128))]),
|
|
1664
1671
|
_: 3
|
|
1665
|
-
}, 16)) : (
|
|
1672
|
+
}, 16)) : (L(), T(W(J), P({ key: `${W(Q)(e.column, e.columnIndex)}:default` }, s.value), k({
|
|
1666
1673
|
default: q(({ row: n, column: r, $index: i }) => [l.value ? B(t.$slots, o(e.column.prop), {
|
|
1667
1674
|
row: n,
|
|
1668
1675
|
column: r,
|
|
1669
1676
|
index: i
|
|
1670
|
-
}, void 0, !0, 0) : (
|
|
1677
|
+
}, void 0, !0, 0) : (L(), D(S, { key: 1 }, [A(V(W(a)(e.column, n, i)), 1)], 64))]),
|
|
1671
1678
|
_: 2
|
|
1672
1679
|
}, [e.column.toolTip ? {
|
|
1673
1680
|
name: "header",
|
|
1674
|
-
fn: q(() => [
|
|
1681
|
+
fn: q(() => [O("span", null, V(e.column.label), 1), j(W(Pe), {
|
|
1675
1682
|
content: e.column.toolTip,
|
|
1676
1683
|
placement: "top"
|
|
1677
1684
|
}, {
|
|
1678
|
-
default: q(() => [...n[2] ||= [
|
|
1685
|
+
default: q(() => [...n[2] ||= [O("span", { class: "k-table-column__tip" }, "i", -1)]]),
|
|
1679
1686
|
_: 1
|
|
1680
1687
|
}, 8, ["content"])]),
|
|
1681
1688
|
key: "0"
|
|
1682
1689
|
} : void 0]), 1040));
|
|
1683
1690
|
};
|
|
1684
1691
|
}
|
|
1685
|
-
}), [["__scopeId", "data-v-578909bc"]]), Pn = { class: "k-table-column-selector" }, Fn = { class: "k-table-column-selector__header" }, In = { class: "k-table-column-selector__content" }, Ln = /*#__PURE__*/ _(/* @__PURE__ */
|
|
1692
|
+
}), [["__scopeId", "data-v-578909bc"]]), Pn = { class: "k-table-column-selector" }, Fn = { class: "k-table-column-selector__header" }, In = { class: "k-table-column-selector__content" }, Ln = /*#__PURE__*/ _(/* @__PURE__ */ M({
|
|
1686
1693
|
name: "KTableColumnSelector",
|
|
1687
1694
|
__name: "KTableColumnSelector",
|
|
1688
1695
|
props: { items: {} },
|
|
@@ -1695,7 +1702,7 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1695
1702
|
function a() {
|
|
1696
1703
|
n("reset");
|
|
1697
1704
|
}
|
|
1698
|
-
return (t, n) => (
|
|
1705
|
+
return (t, n) => (L(), T(W(je), {
|
|
1699
1706
|
visible: r.value,
|
|
1700
1707
|
"onUpdate:visible": n[0] ||= (e) => r.value = e,
|
|
1701
1708
|
placement: "bottom-end",
|
|
@@ -1703,28 +1710,28 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1703
1710
|
trigger: "click",
|
|
1704
1711
|
"popper-class": "k-table-column-selector__popover"
|
|
1705
1712
|
}, {
|
|
1706
|
-
reference: q(() => [...n[1] ||= [
|
|
1713
|
+
reference: q(() => [...n[1] ||= [O("button", {
|
|
1707
1714
|
type: "button",
|
|
1708
1715
|
class: "k-table-column-selector__trigger",
|
|
1709
1716
|
"aria-label": "列展示设置"
|
|
1710
|
-
}, [
|
|
1711
|
-
default: q(() => [
|
|
1712
|
-
|
|
1717
|
+
}, [O("span", { class: "k-table-column-selector__icon" })], -1)]]),
|
|
1718
|
+
default: q(() => [O("div", Pn, [
|
|
1719
|
+
O("div", Fn, [n[3] ||= O("span", null, "列展示", -1), j(W(be), {
|
|
1713
1720
|
type: "primary",
|
|
1714
1721
|
link: "",
|
|
1715
1722
|
onClick: a
|
|
1716
1723
|
}, {
|
|
1717
|
-
default: q(() => [...n[2] ||= [
|
|
1724
|
+
default: q(() => [...n[2] ||= [A("恢复默认", -1)]]),
|
|
1718
1725
|
_: 1
|
|
1719
1726
|
})]),
|
|
1720
|
-
|
|
1721
|
-
|
|
1727
|
+
j(W(Te), { class: "k-table-column-selector__divider" }),
|
|
1728
|
+
O("div", In, [(L(!0), D(S, null, z(e.items, (e) => (L(), T(W(Se), {
|
|
1722
1729
|
key: e.key,
|
|
1723
1730
|
"model-value": e.checked,
|
|
1724
1731
|
disabled: e.disabled,
|
|
1725
1732
|
onChange: (t) => i(e.key, !!t)
|
|
1726
1733
|
}, {
|
|
1727
|
-
default: q(() => [
|
|
1734
|
+
default: q(() => [A(V(e.label), 1)]),
|
|
1728
1735
|
_: 2
|
|
1729
1736
|
}, 1032, [
|
|
1730
1737
|
"model-value",
|
|
@@ -1753,7 +1760,7 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1753
1760
|
}, Un = {
|
|
1754
1761
|
key: 2,
|
|
1755
1762
|
class: "k-table-toolbar__selection"
|
|
1756
|
-
}, Wn = /*#__PURE__*/ _(/* @__PURE__ */
|
|
1763
|
+
}, Wn = /*#__PURE__*/ _(/* @__PURE__ */ M({
|
|
1757
1764
|
name: "KTableToolbar",
|
|
1758
1765
|
__name: "KTableToolbar",
|
|
1759
1766
|
props: {
|
|
@@ -1769,24 +1776,24 @@ var Nn = /*#__PURE__*/ _(/* @__PURE__ */ j({
|
|
|
1769
1776
|
},
|
|
1770
1777
|
emits: ["add"],
|
|
1771
1778
|
setup(t, { emit: n }) {
|
|
1772
|
-
let r = t, i = n, a = G(), o =
|
|
1773
|
-
return (n, r) => o.value || t.selectionShow ? (
|
|
1774
|
-
o.value ? (
|
|
1775
|
-
t.addButton ? (
|
|
1779
|
+
let r = t, i = n, a = G(), o = w(() => !!(r.addButton || a.header || a.extra)), s = w(() => !!(r.addButton && r.selectionShow));
|
|
1780
|
+
return (n, r) => o.value || t.selectionShow ? (L(), D("div", Rn, [
|
|
1781
|
+
o.value ? (L(), D("div", zn, [
|
|
1782
|
+
t.addButton ? (L(), T(e, {
|
|
1776
1783
|
key: 0,
|
|
1777
1784
|
type: "primary",
|
|
1778
1785
|
icon: W(ze),
|
|
1779
1786
|
onClick: r[0] ||= (e) => i("add")
|
|
1780
1787
|
}, {
|
|
1781
|
-
default: q(() => [
|
|
1788
|
+
default: q(() => [A(V(t.addButton === !0 ? "新建" : t.addButton), 1)]),
|
|
1782
1789
|
_: 1
|
|
1783
|
-
}, 8, ["icon"])) :
|
|
1784
|
-
W(a).header ? (
|
|
1785
|
-
W(a).extra ? (
|
|
1786
|
-
])) :
|
|
1787
|
-
s.value ? (
|
|
1788
|
-
t.selectionShow ? (
|
|
1789
|
-
])) :
|
|
1790
|
+
}, 8, ["icon"])) : E("", !0),
|
|
1791
|
+
W(a).header ? (L(), D("div", Bn, [B(n.$slots, "header", {}, void 0, !0)])) : E("", !0),
|
|
1792
|
+
W(a).extra ? (L(), D("div", Vn, [B(n.$slots, "extra", {}, void 0, !0)])) : E("", !0)
|
|
1793
|
+
])) : E("", !0),
|
|
1794
|
+
s.value ? (L(), D("div", Hn)) : E("", !0),
|
|
1795
|
+
t.selectionShow ? (L(), D("div", Un, "已选择" + V(t.selectedCount) + "条数据", 1)) : E("", !0)
|
|
1796
|
+
])) : E("", !0);
|
|
1790
1797
|
}
|
|
1791
1798
|
}), [["__scopeId", "data-v-bff19ed1"]]), Gn = "kayak_table_column_display";
|
|
1792
1799
|
function Kn(e) {
|
|
@@ -1796,7 +1803,7 @@ function qn(e) {
|
|
|
1796
1803
|
return !(e.type === "radio" || e.type === "expand" || e.children?.length);
|
|
1797
1804
|
}
|
|
1798
1805
|
function Jn(e) {
|
|
1799
|
-
let t = R({}), n = R(""), r = Ie(Gn, {}), i =
|
|
1806
|
+
let t = R({}), n = R(""), r = Ie(Gn, {}), i = w(() => !!U(e.enableColumnCache)), a = w(() => U(e.columns).filter((e) => qn(e)));
|
|
1800
1807
|
function o() {
|
|
1801
1808
|
return U(e.tableKey) || n.value;
|
|
1802
1809
|
}
|
|
@@ -1836,7 +1843,7 @@ function Jn(e) {
|
|
|
1836
1843
|
t.value = r ? Y(r) : s();
|
|
1837
1844
|
}
|
|
1838
1845
|
function p() {
|
|
1839
|
-
|
|
1846
|
+
F(() => e.onLayout?.());
|
|
1840
1847
|
}
|
|
1841
1848
|
function m(n, r) {
|
|
1842
1849
|
t.value = {
|
|
@@ -1850,14 +1857,14 @@ function Jn(e) {
|
|
|
1850
1857
|
function g() {
|
|
1851
1858
|
u(), t.value = s(), e.onDisplayChange?.(t.value), p();
|
|
1852
1859
|
}
|
|
1853
|
-
let _ =
|
|
1860
|
+
let _ = w(() => {
|
|
1854
1861
|
let n = U(e.renderColumns);
|
|
1855
1862
|
return i.value ? n.filter((e, n) => {
|
|
1856
1863
|
if (Kn(e)) return !0;
|
|
1857
1864
|
let r = d(e, n);
|
|
1858
1865
|
return t.value[r] !== !1;
|
|
1859
1866
|
}) : n;
|
|
1860
|
-
}), v =
|
|
1867
|
+
}), v = w(() => a.value.map((e, n) => {
|
|
1861
1868
|
let r = Q(e, n);
|
|
1862
1869
|
return {
|
|
1863
1870
|
column: e,
|
|
@@ -1872,7 +1879,7 @@ function Jn(e) {
|
|
|
1872
1879
|
Object.keys(e).forEach((e) => {
|
|
1873
1880
|
t.value[e] === void 0 && (t.value[e] = !0);
|
|
1874
1881
|
});
|
|
1875
|
-
}, { deep: !0 }),
|
|
1882
|
+
}, { deep: !0 }), le(() => {
|
|
1876
1883
|
f();
|
|
1877
1884
|
}), {
|
|
1878
1885
|
columnDisplay: t,
|
|
@@ -1937,13 +1944,13 @@ function Xn(e) {
|
|
|
1937
1944
|
pageSize: t?.pageSize ?? i.pageSize,
|
|
1938
1945
|
pageSizes: t?.pageSizes ?? [...i.pageSizes],
|
|
1939
1946
|
layout: t?.layout ?? i.layout
|
|
1940
|
-
}), r =
|
|
1947
|
+
}), r = w(() => ({
|
|
1941
1948
|
total: n.value.total,
|
|
1942
1949
|
currentPage: n.value.currentPage,
|
|
1943
1950
|
pageSize: n.value.pageSize,
|
|
1944
1951
|
pageSizes: n.value.pageSizes,
|
|
1945
1952
|
layout: n.value.layout
|
|
1946
|
-
})), a =
|
|
1953
|
+
})), a = w(() => (n.value.currentPage - 1) * n.value.pageSize);
|
|
1947
1954
|
K(() => {
|
|
1948
1955
|
let t = U(e.pagination);
|
|
1949
1956
|
return [
|
|
@@ -1980,7 +1987,7 @@ function Xn(e) {
|
|
|
1980
1987
|
//#endregion
|
|
1981
1988
|
//#region src/components/k-table/composables/useTableRadio.ts
|
|
1982
1989
|
function Zn(e) {
|
|
1983
|
-
let t = R(""), n =
|
|
1990
|
+
let t = R(""), n = w(() => U(e.columns).some((e) => e.type === "radio"));
|
|
1984
1991
|
function r(n) {
|
|
1985
1992
|
return t.value = n ? Sn(n, U(e.rowKey)) : "", n;
|
|
1986
1993
|
}
|
|
@@ -2026,11 +2033,11 @@ function Qn(e) {
|
|
|
2026
2033
|
U(e.rebindKey),
|
|
2027
2034
|
e.tableRef.value
|
|
2028
2035
|
], () => {
|
|
2029
|
-
|
|
2036
|
+
F(r);
|
|
2030
2037
|
}, { flush: "post" }), K(() => U(e.disabled), (e) => {
|
|
2031
2038
|
t && t.option("disabled", e);
|
|
2032
|
-
}),
|
|
2033
|
-
initSortable: () =>
|
|
2039
|
+
}), ce(n), {
|
|
2040
|
+
initSortable: () => F(r),
|
|
2034
2041
|
destroySortable: n
|
|
2035
2042
|
};
|
|
2036
2043
|
}
|
|
@@ -2066,12 +2073,12 @@ function $n(e) {
|
|
|
2066
2073
|
//#endregion
|
|
2067
2074
|
//#region src/components/k-table/composables/useKTable.ts
|
|
2068
2075
|
function er(e) {
|
|
2069
|
-
let { props: t, emit: n, attrs: r, slots: i, tableRef: a, queryRef: o } = e, s = R({}), c = R(0), l =
|
|
2076
|
+
let { props: t, emit: n, attrs: r, slots: i, tableRef: a, queryRef: o } = e, s = R({}), c = R(0), l = w(() => !!t.action), u = w(() => !!t.query?.form?.formConfigs?.length), d = w(() => !!i.header);
|
|
2070
2077
|
function f(e) {
|
|
2071
2078
|
let n = { ...e };
|
|
2072
2079
|
s.value = t.convertParams ? t.convertParams(n) : n;
|
|
2073
2080
|
}
|
|
2074
|
-
let p =
|
|
2081
|
+
let p = w(() => {
|
|
2075
2082
|
let e = kn(t.columns, t.selectionShow);
|
|
2076
2083
|
return t.disabled && (e = e.filter((e) => e.type !== "operates" && e.prop !== "operates")), e;
|
|
2077
2084
|
}), m = Jn({
|
|
@@ -2099,11 +2106,11 @@ function er(e) {
|
|
|
2099
2106
|
pagination: _,
|
|
2100
2107
|
initialLoading: !!(t.action && t.initTable),
|
|
2101
2108
|
onDataLoaded: (e, t) => n("data-loaded", e, t)
|
|
2102
|
-
}), y =
|
|
2109
|
+
}), y = w(() => t.enableColumnCache ? m.visibleColumns.value : p.value), b = w(() => y.value.map((e, t) => Q(e, t)).join("|")), x = w(() => !!(t.addButton || t.selectionShow || d.value || t.enableColumnCache)), ee = w(() => l.value ? v.tableData.value : t.data), te = w(() => t.loading === void 0 ? l.value ? v.loading.value : !1 : t.loading), ne = w(() => te.value || !!(l.value && t.initTable && !v.loaded.value)), S = w(() => {
|
|
2103
2110
|
let e = { ...r };
|
|
2104
2111
|
l.value && "data" in e && delete e.data, t.load && delete e.load;
|
|
2105
2112
|
let n = {
|
|
2106
|
-
data:
|
|
2113
|
+
data: ee.value,
|
|
2107
2114
|
rowKey: t.rowKey,
|
|
2108
2115
|
border: !0,
|
|
2109
2116
|
stripe: !0,
|
|
@@ -2121,81 +2128,81 @@ function er(e) {
|
|
|
2121
2128
|
tableRef: a,
|
|
2122
2129
|
rebindKey: () => b.value,
|
|
2123
2130
|
onSortEnd: (e) => {
|
|
2124
|
-
let t = [...
|
|
2131
|
+
let t = [...ee.value];
|
|
2125
2132
|
if (e.oldIndex == null || e.newIndex == null) return;
|
|
2126
2133
|
let [r] = t.splice(e.oldIndex, 1);
|
|
2127
2134
|
t.splice(e.newIndex, 0, r), n("sort-end", e, t);
|
|
2128
2135
|
}
|
|
2129
2136
|
});
|
|
2130
|
-
function
|
|
2137
|
+
function C() {
|
|
2131
2138
|
l.value && v.fetchData();
|
|
2132
2139
|
}
|
|
2133
|
-
|
|
2140
|
+
le(() => {
|
|
2134
2141
|
!t.initTable || !t.action || (u.value && f(o.value?.getParams() ?? {}), v.fetchData());
|
|
2135
2142
|
});
|
|
2136
|
-
function
|
|
2143
|
+
function T(e) {
|
|
2137
2144
|
c.value = e.length, n("selection-change", e);
|
|
2138
2145
|
}
|
|
2139
|
-
function
|
|
2146
|
+
function E(e) {
|
|
2140
2147
|
n("sort-change", e);
|
|
2141
2148
|
}
|
|
2142
|
-
function
|
|
2149
|
+
function D() {
|
|
2143
2150
|
a.value?.setCurrentRow();
|
|
2144
2151
|
}
|
|
2145
|
-
function
|
|
2146
|
-
f(e), _.resetPage(), t.clearCurrentRowOnQuery &&
|
|
2147
|
-
}
|
|
2148
|
-
function O() {
|
|
2149
|
-
n("reset"), t.selectionShow && se(), t.clearCurrentRowOnReset && E();
|
|
2152
|
+
function O(e) {
|
|
2153
|
+
f(e), _.resetPage(), t.clearCurrentRowOnQuery && D(), n("query", s.value), C();
|
|
2150
2154
|
}
|
|
2151
|
-
function k(
|
|
2152
|
-
|
|
2155
|
+
function k() {
|
|
2156
|
+
n("reset"), t.selectionShow && oe(), t.clearCurrentRowOnReset && D();
|
|
2153
2157
|
}
|
|
2154
2158
|
function A(e) {
|
|
2155
|
-
_.
|
|
2159
|
+
_.setCurrentPage(e), n("page-change", e), C();
|
|
2156
2160
|
}
|
|
2157
|
-
function j() {
|
|
2161
|
+
function j(e) {
|
|
2162
|
+
_.setPageSize(e), n("size-change", e), C();
|
|
2163
|
+
}
|
|
2164
|
+
function M() {
|
|
2158
2165
|
n("add");
|
|
2159
2166
|
}
|
|
2160
|
-
function
|
|
2167
|
+
function re(e, t, r) {
|
|
2161
2168
|
n("operate-click", e, t, r);
|
|
2162
2169
|
}
|
|
2163
|
-
function
|
|
2170
|
+
function N(e) {
|
|
2164
2171
|
if (!h.hasRadioColumn.value) return;
|
|
2165
2172
|
let t = h.selectRow(e);
|
|
2166
2173
|
t && n("radio-change", t, h.radioSelected.value);
|
|
2167
2174
|
}
|
|
2168
|
-
function
|
|
2169
|
-
|
|
2175
|
+
function ie(e) {
|
|
2176
|
+
N(e);
|
|
2170
2177
|
}
|
|
2171
|
-
function
|
|
2178
|
+
function ae(e, t) {
|
|
2172
2179
|
m.setColumnVisibleByKey(e, t);
|
|
2173
2180
|
}
|
|
2174
|
-
function
|
|
2181
|
+
function P() {
|
|
2175
2182
|
return a.value;
|
|
2176
2183
|
}
|
|
2177
|
-
function
|
|
2184
|
+
function F() {
|
|
2178
2185
|
return o.value;
|
|
2179
2186
|
}
|
|
2180
|
-
function
|
|
2187
|
+
function I() {
|
|
2181
2188
|
return a.value?.getSelectionRows() ?? [];
|
|
2182
2189
|
}
|
|
2183
|
-
function
|
|
2190
|
+
function oe() {
|
|
2184
2191
|
a.value?.clearSelection(), c.value = 0;
|
|
2185
2192
|
}
|
|
2186
|
-
function
|
|
2193
|
+
function se(e, t) {
|
|
2187
2194
|
a.value?.toggleRowSelection(e, t);
|
|
2188
2195
|
}
|
|
2189
|
-
async function
|
|
2196
|
+
async function ce(e = !1) {
|
|
2190
2197
|
l.value && await v.refresh(e);
|
|
2191
2198
|
}
|
|
2192
|
-
function
|
|
2199
|
+
function L() {
|
|
2193
2200
|
h.clearRadioSelection(), a.value?.setCurrentRow();
|
|
2194
2201
|
}
|
|
2195
|
-
function
|
|
2202
|
+
function ue(e) {
|
|
2196
2203
|
h.setRadioSelection(e);
|
|
2197
2204
|
}
|
|
2198
|
-
function
|
|
2205
|
+
function de() {
|
|
2199
2206
|
return h.getRadioSelection();
|
|
2200
2207
|
}
|
|
2201
2208
|
function z(e) {
|
|
@@ -2203,39 +2210,39 @@ function er(e) {
|
|
|
2203
2210
|
}
|
|
2204
2211
|
return {
|
|
2205
2212
|
showQuery: u,
|
|
2206
|
-
showToolbar:
|
|
2213
|
+
showToolbar: x,
|
|
2207
2214
|
hasHeaderSlot: d,
|
|
2208
2215
|
renderColumns: y,
|
|
2209
2216
|
tableProps: S,
|
|
2210
|
-
tableLoading:
|
|
2211
|
-
showLoadingEmpty:
|
|
2217
|
+
tableLoading: te,
|
|
2218
|
+
showLoadingEmpty: ne,
|
|
2212
2219
|
columnSelectorItems: m.selectorItems,
|
|
2213
2220
|
paginationBind: _.bindProps,
|
|
2214
2221
|
indexOffset: _.indexOffset,
|
|
2215
2222
|
selectedCount: c,
|
|
2216
2223
|
radioSelected: h.radioSelected,
|
|
2217
2224
|
getColumnIdentity: Q,
|
|
2218
|
-
handleSelectionChange:
|
|
2219
|
-
handleSortChange:
|
|
2220
|
-
handleQuery:
|
|
2221
|
-
handleQueryReset:
|
|
2222
|
-
handlePageChange:
|
|
2223
|
-
handleSizeChange:
|
|
2224
|
-
handleAdd:
|
|
2225
|
-
handleOperateClick:
|
|
2226
|
-
handleRowClick:
|
|
2227
|
-
handleRadioChange:
|
|
2228
|
-
handleColumnVisibleChange:
|
|
2225
|
+
handleSelectionChange: T,
|
|
2226
|
+
handleSortChange: E,
|
|
2227
|
+
handleQuery: O,
|
|
2228
|
+
handleQueryReset: k,
|
|
2229
|
+
handlePageChange: A,
|
|
2230
|
+
handleSizeChange: j,
|
|
2231
|
+
handleAdd: M,
|
|
2232
|
+
handleOperateClick: re,
|
|
2233
|
+
handleRowClick: ie,
|
|
2234
|
+
handleRadioChange: N,
|
|
2235
|
+
handleColumnVisibleChange: ae,
|
|
2229
2236
|
resetColumnDisplay: m.resetColumnDisplay,
|
|
2230
|
-
getTableRef:
|
|
2231
|
-
getQueryRef:
|
|
2232
|
-
getSelection:
|
|
2233
|
-
clearSelection:
|
|
2234
|
-
toggleRowSelection:
|
|
2235
|
-
refresh:
|
|
2236
|
-
clearRadioSelection:
|
|
2237
|
-
setRadioSelection:
|
|
2238
|
-
getRadioSelection:
|
|
2237
|
+
getTableRef: P,
|
|
2238
|
+
getQueryRef: F,
|
|
2239
|
+
getSelection: I,
|
|
2240
|
+
clearSelection: oe,
|
|
2241
|
+
toggleRowSelection: se,
|
|
2242
|
+
refresh: ce,
|
|
2243
|
+
clearRadioSelection: L,
|
|
2244
|
+
setRadioSelection: ue,
|
|
2245
|
+
getRadioSelection: de,
|
|
2239
2246
|
refreshTree: z
|
|
2240
2247
|
};
|
|
2241
2248
|
}
|
|
@@ -2256,11 +2263,11 @@ var tr = {
|
|
|
2256
2263
|
}, nr = { class: "k-table__box" }, rr = { class: "k-table" }, ir = {
|
|
2257
2264
|
key: 0,
|
|
2258
2265
|
class: "k-table__loading-empty"
|
|
2259
|
-
}, ar = { class: "k-table-footer" }, or = /*@__PURE__*/
|
|
2266
|
+
}, ar = { class: "k-table-footer" }, or = /*@__PURE__*/ M({
|
|
2260
2267
|
name: "KTable",
|
|
2261
2268
|
inheritAttrs: !0,
|
|
2262
2269
|
__name: "KTable",
|
|
2263
|
-
props: /*@__PURE__*/
|
|
2270
|
+
props: /*@__PURE__*/ ae({
|
|
2264
2271
|
columns: {},
|
|
2265
2272
|
data: {},
|
|
2266
2273
|
action: { type: Function },
|
|
@@ -2304,14 +2311,14 @@ var tr = {
|
|
|
2304
2311
|
"sort-change"
|
|
2305
2312
|
],
|
|
2306
2313
|
setup(e, { expose: t, emit: n }) {
|
|
2307
|
-
let r = e, i = n, a = G(), o = R(), s = R(), c =
|
|
2314
|
+
let r = e, i = n, a = G(), o = R(), s = R(), c = de(er({
|
|
2308
2315
|
props: r,
|
|
2309
2316
|
emit: i,
|
|
2310
2317
|
attrs: ge(),
|
|
2311
2318
|
slots: a,
|
|
2312
2319
|
tableRef: o,
|
|
2313
2320
|
queryRef: s
|
|
2314
|
-
})), l =
|
|
2321
|
+
})), l = w(() => {
|
|
2315
2322
|
let e = /* @__PURE__ */ new Set();
|
|
2316
2323
|
a.operates && e.add("operates"), a.index && e.add("index"), a.expand && e.add("expand");
|
|
2317
2324
|
for (let t of c.renderColumns) {
|
|
@@ -2333,7 +2340,7 @@ var tr = {
|
|
|
2333
2340
|
refreshTree: c.refreshTree
|
|
2334
2341
|
}), (t, n) => {
|
|
2335
2342
|
let r = pe("loading");
|
|
2336
|
-
return
|
|
2343
|
+
return L(), D("div", nr, [c.showQuery ? (L(), T(W(bn), P({
|
|
2337
2344
|
key: 0,
|
|
2338
2345
|
ref_key: "queryRef",
|
|
2339
2346
|
ref: s,
|
|
@@ -2341,20 +2348,20 @@ var tr = {
|
|
|
2341
2348
|
}, e.query, {
|
|
2342
2349
|
onQuery: c.handleQuery,
|
|
2343
2350
|
onReset: c.handleQueryReset
|
|
2344
|
-
}), null, 16, ["onQuery", "onReset"])) :
|
|
2345
|
-
c.showToolbar ? (
|
|
2351
|
+
}), null, 16, ["onQuery", "onReset"])) : E("", !0), O("div", rr, [
|
|
2352
|
+
c.showToolbar ? (L(), T(Wn, {
|
|
2346
2353
|
key: 0,
|
|
2347
2354
|
"add-button": e.addButton,
|
|
2348
2355
|
"selection-show": e.selectionShow,
|
|
2349
2356
|
"selected-count": c.selectedCount,
|
|
2350
2357
|
onAdd: c.handleAdd
|
|
2351
|
-
},
|
|
2358
|
+
}, k({ _: 2 }, [c.hasHeaderSlot ? {
|
|
2352
2359
|
name: "header",
|
|
2353
2360
|
fn: q(() => [B(t.$slots, "header", {}, void 0, !0)]),
|
|
2354
2361
|
key: "0"
|
|
2355
2362
|
} : void 0, e.enableColumnCache ? {
|
|
2356
2363
|
name: "extra",
|
|
2357
|
-
fn: q(() => [
|
|
2364
|
+
fn: q(() => [j(Ln, {
|
|
2358
2365
|
items: c.columnSelectorItems,
|
|
2359
2366
|
onChange: c.handleColumnVisibleChange,
|
|
2360
2367
|
onReset: c.resetColumnDisplay
|
|
@@ -2369,8 +2376,8 @@ var tr = {
|
|
|
2369
2376
|
"selection-show",
|
|
2370
2377
|
"selected-count",
|
|
2371
2378
|
"onAdd"
|
|
2372
|
-
])) :
|
|
2373
|
-
ve((
|
|
2379
|
+
])) : E("", !0),
|
|
2380
|
+
ve((L(), T(W(Ne), P({
|
|
2374
2381
|
ref_key: "tableRef",
|
|
2375
2382
|
ref: o,
|
|
2376
2383
|
class: "k-table__main"
|
|
@@ -2379,8 +2386,8 @@ var tr = {
|
|
|
2379
2386
|
onSortChange: c.handleSortChange,
|
|
2380
2387
|
onRowClick: c.handleRowClick
|
|
2381
2388
|
}), {
|
|
2382
|
-
empty: q(() => [c.showLoadingEmpty ? ve((
|
|
2383
|
-
default: q(() => [e.sort ? (
|
|
2389
|
+
empty: q(() => [c.showLoadingEmpty ? ve((L(), D("span", ir, null, 512)), [[r, c.showLoadingEmpty]]) : B(t.$slots, "empty", {}, () => [A(V(t.$attrs.emptyText ?? t.$attrs["empty-text"] ?? "暂无数据"), 1)], !0, 1)]),
|
|
2390
|
+
default: q(() => [e.sort ? (L(), T(W(J), {
|
|
2384
2391
|
key: 0,
|
|
2385
2392
|
label: "拖拽排序",
|
|
2386
2393
|
align: "center",
|
|
@@ -2390,12 +2397,12 @@ var tr = {
|
|
|
2390
2397
|
row: n,
|
|
2391
2398
|
column: r,
|
|
2392
2399
|
index: i
|
|
2393
|
-
}, () => [
|
|
2394
|
-
class:
|
|
2400
|
+
}, () => [O("span", {
|
|
2401
|
+
class: I(e.sortFilter.includes(i) ? "ignore-elements" : "sort-handle k-table__sort-handle"),
|
|
2395
2402
|
"aria-hidden": "true"
|
|
2396
2403
|
}, "⋮⋮", 2)], !0)]),
|
|
2397
2404
|
_: 3
|
|
2398
|
-
})) :
|
|
2405
|
+
})) : E("", !0), (L(!0), D(S, null, z(c.renderColumns, (n, r) => (L(), T(Nn, {
|
|
2399
2406
|
key: c.getColumnIdentity(n, r),
|
|
2400
2407
|
column: n,
|
|
2401
2408
|
"column-index": r,
|
|
@@ -2406,9 +2413,9 @@ var tr = {
|
|
|
2406
2413
|
"radio-selected": c.radioSelected,
|
|
2407
2414
|
onOperateClick: c.handleOperateClick,
|
|
2408
2415
|
onRadioSelect: c.handleRadioChange
|
|
2409
|
-
},
|
|
2416
|
+
}, k({ _: 2 }, [z(l.value, (e) => ({
|
|
2410
2417
|
name: e,
|
|
2411
|
-
fn: q((n) => [B(t.$slots, e,
|
|
2418
|
+
fn: q((n) => [B(t.$slots, e, P({ ref_for: !0 }, n ?? {}), void 0, !0)])
|
|
2412
2419
|
}))]), 1032, [
|
|
2413
2420
|
"column",
|
|
2414
2421
|
"column-index",
|
|
@@ -2426,7 +2433,7 @@ var tr = {
|
|
|
2426
2433
|
"onSortChange",
|
|
2427
2434
|
"onRowClick"
|
|
2428
2435
|
])), [[r, c.tableLoading]]),
|
|
2429
|
-
|
|
2436
|
+
O("div", ar, [e.hidePagination ? E("", !0) : (L(), T(W(It), P({
|
|
2430
2437
|
key: 0,
|
|
2431
2438
|
class: "pagination"
|
|
2432
2439
|
}, c.paginationBind, {
|
|
@@ -2507,11 +2514,11 @@ function pr(e) {
|
|
|
2507
2514
|
e && a()?.setRadioSelection(e);
|
|
2508
2515
|
return;
|
|
2509
2516
|
}
|
|
2510
|
-
r.value = !0,
|
|
2517
|
+
r.value = !0, F(async () => {
|
|
2511
2518
|
let e = a();
|
|
2512
2519
|
i.forEach((t) => {
|
|
2513
2520
|
s.has(o(t)) && e?.toggleRowSelection(t, !0);
|
|
2514
|
-
}), await
|
|
2521
|
+
}), await F(), r.value = !1;
|
|
2515
2522
|
});
|
|
2516
2523
|
}
|
|
2517
2524
|
function d(e) {
|
|
@@ -2664,21 +2671,21 @@ var wr = /* @__PURE__ */ Ue({
|
|
|
2664
2671
|
KTable: () => sr,
|
|
2665
2672
|
KTimePicker: () => t,
|
|
2666
2673
|
KUpload: () => p,
|
|
2667
|
-
countEditorHtmlWords: () =>
|
|
2668
|
-
countEditorWords: () =>
|
|
2674
|
+
countEditorHtmlWords: () => ee,
|
|
2675
|
+
countEditorWords: () => te,
|
|
2669
2676
|
createUploadFileItem: () => yr,
|
|
2670
2677
|
exportKTableReport: () => gr,
|
|
2671
2678
|
exportKTableReportData: () => _r,
|
|
2672
2679
|
getAllLucideKebabNames: () => At,
|
|
2673
2680
|
getEditorHtml: () => b,
|
|
2674
2681
|
getEditorWordCount: () => v,
|
|
2675
|
-
getUploadConfig: () =>
|
|
2682
|
+
getUploadConfig: () => ne,
|
|
2676
2683
|
hasUploadSubmitFields: () => Cr,
|
|
2677
2684
|
mapGroupDictToOptions: () => cr,
|
|
2678
2685
|
pascalToKebab: () => Et,
|
|
2679
2686
|
registerFormComponents: () => h,
|
|
2680
2687
|
resolveLucideIcon: () => Dt,
|
|
2681
|
-
toKEditorValue: () =>
|
|
2688
|
+
toKEditorValue: () => x,
|
|
2682
2689
|
toLucidePascalName: () => Tt,
|
|
2683
2690
|
toUploadFiles: () => br,
|
|
2684
2691
|
toUploadSubmitFields: () => Sr,
|
|
@@ -2867,4 +2874,4 @@ function ii(e) {
|
|
|
2867
2874
|
});
|
|
2868
2875
|
}
|
|
2869
2876
|
//#endregion
|
|
2870
|
-
export { Ir as BANK_ACCOUNT_PATTERN, Hr as DECIMAL_MONEY_PATTERN, l as DICT_KEY, Lr as HTTP_URL_PATTERN, Vr as ID_CODE_PATTERN, Tr as KAffix, Er as KBreadcrumb, e as KButton, on as KCard, Dr as KCascader, g as KCheckbox, Or as KColorPicker, c as KDatePicker, o as KDialog, a as KDialogHeader, dt as KForm, St as KHandlePage, jt as KIcon, n as KInput, Ft as KLinkButton, an as KLongPage, It as KPagination, un as KPanel, bn as KPanelQuery, d as KRadio, m as KSelect, sr as KTable, t as KTimePicker, p as KUpload, zr as NON_NEGATIVE_INT_PATTERN, Br as OPTIONAL_NON_NEGATIVE_INT_PATTERN, Pr as PHONE_PATTERN, Rr as POSITIVE_INT_PATTERN, Fr as USC_CODE_PATTERN, Kr as alphaNumCodeRule, Yr as bankAccountRule, Wr as cnAlphaNumRule, ri as compareRule,
|
|
2877
|
+
export { Ir as BANK_ACCOUNT_PATTERN, Hr as DECIMAL_MONEY_PATTERN, l as DICT_KEY, Lr as HTTP_URL_PATTERN, Vr as ID_CODE_PATTERN, Tr as KAffix, Er as KBreadcrumb, e as KButton, on as KCard, Dr as KCascader, g as KCheckbox, Or as KColorPicker, c as KDatePicker, o as KDialog, a as KDialogHeader, dt as KForm, St as KHandlePage, jt as KIcon, n as KInput, Ft as KLinkButton, an as KLongPage, It as KPagination, un as KPanel, bn as KPanelQuery, d as KRadio, m as KSelect, sr as KTable, t as KTimePicker, p as KUpload, zr as NON_NEGATIVE_INT_PATTERN, Br as OPTIONAL_NON_NEGATIVE_INT_PATTERN, Pr as PHONE_PATTERN, Rr as POSITIVE_INT_PATTERN, Fr as USC_CODE_PATTERN, Kr as alphaNumCodeRule, Yr as bankAccountRule, Wr as cnAlphaNumRule, ri as compareRule, ee as countEditorHtmlWords, te as countEditorWords, $ as createPatternValidator, yr as createUploadFileItem, gr as exportKTableReport, _r as exportKTableReportData, At as getAllLucideKebabNames, jr as getDesignTheme, b as getEditorHtml, v as getEditorWordCount, ne as getUploadConfig, Cr as hasUploadSubmitFields, Xr as httpUrlRule, ei as idCodeRule, Nr as initDesignTheme, ht as mapFieldVisibility, cr as mapGroupDictToOptions, Gr as mixedNameRule, ti as moneyRule, Qr as nonNegativeIntRule, $r as optionalNonNegativeIntRule, Et as pascalToKebab, qr as phoneRule, Zr as positiveIntRule, h as registerFormComponents, Dt as resolveLucideIcon, pt as resolveSchemaField, Mr as setDesignTheme, ii as setupDesign, x as toKEditorValue, Tt as toLucidePascalName, br as toUploadFiles, Sr as toUploadSubmitFields, y as updateUploadConfig, Jr as uscCodeRule, vr as useExportKTableReport, mt as useFormSchema, Ct as useHandlePageInit, ft as useKFormTemplateRef, pr as useKTableCrossPageSelection, fr as useKTableTemplateRef, dr as withQueryFieldOptions };
|