@kayak-sj/design 1.0.64 → 1.0.66
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/assets/{index-Biv6Btn_.css → index-o6CgEMYr.css} +1 -1
- package/dist/components/k-form/composables/useKFormFields.d.ts +1 -1
- package/dist/components/k-form/types.d.ts +7 -3
- package/dist/components/k-table/KTable.d.ts +1 -0
- package/dist/components/k-table/composables/useKTable.d.ts +3 -0
- package/dist/components/k-table/index.d.ts +1 -1
- package/dist/components/k-table/report/exportKTableReport.d.ts +19 -34
- package/dist/components/k-table/report/index.d.ts +1 -1
- package/dist/components/k-table/report/pickExportColumns.d.ts +8 -2
- package/dist/components/k-table/report/useExportKTableReport.d.ts +25 -19
- package/dist/index.js +439 -376
- package/package.json +2 -2
- package/src/styles/components/_k-form.scss +34 -1
- 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
|
|
3
|
+
import { a as v, d as y, i as b, l as x, n as S, r as ee, u as te } from "./chunks/editorValue-DSKvW8ty.js";
|
|
4
|
+
import { Fragment as C, Transition as ne, 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";
|
|
@@ -9,7 +9,7 @@ import { cloneDeep as Y } from "lodash-es";
|
|
|
9
9
|
import { Loading as Re, Plus as ze } from "@element-plus/icons-vue";
|
|
10
10
|
import * as Be from "lucide-vue-next";
|
|
11
11
|
import Ve from "sortablejs";
|
|
12
|
-
import './assets/index-
|
|
12
|
+
import './assets/index-o6CgEMYr.css';//#region \0rolldown/runtime.js
|
|
13
13
|
var He = Object.defineProperty, Ue = (e, t) => {
|
|
14
14
|
let n = {};
|
|
15
15
|
for (var r in e) He(n, r, {
|
|
@@ -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: S, getFieldOptions: ee, resolveItemRules: te, itemStyle: ne, 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
|
+
...ne(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 = te(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(C, null, z(W(S), (n) => (L(), D(C, { 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(te)(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(ee)(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(ne, { 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(C, 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(C, { 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(C, 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(C, 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(C, { 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(C, { 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(C, 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(C, { 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(C, { 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(C, { key: 0 }, [c.value ? (L(), D(C, { 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(C, { 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(C, 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(C, { 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(C, 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)), S = w(() => l.value ? v.tableData.value : t.data), ee = w(() => t.loading === void 0 ? l.value ? v.loading.value : !1 : t.loading), te = w(() => ee.value || !!(l.value && t.initTable && !v.loaded.value)), C = 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: S.value,
|
|
2107
2114
|
rowKey: t.rowKey,
|
|
2108
2115
|
border: !0,
|
|
2109
2116
|
stripe: !0,
|
|
@@ -2121,63 +2128,70 @@ function er(e) {
|
|
|
2121
2128
|
tableRef: a,
|
|
2122
2129
|
rebindKey: () => b.value,
|
|
2123
2130
|
onSortEnd: (e) => {
|
|
2124
|
-
let t = [...
|
|
2131
|
+
let t = [...S.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 ne() {
|
|
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 &&
|
|
2152
|
+
function O(e) {
|
|
2153
|
+
f(e), _.resetPage(), t.clearCurrentRowOnQuery && D(), n("query", s.value), ne();
|
|
2147
2154
|
}
|
|
2148
|
-
function
|
|
2149
|
-
n("reset"), t.selectionShow && se(), t.clearCurrentRowOnReset &&
|
|
2150
|
-
}
|
|
2151
|
-
function k(e) {
|
|
2152
|
-
_.setCurrentPage(e), n("page-change", e), re();
|
|
2155
|
+
function k() {
|
|
2156
|
+
n("reset"), t.selectionShow && se(), t.clearCurrentRowOnReset && D();
|
|
2153
2157
|
}
|
|
2154
2158
|
function A(e) {
|
|
2155
|
-
_.
|
|
2159
|
+
_.setCurrentPage(e), n("page-change", e), ne();
|
|
2160
|
+
}
|
|
2161
|
+
function j(e) {
|
|
2162
|
+
_.setPageSize(e), n("size-change", e), ne();
|
|
2156
2163
|
}
|
|
2157
|
-
function
|
|
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() {
|
|
2188
|
+
if (!t.enableColumnCache) return {};
|
|
2189
|
+
let e = { ...m.columnDisplay.value };
|
|
2190
|
+
return t.columns.forEach((t, n) => {
|
|
2191
|
+
t.required && (e[Q(t, n)] = !0);
|
|
2192
|
+
}), e;
|
|
2193
|
+
}
|
|
2194
|
+
function oe() {
|
|
2181
2195
|
return a.value?.getSelectionRows() ?? [];
|
|
2182
2196
|
}
|
|
2183
2197
|
function se() {
|
|
@@ -2186,57 +2200,58 @@ function er(e) {
|
|
|
2186
2200
|
function ce(e, t) {
|
|
2187
2201
|
a.value?.toggleRowSelection(e, t);
|
|
2188
2202
|
}
|
|
2189
|
-
async function
|
|
2203
|
+
async function L(e = !1) {
|
|
2190
2204
|
l.value && await v.refresh(e);
|
|
2191
2205
|
}
|
|
2192
|
-
function
|
|
2206
|
+
function ue() {
|
|
2193
2207
|
h.clearRadioSelection(), a.value?.setCurrentRow();
|
|
2194
2208
|
}
|
|
2195
2209
|
function de(e) {
|
|
2196
2210
|
h.setRadioSelection(e);
|
|
2197
2211
|
}
|
|
2198
|
-
function
|
|
2212
|
+
function z() {
|
|
2199
2213
|
return h.getRadioSelection();
|
|
2200
2214
|
}
|
|
2201
|
-
function
|
|
2215
|
+
function B(e) {
|
|
2202
2216
|
g.refreshTree(e);
|
|
2203
2217
|
}
|
|
2204
2218
|
return {
|
|
2205
2219
|
showQuery: u,
|
|
2206
|
-
showToolbar:
|
|
2220
|
+
showToolbar: x,
|
|
2207
2221
|
hasHeaderSlot: d,
|
|
2208
2222
|
renderColumns: y,
|
|
2209
|
-
tableProps:
|
|
2210
|
-
tableLoading:
|
|
2211
|
-
showLoadingEmpty:
|
|
2223
|
+
tableProps: C,
|
|
2224
|
+
tableLoading: ee,
|
|
2225
|
+
showLoadingEmpty: te,
|
|
2212
2226
|
columnSelectorItems: m.selectorItems,
|
|
2213
2227
|
paginationBind: _.bindProps,
|
|
2214
2228
|
indexOffset: _.indexOffset,
|
|
2215
2229
|
selectedCount: c,
|
|
2216
2230
|
radioSelected: h.radioSelected,
|
|
2217
2231
|
getColumnIdentity: Q,
|
|
2218
|
-
handleSelectionChange:
|
|
2219
|
-
handleSortChange:
|
|
2220
|
-
handleQuery:
|
|
2221
|
-
handleQueryReset:
|
|
2222
|
-
handlePageChange:
|
|
2223
|
-
handleSizeChange:
|
|
2224
|
-
handleAdd:
|
|
2225
|
-
handleOperateClick:
|
|
2226
|
-
handleRowClick:
|
|
2227
|
-
handleRadioChange:
|
|
2228
|
-
handleColumnVisibleChange:
|
|
2232
|
+
handleSelectionChange: T,
|
|
2233
|
+
handleSortChange: E,
|
|
2234
|
+
handleQuery: O,
|
|
2235
|
+
handleQueryReset: k,
|
|
2236
|
+
handlePageChange: A,
|
|
2237
|
+
handleSizeChange: j,
|
|
2238
|
+
handleAdd: M,
|
|
2239
|
+
handleOperateClick: re,
|
|
2240
|
+
handleRowClick: ie,
|
|
2241
|
+
handleRadioChange: N,
|
|
2242
|
+
handleColumnVisibleChange: ae,
|
|
2229
2243
|
resetColumnDisplay: m.resetColumnDisplay,
|
|
2230
|
-
getTableRef:
|
|
2231
|
-
getQueryRef:
|
|
2232
|
-
|
|
2244
|
+
getTableRef: P,
|
|
2245
|
+
getQueryRef: F,
|
|
2246
|
+
getColumnDisplay: I,
|
|
2247
|
+
getSelection: oe,
|
|
2233
2248
|
clearSelection: se,
|
|
2234
2249
|
toggleRowSelection: ce,
|
|
2235
|
-
refresh:
|
|
2236
|
-
clearRadioSelection:
|
|
2250
|
+
refresh: L,
|
|
2251
|
+
clearRadioSelection: ue,
|
|
2237
2252
|
setRadioSelection: de,
|
|
2238
|
-
getRadioSelection:
|
|
2239
|
-
refreshTree:
|
|
2253
|
+
getRadioSelection: z,
|
|
2254
|
+
refreshTree: B
|
|
2240
2255
|
};
|
|
2241
2256
|
}
|
|
2242
2257
|
var tr = {
|
|
@@ -2256,11 +2271,11 @@ var tr = {
|
|
|
2256
2271
|
}, nr = { class: "k-table__box" }, rr = { class: "k-table" }, ir = {
|
|
2257
2272
|
key: 0,
|
|
2258
2273
|
class: "k-table__loading-empty"
|
|
2259
|
-
}, ar = { class: "k-table-footer" }, or = /*@__PURE__*/
|
|
2274
|
+
}, ar = { class: "k-table-footer" }, or = /*@__PURE__*/ M({
|
|
2260
2275
|
name: "KTable",
|
|
2261
2276
|
inheritAttrs: !0,
|
|
2262
2277
|
__name: "KTable",
|
|
2263
|
-
props: /*@__PURE__*/
|
|
2278
|
+
props: /*@__PURE__*/ ae({
|
|
2264
2279
|
columns: {},
|
|
2265
2280
|
data: {},
|
|
2266
2281
|
action: { type: Function },
|
|
@@ -2304,14 +2319,14 @@ var tr = {
|
|
|
2304
2319
|
"sort-change"
|
|
2305
2320
|
],
|
|
2306
2321
|
setup(e, { expose: t, emit: n }) {
|
|
2307
|
-
let r = e, i = n, a = G(), o = R(), s = R(), c =
|
|
2322
|
+
let r = e, i = n, a = G(), o = R(), s = R(), c = de(er({
|
|
2308
2323
|
props: r,
|
|
2309
2324
|
emit: i,
|
|
2310
2325
|
attrs: ge(),
|
|
2311
2326
|
slots: a,
|
|
2312
2327
|
tableRef: o,
|
|
2313
2328
|
queryRef: s
|
|
2314
|
-
})), l =
|
|
2329
|
+
})), l = w(() => {
|
|
2315
2330
|
let e = /* @__PURE__ */ new Set();
|
|
2316
2331
|
a.operates && e.add("operates"), a.index && e.add("index"), a.expand && e.add("expand");
|
|
2317
2332
|
for (let t of c.renderColumns) {
|
|
@@ -2323,6 +2338,7 @@ var tr = {
|
|
|
2323
2338
|
return t({
|
|
2324
2339
|
getTableRef: c.getTableRef,
|
|
2325
2340
|
getQueryRef: c.getQueryRef,
|
|
2341
|
+
getColumnDisplay: c.getColumnDisplay,
|
|
2326
2342
|
getSelection: c.getSelection,
|
|
2327
2343
|
clearSelection: c.clearSelection,
|
|
2328
2344
|
toggleRowSelection: c.toggleRowSelection,
|
|
@@ -2333,7 +2349,7 @@ var tr = {
|
|
|
2333
2349
|
refreshTree: c.refreshTree
|
|
2334
2350
|
}), (t, n) => {
|
|
2335
2351
|
let r = pe("loading");
|
|
2336
|
-
return
|
|
2352
|
+
return L(), D("div", nr, [c.showQuery ? (L(), T(W(bn), P({
|
|
2337
2353
|
key: 0,
|
|
2338
2354
|
ref_key: "queryRef",
|
|
2339
2355
|
ref: s,
|
|
@@ -2341,20 +2357,20 @@ var tr = {
|
|
|
2341
2357
|
}, e.query, {
|
|
2342
2358
|
onQuery: c.handleQuery,
|
|
2343
2359
|
onReset: c.handleQueryReset
|
|
2344
|
-
}), null, 16, ["onQuery", "onReset"])) :
|
|
2345
|
-
c.showToolbar ? (
|
|
2360
|
+
}), null, 16, ["onQuery", "onReset"])) : E("", !0), O("div", rr, [
|
|
2361
|
+
c.showToolbar ? (L(), T(Wn, {
|
|
2346
2362
|
key: 0,
|
|
2347
2363
|
"add-button": e.addButton,
|
|
2348
2364
|
"selection-show": e.selectionShow,
|
|
2349
2365
|
"selected-count": c.selectedCount,
|
|
2350
2366
|
onAdd: c.handleAdd
|
|
2351
|
-
},
|
|
2367
|
+
}, k({ _: 2 }, [c.hasHeaderSlot ? {
|
|
2352
2368
|
name: "header",
|
|
2353
2369
|
fn: q(() => [B(t.$slots, "header", {}, void 0, !0)]),
|
|
2354
2370
|
key: "0"
|
|
2355
2371
|
} : void 0, e.enableColumnCache ? {
|
|
2356
2372
|
name: "extra",
|
|
2357
|
-
fn: q(() => [
|
|
2373
|
+
fn: q(() => [j(Ln, {
|
|
2358
2374
|
items: c.columnSelectorItems,
|
|
2359
2375
|
onChange: c.handleColumnVisibleChange,
|
|
2360
2376
|
onReset: c.resetColumnDisplay
|
|
@@ -2369,8 +2385,8 @@ var tr = {
|
|
|
2369
2385
|
"selection-show",
|
|
2370
2386
|
"selected-count",
|
|
2371
2387
|
"onAdd"
|
|
2372
|
-
])) :
|
|
2373
|
-
ve((
|
|
2388
|
+
])) : E("", !0),
|
|
2389
|
+
ve((L(), T(W(Ne), P({
|
|
2374
2390
|
ref_key: "tableRef",
|
|
2375
2391
|
ref: o,
|
|
2376
2392
|
class: "k-table__main"
|
|
@@ -2379,8 +2395,8 @@ var tr = {
|
|
|
2379
2395
|
onSortChange: c.handleSortChange,
|
|
2380
2396
|
onRowClick: c.handleRowClick
|
|
2381
2397
|
}), {
|
|
2382
|
-
empty: q(() => [c.showLoadingEmpty ? ve((
|
|
2383
|
-
default: q(() => [e.sort ? (
|
|
2398
|
+
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)]),
|
|
2399
|
+
default: q(() => [e.sort ? (L(), T(W(J), {
|
|
2384
2400
|
key: 0,
|
|
2385
2401
|
label: "拖拽排序",
|
|
2386
2402
|
align: "center",
|
|
@@ -2390,12 +2406,12 @@ var tr = {
|
|
|
2390
2406
|
row: n,
|
|
2391
2407
|
column: r,
|
|
2392
2408
|
index: i
|
|
2393
|
-
}, () => [
|
|
2394
|
-
class:
|
|
2409
|
+
}, () => [O("span", {
|
|
2410
|
+
class: I(e.sortFilter.includes(i) ? "ignore-elements" : "sort-handle k-table__sort-handle"),
|
|
2395
2411
|
"aria-hidden": "true"
|
|
2396
2412
|
}, "⋮⋮", 2)], !0)]),
|
|
2397
2413
|
_: 3
|
|
2398
|
-
})) :
|
|
2414
|
+
})) : E("", !0), (L(!0), D(C, null, z(c.renderColumns, (n, r) => (L(), T(Nn, {
|
|
2399
2415
|
key: c.getColumnIdentity(n, r),
|
|
2400
2416
|
column: n,
|
|
2401
2417
|
"column-index": r,
|
|
@@ -2406,9 +2422,9 @@ var tr = {
|
|
|
2406
2422
|
"radio-selected": c.radioSelected,
|
|
2407
2423
|
onOperateClick: c.handleOperateClick,
|
|
2408
2424
|
onRadioSelect: c.handleRadioChange
|
|
2409
|
-
},
|
|
2425
|
+
}, k({ _: 2 }, [z(l.value, (e) => ({
|
|
2410
2426
|
name: e,
|
|
2411
|
-
fn: q((n) => [B(t.$slots, e,
|
|
2427
|
+
fn: q((n) => [B(t.$slots, e, P({ ref_for: !0 }, n ?? {}), void 0, !0)])
|
|
2412
2428
|
}))]), 1032, [
|
|
2413
2429
|
"column",
|
|
2414
2430
|
"column-index",
|
|
@@ -2426,7 +2442,7 @@ var tr = {
|
|
|
2426
2442
|
"onSortChange",
|
|
2427
2443
|
"onRowClick"
|
|
2428
2444
|
])), [[r, c.tableLoading]]),
|
|
2429
|
-
|
|
2445
|
+
O("div", ar, [e.hidePagination ? E("", !0) : (L(), T(W(It), P({
|
|
2430
2446
|
key: 0,
|
|
2431
2447
|
class: "pagination"
|
|
2432
2448
|
}, c.paginationBind, {
|
|
@@ -2436,7 +2452,7 @@ var tr = {
|
|
|
2436
2452
|
])]);
|
|
2437
2453
|
};
|
|
2438
2454
|
}
|
|
2439
|
-
}), sr = /*#__PURE__*/ _(or, [["__scopeId", "data-v-
|
|
2455
|
+
}), sr = /*#__PURE__*/ _(or, [["__scopeId", "data-v-8ef38691"]]);
|
|
2440
2456
|
//#endregion
|
|
2441
2457
|
//#region src/components/k-table/dictOptions.ts
|
|
2442
2458
|
function cr(e) {
|
|
@@ -2507,11 +2523,11 @@ function pr(e) {
|
|
|
2507
2523
|
e && a()?.setRadioSelection(e);
|
|
2508
2524
|
return;
|
|
2509
2525
|
}
|
|
2510
|
-
r.value = !0,
|
|
2526
|
+
r.value = !0, F(async () => {
|
|
2511
2527
|
let e = a();
|
|
2512
2528
|
i.forEach((t) => {
|
|
2513
2529
|
s.has(o(t)) && e?.toggleRowSelection(t, !0);
|
|
2514
|
-
}), await
|
|
2530
|
+
}), await F(), r.value = !1;
|
|
2515
2531
|
});
|
|
2516
2532
|
}
|
|
2517
2533
|
function d(e) {
|
|
@@ -2553,50 +2569,97 @@ function hr(e, t) {
|
|
|
2553
2569
|
//#endregion
|
|
2554
2570
|
//#region src/components/k-table/report/exportKTableReport.ts
|
|
2555
2571
|
function gr(e) {
|
|
2556
|
-
let t =
|
|
2572
|
+
let t = hr(e.columns, e);
|
|
2573
|
+
if (!e.columnDisplay || e.respectColumnDisplay === !1) return t;
|
|
2574
|
+
let n = e.columnDisplay, r = e.getExportColumnKey ?? Q, i = new Set(e.columns.filter((e, t) => e.required || n[r(e, t)] !== !1));
|
|
2575
|
+
return t.filter((e) => i.has(e));
|
|
2576
|
+
}
|
|
2577
|
+
function _r(e) {
|
|
2578
|
+
let t = e.tableRef.value, n = t?.getQueryRef()?.getParams() ?? {}, r = e.convertParams ? e.convertParams(n) : n, i = e.respectColumnDisplay ?? !0, a = e.columnDisplay ?? (i ? t?.getColumnDisplay?.() : void 0);
|
|
2557
2579
|
return e.exportApi({
|
|
2558
|
-
globColumnlist: mr(
|
|
2559
|
-
|
|
2580
|
+
globColumnlist: mr(gr({
|
|
2581
|
+
...e,
|
|
2582
|
+
columnDisplay: a
|
|
2583
|
+
})),
|
|
2584
|
+
jsondata: r
|
|
2560
2585
|
});
|
|
2561
2586
|
}
|
|
2562
|
-
function
|
|
2563
|
-
let t = hr(e.columns, e);
|
|
2587
|
+
function vr(e) {
|
|
2564
2588
|
return e.exportApi({
|
|
2565
|
-
globColumnlist: mr(
|
|
2589
|
+
globColumnlist: mr(gr(e)),
|
|
2566
2590
|
jsondata: e.jsondata
|
|
2567
2591
|
});
|
|
2568
2592
|
}
|
|
2569
2593
|
//#endregion
|
|
2570
2594
|
//#region src/components/k-table/report/useExportKTableReport.ts
|
|
2571
|
-
function
|
|
2595
|
+
async function yr(e) {
|
|
2596
|
+
if (typeof e == "string") return e.trim() || void 0;
|
|
2597
|
+
if (!e || typeof e != "object") return;
|
|
2598
|
+
let t = e;
|
|
2599
|
+
if (typeof t.head_ret_msg == "string" && t.head_ret_msg.trim()) return t.head_ret_msg;
|
|
2600
|
+
let n = t.response?.data;
|
|
2601
|
+
if (n instanceof Blob) try {
|
|
2602
|
+
let e = await yr(JSON.parse(await n.text()));
|
|
2603
|
+
if (e) return e;
|
|
2604
|
+
} catch {}
|
|
2605
|
+
else if (n && n !== e) {
|
|
2606
|
+
let e = await yr(n);
|
|
2607
|
+
if (e) return e;
|
|
2608
|
+
}
|
|
2609
|
+
return typeof t.message == "string" && t.message.trim() || void 0;
|
|
2610
|
+
}
|
|
2611
|
+
function br(e) {
|
|
2572
2612
|
let t = R(!1);
|
|
2573
|
-
|
|
2613
|
+
function n(e) {
|
|
2614
|
+
e.preventDefault(), window.location.hash = "/download";
|
|
2615
|
+
}
|
|
2616
|
+
function r() {
|
|
2617
|
+
ke.success({ message: N("span", [
|
|
2618
|
+
"提交成功,请前往",
|
|
2619
|
+
N("a", {
|
|
2620
|
+
href: "#/download",
|
|
2621
|
+
class: "el-message__link",
|
|
2622
|
+
style: { textDecoration: "underline" },
|
|
2623
|
+
onClick: n
|
|
2624
|
+
}, "文件下载"),
|
|
2625
|
+
"页面进行下载"
|
|
2626
|
+
]) });
|
|
2627
|
+
}
|
|
2628
|
+
async function i(n = !1) {
|
|
2574
2629
|
if (!t.value) {
|
|
2575
2630
|
t.value = !0;
|
|
2576
2631
|
try {
|
|
2577
|
-
await
|
|
2632
|
+
await _r({
|
|
2578
2633
|
tableRef: e.tableRef,
|
|
2579
2634
|
columns: U(e.columns),
|
|
2580
2635
|
exportApi: e.exportApi,
|
|
2581
2636
|
convertParams: e.convertParams,
|
|
2582
2637
|
excludeOperates: U(e.excludeOperates),
|
|
2583
|
-
excludeLast: U(e.excludeLast)
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2638
|
+
excludeLast: U(e.excludeLast),
|
|
2639
|
+
columnDisplay: U(e.columnDisplay),
|
|
2640
|
+
respectColumnDisplay: U(e.respectColumnDisplay) ?? !0,
|
|
2641
|
+
getExportColumnKey: e.getExportColumnKey
|
|
2642
|
+
}), n ? r() : ke.success("导出成功");
|
|
2643
|
+
} catch (t) {
|
|
2644
|
+
let n = e.onExportError?.(t), r = await yr(t) ?? "导出失败";
|
|
2645
|
+
ke.error(n || r);
|
|
2587
2646
|
} finally {
|
|
2588
2647
|
t.value = !1;
|
|
2589
2648
|
}
|
|
2590
2649
|
}
|
|
2591
2650
|
}
|
|
2651
|
+
async function a() {
|
|
2652
|
+
i(!0);
|
|
2653
|
+
}
|
|
2592
2654
|
return {
|
|
2593
|
-
exportTable:
|
|
2655
|
+
exportTable: i,
|
|
2656
|
+
asyncExportTable: a,
|
|
2594
2657
|
exportLoading: t
|
|
2595
2658
|
};
|
|
2596
2659
|
}
|
|
2597
2660
|
//#endregion
|
|
2598
2661
|
//#region src/components/k-upload/utils/uploadFileValue.ts
|
|
2599
|
-
function
|
|
2662
|
+
function xr(e, t, n = {}) {
|
|
2600
2663
|
let r = `${s(n.listType ?? "text")}${e}`;
|
|
2601
2664
|
return [{
|
|
2602
2665
|
uid: e,
|
|
@@ -2607,10 +2670,10 @@ function yr(e, t, n = {}) {
|
|
|
2607
2670
|
url: r
|
|
2608
2671
|
}];
|
|
2609
2672
|
}
|
|
2610
|
-
function
|
|
2611
|
-
return Array.isArray(e) ? e : typeof e != "string" || !e ? [] :
|
|
2673
|
+
function Sr(e, t = {}) {
|
|
2674
|
+
return Array.isArray(e) ? e : typeof e != "string" || !e ? [] : xr(e, t.fileName ?? e, { listType: t.listType });
|
|
2612
2675
|
}
|
|
2613
|
-
function
|
|
2676
|
+
function Cr(e, t = {}) {
|
|
2614
2677
|
if (typeof e == "string") return e ? {
|
|
2615
2678
|
resource_id: e,
|
|
2616
2679
|
file_name: t.fileName
|
|
@@ -2624,8 +2687,8 @@ function xr(e, t = {}) {
|
|
|
2624
2687
|
imp_count: n.imp_count
|
|
2625
2688
|
};
|
|
2626
2689
|
}
|
|
2627
|
-
function
|
|
2628
|
-
let n =
|
|
2690
|
+
function wr(e, t = {}) {
|
|
2691
|
+
let n = Cr(e, t);
|
|
2629
2692
|
return {
|
|
2630
2693
|
resource_id: n?.resource_id ?? "",
|
|
2631
2694
|
file_name: n?.file_name ?? t.fileName ?? "",
|
|
@@ -2633,20 +2696,20 @@ function Sr(e, t = {}) {
|
|
|
2633
2696
|
imp_count: n?.imp_count
|
|
2634
2697
|
};
|
|
2635
2698
|
}
|
|
2636
|
-
function
|
|
2699
|
+
function Tr(e) {
|
|
2637
2700
|
return !!(e.resource_id || e.imp_id);
|
|
2638
2701
|
}
|
|
2639
2702
|
//#endregion
|
|
2640
2703
|
//#region src/components/index.ts
|
|
2641
|
-
var
|
|
2704
|
+
var Er = /* @__PURE__ */ Ue({
|
|
2642
2705
|
DICT_KEY: () => l,
|
|
2643
|
-
KAffix: () =>
|
|
2644
|
-
KBreadcrumb: () =>
|
|
2706
|
+
KAffix: () => Dr,
|
|
2707
|
+
KBreadcrumb: () => Or,
|
|
2645
2708
|
KButton: () => e,
|
|
2646
2709
|
KCard: () => on,
|
|
2647
|
-
KCascader: () =>
|
|
2710
|
+
KCascader: () => kr,
|
|
2648
2711
|
KCheckbox: () => g,
|
|
2649
|
-
KColorPicker: () =>
|
|
2712
|
+
KColorPicker: () => Ar,
|
|
2650
2713
|
KDatePicker: () => c,
|
|
2651
2714
|
KDialog: () => o,
|
|
2652
2715
|
KDialogHeader: () => a,
|
|
@@ -2664,53 +2727,53 @@ var wr = /* @__PURE__ */ Ue({
|
|
|
2664
2727
|
KTable: () => sr,
|
|
2665
2728
|
KTimePicker: () => t,
|
|
2666
2729
|
KUpload: () => p,
|
|
2667
|
-
countEditorHtmlWords: () =>
|
|
2668
|
-
countEditorWords: () =>
|
|
2669
|
-
createUploadFileItem: () =>
|
|
2670
|
-
exportKTableReport: () =>
|
|
2671
|
-
exportKTableReportData: () =>
|
|
2730
|
+
countEditorHtmlWords: () => S,
|
|
2731
|
+
countEditorWords: () => ee,
|
|
2732
|
+
createUploadFileItem: () => xr,
|
|
2733
|
+
exportKTableReport: () => _r,
|
|
2734
|
+
exportKTableReportData: () => vr,
|
|
2672
2735
|
getAllLucideKebabNames: () => At,
|
|
2673
2736
|
getEditorHtml: () => b,
|
|
2674
2737
|
getEditorWordCount: () => v,
|
|
2675
|
-
getUploadConfig: () =>
|
|
2676
|
-
hasUploadSubmitFields: () =>
|
|
2738
|
+
getUploadConfig: () => te,
|
|
2739
|
+
hasUploadSubmitFields: () => Tr,
|
|
2677
2740
|
mapGroupDictToOptions: () => cr,
|
|
2678
2741
|
pascalToKebab: () => Et,
|
|
2679
2742
|
registerFormComponents: () => h,
|
|
2680
2743
|
resolveLucideIcon: () => Dt,
|
|
2681
|
-
toKEditorValue: () =>
|
|
2744
|
+
toKEditorValue: () => x,
|
|
2682
2745
|
toLucidePascalName: () => Tt,
|
|
2683
|
-
toUploadFiles: () =>
|
|
2684
|
-
toUploadSubmitFields: () =>
|
|
2746
|
+
toUploadFiles: () => Sr,
|
|
2747
|
+
toUploadSubmitFields: () => wr,
|
|
2685
2748
|
updateUploadConfig: () => y,
|
|
2686
|
-
useExportKTableReport: () =>
|
|
2749
|
+
useExportKTableReport: () => br,
|
|
2687
2750
|
useHandlePageInit: () => Ct,
|
|
2688
2751
|
useKFormTemplateRef: () => ft,
|
|
2689
2752
|
useKTableCrossPageSelection: () => pr,
|
|
2690
2753
|
useKTableTemplateRef: () => fr,
|
|
2691
2754
|
withQueryFieldOptions: () => dr
|
|
2692
|
-
}),
|
|
2693
|
-
function
|
|
2694
|
-
let e = document.documentElement.getAttribute(
|
|
2755
|
+
}), Dr = We("KAffix"), Or = We("KBreadcrumb"), kr = We("KCascader"), Ar = We("KColorPicker"), jr = "data-theme", Mr = "kayak-design-theme";
|
|
2756
|
+
function Nr() {
|
|
2757
|
+
let e = document.documentElement.getAttribute(jr);
|
|
2695
2758
|
return e === "blue-pro" || e === "dark" ? e : "kayak";
|
|
2696
2759
|
}
|
|
2697
|
-
function
|
|
2698
|
-
document.documentElement.setAttribute(
|
|
2760
|
+
function Pr(e) {
|
|
2761
|
+
document.documentElement.setAttribute(jr, e);
|
|
2699
2762
|
try {
|
|
2700
|
-
localStorage.setItem(
|
|
2763
|
+
localStorage.setItem(Mr, e);
|
|
2701
2764
|
} catch {}
|
|
2702
2765
|
}
|
|
2703
|
-
function
|
|
2766
|
+
function Fr() {
|
|
2704
2767
|
let e = "kayak";
|
|
2705
2768
|
try {
|
|
2706
|
-
let t = localStorage.getItem(
|
|
2769
|
+
let t = localStorage.getItem(Mr);
|
|
2707
2770
|
(t === "kayak" || t === "blue-pro" || t === "dark") && (e = t);
|
|
2708
2771
|
} catch {}
|
|
2709
|
-
|
|
2772
|
+
Pr(e);
|
|
2710
2773
|
}
|
|
2711
2774
|
//#endregion
|
|
2712
2775
|
//#region src/utils/validators.ts
|
|
2713
|
-
var
|
|
2776
|
+
var Ir = /^1[3-9]\d{9}$/, Lr = /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/, Rr = /^\d{1,20}$/, zr = /^(https?:\/\/).+/i, Br = /^[1-9]\d*$/, Vr = /^(0|[1-9][0-9]*)$/, Hr = /^(|[1-9][0-9]*)$/, Ur = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/, Wr = /(^[0-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
|
|
2714
2777
|
function $(e, t, n = !1) {
|
|
2715
2778
|
return (r, i, a) => {
|
|
2716
2779
|
if (!n && (i === "" || i == null)) {
|
|
@@ -2724,10 +2787,10 @@ function $(e, t, n = !1) {
|
|
|
2724
2787
|
a();
|
|
2725
2788
|
};
|
|
2726
2789
|
}
|
|
2727
|
-
function
|
|
2790
|
+
function Gr(e) {
|
|
2728
2791
|
return RegExp(`^(?!00.*)(\\d{0,${e}}(\\.\\d{1,2})?)$`);
|
|
2729
2792
|
}
|
|
2730
|
-
function
|
|
2793
|
+
function Kr(e, t, n = !0) {
|
|
2731
2794
|
return {
|
|
2732
2795
|
required: n,
|
|
2733
2796
|
validator: (r, i, a) => {
|
|
@@ -2744,69 +2807,69 @@ function Wr(e, t, n = !0) {
|
|
|
2744
2807
|
trigger: "change"
|
|
2745
2808
|
};
|
|
2746
2809
|
}
|
|
2747
|
-
function
|
|
2810
|
+
function qr(e, t, n = !0) {
|
|
2748
2811
|
return {
|
|
2749
2812
|
validator: $(RegExp(`^([\\u4e00-\\u9fa5]|\\w*|\\W*){1,${e}}$`), `请输入正确的${t}`, n),
|
|
2750
2813
|
trigger: "change"
|
|
2751
2814
|
};
|
|
2752
2815
|
}
|
|
2753
|
-
function
|
|
2816
|
+
function Jr(e, t, n = !0) {
|
|
2754
2817
|
return {
|
|
2755
2818
|
validator: $(RegExp(`^\\w{1,${e}}$`), `请输入正确的${t}`, n),
|
|
2756
2819
|
trigger: "change"
|
|
2757
2820
|
};
|
|
2758
2821
|
}
|
|
2759
|
-
function
|
|
2822
|
+
function Yr(e = "请输入11位手机号") {
|
|
2760
2823
|
return {
|
|
2761
|
-
validator: $(
|
|
2824
|
+
validator: $(Ir, e, !0),
|
|
2762
2825
|
trigger: "change"
|
|
2763
2826
|
};
|
|
2764
2827
|
}
|
|
2765
|
-
function
|
|
2828
|
+
function Xr(e = "请输入正确的统一社会信用代码") {
|
|
2766
2829
|
return {
|
|
2767
|
-
validator: $(
|
|
2830
|
+
validator: $(Lr, e, !0),
|
|
2768
2831
|
trigger: "change"
|
|
2769
2832
|
};
|
|
2770
2833
|
}
|
|
2771
|
-
function
|
|
2834
|
+
function Zr(e = "请输入正确的打款账号") {
|
|
2772
2835
|
return {
|
|
2773
|
-
validator: $(
|
|
2836
|
+
validator: $(Rr, e, !0),
|
|
2774
2837
|
trigger: "change"
|
|
2775
2838
|
};
|
|
2776
2839
|
}
|
|
2777
|
-
function
|
|
2840
|
+
function Qr(e = "请输入正确的链接地址", t = !1) {
|
|
2778
2841
|
return {
|
|
2779
|
-
validator: $(
|
|
2842
|
+
validator: $(zr, e, t),
|
|
2780
2843
|
trigger: "change"
|
|
2781
2844
|
};
|
|
2782
2845
|
}
|
|
2783
|
-
function
|
|
2846
|
+
function $r(e = "请输入正确的数字", t = !1) {
|
|
2784
2847
|
return {
|
|
2785
|
-
validator: $(
|
|
2848
|
+
validator: $(Br, e, t),
|
|
2786
2849
|
trigger: "change"
|
|
2787
2850
|
};
|
|
2788
2851
|
}
|
|
2789
|
-
function
|
|
2852
|
+
function ei(e) {
|
|
2790
2853
|
return {
|
|
2791
|
-
validator: $(
|
|
2854
|
+
validator: $(Vr, e, !1),
|
|
2792
2855
|
trigger: "change"
|
|
2793
2856
|
};
|
|
2794
2857
|
}
|
|
2795
|
-
function
|
|
2858
|
+
function ti(e) {
|
|
2796
2859
|
return {
|
|
2797
|
-
validator: $(
|
|
2860
|
+
validator: $(Hr, e, !1),
|
|
2798
2861
|
trigger: "change"
|
|
2799
2862
|
};
|
|
2800
2863
|
}
|
|
2801
|
-
function
|
|
2864
|
+
function ni(e = !0) {
|
|
2802
2865
|
return {
|
|
2803
2866
|
required: e,
|
|
2804
|
-
validator: $(
|
|
2867
|
+
validator: $(Ur, "请输入正确格式的证件号码", !0),
|
|
2805
2868
|
trigger: "change"
|
|
2806
2869
|
};
|
|
2807
2870
|
}
|
|
2808
|
-
function
|
|
2809
|
-
let { required: n = !0, maxInt: r = 11 } = t, i =
|
|
2871
|
+
function ri(e, t = {}) {
|
|
2872
|
+
let { required: n = !0, maxInt: r = 11 } = t, i = Gr(r);
|
|
2810
2873
|
return [{
|
|
2811
2874
|
required: n,
|
|
2812
2875
|
message: `请输入${e}`
|
|
@@ -2825,7 +2888,7 @@ function ti(e, t = {}) {
|
|
|
2825
2888
|
trigger: "change"
|
|
2826
2889
|
}];
|
|
2827
2890
|
}
|
|
2828
|
-
function
|
|
2891
|
+
function ii(e, t) {
|
|
2829
2892
|
if (t === "number") {
|
|
2830
2893
|
let t = Number(e);
|
|
2831
2894
|
return Number.isFinite(t) ? t : null;
|
|
@@ -2841,7 +2904,7 @@ function ni(e, t) {
|
|
|
2841
2904
|
let n = Date.parse(String(e));
|
|
2842
2905
|
return Number.isFinite(n) ? n : null;
|
|
2843
2906
|
}
|
|
2844
|
-
function
|
|
2907
|
+
function ai(e, t, n) {
|
|
2845
2908
|
let { op: r, message: i, skipEmpty: a = !0, type: o = "number" } = n;
|
|
2846
2909
|
return {
|
|
2847
2910
|
validator: (n, s, c) => {
|
|
@@ -2849,7 +2912,7 @@ function ri(e, t, n) {
|
|
|
2849
2912
|
c();
|
|
2850
2913
|
return;
|
|
2851
2914
|
}
|
|
2852
|
-
let l =
|
|
2915
|
+
let l = ii(e, o), u = ii(t, o);
|
|
2853
2916
|
if (l == null || u == null) {
|
|
2854
2917
|
c();
|
|
2855
2918
|
return;
|
|
@@ -2861,10 +2924,10 @@ function ri(e, t, n) {
|
|
|
2861
2924
|
}
|
|
2862
2925
|
//#endregion
|
|
2863
2926
|
//#region src/index.ts
|
|
2864
|
-
function
|
|
2865
|
-
Object.entries(
|
|
2927
|
+
function oi(e) {
|
|
2928
|
+
Object.entries(Er).forEach(([t, n]) => {
|
|
2866
2929
|
e.component(t, n);
|
|
2867
2930
|
});
|
|
2868
2931
|
}
|
|
2869
2932
|
//#endregion
|
|
2870
|
-
export {
|
|
2933
|
+
export { Rr as BANK_ACCOUNT_PATTERN, Wr as DECIMAL_MONEY_PATTERN, l as DICT_KEY, zr as HTTP_URL_PATTERN, Ur as ID_CODE_PATTERN, Dr as KAffix, Or as KBreadcrumb, e as KButton, on as KCard, kr as KCascader, g as KCheckbox, Ar 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, Vr as NON_NEGATIVE_INT_PATTERN, Hr as OPTIONAL_NON_NEGATIVE_INT_PATTERN, Ir as PHONE_PATTERN, Br as POSITIVE_INT_PATTERN, Lr as USC_CODE_PATTERN, Jr as alphaNumCodeRule, Zr as bankAccountRule, Kr as cnAlphaNumRule, ai as compareRule, S as countEditorHtmlWords, ee as countEditorWords, $ as createPatternValidator, xr as createUploadFileItem, _r as exportKTableReport, vr as exportKTableReportData, At as getAllLucideKebabNames, Nr as getDesignTheme, b as getEditorHtml, v as getEditorWordCount, te as getUploadConfig, Tr as hasUploadSubmitFields, Qr as httpUrlRule, ni as idCodeRule, Fr as initDesignTheme, ht as mapFieldVisibility, cr as mapGroupDictToOptions, qr as mixedNameRule, ri as moneyRule, ei as nonNegativeIntRule, ti as optionalNonNegativeIntRule, Et as pascalToKebab, Yr as phoneRule, $r as positiveIntRule, h as registerFormComponents, Dt as resolveLucideIcon, pt as resolveSchemaField, Pr as setDesignTheme, oi as setupDesign, x as toKEditorValue, Tt as toLucidePascalName, Sr as toUploadFiles, wr as toUploadSubmitFields, y as updateUploadConfig, Xr as uscCodeRule, br as useExportKTableReport, mt as useFormSchema, Ct as useHandlePageInit, ft as useKFormTemplateRef, pr as useKTableCrossPageSelection, fr as useKTableTemplateRef, dr as withQueryFieldOptions };
|