@kayak-sj/design 1.0.3 → 1.0.41
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/Complex-bEGviwc1.css +1 -0
- package/dist/assets/{components-DK7g2-zP.css → components-Xvz0PsON.css} +1 -1
- package/dist/chunks/Complex-DuFZOhG0.js +49 -0
- package/dist/chunks/{components-NNeTozJw.js → components-D5GZ1crv.js} +836 -832
- package/dist/components/index.js +2 -2
- package/dist/components/k-form/formComponent/DatePicker.d.ts +5 -0
- package/dist/components/k-form/formComponent/componentRegistry.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { a as t, d as n, i as r, l as i, n as a, r as o, u as s } from "./editorValue-DSKvW8ty.js";
|
|
3
|
-
import { Fragment as c, Transition as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as h, createTextVNode as g, createVNode as _, defineAsyncComponent as v, defineComponent as y, guardReactiveProps as b, h as x, inject as S, isRef as
|
|
4
|
-
import { ElButton as
|
|
3
|
+
import { Fragment as c, Transition as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as h, createTextVNode as g, createVNode as _, defineAsyncComponent as v, defineComponent as y, guardReactiveProps as b, h as x, inject as S, isRef as C, mergeDefaults as w, mergeModels as T, mergeProps as E, nextTick as D, normalizeClass as O, normalizeProps as ee, normalizeStyle as k, onBeforeUnmount as A, onMounted as j, openBlock as M, provide as te, reactive as N, ref as P, renderList as F, renderSlot as I, resolveComponent as ne, resolveDirective as re, resolveDynamicComponent as ie, shallowRef as ae, toDisplayString as L, toRef as R, toValue as z, unref as B, useAttrs as V, useModel as oe, useSlots as H, useTemplateRef as U, vShow as se, watch as W, withCtx as G, withDirectives as ce, withModifiers as le } from "vue";
|
|
4
|
+
import { ElButton as ue, ElCard as de, ElCascader as fe, ElCheckbox as pe, ElCheckboxGroup as me, ElCollapse as he, ElCollapseItem as ge, ElDatePicker as _e, ElDialog as ve, ElDivider as ye, ElForm as be, ElFormItem as xe, ElIcon as Se, ElImageViewer as Ce, ElInput as we, ElInputNumber as Te, ElMessage as Ee, ElOption as De, ElPagination as Oe, ElPopover as ke, ElProgress as Ae, ElRadio as je, ElRadioButton as Me, ElRadioGroup as Ne, ElSelect as Pe, ElTable as Fe, ElTableColumn as K, ElTag as Ie, ElTimePicker as Le, ElTooltip as Re, ElTreeSelect as ze, ElUpload as Be } from "element-plus";
|
|
5
5
|
import q from "dayjs";
|
|
6
6
|
import { cloneDeep as J } from "lodash-es";
|
|
7
7
|
import { useDebounceFn as Ve, useEventListener as He, useLocalStorage as Ue } from "@vueuse/core";
|
|
8
8
|
import { Delete as We, Download as Ge, Loading as Ke, Plus as qe, VideoPlay as Je, ZoomIn as Ye } from "@element-plus/icons-vue";
|
|
9
9
|
import * as Xe from "lucide-vue-next";
|
|
10
10
|
import Ze from "sortablejs";
|
|
11
|
-
import '../assets/components-
|
|
11
|
+
import '../assets/components-Xvz0PsON.css';//#region \0rolldown/runtime.js
|
|
12
12
|
var Qe = Object.defineProperty, $e = (e, t) => {
|
|
13
13
|
let n = {};
|
|
14
14
|
for (var r in e) Qe(n, r, {
|
|
@@ -64,8 +64,8 @@ var Y = /* @__PURE__ */ y({
|
|
|
64
64
|
name: "KButton",
|
|
65
65
|
__name: "KButton",
|
|
66
66
|
setup(e) {
|
|
67
|
-
return (e, t) => (
|
|
68
|
-
default:
|
|
67
|
+
return (e, t) => (M(), d(B(ue), ee(b(e.$attrs)), {
|
|
68
|
+
default: G(() => [I(e.$slots, "default")]),
|
|
69
69
|
_: 3
|
|
70
70
|
}, 16));
|
|
71
71
|
}
|
|
@@ -92,25 +92,25 @@ var Y = /* @__PURE__ */ y({
|
|
|
92
92
|
iconSize: { default: 22 }
|
|
93
93
|
},
|
|
94
94
|
setup(e) {
|
|
95
|
-
return (t, n) => (
|
|
96
|
-
e.icon || t.$slots.icon ? (
|
|
95
|
+
return (t, n) => (M(), p("div", nt, [
|
|
96
|
+
e.icon || t.$slots.icon ? (M(), p("div", rt, [I(t.$slots, "icon", {}, () => [(M(), d(ie(e.icon), {
|
|
97
97
|
class: "k-dialog-header__icon",
|
|
98
98
|
size: e.iconSize,
|
|
99
99
|
"stroke-width": 2.2
|
|
100
100
|
}, null, 8, ["size"]))])])) : f("", !0),
|
|
101
101
|
m("div", it, [
|
|
102
|
-
e.title || t.$slots.title ? (
|
|
103
|
-
e.description || t.$slots.description ? (
|
|
104
|
-
|
|
102
|
+
e.title || t.$slots.title ? (M(), p("p", at, [I(t.$slots, "title", {}, () => [g(L(e.title), 1)])])) : f("", !0),
|
|
103
|
+
e.description || t.$slots.description ? (M(), p("p", ot, [I(t.$slots, "description", {}, () => [g(L(e.description), 1)])])) : f("", !0),
|
|
104
|
+
I(t.$slots, "default")
|
|
105
105
|
]),
|
|
106
|
-
t.$slots.extra ? (
|
|
106
|
+
t.$slots.extra ? (M(), p("div", st, [I(t.$slots, "extra")])) : f("", !0)
|
|
107
107
|
]));
|
|
108
108
|
}
|
|
109
109
|
}), lt = { class: "k-dialog__body" }, ut = /* @__PURE__ */ y({
|
|
110
110
|
name: "KDialog",
|
|
111
111
|
inheritAttrs: !1,
|
|
112
112
|
__name: "KDialog",
|
|
113
|
-
props: /*@__PURE__*/
|
|
113
|
+
props: /*@__PURE__*/ T({
|
|
114
114
|
title: { default: "" },
|
|
115
115
|
description: { default: "" },
|
|
116
116
|
icon: { default: void 0 },
|
|
@@ -146,13 +146,13 @@ var Y = /* @__PURE__ */ y({
|
|
|
146
146
|
},
|
|
147
147
|
visibleModifiers: {}
|
|
148
148
|
}),
|
|
149
|
-
emits: /*@__PURE__*/
|
|
149
|
+
emits: /*@__PURE__*/ T([
|
|
150
150
|
"confirm",
|
|
151
151
|
"cancel",
|
|
152
152
|
"closed"
|
|
153
153
|
], ["update:visible"]),
|
|
154
154
|
setup(e, { emit: t }) {
|
|
155
|
-
let n =
|
|
155
|
+
let n = oe(e, "visible"), r = e, i = t, a = V(), o = H(), s = u(() => r.variant === "hero"), c = u(() => s.value ? void 0 : r.title), l = u(() => [
|
|
156
156
|
"k-dialog",
|
|
157
157
|
s.value ? "k-dialog--hero" : void 0,
|
|
158
158
|
a.class
|
|
@@ -172,26 +172,26 @@ var Y = /* @__PURE__ */ y({
|
|
|
172
172
|
function S() {
|
|
173
173
|
x(), i("cancel");
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function C() {
|
|
176
176
|
i("confirm");
|
|
177
177
|
}
|
|
178
|
-
return (t, r) => (
|
|
178
|
+
return (t, r) => (M(), d(B(ve), E({
|
|
179
179
|
modelValue: n.value,
|
|
180
180
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
181
181
|
class: l.value,
|
|
182
182
|
title: c.value
|
|
183
183
|
}, p.value, { onClosed: r[1] ||= (e) => i("closed") }), h({
|
|
184
|
-
default:
|
|
184
|
+
default: G(() => [m("div", lt, [I(t.$slots, "default")])]),
|
|
185
185
|
_: 2
|
|
186
186
|
}, [b.value ? {
|
|
187
187
|
name: "header",
|
|
188
|
-
fn:
|
|
188
|
+
fn: G(() => [I(t.$slots, "header", {}, () => [_(ct, {
|
|
189
189
|
title: e.title,
|
|
190
190
|
description: e.description,
|
|
191
191
|
icon: e.icon
|
|
192
|
-
}, h({ _: 2 }, [
|
|
192
|
+
}, h({ _: 2 }, [B(o).icon ? {
|
|
193
193
|
name: "icon",
|
|
194
|
-
fn:
|
|
194
|
+
fn: G(() => [I(t.$slots, "icon")]),
|
|
195
195
|
key: "0"
|
|
196
196
|
} : void 0]), 1032, [
|
|
197
197
|
"title",
|
|
@@ -199,25 +199,25 @@ var Y = /* @__PURE__ */ y({
|
|
|
199
199
|
"icon"
|
|
200
200
|
])])]),
|
|
201
201
|
key: "0"
|
|
202
|
-
} : void 0,
|
|
202
|
+
} : void 0, B(o).footer ? {
|
|
203
203
|
name: "footer",
|
|
204
|
-
fn:
|
|
204
|
+
fn: G(() => [I(t.$slots, "footer")]),
|
|
205
205
|
key: "1"
|
|
206
|
-
} : !
|
|
206
|
+
} : !B(o).footer && (e.showConfirm !== !1 || e.showCancel !== !1) ? {
|
|
207
207
|
name: "footer",
|
|
208
|
-
fn:
|
|
208
|
+
fn: G(() => [e.showCancel === !1 ? f("", !0) : (M(), d(Y, {
|
|
209
209
|
key: 0,
|
|
210
210
|
onClick: S
|
|
211
211
|
}, {
|
|
212
|
-
default:
|
|
212
|
+
default: G(() => [g(L(y.value), 1)]),
|
|
213
213
|
_: 1
|
|
214
|
-
})), e.showConfirm === !1 ? f("", !0) : (
|
|
214
|
+
})), e.showConfirm === !1 ? f("", !0) : (M(), d(Y, {
|
|
215
215
|
key: 1,
|
|
216
216
|
type: "primary",
|
|
217
217
|
loading: e.confirmLoading,
|
|
218
|
-
onClick:
|
|
218
|
+
onClick: C
|
|
219
219
|
}, {
|
|
220
|
-
default:
|
|
220
|
+
default: G(() => [g(L(v.value), 1)]),
|
|
221
221
|
_: 1
|
|
222
222
|
}, 8, ["loading"]))]),
|
|
223
223
|
key: "2"
|
|
@@ -368,7 +368,7 @@ function Ct(e, t) {
|
|
|
368
368
|
return n == null ? yt(e) : bt(e, n, t);
|
|
369
369
|
}
|
|
370
370
|
function wt(e) {
|
|
371
|
-
let t =
|
|
371
|
+
let t = N({}), n = {}, r = null, i = u(() => {
|
|
372
372
|
let t = /* @__PURE__ */ new Map();
|
|
373
373
|
return e.formConfigs.value.forEach((e) => t.set(e.id, e)), t;
|
|
374
374
|
});
|
|
@@ -495,15 +495,15 @@ function wt(e) {
|
|
|
495
495
|
t[r] = X(i);
|
|
496
496
|
}), l();
|
|
497
497
|
}
|
|
498
|
-
return
|
|
498
|
+
return W(o, (t, n) => {
|
|
499
499
|
if (!n || t.fieldSignature !== n.fieldSignature) {
|
|
500
500
|
d(e.formConfigs.value);
|
|
501
501
|
return;
|
|
502
502
|
}
|
|
503
503
|
t.displaySignature !== n.displaySignature && p(e.formConfigs.value);
|
|
504
|
-
}, { immediate: !0 }),
|
|
504
|
+
}, { immediate: !0 }), W(() => e.data?.value, (t) => {
|
|
505
505
|
xt(e) || t && Object.keys(t).length && m(t);
|
|
506
|
-
}, { deep: !0 }),
|
|
506
|
+
}, { deep: !0 }), W(() => e.modelValue?.value, (t) => {
|
|
507
507
|
!xt(e) || !t || t !== r && f(t);
|
|
508
508
|
}, {
|
|
509
509
|
deep: !0,
|
|
@@ -624,7 +624,7 @@ var zt = {
|
|
|
624
624
|
emits: ["update:modelValue"],
|
|
625
625
|
setup(e, { emit: t }) {
|
|
626
626
|
let n = e, r = t, i = u(() => Ft(n.modelValue)), a = u(() => n.cascaderProps ?? n.props), o = u(() => Rt(n.options, n.modelValue, a.value, n.separator ?? " / "));
|
|
627
|
-
return (t, n) => e.readonly ? (
|
|
627
|
+
return (t, n) => e.readonly ? (M(), p("span", zt, L(o.value), 1)) : (M(), d(B(fe), {
|
|
628
628
|
key: 1,
|
|
629
629
|
"model-value": i.value,
|
|
630
630
|
options: e.options ?? [],
|
|
@@ -666,11 +666,11 @@ var zt = {
|
|
|
666
666
|
function r(e) {
|
|
667
667
|
return n(e) === "";
|
|
668
668
|
}
|
|
669
|
-
let i = e, a = t, o =
|
|
669
|
+
let i = e, a = t, o = P([]), s = P(!1), l = P(!1), m = u(() => (i.options ?? []).map((e) => e.value)), h = u(() => {
|
|
670
670
|
let e = (i.options ?? []).filter((e) => o.value.includes(e.value)).map((e) => e.label);
|
|
671
671
|
return e.length ? e.join(", ") : "--";
|
|
672
672
|
});
|
|
673
|
-
|
|
673
|
+
W(() => i.modelValue, (e) => {
|
|
674
674
|
o.value = kt(e), v(o.value);
|
|
675
675
|
}, { immediate: !0 });
|
|
676
676
|
function v(e) {
|
|
@@ -684,7 +684,7 @@ var zt = {
|
|
|
684
684
|
function b(e) {
|
|
685
685
|
o.value = e, v(e), a("update:modelValue", e);
|
|
686
686
|
}
|
|
687
|
-
return (t, i) => (
|
|
687
|
+
return (t, i) => (M(), p("div", Vt, [e.readonly ? (M(), p("span", Ht, L(h.value), 1)) : (M(), p(c, { key: 1 }, [e.showSelectAll ? (M(), d(B(pe), {
|
|
688
688
|
key: 0,
|
|
689
689
|
modelValue: s.value,
|
|
690
690
|
"onUpdate:modelValue": i[0] ||= (e) => s.value = e,
|
|
@@ -692,28 +692,28 @@ var zt = {
|
|
|
692
692
|
disabled: e.disabled,
|
|
693
693
|
onChange: y
|
|
694
694
|
}, {
|
|
695
|
-
default:
|
|
695
|
+
default: G(() => [...i[1] ||= [g(" 全选 ", -1)]]),
|
|
696
696
|
_: 1
|
|
697
697
|
}, 8, [
|
|
698
698
|
"modelValue",
|
|
699
699
|
"indeterminate",
|
|
700
700
|
"disabled"
|
|
701
|
-
])) : f("", !0), _(
|
|
701
|
+
])) : f("", !0), _(B(me), {
|
|
702
702
|
"model-value": o.value,
|
|
703
703
|
disabled: e.disabled,
|
|
704
704
|
"onUpdate:modelValue": b
|
|
705
705
|
}, {
|
|
706
|
-
default:
|
|
706
|
+
default: G(() => [(M(!0), p(c, null, F(e.options, (e) => (M(), d(B(Re), {
|
|
707
707
|
key: String(e.value),
|
|
708
708
|
content: n(e),
|
|
709
709
|
disabled: r(e),
|
|
710
710
|
placement: "top-start"
|
|
711
711
|
}, {
|
|
712
|
-
default:
|
|
713
|
-
value:
|
|
712
|
+
default: G(() => [_(B(pe), {
|
|
713
|
+
value: B(Z)(e.value),
|
|
714
714
|
disabled: e.disabled
|
|
715
715
|
}, {
|
|
716
|
-
default:
|
|
716
|
+
default: G(() => [g(L(e.label), 1)]),
|
|
717
717
|
_: 2
|
|
718
718
|
}, 1032, ["value", "disabled"])]),
|
|
719
719
|
_: 2
|
|
@@ -764,69 +764,70 @@ var zt = {
|
|
|
764
764
|
placeholder: { default: void 0 },
|
|
765
765
|
startPlaceholder: { default: void 0 },
|
|
766
766
|
endPlaceholder: { default: void 0 },
|
|
767
|
-
valueFormat: { default: void 0 }
|
|
767
|
+
valueFormat: { default: void 0 },
|
|
768
|
+
defaultTime: { default: void 0 }
|
|
768
769
|
},
|
|
769
770
|
emits: ["update:modelValue"],
|
|
770
771
|
setup(e, { emit: t }) {
|
|
771
|
-
let n = e, r = t, i = S(Tt, null), a = u(() => n.datePickerValues ?? i?.value ?? {}), o = u(() => jt(n.modelValue)), s = u(() => Mt(n.type)), c = u(() => s.value === "datetimerange" ? "k-form-date-picker--datetimerange" : ""),
|
|
772
|
+
let n = e, r = t, i = S(Tt, null), a = u(() => n.datePickerValues ?? i?.value ?? {}), o = u(() => jt(n.modelValue)), s = u(() => Mt(n.type)), c = u(() => n.defaultTime), l = u(() => s.value === "datetimerange" ? "k-form-date-picker--datetimerange" : ""), m = (e, t) => q(e instanceof Date ? e : String(e)).format(t), h = u(() => {
|
|
772
773
|
if (!n.modelValue) return Q(n.modelValue);
|
|
773
774
|
let e = s.value.includes("datetime") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
774
|
-
if (Array.isArray(n.modelValue)) return n.modelValue.map((t) =>
|
|
775
|
+
if (Array.isArray(n.modelValue)) return n.modelValue.map((t) => m(t, e)).join(" - ");
|
|
775
776
|
let t = q(n.modelValue instanceof Date ? n.modelValue : String(n.modelValue));
|
|
776
777
|
return t.isValid() ? t.format(e) : Q(n.modelValue);
|
|
777
|
-
}),
|
|
778
|
+
}), g = u(() => {
|
|
778
779
|
if (!n.limitTime) return;
|
|
779
780
|
let e = q().hour();
|
|
780
781
|
return () => Array.from({ length: 24 }, (e, t) => t).filter((t) => t < e);
|
|
781
782
|
});
|
|
782
|
-
function
|
|
783
|
+
function _(e) {
|
|
783
784
|
let t = new Date(e.getTime());
|
|
784
785
|
return t.setHours(0, 0, 0, 0), t;
|
|
785
786
|
}
|
|
786
|
-
function
|
|
787
|
+
function v(e) {
|
|
787
788
|
if (e == null) return null;
|
|
788
|
-
if (e === "today") return
|
|
789
|
+
if (e === "today") return _(/* @__PURE__ */ new Date());
|
|
789
790
|
if (typeof e == "function") {
|
|
790
791
|
let t = e();
|
|
791
|
-
return t instanceof Date && !Number.isNaN(t.getTime()) ?
|
|
792
|
+
return t instanceof Date && !Number.isNaN(t.getTime()) ? _(t) : null;
|
|
792
793
|
}
|
|
793
|
-
return e instanceof Date && !Number.isNaN(e.getTime()) ?
|
|
794
|
+
return e instanceof Date && !Number.isNaN(e.getTime()) ? _(e) : null;
|
|
794
795
|
}
|
|
795
|
-
function
|
|
796
|
-
if (e.date !== void 0) return
|
|
796
|
+
function y(e) {
|
|
797
|
+
if (e.date !== void 0) return v(e.date);
|
|
797
798
|
if (e.id) {
|
|
798
799
|
let t = a.value[`kitDate-${e.id}`];
|
|
799
800
|
if (!t) return null;
|
|
800
|
-
if (t instanceof Date) return
|
|
801
|
+
if (t instanceof Date) return _(t);
|
|
801
802
|
let n = q(t);
|
|
802
|
-
return n.isValid() ?
|
|
803
|
+
return n.isValid() ? _(n.toDate()) : null;
|
|
803
804
|
}
|
|
804
805
|
return null;
|
|
805
806
|
}
|
|
806
|
-
function
|
|
807
|
+
function b(e, t, n) {
|
|
807
808
|
return n === ">=" ? e >= t : n === ">" ? e > t : n === "<=" ? e <= t : n === "<" ? e < t : n === "==" && e === t;
|
|
808
809
|
}
|
|
809
|
-
function
|
|
810
|
-
let t =
|
|
810
|
+
function x(e) {
|
|
811
|
+
let t = _(e).getTime(), r = v(n.minDate);
|
|
811
812
|
if (r && t < r.getTime()) return !0;
|
|
812
|
-
let i =
|
|
813
|
+
let i = v(n.maxDate);
|
|
813
814
|
if (i && t > i.getTime()) return !0;
|
|
814
815
|
let a = n.dateDisabled;
|
|
815
816
|
return !a || (typeof a == "function" && (a = a()), !a.length) ? !1 : a.some((e) => {
|
|
816
|
-
let n =
|
|
817
|
-
return n ?
|
|
817
|
+
let n = y(e);
|
|
818
|
+
return n ? b(t, n.getTime(), e.condition) : !1;
|
|
818
819
|
});
|
|
819
820
|
}
|
|
820
|
-
function
|
|
821
|
+
function C(e) {
|
|
821
822
|
r("update:modelValue", e);
|
|
822
823
|
}
|
|
823
|
-
return (t, n) => (
|
|
824
|
-
e.prepend ? (
|
|
824
|
+
return (t, n) => (M(), p("div", { class: O(["k-form-date-picker", l.value]) }, [
|
|
825
|
+
e.prepend ? (M(), p("span", {
|
|
825
826
|
key: 0,
|
|
826
827
|
class: "k-form-date-picker__text",
|
|
827
828
|
innerHTML: e.prepend
|
|
828
829
|
}, null, 8, Wt)) : f("", !0),
|
|
829
|
-
e.readonly ? (
|
|
830
|
+
e.readonly ? (M(), p("span", Gt, L(h.value), 1)) : (M(), d(B(_e), {
|
|
830
831
|
key: 1,
|
|
831
832
|
"model-value": o.value,
|
|
832
833
|
type: s.value,
|
|
@@ -835,10 +836,11 @@ var zt = {
|
|
|
835
836
|
"start-placeholder": e.startPlaceholder,
|
|
836
837
|
"end-placeholder": e.endPlaceholder,
|
|
837
838
|
"value-format": e.valueFormat,
|
|
839
|
+
"default-time": c.value,
|
|
838
840
|
disabled: e.disabled,
|
|
839
|
-
"disabled-date":
|
|
840
|
-
"disabled-hours":
|
|
841
|
-
"onUpdate:modelValue":
|
|
841
|
+
"disabled-date": x,
|
|
842
|
+
"disabled-hours": g.value,
|
|
843
|
+
"onUpdate:modelValue": C
|
|
842
844
|
}, null, 8, [
|
|
843
845
|
"model-value",
|
|
844
846
|
"type",
|
|
@@ -846,17 +848,18 @@ var zt = {
|
|
|
846
848
|
"start-placeholder",
|
|
847
849
|
"end-placeholder",
|
|
848
850
|
"value-format",
|
|
851
|
+
"default-time",
|
|
849
852
|
"disabled",
|
|
850
853
|
"disabled-hours"
|
|
851
854
|
])),
|
|
852
|
-
e.append ? (
|
|
855
|
+
e.append ? (M(), p("span", {
|
|
853
856
|
key: 3,
|
|
854
857
|
class: "k-form-date-picker__text",
|
|
855
858
|
innerHTML: e.append
|
|
856
859
|
}, null, 8, Kt)) : f("", !0)
|
|
857
860
|
], 2));
|
|
858
861
|
}
|
|
859
|
-
}), [["__scopeId", "data-v-
|
|
862
|
+
}), [["__scopeId", "data-v-b40027f7"]]), Jt = /* @__PURE__ */ y({
|
|
860
863
|
name: "KFormFallback",
|
|
861
864
|
__name: "Fallback",
|
|
862
865
|
props: {
|
|
@@ -865,7 +868,7 @@ var zt = {
|
|
|
865
868
|
},
|
|
866
869
|
setup(e) {
|
|
867
870
|
let t = e, n = u(() => `[${t.componentType ?? "Unknown"}] 待迁移`), r = u(() => Ot(t.modelValue));
|
|
868
|
-
return (e, t) => (
|
|
871
|
+
return (e, t) => (M(), d(B(we), {
|
|
869
872
|
"model-value": r.value,
|
|
870
873
|
disabled: "",
|
|
871
874
|
placeholder: n.value
|
|
@@ -916,16 +919,16 @@ var zt = {
|
|
|
916
919
|
function l(e) {
|
|
917
920
|
r("update:modelValue", e);
|
|
918
921
|
}
|
|
919
|
-
return (t, n) => (
|
|
922
|
+
return (t, n) => (M(), p("div", {
|
|
920
923
|
class: "k-form-input",
|
|
921
924
|
type: o.value ? "textarea" : void 0
|
|
922
925
|
}, [
|
|
923
|
-
e.leftText ? (
|
|
926
|
+
e.leftText ? (M(), p("div", {
|
|
924
927
|
key: 0,
|
|
925
|
-
class:
|
|
928
|
+
class: O(["k-form-input__side k-form-input__side--left", e.leftClass]),
|
|
926
929
|
onClick: n[0] ||= (...t) => e.leftClick && e.leftClick(...t)
|
|
927
|
-
},
|
|
928
|
-
e.readonly ? (
|
|
930
|
+
}, L(e.leftText), 3)) : f("", !0),
|
|
931
|
+
e.readonly ? (M(), p("div", Xt, L(c.value), 1)) : (M(), d(B(we), E({ key: 2 }, t.$attrs, {
|
|
929
932
|
"model-value": i.value,
|
|
930
933
|
autocomplete: "off",
|
|
931
934
|
clearable: s.value,
|
|
@@ -936,11 +939,11 @@ var zt = {
|
|
|
936
939
|
"onUpdate:modelValue": l
|
|
937
940
|
}), h({ _: 2 }, [e.prepend ? {
|
|
938
941
|
name: "prepend",
|
|
939
|
-
fn:
|
|
942
|
+
fn: G(() => [g(L(e.prepend), 1)]),
|
|
940
943
|
key: "0"
|
|
941
944
|
} : void 0, e.append ? {
|
|
942
945
|
name: "append",
|
|
943
|
-
fn:
|
|
946
|
+
fn: G(() => [g(L(e.append), 1)]),
|
|
944
947
|
key: "1"
|
|
945
948
|
} : void 0]), 1040, [
|
|
946
949
|
"model-value",
|
|
@@ -950,11 +953,11 @@ var zt = {
|
|
|
950
953
|
"maxlength",
|
|
951
954
|
"type"
|
|
952
955
|
])),
|
|
953
|
-
e.rightText ? (
|
|
956
|
+
e.rightText ? (M(), p("div", {
|
|
954
957
|
key: 3,
|
|
955
|
-
class:
|
|
958
|
+
class: O(["k-form-input__side k-form-input__side--right", e.rightClass]),
|
|
956
959
|
onClick: n[1] ||= (...t) => e.rightClick && e.rightClick(...t)
|
|
957
|
-
},
|
|
960
|
+
}, L(e.rightText), 3)) : f("", !0)
|
|
958
961
|
], 8, Yt));
|
|
959
962
|
}
|
|
960
963
|
}), Qt = ["innerHTML"], $t = ["innerHTML"], en = ["innerHTML"], tn = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
@@ -982,7 +985,7 @@ var zt = {
|
|
|
982
985
|
},
|
|
983
986
|
emits: ["update:modelValue"],
|
|
984
987
|
setup(e, { emit: t }) {
|
|
985
|
-
let n = e, r = t, i =
|
|
988
|
+
let n = e, r = t, i = P(["", ""]);
|
|
986
989
|
function a(e, t) {
|
|
987
990
|
let n = e ?? t;
|
|
988
991
|
return typeof n == "number" ? `${n}px` : n;
|
|
@@ -1003,22 +1006,22 @@ var zt = {
|
|
|
1003
1006
|
};
|
|
1004
1007
|
}
|
|
1005
1008
|
let c = u(() => o(n.leftProps)), l = u(() => o(n.rightProps)), d = u(() => s(n.leftWidth, n.leftProps)), h = u(() => s(n.rightWidth, n.rightProps));
|
|
1006
|
-
|
|
1009
|
+
W(() => n.modelValue, (e) => {
|
|
1007
1010
|
Array.isArray(e) && (i.value = [String(e[0] ?? ""), String(e[1] ?? "")]);
|
|
1008
1011
|
}, { immediate: !0 });
|
|
1009
1012
|
function g(e, t) {
|
|
1010
1013
|
i.value[e] = t, r("update:modelValue", [...i.value]);
|
|
1011
1014
|
}
|
|
1012
|
-
return (t, n) => (
|
|
1013
|
-
e.leftText ? (
|
|
1015
|
+
return (t, n) => (M(), p("div", { class: O(["k-form-input-mix-input", { "k-form-input-mix-input--readonly": e.readonly }]) }, [
|
|
1016
|
+
e.leftText ? (M(), p("div", {
|
|
1014
1017
|
key: 0,
|
|
1015
1018
|
class: "k-form-input-mix-input__text",
|
|
1016
1019
|
innerHTML: e.leftText
|
|
1017
1020
|
}, null, 8, Qt)) : f("", !0),
|
|
1018
1021
|
m("div", {
|
|
1019
|
-
class:
|
|
1020
|
-
style:
|
|
1021
|
-
}, [_(Zt,
|
|
1022
|
+
class: O(["k-form-input-mix-input__control", { "k-form-input-mix-input__control--affix": c.value }]),
|
|
1023
|
+
style: k(e.readonly ? void 0 : d.value)
|
|
1024
|
+
}, [_(Zt, E({
|
|
1022
1025
|
clearable: e.clearable,
|
|
1023
1026
|
"model-value": i.value[0],
|
|
1024
1027
|
readonly: e.readonly,
|
|
@@ -1031,15 +1034,15 @@ var zt = {
|
|
|
1031
1034
|
"disabled",
|
|
1032
1035
|
"placeholder"
|
|
1033
1036
|
])], 6),
|
|
1034
|
-
e.centerText ? (
|
|
1037
|
+
e.centerText ? (M(), p("div", {
|
|
1035
1038
|
key: 1,
|
|
1036
1039
|
class: "k-form-input-mix-input__text",
|
|
1037
1040
|
innerHTML: e.centerText
|
|
1038
1041
|
}, null, 8, $t)) : f("", !0),
|
|
1039
1042
|
m("div", {
|
|
1040
|
-
class:
|
|
1041
|
-
style:
|
|
1042
|
-
}, [_(Zt,
|
|
1043
|
+
class: O(["k-form-input-mix-input__control", { "k-form-input-mix-input__control--affix": l.value }]),
|
|
1044
|
+
style: k(e.readonly ? void 0 : h.value)
|
|
1045
|
+
}, [_(Zt, E({
|
|
1043
1046
|
"model-value": i.value[1],
|
|
1044
1047
|
clearable: e.clearable,
|
|
1045
1048
|
readonly: e.readonly,
|
|
@@ -1052,7 +1055,7 @@ var zt = {
|
|
|
1052
1055
|
"disabled",
|
|
1053
1056
|
"placeholder"
|
|
1054
1057
|
])], 6),
|
|
1055
|
-
e.rightText ? (
|
|
1058
|
+
e.rightText ? (M(), p("div", {
|
|
1056
1059
|
key: 2,
|
|
1057
1060
|
class: "k-form-input-mix-input__text",
|
|
1058
1061
|
innerHTML: e.rightText
|
|
@@ -1103,7 +1106,7 @@ var zt = {
|
|
|
1103
1106
|
function l(e) {
|
|
1104
1107
|
r("update:modelValue", e);
|
|
1105
1108
|
}
|
|
1106
|
-
return (t, n) => (
|
|
1109
|
+
return (t, n) => (M(), p("div", E({ class: ["k-form-select", { "k-form-select--readonly": e.readonly }] }, t.$attrs), [e.readonly ? (M(), p("span", nn, L(s.value), 1)) : (M(), d(B(Pe), {
|
|
1107
1110
|
key: 1,
|
|
1108
1111
|
"model-value": e.multiple ? a.value : i.value,
|
|
1109
1112
|
placeholder: e.placeholder,
|
|
@@ -1113,7 +1116,7 @@ var zt = {
|
|
|
1113
1116
|
disabled: e.disabled,
|
|
1114
1117
|
"onUpdate:modelValue": l
|
|
1115
1118
|
}, {
|
|
1116
|
-
default:
|
|
1119
|
+
default: G(() => [(M(!0), p(c, null, F(o.value, (e) => (M(), d(B(De), {
|
|
1117
1120
|
key: e.key,
|
|
1118
1121
|
label: e.label,
|
|
1119
1122
|
value: e.value,
|
|
@@ -1181,7 +1184,7 @@ var zt = {
|
|
|
1181
1184
|
},
|
|
1182
1185
|
emits: ["update:modelValue"],
|
|
1183
1186
|
setup(e, { emit: t }) {
|
|
1184
|
-
let n = S(dt, null), r = e, i = t, a =
|
|
1187
|
+
let n = S(dt, null), r = e, i = t, a = P({}), o = P(""), s = P(""), l = u(() => r.inputProps.id ?? "input"), d = u(() => r.selectProps.id ?? "select"), h = u(() => {
|
|
1185
1188
|
let e = J(r.inputProps);
|
|
1186
1189
|
return delete e.id, e;
|
|
1187
1190
|
}), g = u(() => {
|
|
@@ -1208,8 +1211,8 @@ var zt = {
|
|
|
1208
1211
|
flex: "0 0 auto"
|
|
1209
1212
|
};
|
|
1210
1213
|
}
|
|
1211
|
-
let
|
|
1212
|
-
function
|
|
1214
|
+
let C = u(() => y(r.inputProps)), w = u(() => y(r.selectProps)), T = u(() => x(r.selectWidth, "150px", r.selectProps)), D = u(() => x(r.inputWidth, "140px", r.inputProps));
|
|
1215
|
+
function ee(e) {
|
|
1213
1216
|
let { dict: t, options: r = [] } = e;
|
|
1214
1217
|
return t && n?.getGroupOptions ? n.getGroupOptions(t) : r.map((e) => ({
|
|
1215
1218
|
label: String(e.label ?? ""),
|
|
@@ -1217,8 +1220,8 @@ var zt = {
|
|
|
1217
1220
|
disabled: e.disabled
|
|
1218
1221
|
}));
|
|
1219
1222
|
}
|
|
1220
|
-
let
|
|
1221
|
-
function
|
|
1223
|
+
let A = u(() => ee(r.selectProps));
|
|
1224
|
+
function j() {
|
|
1222
1225
|
let e = a.value[l.value], t = a.value[d.value];
|
|
1223
1226
|
if (r.integrityCheck) {
|
|
1224
1227
|
e && t || r.inputHide ? i("update:modelValue", { ...a.value }) : i("update:modelValue", "");
|
|
@@ -1226,87 +1229,87 @@ var zt = {
|
|
|
1226
1229
|
}
|
|
1227
1230
|
i("update:modelValue", { ...a.value });
|
|
1228
1231
|
}
|
|
1229
|
-
function
|
|
1230
|
-
a.value[t] = e, o.value = String(a.value[l.value] ?? ""), s.value = a.value[d.value],
|
|
1232
|
+
function te(e, t) {
|
|
1233
|
+
a.value[t] = e, o.value = String(a.value[l.value] ?? ""), s.value = a.value[d.value], j();
|
|
1231
1234
|
}
|
|
1232
|
-
return
|
|
1235
|
+
return W(() => r.modelValue, (e) => {
|
|
1233
1236
|
e && typeof e == "object" && !Array.isArray(e) && (a.value = J(e), o.value = String(a.value[l.value] ?? ""), s.value = a.value[d.value]);
|
|
1234
1237
|
}, {
|
|
1235
1238
|
immediate: !0,
|
|
1236
1239
|
deep: !0
|
|
1237
|
-
}), (t, n) => (
|
|
1240
|
+
}), (t, n) => (M(), p("div", { class: O(["k-form-input-mix-select", { "k-form-input-mix-select--readonly": e.readonly }]) }, [m("div", {
|
|
1238
1241
|
class: "k-form-input-mix-select__row",
|
|
1239
|
-
style:
|
|
1242
|
+
style: k(b.value)
|
|
1240
1243
|
}, [
|
|
1241
|
-
e.leftText ? (
|
|
1242
|
-
e.inputBefore ? (
|
|
1243
|
-
e.inputHide ? f("", !0) : (
|
|
1244
|
+
e.leftText ? (M(), p("div", an, L(e.leftText), 1)) : f("", !0),
|
|
1245
|
+
e.inputBefore ? (M(), p(c, { key: 1 }, [
|
|
1246
|
+
e.inputHide ? f("", !0) : (M(), p("div", {
|
|
1244
1247
|
key: 0,
|
|
1245
|
-
class:
|
|
1246
|
-
style:
|
|
1247
|
-
}, [_(Zt,
|
|
1248
|
+
class: O(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": C.value }]),
|
|
1249
|
+
style: k(D.value)
|
|
1250
|
+
}, [_(Zt, E({
|
|
1248
1251
|
"model-value": o.value,
|
|
1249
1252
|
readonly: e.readonly,
|
|
1250
1253
|
disabled: e.disabled,
|
|
1251
1254
|
placeholder: e.inputPlaceholder
|
|
1252
|
-
}, h.value, { "onUpdate:modelValue": n[0] ||= (e) =>
|
|
1255
|
+
}, h.value, { "onUpdate:modelValue": n[0] ||= (e) => te(e, l.value) }), null, 16, [
|
|
1253
1256
|
"model-value",
|
|
1254
1257
|
"readonly",
|
|
1255
1258
|
"disabled",
|
|
1256
1259
|
"placeholder"
|
|
1257
1260
|
])], 6)),
|
|
1258
|
-
e.centerText ? (
|
|
1261
|
+
e.centerText ? (M(), p("div", on, L(e.centerText), 1)) : f("", !0),
|
|
1259
1262
|
m("div", {
|
|
1260
|
-
class:
|
|
1261
|
-
style:
|
|
1262
|
-
}, [_(rn,
|
|
1263
|
+
class: O(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": w.value }]),
|
|
1264
|
+
style: k(T.value)
|
|
1265
|
+
}, [_(rn, E({
|
|
1263
1266
|
"model-value": s.value,
|
|
1264
1267
|
readonly: e.readonly,
|
|
1265
1268
|
disabled: e.disabled,
|
|
1266
|
-
options:
|
|
1269
|
+
options: A.value,
|
|
1267
1270
|
placeholder: e.selectPlaceholder
|
|
1268
|
-
}, g.value, { "onUpdate:modelValue": n[1] ||= (e) =>
|
|
1271
|
+
}, g.value, { "onUpdate:modelValue": n[1] ||= (e) => te(e, d.value) }), null, 16, [
|
|
1269
1272
|
"model-value",
|
|
1270
1273
|
"readonly",
|
|
1271
1274
|
"disabled",
|
|
1272
1275
|
"options",
|
|
1273
1276
|
"placeholder"
|
|
1274
1277
|
])], 6)
|
|
1275
|
-
], 64)) : (
|
|
1278
|
+
], 64)) : (M(), p(c, { key: 2 }, [
|
|
1276
1279
|
m("div", {
|
|
1277
|
-
class:
|
|
1278
|
-
style:
|
|
1279
|
-
}, [_(rn,
|
|
1280
|
+
class: O(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": w.value }]),
|
|
1281
|
+
style: k(T.value)
|
|
1282
|
+
}, [_(rn, E({
|
|
1280
1283
|
"model-value": s.value,
|
|
1281
1284
|
readonly: e.readonly,
|
|
1282
1285
|
disabled: e.disabled,
|
|
1283
|
-
options:
|
|
1286
|
+
options: A.value,
|
|
1284
1287
|
placeholder: e.selectPlaceholder
|
|
1285
|
-
}, g.value, { "onUpdate:modelValue": n[2] ||= (e) =>
|
|
1288
|
+
}, g.value, { "onUpdate:modelValue": n[2] ||= (e) => te(e, d.value) }), null, 16, [
|
|
1286
1289
|
"model-value",
|
|
1287
1290
|
"readonly",
|
|
1288
1291
|
"disabled",
|
|
1289
1292
|
"options",
|
|
1290
1293
|
"placeholder"
|
|
1291
1294
|
])], 6),
|
|
1292
|
-
e.centerText ? (
|
|
1293
|
-
e.inputHide ? f("", !0) : (
|
|
1295
|
+
e.centerText ? (M(), p("div", sn, L(e.centerText), 1)) : f("", !0),
|
|
1296
|
+
e.inputHide ? f("", !0) : (M(), p("div", {
|
|
1294
1297
|
key: 1,
|
|
1295
|
-
class:
|
|
1296
|
-
style:
|
|
1297
|
-
}, [_(Zt,
|
|
1298
|
+
class: O(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": C.value }]),
|
|
1299
|
+
style: k(D.value)
|
|
1300
|
+
}, [_(Zt, E({
|
|
1298
1301
|
"model-value": o.value,
|
|
1299
1302
|
readonly: e.readonly,
|
|
1300
1303
|
disabled: e.disabled,
|
|
1301
1304
|
placeholder: e.inputPlaceholder
|
|
1302
|
-
}, h.value, { "onUpdate:modelValue": n[3] ||= (e) =>
|
|
1305
|
+
}, h.value, { "onUpdate:modelValue": n[3] ||= (e) => te(e, l.value) }), null, 16, [
|
|
1303
1306
|
"model-value",
|
|
1304
1307
|
"readonly",
|
|
1305
1308
|
"disabled",
|
|
1306
1309
|
"placeholder"
|
|
1307
1310
|
])], 6))
|
|
1308
1311
|
], 64)),
|
|
1309
|
-
e.rightText && !e.inputHide ? (
|
|
1312
|
+
e.rightText && !e.inputHide ? (M(), p("div", cn, L(e.rightText), 1)) : f("", !0)
|
|
1310
1313
|
], 4)], 2));
|
|
1311
1314
|
}
|
|
1312
1315
|
}), [["__scopeId", "data-v-1f46ef39"]]), un = { class: "k-form-input-number" }, dn = {
|
|
@@ -1347,9 +1350,9 @@ var zt = {
|
|
|
1347
1350
|
}
|
|
1348
1351
|
r("update:modelValue", e);
|
|
1349
1352
|
}
|
|
1350
|
-
return (t, n) => (
|
|
1351
|
-
e.leftText ? (
|
|
1352
|
-
e.readonly ? (
|
|
1353
|
+
return (t, n) => (M(), p("div", un, [
|
|
1354
|
+
e.leftText ? (M(), p("div", dn, L(e.leftText), 1)) : f("", !0),
|
|
1355
|
+
e.readonly ? (M(), p("span", fn, L(B(Q)(i.value)), 1)) : (M(), d(B(Te), {
|
|
1353
1356
|
key: 2,
|
|
1354
1357
|
"model-value": i.value,
|
|
1355
1358
|
min: e.min,
|
|
@@ -1362,7 +1365,7 @@ var zt = {
|
|
|
1362
1365
|
"max",
|
|
1363
1366
|
"disabled"
|
|
1364
1367
|
])),
|
|
1365
|
-
e.rightText ? (
|
|
1368
|
+
e.rightText ? (M(), p("div", pn, L(e.rightText), 1)) : f("", !0)
|
|
1366
1369
|
]));
|
|
1367
1370
|
}
|
|
1368
1371
|
}), [["__scopeId", "data-v-acdc4199"]]), hn = { class: "k-form-radio" }, gn = {
|
|
@@ -1384,25 +1387,25 @@ var zt = {
|
|
|
1384
1387
|
function o(e) {
|
|
1385
1388
|
r("update:modelValue", e);
|
|
1386
1389
|
}
|
|
1387
|
-
return (t, n) => (
|
|
1390
|
+
return (t, n) => (M(), p("div", hn, [e.readonly ? (M(), p("span", gn, L(a.value), 1)) : (M(), d(B(Ne), {
|
|
1388
1391
|
key: 1,
|
|
1389
1392
|
"model-value": i.value,
|
|
1390
1393
|
disabled: e.disabled,
|
|
1391
1394
|
"onUpdate:modelValue": o
|
|
1392
1395
|
}, {
|
|
1393
|
-
default:
|
|
1396
|
+
default: G(() => [(M(!0), p(c, null, F(e.options, (t) => (M(), p(c, { key: String(t.value) }, [e.type === "button" ? (M(), d(B(Me), {
|
|
1394
1397
|
key: 0,
|
|
1395
|
-
value:
|
|
1398
|
+
value: B(Z)(t.value),
|
|
1396
1399
|
disabled: t.disabled
|
|
1397
1400
|
}, {
|
|
1398
|
-
default:
|
|
1401
|
+
default: G(() => [g(L(t.label), 1)]),
|
|
1399
1402
|
_: 2
|
|
1400
|
-
}, 1032, ["value", "disabled"])) : (
|
|
1403
|
+
}, 1032, ["value", "disabled"])) : (M(), d(B(je), {
|
|
1401
1404
|
key: 1,
|
|
1402
|
-
value:
|
|
1405
|
+
value: B(Z)(t.value),
|
|
1403
1406
|
disabled: t.disabled
|
|
1404
1407
|
}, {
|
|
1405
|
-
default:
|
|
1408
|
+
default: G(() => [g(L(t.label), 1)]),
|
|
1406
1409
|
_: 2
|
|
1407
1410
|
}, 1032, ["value", "disabled"]))], 64))), 128))]),
|
|
1408
1411
|
_: 1
|
|
@@ -1434,7 +1437,7 @@ var zt = {
|
|
|
1434
1437
|
},
|
|
1435
1438
|
emits: ["update:modelValue"],
|
|
1436
1439
|
setup(e, { emit: t }) {
|
|
1437
|
-
let n = e, r = t, i =
|
|
1440
|
+
let n = e, r = t, i = P(n.options?.[0]?.value ?? ""), a = P(""), o = u(() => i.value === n.showInput);
|
|
1438
1441
|
function s() {
|
|
1439
1442
|
let e = Number(n.inputProps?.min ?? 1);
|
|
1440
1443
|
return Number.isFinite(e) ? e : 1;
|
|
@@ -1453,7 +1456,7 @@ var zt = {
|
|
|
1453
1456
|
let e = Number(a.value);
|
|
1454
1457
|
return Number.isFinite(e) ? e : null;
|
|
1455
1458
|
});
|
|
1456
|
-
|
|
1459
|
+
W(() => n.modelValue, (e) => {
|
|
1457
1460
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
1458
1461
|
let t = e;
|
|
1459
1462
|
t.radio !== void 0 && (i.value = t.radio), t.input !== void 0 && (a.value = m(t.input));
|
|
@@ -1480,11 +1483,11 @@ var zt = {
|
|
|
1480
1483
|
}
|
|
1481
1484
|
r("update:modelValue", {});
|
|
1482
1485
|
}
|
|
1483
|
-
|
|
1486
|
+
W([i, a], v, { immediate: !0 });
|
|
1484
1487
|
function y(e) {
|
|
1485
1488
|
e === n.showInput && n.type === "inputNumber" && l(a.value) && (a.value = s()), i.value = e;
|
|
1486
1489
|
}
|
|
1487
|
-
return (t, n) => (
|
|
1490
|
+
return (t, n) => (M(), p("div", { class: O(["k-form-radio-input", { "k-form-radio-input--readonly": e.readonly }]) }, [
|
|
1488
1491
|
_(_n, {
|
|
1489
1492
|
"model-value": i.value,
|
|
1490
1493
|
options: e.options,
|
|
@@ -1498,9 +1501,9 @@ var zt = {
|
|
|
1498
1501
|
"readonly",
|
|
1499
1502
|
"disabled"
|
|
1500
1503
|
]),
|
|
1501
|
-
!e.readonly && o.value ? (
|
|
1502
|
-
e.leftText ? (
|
|
1503
|
-
e.type === "inputNumber" ? (
|
|
1504
|
+
!e.readonly && o.value ? (M(), p(c, { key: 0 }, [
|
|
1505
|
+
e.leftText ? (M(), p("label", vn, L(e.leftText), 1)) : f("", !0),
|
|
1506
|
+
e.type === "inputNumber" ? (M(), d(B(Te), E({
|
|
1504
1507
|
key: 1,
|
|
1505
1508
|
"model-value": h.value,
|
|
1506
1509
|
class: "k-form-radio-input__input",
|
|
@@ -1510,7 +1513,7 @@ var zt = {
|
|
|
1510
1513
|
"model-value",
|
|
1511
1514
|
"placeholder",
|
|
1512
1515
|
"disabled"
|
|
1513
|
-
])) : (
|
|
1516
|
+
])) : (M(), d(B(we), E({
|
|
1514
1517
|
key: 2,
|
|
1515
1518
|
modelValue: a.value,
|
|
1516
1519
|
"onUpdate:modelValue": n[1] ||= (e) => a.value = e,
|
|
@@ -1522,12 +1525,12 @@ var zt = {
|
|
|
1522
1525
|
"placeholder",
|
|
1523
1526
|
"disabled"
|
|
1524
1527
|
])),
|
|
1525
|
-
e.rightText ? (
|
|
1528
|
+
e.rightText ? (M(), p("label", yn, L(e.rightText), 1)) : f("", !0)
|
|
1526
1529
|
], 64)) : f("", !0),
|
|
1527
|
-
e.readonly && o.value ? (
|
|
1528
|
-
e.leftText ? (
|
|
1529
|
-
g(" " +
|
|
1530
|
-
e.rightText ? (
|
|
1530
|
+
e.readonly && o.value ? (M(), p("div", bn, [
|
|
1531
|
+
e.leftText ? (M(), p("label", xn, L(e.leftText), 1)) : f("", !0),
|
|
1532
|
+
g(" " + L(a.value) + " ", 1),
|
|
1533
|
+
e.rightText ? (M(), p("label", Sn, L(e.rightText), 1)) : f("", !0)
|
|
1531
1534
|
])) : f("", !0)
|
|
1532
1535
|
], 2));
|
|
1533
1536
|
}
|
|
@@ -1565,15 +1568,15 @@ var zt = {
|
|
|
1565
1568
|
},
|
|
1566
1569
|
emits: ["update:modelValue"],
|
|
1567
1570
|
setup(e, { emit: t }) {
|
|
1568
|
-
let n = e, r = t, i =
|
|
1569
|
-
|
|
1571
|
+
let n = e, r = t, i = P([]), a = P(!1), o = P(!1), s = P(1), l = P(""), f = P(null), m = P(n.multiple ? [] : "");
|
|
1572
|
+
W(() => n.modelValue, (e) => {
|
|
1570
1573
|
m.value = n.multiple ? kt(e) : Z(e);
|
|
1571
|
-
}, { immediate: !0 }),
|
|
1574
|
+
}, { immediate: !0 }), W(() => n.defaultSelectedStr, (e) => {
|
|
1572
1575
|
e?.length && (i.value = [...i.value, ...e]);
|
|
1573
1576
|
}, {
|
|
1574
1577
|
immediate: !0,
|
|
1575
1578
|
deep: !0
|
|
1576
|
-
}),
|
|
1579
|
+
}), W(() => n.getListParams, () => {
|
|
1577
1580
|
m.value = n.multiple ? [] : "", i.value = [], s.value = 1, o.value = !1, h();
|
|
1578
1581
|
}, { deep: !0 });
|
|
1579
1582
|
async function h() {
|
|
@@ -1611,7 +1614,7 @@ var zt = {
|
|
|
1611
1614
|
f.value = null;
|
|
1612
1615
|
return;
|
|
1613
1616
|
}
|
|
1614
|
-
|
|
1617
|
+
D(() => {
|
|
1615
1618
|
f.value = document.querySelector(".k-form-scroll-select__dropdown .el-select-dropdown__wrap");
|
|
1616
1619
|
});
|
|
1617
1620
|
}
|
|
@@ -1626,7 +1629,7 @@ var zt = {
|
|
|
1626
1629
|
let e = Z(m.value), t = i.value.find((t) => t.value === e);
|
|
1627
1630
|
return t ? String(t.label ?? t.name ?? t.value) : Q(e);
|
|
1628
1631
|
});
|
|
1629
|
-
return h(), (t, n) => e.readonly ? (
|
|
1632
|
+
return h(), (t, n) => e.readonly ? (M(), p("span", wn, L(S.value), 1)) : (M(), d(B(Pe), {
|
|
1630
1633
|
key: 1,
|
|
1631
1634
|
"model-value": m.value,
|
|
1632
1635
|
remote: "",
|
|
@@ -1641,11 +1644,11 @@ var zt = {
|
|
|
1641
1644
|
onVisibleChange: b,
|
|
1642
1645
|
"onUpdate:modelValue": x
|
|
1643
1646
|
}, {
|
|
1644
|
-
default:
|
|
1647
|
+
default: G(() => [(M(!0), p(c, null, F(i.value, (e, t) => ce((M(), d(B(De), {
|
|
1645
1648
|
key: `${e.value}-${t}`,
|
|
1646
1649
|
label: String(e.label ?? ""),
|
|
1647
1650
|
value: e.value
|
|
1648
|
-
}, null, 8, ["label", "value"])), [[
|
|
1651
|
+
}, null, 8, ["label", "value"])), [[se, e.isShow !== !1]])), 128))]),
|
|
1649
1652
|
_: 1
|
|
1650
1653
|
}, 8, [
|
|
1651
1654
|
"model-value",
|
|
@@ -1674,7 +1677,7 @@ var zt = {
|
|
|
1674
1677
|
},
|
|
1675
1678
|
emits: ["update:modelValue"],
|
|
1676
1679
|
setup(e, { emit: t }) {
|
|
1677
|
-
let n = e, r = t, i =
|
|
1680
|
+
let n = e, r = t, i = P([]), a = u(() => {
|
|
1678
1681
|
let e = n.options ?? [];
|
|
1679
1682
|
return !n.showAllItem || e.some((e) => e.value === Dn) ? e : [{
|
|
1680
1683
|
label: "全选",
|
|
@@ -1689,7 +1692,7 @@ var zt = {
|
|
|
1689
1692
|
let e = o.value.filter((e) => i.value.includes(e.value)).map((e) => e.label);
|
|
1690
1693
|
return e.length ? e.join(", ") : Q(i.value);
|
|
1691
1694
|
});
|
|
1692
|
-
|
|
1695
|
+
W(() => n.modelValue, (e) => {
|
|
1693
1696
|
i.value = kt(e);
|
|
1694
1697
|
}, { immediate: !0 });
|
|
1695
1698
|
function f(e, t) {
|
|
@@ -1704,7 +1707,7 @@ var zt = {
|
|
|
1704
1707
|
function h(e) {
|
|
1705
1708
|
f(e, m), m = [...i.value];
|
|
1706
1709
|
}
|
|
1707
|
-
return (t, n) => e.readonly ? (
|
|
1710
|
+
return (t, n) => e.readonly ? (M(), p("span", En, L(l.value), 1)) : (M(), d(B(Pe), {
|
|
1708
1711
|
key: 1,
|
|
1709
1712
|
"model-value": i.value,
|
|
1710
1713
|
multiple: "",
|
|
@@ -1715,7 +1718,7 @@ var zt = {
|
|
|
1715
1718
|
class: "k-form-select-multiple",
|
|
1716
1719
|
"onUpdate:modelValue": h
|
|
1717
1720
|
}, {
|
|
1718
|
-
default:
|
|
1721
|
+
default: G(() => [(M(!0), p(c, null, F(o.value, (e) => (M(), d(B(De), {
|
|
1719
1722
|
key: e.key,
|
|
1720
1723
|
label: e.label,
|
|
1721
1724
|
value: e.value,
|
|
@@ -1763,7 +1766,7 @@ var zt = {
|
|
|
1763
1766
|
},
|
|
1764
1767
|
emits: ["update:modelValue"],
|
|
1765
1768
|
setup(e, { emit: t }) {
|
|
1766
|
-
let n = e, r = t, i =
|
|
1769
|
+
let n = e, r = t, i = P([]), a = u(() => n.hasDefaultOption || n.hasAllTag), o = u(() => {
|
|
1767
1770
|
let e = (n.options ?? []).map((e) => ({
|
|
1768
1771
|
label: e.label,
|
|
1769
1772
|
value: String(e.value)
|
|
@@ -1782,7 +1785,7 @@ var zt = {
|
|
|
1782
1785
|
let t = Z(e);
|
|
1783
1786
|
i.value = t ? [String(t)] : [];
|
|
1784
1787
|
}
|
|
1785
|
-
|
|
1788
|
+
W(() => n.modelValue, s, { immediate: !0 });
|
|
1786
1789
|
function l() {
|
|
1787
1790
|
if (n.multiple) {
|
|
1788
1791
|
r("update:modelValue", [...i.value]);
|
|
@@ -1799,15 +1802,15 @@ var zt = {
|
|
|
1799
1802
|
let t = ["k-form-tag__item"];
|
|
1800
1803
|
return n.disabled && t.push("is-disabled"), n.readonly && t.push("is-readonly"), i.value.includes(e) && t.push("is-active"), t.join(" ");
|
|
1801
1804
|
}
|
|
1802
|
-
return (e, t) => (
|
|
1805
|
+
return (e, t) => (M(), p("div", kn, [(M(!0), p(c, null, F(o.value, (e) => (M(), d(B(Ie), {
|
|
1803
1806
|
key: e.value || "__all__",
|
|
1804
|
-
class:
|
|
1807
|
+
class: O(["k-form-tag__item", m(e.value)]),
|
|
1805
1808
|
type: "info",
|
|
1806
1809
|
effect: "plain",
|
|
1807
1810
|
"disable-transitions": !0,
|
|
1808
1811
|
onClick: (t) => f(e.value)
|
|
1809
1812
|
}, {
|
|
1810
|
-
default:
|
|
1813
|
+
default: G(() => [g(L(e.label), 1)]),
|
|
1811
1814
|
_: 2
|
|
1812
1815
|
}, 1032, ["class", "onClick"]))), 128))]));
|
|
1813
1816
|
}
|
|
@@ -1822,7 +1825,7 @@ var zt = {
|
|
|
1822
1825
|
},
|
|
1823
1826
|
setup(e) {
|
|
1824
1827
|
let t = e, n = u(() => Ot(t.modelValue));
|
|
1825
|
-
return (e, t) => (
|
|
1828
|
+
return (e, t) => (M(), p("div", jn, [m("p", null, L(n.value), 1)]));
|
|
1826
1829
|
}
|
|
1827
1830
|
}), [["__scopeId", "data-v-9dc35114"]]), Nn = { class: "k-form-time-picker" }, Pn = ["innerHTML"], Fn = {
|
|
1828
1831
|
key: 1,
|
|
@@ -1888,14 +1891,14 @@ var zt = {
|
|
|
1888
1891
|
function g(e) {
|
|
1889
1892
|
r("update:modelValue", e);
|
|
1890
1893
|
}
|
|
1891
|
-
return (t, n) => (
|
|
1892
|
-
e.prepend ? (
|
|
1894
|
+
return (t, n) => (M(), p("div", Nn, [
|
|
1895
|
+
e.prepend ? (M(), p("span", {
|
|
1893
1896
|
key: 0,
|
|
1894
1897
|
class: "k-form-time-picker__text",
|
|
1895
1898
|
innerHTML: e.prepend
|
|
1896
1899
|
}, null, 8, Pn)) : f("", !0),
|
|
1897
|
-
e.leftText ? (
|
|
1898
|
-
e.readonly ? (
|
|
1900
|
+
e.leftText ? (M(), p("span", Fn, L(e.leftText), 1)) : f("", !0),
|
|
1901
|
+
e.readonly ? (M(), p("span", In, L(c.value), 1)) : (M(), d(B(Le), {
|
|
1899
1902
|
key: 3,
|
|
1900
1903
|
"model-value": i.value,
|
|
1901
1904
|
"is-range": o.value,
|
|
@@ -1924,8 +1927,8 @@ var zt = {
|
|
|
1924
1927
|
"disabled-minutes",
|
|
1925
1928
|
"disabled-seconds"
|
|
1926
1929
|
])),
|
|
1927
|
-
e.rightText ? (
|
|
1928
|
-
e.append ? (
|
|
1930
|
+
e.rightText ? (M(), p("span", Ln, L(e.rightText), 1)) : f("", !0),
|
|
1931
|
+
e.append ? (M(), p("span", {
|
|
1929
1932
|
key: 5,
|
|
1930
1933
|
class: "k-form-time-picker__text",
|
|
1931
1934
|
innerHTML: e.append
|
|
@@ -1961,7 +1964,7 @@ var zt = {
|
|
|
1961
1964
|
emits: ["update:modelValue"],
|
|
1962
1965
|
setup(e, { emit: t }) {
|
|
1963
1966
|
let n = e, r = t, i = u(() => Z(n.modelValue)), a = u(() => It(n.data)), o = u(() => Lt(a.value, i.value) ?? Q(i.value));
|
|
1964
|
-
return (t, n) => (
|
|
1967
|
+
return (t, n) => (M(), p("div", Bn, [e.readonly ? (M(), p("div", Vn, L(o.value), 1)) : (M(), d(B(ze), {
|
|
1965
1968
|
key: 1,
|
|
1966
1969
|
"model-value": i.value,
|
|
1967
1970
|
data: a.value,
|
|
@@ -1998,15 +2001,15 @@ var zt = {
|
|
|
1998
2001
|
],
|
|
1999
2002
|
setup(e, { emit: t }) {
|
|
2000
2003
|
let n = e, r = t, i = u(() => n.listType === "video" || n.listType === "audio"), a = u(() => n.file.status === "uploading"), o = u(() => Math.round(Number(n.file.percentage ?? 0)));
|
|
2001
|
-
return (t, n) => (
|
|
2004
|
+
return (t, n) => (M(), p("div", Un, [i.value ? (M(), p("button", {
|
|
2002
2005
|
key: 0,
|
|
2003
2006
|
type: "button",
|
|
2004
2007
|
class: "k-upload__media-play",
|
|
2005
2008
|
onClick: n[0] ||= (t) => r("play", e.file)
|
|
2006
|
-
}, [_(
|
|
2007
|
-
default:
|
|
2009
|
+
}, [_(B(Se), null, {
|
|
2010
|
+
default: G(() => [_(B(Je))]),
|
|
2008
2011
|
_: 1
|
|
2009
|
-
})])) : (
|
|
2012
|
+
})])) : (M(), p(c, { key: 1 }, [I(t.$slots, "preview", { file: e.file }, () => [m("img", {
|
|
2010
2013
|
class: "el-upload-list__item-thumbnail",
|
|
2011
2014
|
src: e.file.url,
|
|
2012
2015
|
alt: ""
|
|
@@ -2014,27 +2017,27 @@ var zt = {
|
|
|
2014
2017
|
m("span", {
|
|
2015
2018
|
class: "el-upload-list__item-preview",
|
|
2016
2019
|
onClick: n[1] ||= (t) => r("zoom", e.file)
|
|
2017
|
-
}, [_(
|
|
2018
|
-
default:
|
|
2020
|
+
}, [_(B(Se), null, {
|
|
2021
|
+
default: G(() => [_(B(Ye))]),
|
|
2019
2022
|
_: 1
|
|
2020
2023
|
})]),
|
|
2021
|
-
e.disabled ? f("", !0) : (
|
|
2024
|
+
e.disabled ? f("", !0) : (M(), p("span", {
|
|
2022
2025
|
key: 0,
|
|
2023
2026
|
class: "el-upload-list__item-download",
|
|
2024
2027
|
onClick: n[2] ||= (t) => r("download", e.file)
|
|
2025
|
-
}, [_(
|
|
2026
|
-
default:
|
|
2028
|
+
}, [_(B(Se), null, {
|
|
2029
|
+
default: G(() => [_(B(Ge))]),
|
|
2027
2030
|
_: 1
|
|
2028
2031
|
})])),
|
|
2029
|
-
e.disabled ? f("", !0) : (
|
|
2032
|
+
e.disabled ? f("", !0) : (M(), p("span", {
|
|
2030
2033
|
key: 1,
|
|
2031
2034
|
class: "el-upload-list__item-delete",
|
|
2032
2035
|
onClick: n[3] ||= (t) => r("remove", e.file)
|
|
2033
|
-
}, [_(
|
|
2034
|
-
default:
|
|
2036
|
+
}, [_(B(Se), null, {
|
|
2037
|
+
default: G(() => [_(B(We))]),
|
|
2035
2038
|
_: 1
|
|
2036
2039
|
})]))
|
|
2037
|
-
])], 64)), a.value ? (
|
|
2040
|
+
])], 64)), a.value ? (M(), d(B(Ae), {
|
|
2038
2041
|
key: 2,
|
|
2039
2042
|
class: "k-upload__file-progress",
|
|
2040
2043
|
type: e.listType === "picture-card" || e.listType === "lottie" ? "circle" : "line",
|
|
@@ -2060,20 +2063,20 @@ var zt = {
|
|
|
2060
2063
|
emits: ["downloadTemplate"],
|
|
2061
2064
|
setup(e, { emit: t }) {
|
|
2062
2065
|
let n = t;
|
|
2063
|
-
return (t, r) => (
|
|
2066
|
+
return (t, r) => (M(), p("div", qn, [e.templateCode ? (M(), p("button", {
|
|
2064
2067
|
key: 0,
|
|
2065
2068
|
type: "button",
|
|
2066
2069
|
class: "k-upload__download",
|
|
2067
|
-
onClick: r[0] ||=
|
|
2068
|
-
}, [_(
|
|
2069
|
-
default:
|
|
2070
|
+
onClick: r[0] ||= le((e) => n("downloadTemplate"), ["stop"])
|
|
2071
|
+
}, [_(B(Se), { class: "k-upload__download-icon" }, {
|
|
2072
|
+
default: G(() => [_(B(Ge))]),
|
|
2070
2073
|
_: 1
|
|
2071
|
-
}), m("span", null,
|
|
2074
|
+
}), m("span", null, L(e.templateBtnText), 1)])) : f("", !0), e.tipType === "tooltip" && e.tipText ? (M(), d(B(Re), {
|
|
2072
2075
|
key: 1,
|
|
2073
2076
|
placement: "top",
|
|
2074
2077
|
content: e.tipText
|
|
2075
2078
|
}, {
|
|
2076
|
-
default:
|
|
2079
|
+
default: G(() => [...r[1] ||= [m("i", {
|
|
2077
2080
|
class: "k-upload__tip-icon",
|
|
2078
2081
|
"aria-label": "上传说明"
|
|
2079
2082
|
}, "?", -1)]]),
|
|
@@ -2083,7 +2086,7 @@ var zt = {
|
|
|
2083
2086
|
}), [["__scopeId", "data-v-55d9c320"]]), Yn = { class: "k-upload__media-wrap" }, Xn = ["src"], Zn = ["src"], Qn = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
2084
2087
|
name: "KUploadMediaDialog",
|
|
2085
2088
|
__name: "UploadMediaDialog",
|
|
2086
|
-
props: /*@__PURE__*/
|
|
2089
|
+
props: /*@__PURE__*/ T({
|
|
2087
2090
|
url: {},
|
|
2088
2091
|
type: {}
|
|
2089
2092
|
}, {
|
|
@@ -2095,8 +2098,8 @@ var zt = {
|
|
|
2095
2098
|
}),
|
|
2096
2099
|
emits: ["update:visible"],
|
|
2097
2100
|
setup(e) {
|
|
2098
|
-
let t =
|
|
2099
|
-
return (n, r) => (
|
|
2101
|
+
let t = oe(e, "visible");
|
|
2102
|
+
return (n, r) => (M(), d(ut, {
|
|
2100
2103
|
visible: t.value,
|
|
2101
2104
|
"onUpdate:visible": r[0] ||= (e) => t.value = e,
|
|
2102
2105
|
"show-confirm": !1,
|
|
@@ -2104,12 +2107,12 @@ var zt = {
|
|
|
2104
2107
|
width: "640px",
|
|
2105
2108
|
title: "预览"
|
|
2106
2109
|
}, {
|
|
2107
|
-
default:
|
|
2110
|
+
default: G(() => [m("div", Yn, [e.type === "video" ? (M(), p("video", {
|
|
2108
2111
|
key: 0,
|
|
2109
2112
|
src: e.url,
|
|
2110
2113
|
controls: "",
|
|
2111
2114
|
class: "k-upload__media"
|
|
2112
|
-
}, "您的浏览器不支持视频播放", 8, Xn)) : (
|
|
2115
|
+
}, "您的浏览器不支持视频播放", 8, Xn)) : (M(), p("audio", {
|
|
2113
2116
|
key: 1,
|
|
2114
2117
|
src: e.url,
|
|
2115
2118
|
controls: "",
|
|
@@ -2127,11 +2130,11 @@ var zt = {
|
|
|
2127
2130
|
percentage: { default: 0 }
|
|
2128
2131
|
},
|
|
2129
2132
|
setup(e) {
|
|
2130
|
-
return (t, n) => (
|
|
2133
|
+
return (t, n) => (M(), p("div", $n, [e.tipType === "text" && e.tipText ? (M(), p("div", {
|
|
2131
2134
|
key: 0,
|
|
2132
2135
|
class: "el-upload__tip",
|
|
2133
2136
|
innerHTML: e.tipText
|
|
2134
|
-
}, null, 8, er)) : f("", !0), e.percentage > 0 ? (
|
|
2137
|
+
}, null, 8, er)) : f("", !0), e.percentage > 0 ? (M(), d(B(Ae), {
|
|
2135
2138
|
key: 1,
|
|
2136
2139
|
class: "k-upload__progress",
|
|
2137
2140
|
percentage: e.percentage,
|
|
@@ -2142,7 +2145,7 @@ var zt = {
|
|
|
2142
2145
|
//#endregion
|
|
2143
2146
|
//#region src/components/k-upload/composables/useImagePreview.ts
|
|
2144
2147
|
function nr() {
|
|
2145
|
-
let e =
|
|
2148
|
+
let e = P(!1), t = P([]), n = P(0);
|
|
2146
2149
|
function r(r, i) {
|
|
2147
2150
|
let a = i.map((e) => e.url).filter((e) => !!e), o = r.url;
|
|
2148
2151
|
if (o && !a.includes(o) && a.unshift(o), !a.length) return !1;
|
|
@@ -2163,7 +2166,7 @@ function nr() {
|
|
|
2163
2166
|
//#endregion
|
|
2164
2167
|
//#region src/components/k-upload/composables/useMediaPreview.ts
|
|
2165
2168
|
function rr() {
|
|
2166
|
-
let e =
|
|
2169
|
+
let e = P(!1), t = P(""), n = P("video");
|
|
2167
2170
|
function r(r, i) {
|
|
2168
2171
|
r.url && (t.value = r.url, n.value = i, e.value = !0);
|
|
2169
2172
|
}
|
|
@@ -2184,8 +2187,8 @@ function ir(e, t) {
|
|
|
2184
2187
|
return String(e) === String(t);
|
|
2185
2188
|
}
|
|
2186
2189
|
function ar(e) {
|
|
2187
|
-
let t =
|
|
2188
|
-
|
|
2190
|
+
let t = P([]);
|
|
2191
|
+
W(() => e.getModelValue(), (e) => {
|
|
2189
2192
|
t.value = Array.isArray(e) ? e.map((e) => ({ ...e })) : [];
|
|
2190
2193
|
}, {
|
|
2191
2194
|
immediate: !0,
|
|
@@ -2357,8 +2360,8 @@ var fr = {
|
|
|
2357
2360
|
let n = e instanceof Error ? e.message : String(e ?? "");
|
|
2358
2361
|
return /timeout/i.test(n) || /ECONNABORTED/i.test(n) ? "请求超时,请稍后重试" : n || t;
|
|
2359
2362
|
}
|
|
2360
|
-
let o = e, c = n, l =
|
|
2361
|
-
|
|
2363
|
+
let o = e, c = n, l = P(), y = U("cutterRef"), x = P(null), S = P(0);
|
|
2364
|
+
W(y, (e) => {
|
|
2362
2365
|
if (!e || !x.value) return;
|
|
2363
2366
|
let t = x.value;
|
|
2364
2367
|
x.value = null, e.openImgCutter({
|
|
@@ -2366,7 +2369,7 @@ var fr = {
|
|
|
2366
2369
|
raw: t.raw
|
|
2367
2370
|
});
|
|
2368
2371
|
});
|
|
2369
|
-
function
|
|
2372
|
+
function w(e) {
|
|
2370
2373
|
if (y.value) {
|
|
2371
2374
|
y.value.openImgCutter({
|
|
2372
2375
|
name: e.name,
|
|
@@ -2376,14 +2379,14 @@ var fr = {
|
|
|
2376
2379
|
}
|
|
2377
2380
|
x.value = e;
|
|
2378
2381
|
}
|
|
2379
|
-
let
|
|
2382
|
+
let T = u(() => o.accept ? o.accept.toLowerCase() : i[o.listType] ?? ""), { fileList: k, elFileList: A, removeByUid: j, upsert: te, findByUid: N } = ar({
|
|
2380
2383
|
getModelValue: () => o.modelValue,
|
|
2381
2384
|
onUpdate: (e) => c("update:modelValue", e),
|
|
2382
2385
|
getLimit: () => o.limit
|
|
2383
|
-
}),
|
|
2384
|
-
getAccept: () =>
|
|
2386
|
+
}), F = lr({
|
|
2387
|
+
getAccept: () => T.value,
|
|
2385
2388
|
getMaxSize: () => o.maxSize
|
|
2386
|
-
}),
|
|
2389
|
+
}), ne = cr({ getTemplateCode: () => o.templateCode }), { visible: re, urlList: ie, initialIndex: ae, open: R, close: z } = nr(), { visible: V, url: oe, type: H, open: se } = rr(), ce = u(() => ur(o.listType, o.action)), le = u(() => {
|
|
2387
2390
|
switch (o.listType) {
|
|
2388
2391
|
case "picture": return "picture";
|
|
2389
2392
|
case "picture-card":
|
|
@@ -2391,19 +2394,19 @@ var fr = {
|
|
|
2391
2394
|
case "lottie": return "picture-card";
|
|
2392
2395
|
default: return "text";
|
|
2393
2396
|
}
|
|
2394
|
-
}),
|
|
2397
|
+
}), ue = u(() => [
|
|
2395
2398
|
"picture",
|
|
2396
2399
|
"picture-card",
|
|
2397
2400
|
"picture2",
|
|
2398
2401
|
"lottie"
|
|
2399
|
-
].includes(o.listType)),
|
|
2402
|
+
].includes(o.listType)), de = u(() => [
|
|
2400
2403
|
"picture-card",
|
|
2401
2404
|
"lottie",
|
|
2402
2405
|
"video",
|
|
2403
2406
|
"audio"
|
|
2404
|
-
].includes(o.listType)),
|
|
2407
|
+
].includes(o.listType)), fe = u(() => o.listType === "picture-card" || o.listType === "lottie"), pe = u(() => !fe.value), me = u(() => !o.openCutter && o.autoUpload), he = u(() => o.limit === 1 ? void 0 : o.limit), ge = u(() => !!(o.limit && o.limit !== 1 && k.value.length >= o.limit)), _e = u(() => !o.disabled), ve = u(() => !fe.value && !o.disabled), ye = u(() => o.disabled ? "" : o.fileTips || (T.value ? `支持上传 ${T.value} 后缀文件,且不超过${o.maxSize}M` : "")), be = u(() => {
|
|
2405
2408
|
let e = ["k-upload", `k-upload--${o.listType}`];
|
|
2406
|
-
return o.disabled && e.push("k-upload_detail"),
|
|
2409
|
+
return o.disabled && e.push("k-upload_detail"), ge.value && e.push("k-upload--limit"), e.join(" ");
|
|
2407
2410
|
});
|
|
2408
2411
|
function xe(e, t, n) {
|
|
2409
2412
|
let r = e ?? {}, i = String(r.resource_id ?? ""), a = String(r.file_name ?? n), s = dr(o.listType);
|
|
@@ -2420,29 +2423,29 @@ var fr = {
|
|
|
2420
2423
|
}
|
|
2421
2424
|
function we(e, t, n) {
|
|
2422
2425
|
let r = xe(e, t, n);
|
|
2423
|
-
|
|
2426
|
+
te(r), S.value = 0, o.showSuccMessage && Ee.success("文件上传成功!"), c("success", e, r);
|
|
2424
2427
|
}
|
|
2425
|
-
let Te = (e) =>
|
|
2428
|
+
let Te = (e) => F.validate(e), De = (e, t) => {
|
|
2426
2429
|
we(e ?? {}, t.uid, t.name);
|
|
2427
2430
|
}, Oe = (e, t) => {
|
|
2428
|
-
S.value = 0, Ee.error(a(e, "文件上传失败!")),
|
|
2431
|
+
S.value = 0, Ee.error(a(e, "文件上传失败!")), j(t.uid), c("error", e, t);
|
|
2429
2432
|
}, ke = (e) => {
|
|
2430
|
-
if (typeof e.uid == "number" &&
|
|
2431
|
-
let t =
|
|
2432
|
-
|
|
2433
|
+
if (typeof e.uid == "number" && F.consumeRejected(e.uid)) return;
|
|
2434
|
+
let t = N(e.uid);
|
|
2435
|
+
j(e.uid), t && c("remove", t);
|
|
2433
2436
|
}, Ae = (e) => {
|
|
2434
|
-
let t =
|
|
2435
|
-
t && (c("preview", t), !(
|
|
2437
|
+
let t = N(e.uid);
|
|
2438
|
+
t && (c("preview", t), !(ue.value && R(t, k.value)) && ze(t));
|
|
2436
2439
|
}, je = (e) => {
|
|
2437
2440
|
o.listType === "picture2" && (S.value = Math.round(e.percent ?? 0));
|
|
2438
2441
|
}, Me = (e) => {
|
|
2439
2442
|
if (c("change", e), !(!o.openCutter || e.status !== "ready" || !e.raw)) {
|
|
2440
|
-
if (
|
|
2441
|
-
|
|
2443
|
+
if (F.validate(e.raw) === !1) {
|
|
2444
|
+
j(e.uid);
|
|
2442
2445
|
return;
|
|
2443
2446
|
}
|
|
2444
|
-
|
|
2445
|
-
l.value?.handleRemove(e),
|
|
2447
|
+
j(e.uid), D(() => {
|
|
2448
|
+
l.value?.handleRemove(e), w({
|
|
2446
2449
|
name: e.name,
|
|
2447
2450
|
raw: e.raw
|
|
2448
2451
|
});
|
|
@@ -2452,25 +2455,25 @@ var fr = {
|
|
|
2452
2455
|
c("exceed", e, t);
|
|
2453
2456
|
};
|
|
2454
2457
|
function Pe(e) {
|
|
2455
|
-
let t =
|
|
2456
|
-
t &&
|
|
2458
|
+
let t = N(e.uid);
|
|
2459
|
+
t && R(t, k.value);
|
|
2457
2460
|
}
|
|
2458
2461
|
function Fe(e) {
|
|
2459
|
-
let t =
|
|
2462
|
+
let t = N(e.uid);
|
|
2460
2463
|
t && ze(t);
|
|
2461
2464
|
}
|
|
2462
2465
|
function K(e) {
|
|
2463
|
-
let t =
|
|
2464
|
-
|
|
2466
|
+
let t = N(e.uid);
|
|
2467
|
+
j(e.uid), t && c("remove", t);
|
|
2465
2468
|
}
|
|
2466
2469
|
function Ie(e) {
|
|
2467
|
-
let t =
|
|
2468
|
-
t &&
|
|
2470
|
+
let t = N(e.uid);
|
|
2471
|
+
t && se(t, o.listType === "audio" ? "audio" : "video");
|
|
2469
2472
|
}
|
|
2470
2473
|
async function Le(e) {
|
|
2471
2474
|
try {
|
|
2472
2475
|
let t = ur("picture", o.action);
|
|
2473
|
-
we(await
|
|
2476
|
+
we(await ne.uploadFile(e, t), -Date.now(), e.name);
|
|
2474
2477
|
} catch (e) {
|
|
2475
2478
|
Ee.error(a(e, "图片上传失败!"));
|
|
2476
2479
|
}
|
|
@@ -2494,20 +2497,20 @@ var fr = {
|
|
|
2494
2497
|
submit: () => l.value?.submit(),
|
|
2495
2498
|
clearFiles: () => l.value?.clearFiles(),
|
|
2496
2499
|
uploadRef: l
|
|
2497
|
-
}), (t, n) => (
|
|
2498
|
-
_(
|
|
2500
|
+
}), (t, n) => (M(), p("div", { class: O(["k-upload-wrap", be.value]) }, [
|
|
2501
|
+
_(B(Be), E({
|
|
2499
2502
|
ref_key: "uploadRef",
|
|
2500
2503
|
ref: l
|
|
2501
2504
|
}, t.$attrs, {
|
|
2502
2505
|
class: "k-upload__inner",
|
|
2503
|
-
"file-list":
|
|
2504
|
-
action:
|
|
2505
|
-
"list-type":
|
|
2506
|
-
accept:
|
|
2507
|
-
limit:
|
|
2506
|
+
"file-list": B(A),
|
|
2507
|
+
action: ce.value,
|
|
2508
|
+
"list-type": le.value,
|
|
2509
|
+
accept: T.value,
|
|
2510
|
+
limit: he.value,
|
|
2508
2511
|
disabled: e.disabled,
|
|
2509
|
-
"auto-upload":
|
|
2510
|
-
"http-request":
|
|
2512
|
+
"auto-upload": me.value,
|
|
2513
|
+
"http-request": B(ne).httpRequest,
|
|
2511
2514
|
"before-upload": Te,
|
|
2512
2515
|
"on-success": De,
|
|
2513
2516
|
"on-error": Oe,
|
|
@@ -2517,22 +2520,22 @@ var fr = {
|
|
|
2517
2520
|
"on-change": Me,
|
|
2518
2521
|
"on-exceed": Ne
|
|
2519
2522
|
}), h({
|
|
2520
|
-
tip:
|
|
2523
|
+
tip: G(() => [I(t.$slots, "tip", {}, () => [fe.value && (e.templateCode || e.tipType === "tooltip" && ye.value) ? (M(), d(Jn, {
|
|
2521
2524
|
key: 0,
|
|
2522
2525
|
"template-code": e.templateCode,
|
|
2523
2526
|
"template-btn-text": e.templateBtnText,
|
|
2524
2527
|
"tip-type": e.tipType,
|
|
2525
|
-
"tip-text":
|
|
2528
|
+
"tip-text": ye.value,
|
|
2526
2529
|
onDownloadTemplate: q
|
|
2527
2530
|
}, null, 8, [
|
|
2528
2531
|
"template-code",
|
|
2529
2532
|
"template-btn-text",
|
|
2530
2533
|
"tip-type",
|
|
2531
2534
|
"tip-text"
|
|
2532
|
-
])) : f("", !0),
|
|
2535
|
+
])) : f("", !0), ve.value ? (M(), d(tr, {
|
|
2533
2536
|
key: 1,
|
|
2534
2537
|
"tip-type": e.tipType,
|
|
2535
|
-
"tip-text":
|
|
2538
|
+
"tip-text": ye.value,
|
|
2536
2539
|
percentage: S.value
|
|
2537
2540
|
}, null, 8, [
|
|
2538
2541
|
"tip-type",
|
|
@@ -2540,22 +2543,22 @@ var fr = {
|
|
|
2540
2543
|
"percentage"
|
|
2541
2544
|
])) : f("", !0)], !0)]),
|
|
2542
2545
|
_: 2
|
|
2543
|
-
}, [
|
|
2546
|
+
}, [_e.value ? {
|
|
2544
2547
|
name: "default",
|
|
2545
|
-
fn:
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
+
fn: G(() => [pe.value ? (M(), p("div", fr, [
|
|
2549
|
+
I(t.$slots, "buttonBefore", {}, void 0, !0),
|
|
2550
|
+
I(t.$slots, "content", {}, () => [_(Y, {
|
|
2548
2551
|
type: "primary",
|
|
2549
|
-
disabled:
|
|
2552
|
+
disabled: ge.value
|
|
2550
2553
|
}, {
|
|
2551
|
-
default:
|
|
2554
|
+
default: G(() => [g(L(e.btnText), 1)]),
|
|
2552
2555
|
_: 1
|
|
2553
2556
|
}, 8, ["disabled"])], !0),
|
|
2554
2557
|
_(Jn, {
|
|
2555
2558
|
"template-code": e.templateCode,
|
|
2556
2559
|
"template-btn-text": e.templateBtnText,
|
|
2557
2560
|
"tip-type": e.tipType,
|
|
2558
|
-
"tip-text":
|
|
2561
|
+
"tip-text": ye.value,
|
|
2559
2562
|
onDownloadTemplate: q
|
|
2560
2563
|
}, null, 8, [
|
|
2561
2564
|
"template-code",
|
|
@@ -2563,19 +2566,19 @@ var fr = {
|
|
|
2563
2566
|
"tip-type",
|
|
2564
2567
|
"tip-text"
|
|
2565
2568
|
]),
|
|
2566
|
-
|
|
2567
|
-
])) :
|
|
2568
|
-
default:
|
|
2569
|
+
I(t.$slots, "buttonAfter", {}, void 0, !0)
|
|
2570
|
+
])) : I(t.$slots, "content", {}, () => [m("div", pr, [_(B(Se), { class: "k-upload__plus" }, {
|
|
2571
|
+
default: G(() => [_(B(qe))]),
|
|
2569
2572
|
_: 1
|
|
2570
|
-
}), e.tipType === "text" &&
|
|
2573
|
+
}), e.tipType === "text" && ye.value ? (M(), p("span", {
|
|
2571
2574
|
key: 0,
|
|
2572
2575
|
class: "picture-card-tips",
|
|
2573
|
-
innerHTML:
|
|
2576
|
+
innerHTML: ye.value
|
|
2574
2577
|
}, null, 8, mr)) : f("", !0)])], !0, 1)]),
|
|
2575
2578
|
key: "0"
|
|
2576
|
-
} : void 0,
|
|
2579
|
+
} : void 0, de.value ? {
|
|
2577
2580
|
name: "file",
|
|
2578
|
-
fn:
|
|
2581
|
+
fn: G(({ file: n }) => [I(t.$slots, "file", { file: n }, () => [_(Kn, {
|
|
2579
2582
|
file: n,
|
|
2580
2583
|
"list-type": e.listType,
|
|
2581
2584
|
disabled: e.disabled,
|
|
@@ -2585,7 +2588,7 @@ var fr = {
|
|
|
2585
2588
|
onPlay: Ie
|
|
2586
2589
|
}, h({ _: 2 }, [t.$slots.preview ? {
|
|
2587
2590
|
name: "preview",
|
|
2588
|
-
fn:
|
|
2591
|
+
fn: G((e) => [I(t.$slots, "preview", ee(b(e)), void 0, !0)]),
|
|
2589
2592
|
key: "0"
|
|
2590
2593
|
} : void 0]), 1032, [
|
|
2591
2594
|
"file",
|
|
@@ -2603,28 +2606,28 @@ var fr = {
|
|
|
2603
2606
|
"auto-upload",
|
|
2604
2607
|
"http-request"
|
|
2605
2608
|
]),
|
|
2606
|
-
e.openCutter ? (
|
|
2609
|
+
e.openCutter ? (M(), d(B(r), {
|
|
2607
2610
|
key: 0,
|
|
2608
2611
|
ref_key: "cutterRef",
|
|
2609
2612
|
ref: y,
|
|
2610
2613
|
option: e.cutterOption,
|
|
2611
2614
|
onCut: Le
|
|
2612
2615
|
}, null, 8, ["option"])) : f("", !0),
|
|
2613
|
-
|
|
2616
|
+
B(re) ? (M(), d(B(Ce), {
|
|
2614
2617
|
key: 1,
|
|
2615
|
-
"url-list":
|
|
2616
|
-
"initial-index":
|
|
2617
|
-
onClose: z
|
|
2618
|
+
"url-list": B(ie),
|
|
2619
|
+
"initial-index": B(ae),
|
|
2620
|
+
onClose: B(z)
|
|
2618
2621
|
}, null, 8, [
|
|
2619
2622
|
"url-list",
|
|
2620
2623
|
"initial-index",
|
|
2621
2624
|
"onClose"
|
|
2622
2625
|
])) : f("", !0),
|
|
2623
2626
|
_(Qn, {
|
|
2624
|
-
visible:
|
|
2625
|
-
"onUpdate:visible": n[0] ||= (e) =>
|
|
2626
|
-
url:
|
|
2627
|
-
type:
|
|
2627
|
+
visible: B(V),
|
|
2628
|
+
"onUpdate:visible": n[0] ||= (e) => C(V) ? V.value = e : null,
|
|
2629
|
+
url: B(oe),
|
|
2630
|
+
type: B(H)
|
|
2628
2631
|
}, null, 8, [
|
|
2629
2632
|
"visible",
|
|
2630
2633
|
"url",
|
|
@@ -2632,7 +2635,65 @@ var fr = {
|
|
|
2632
2635
|
])
|
|
2633
2636
|
], 2));
|
|
2634
2637
|
}
|
|
2635
|
-
}), [["__scopeId", "data-v-6050c2c6"]]), gr = {
|
|
2638
|
+
}), [["__scopeId", "data-v-6050c2c6"]]), gr = /* @__PURE__ */ y({
|
|
2639
|
+
name: "KFormUpload",
|
|
2640
|
+
inheritAttrs: !1,
|
|
2641
|
+
__name: "Upload",
|
|
2642
|
+
props: {
|
|
2643
|
+
modelValue: {},
|
|
2644
|
+
options: {},
|
|
2645
|
+
readonly: { type: Boolean },
|
|
2646
|
+
disabled: { type: Boolean },
|
|
2647
|
+
listType: { default: "text" },
|
|
2648
|
+
action: { default: "" },
|
|
2649
|
+
limit: { default: 1 },
|
|
2650
|
+
maxSize: { default: 10 },
|
|
2651
|
+
btnText: { default: "点击上传" },
|
|
2652
|
+
templateCode: { default: "" },
|
|
2653
|
+
templateDownloadUrl: { default: "" },
|
|
2654
|
+
templateBtnText: { default: "模版下载" },
|
|
2655
|
+
fileTips: { default: "" },
|
|
2656
|
+
showSuccMessage: {
|
|
2657
|
+
type: Boolean,
|
|
2658
|
+
default: !0
|
|
2659
|
+
}
|
|
2660
|
+
},
|
|
2661
|
+
emits: ["update:modelValue"],
|
|
2662
|
+
setup(e, { emit: t }) {
|
|
2663
|
+
let n = e, r = t, i = u(() => Array.isArray(n.modelValue) ? n.modelValue : []);
|
|
2664
|
+
function a(e) {
|
|
2665
|
+
r("update:modelValue", e);
|
|
2666
|
+
}
|
|
2667
|
+
return (e, t) => (M(), d(hr, E(e.$attrs, {
|
|
2668
|
+
"model-value": i.value,
|
|
2669
|
+
"list-type": n.listType,
|
|
2670
|
+
action: n.action,
|
|
2671
|
+
limit: n.limit,
|
|
2672
|
+
"max-size": n.maxSize,
|
|
2673
|
+
disabled: n.disabled === !0 || n.readonly === !0,
|
|
2674
|
+
"btn-text": n.btnText,
|
|
2675
|
+
"template-code": n.templateCode,
|
|
2676
|
+
"template-download-url": n.templateDownloadUrl,
|
|
2677
|
+
"template-btn-text": n.templateBtnText,
|
|
2678
|
+
"file-tips": n.fileTips,
|
|
2679
|
+
"show-succ-message": n.showSuccMessage,
|
|
2680
|
+
"onUpdate:modelValue": a
|
|
2681
|
+
}), null, 16, [
|
|
2682
|
+
"model-value",
|
|
2683
|
+
"list-type",
|
|
2684
|
+
"action",
|
|
2685
|
+
"limit",
|
|
2686
|
+
"max-size",
|
|
2687
|
+
"disabled",
|
|
2688
|
+
"btn-text",
|
|
2689
|
+
"template-code",
|
|
2690
|
+
"template-download-url",
|
|
2691
|
+
"template-btn-text",
|
|
2692
|
+
"file-tips",
|
|
2693
|
+
"show-succ-message"
|
|
2694
|
+
]));
|
|
2695
|
+
}
|
|
2696
|
+
}), _r = v(() => import("./Editor-CNxCYFmc.js")), vr = {
|
|
2636
2697
|
Input: Zt,
|
|
2637
2698
|
Text: Mn,
|
|
2638
2699
|
Select: rn,
|
|
@@ -2647,90 +2708,33 @@ var fr = {
|
|
|
2647
2708
|
InputMixInput: tn,
|
|
2648
2709
|
InputMixSelect: ln,
|
|
2649
2710
|
RadioInput: Cn,
|
|
2711
|
+
Complex: v(() => import("./Complex-DuFZOhG0.js")),
|
|
2650
2712
|
ScrollSelect: Tn,
|
|
2651
|
-
Upload:
|
|
2652
|
-
name: "KFormUpload",
|
|
2653
|
-
inheritAttrs: !1,
|
|
2654
|
-
__name: "Upload",
|
|
2655
|
-
props: {
|
|
2656
|
-
modelValue: {},
|
|
2657
|
-
options: {},
|
|
2658
|
-
readonly: { type: Boolean },
|
|
2659
|
-
disabled: { type: Boolean },
|
|
2660
|
-
listType: { default: "text" },
|
|
2661
|
-
action: { default: "" },
|
|
2662
|
-
limit: { default: 1 },
|
|
2663
|
-
maxSize: { default: 10 },
|
|
2664
|
-
btnText: { default: "点击上传" },
|
|
2665
|
-
templateCode: { default: "" },
|
|
2666
|
-
templateDownloadUrl: { default: "" },
|
|
2667
|
-
templateBtnText: { default: "模版下载" },
|
|
2668
|
-
fileTips: { default: "" },
|
|
2669
|
-
showSuccMessage: {
|
|
2670
|
-
type: Boolean,
|
|
2671
|
-
default: !0
|
|
2672
|
-
}
|
|
2673
|
-
},
|
|
2674
|
-
emits: ["update:modelValue"],
|
|
2675
|
-
setup(e, { emit: t }) {
|
|
2676
|
-
let n = e, r = t, i = u(() => Array.isArray(n.modelValue) ? n.modelValue : []);
|
|
2677
|
-
function a(e) {
|
|
2678
|
-
r("update:modelValue", e);
|
|
2679
|
-
}
|
|
2680
|
-
return (e, t) => (j(), d(hr, T(e.$attrs, {
|
|
2681
|
-
"model-value": i.value,
|
|
2682
|
-
"list-type": n.listType,
|
|
2683
|
-
action: n.action,
|
|
2684
|
-
limit: n.limit,
|
|
2685
|
-
"max-size": n.maxSize,
|
|
2686
|
-
disabled: n.disabled === !0 || n.readonly === !0,
|
|
2687
|
-
"btn-text": n.btnText,
|
|
2688
|
-
"template-code": n.templateCode,
|
|
2689
|
-
"template-download-url": n.templateDownloadUrl,
|
|
2690
|
-
"template-btn-text": n.templateBtnText,
|
|
2691
|
-
"file-tips": n.fileTips,
|
|
2692
|
-
"show-succ-message": n.showSuccMessage,
|
|
2693
|
-
"onUpdate:modelValue": a
|
|
2694
|
-
}), null, 16, [
|
|
2695
|
-
"model-value",
|
|
2696
|
-
"list-type",
|
|
2697
|
-
"action",
|
|
2698
|
-
"limit",
|
|
2699
|
-
"max-size",
|
|
2700
|
-
"disabled",
|
|
2701
|
-
"btn-text",
|
|
2702
|
-
"template-code",
|
|
2703
|
-
"template-download-url",
|
|
2704
|
-
"template-btn-text",
|
|
2705
|
-
"file-tips",
|
|
2706
|
-
"show-succ-message"
|
|
2707
|
-
]));
|
|
2708
|
-
}
|
|
2709
|
-
}),
|
|
2713
|
+
Upload: gr,
|
|
2710
2714
|
Tag: An,
|
|
2711
2715
|
TimePicker: zn,
|
|
2712
|
-
Editor:
|
|
2716
|
+
Editor: _r
|
|
2713
2717
|
};
|
|
2714
|
-
function
|
|
2715
|
-
return
|
|
2718
|
+
function yr(e) {
|
|
2719
|
+
return vr[e] ?? Jt;
|
|
2716
2720
|
}
|
|
2717
|
-
function
|
|
2718
|
-
Object.assign(
|
|
2721
|
+
function br(e) {
|
|
2722
|
+
Object.assign(vr, e);
|
|
2719
2723
|
}
|
|
2720
2724
|
//#endregion
|
|
2721
2725
|
//#region src/components/k-form/utils/resolveFormFieldComponent.ts
|
|
2722
|
-
function
|
|
2726
|
+
function xr(e) {
|
|
2723
2727
|
return typeof e == "string";
|
|
2724
2728
|
}
|
|
2725
|
-
function
|
|
2729
|
+
function Sr(e) {
|
|
2726
2730
|
return typeof e == "object" || typeof e == "function";
|
|
2727
2731
|
}
|
|
2728
|
-
function
|
|
2729
|
-
return
|
|
2732
|
+
function Cr(e) {
|
|
2733
|
+
return Sr(e) ? e : yr(e);
|
|
2730
2734
|
}
|
|
2731
2735
|
//#endregion
|
|
2732
2736
|
//#region src/components/k-form/KFormField.vue
|
|
2733
|
-
var
|
|
2737
|
+
var wr = /* @__PURE__ */ y({
|
|
2734
2738
|
name: "KFormField",
|
|
2735
2739
|
__name: "KFormField",
|
|
2736
2740
|
props: {
|
|
@@ -2742,7 +2746,7 @@ var Sr = /* @__PURE__ */ y({
|
|
|
2742
2746
|
},
|
|
2743
2747
|
emits: ["update:modelValue"],
|
|
2744
2748
|
setup(e, { emit: t }) {
|
|
2745
|
-
let n = e, r = t, i = u(() =>
|
|
2749
|
+
let n = e, r = t, i = u(() => Cr(n.item.component)), a = u(() => xr(n.item.component) ? n.item.component : ""), o = u(() => {
|
|
2746
2750
|
let e = { ...n.item.componentProps ?? {} };
|
|
2747
2751
|
return delete e.value, delete e.onChange, delete e.style, delete e.readonly, delete e.disabled, [
|
|
2748
2752
|
"Complex",
|
|
@@ -2762,7 +2766,7 @@ var Sr = /* @__PURE__ */ y({
|
|
|
2762
2766
|
function c(e) {
|
|
2763
2767
|
r("update:modelValue", e);
|
|
2764
2768
|
}
|
|
2765
|
-
return (t, n) => (
|
|
2769
|
+
return (t, n) => (M(), d(ie(i.value), E({
|
|
2766
2770
|
"model-value": e.modelValue,
|
|
2767
2771
|
options: s.value,
|
|
2768
2772
|
readonly: e.readonly,
|
|
@@ -2774,7 +2778,7 @@ var Sr = /* @__PURE__ */ y({
|
|
|
2774
2778
|
"disabled"
|
|
2775
2779
|
]));
|
|
2776
2780
|
}
|
|
2777
|
-
}),
|
|
2781
|
+
}), Tr = ["innerHTML"], Er = /* @__PURE__ */ y({
|
|
2778
2782
|
name: "KForm",
|
|
2779
2783
|
inheritAttrs: !1,
|
|
2780
2784
|
__name: "KForm",
|
|
@@ -2808,8 +2812,8 @@ var Sr = /* @__PURE__ */ y({
|
|
|
2808
2812
|
},
|
|
2809
2813
|
emits: ["update:modelValue", "change"],
|
|
2810
2814
|
setup(e, { expose: t, emit: n }) {
|
|
2811
|
-
let r =
|
|
2812
|
-
|
|
2815
|
+
let r = H(), i = e, a = n, o = V(), s = P(), l = P({});
|
|
2816
|
+
te(Tt, l);
|
|
2813
2817
|
function f(e) {
|
|
2814
2818
|
if (e == null || e === "") return;
|
|
2815
2819
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
@@ -2827,7 +2831,7 @@ var Sr = /* @__PURE__ */ y({
|
|
|
2827
2831
|
};
|
|
2828
2832
|
}
|
|
2829
2833
|
function y(e) {
|
|
2830
|
-
return
|
|
2834
|
+
return xr(e.component) && e.component === "DatePicker";
|
|
2831
2835
|
}
|
|
2832
2836
|
let b = u(() => ({
|
|
2833
2837
|
colLength: i.colLength,
|
|
@@ -2840,38 +2844,38 @@ var Sr = /* @__PURE__ */ y({
|
|
|
2840
2844
|
"k-form--inline-layout": i.inline,
|
|
2841
2845
|
"k-form--query-layout": i.autoLayout,
|
|
2842
2846
|
"k-form--grid-layout": !i.autoLayout && !i.inline
|
|
2843
|
-
})),
|
|
2844
|
-
formConfigs:
|
|
2845
|
-
data:
|
|
2846
|
-
modelValue:
|
|
2847
|
-
controlled:
|
|
2847
|
+
})), C = u(() => ({ "--k-form-cols": String(i.colLength) })), w = u(() => i.modelValue !== void 0), T = wt({
|
|
2848
|
+
formConfigs: R(i, "formConfigs"),
|
|
2849
|
+
data: R(i, "data"),
|
|
2850
|
+
modelValue: R(i, "modelValue"),
|
|
2851
|
+
controlled: w,
|
|
2848
2852
|
onChange: (e) => {
|
|
2849
|
-
a("change", e),
|
|
2853
|
+
a("change", e), w.value && a("update:modelValue", e);
|
|
2850
2854
|
}
|
|
2851
2855
|
});
|
|
2852
|
-
function
|
|
2856
|
+
function ee() {
|
|
2853
2857
|
let e = {};
|
|
2854
2858
|
i.formConfigs.forEach((t) => {
|
|
2855
|
-
y(t) && (e[`kitDate-${t.id}`] = f(
|
|
2859
|
+
y(t) && (e[`kitDate-${t.id}`] = f(T.formModel[t.id]));
|
|
2856
2860
|
}), l.value = e;
|
|
2857
2861
|
}
|
|
2858
|
-
let { normalizedConfigs:
|
|
2859
|
-
formConfigs:
|
|
2862
|
+
let { normalizedConfigs: A, getFieldOptions: j, resolveItemRules: N, itemStyle: ne, itemDisplay: re, isItemReadonly: ie, isItemDisabled: ae } = vt({
|
|
2863
|
+
formConfigs: R(i, "formConfigs"),
|
|
2860
2864
|
layout: b,
|
|
2861
|
-
formReadonly:
|
|
2865
|
+
formReadonly: R(i, "readonly")
|
|
2862
2866
|
});
|
|
2863
|
-
|
|
2867
|
+
W(() => i.formConfigs, () => ee(), {
|
|
2864
2868
|
immediate: !0,
|
|
2865
2869
|
deep: !0
|
|
2866
|
-
}),
|
|
2867
|
-
function
|
|
2868
|
-
let t =
|
|
2870
|
+
}), W(() => T.formModel, () => ee(), { deep: !0 });
|
|
2871
|
+
function z(e) {
|
|
2872
|
+
let t = re(e);
|
|
2869
2873
|
return {
|
|
2870
|
-
...
|
|
2874
|
+
...ne(e),
|
|
2871
2875
|
...t ? { display: t } : {}
|
|
2872
2876
|
};
|
|
2873
2877
|
}
|
|
2874
|
-
let
|
|
2878
|
+
let oe = u(() => {
|
|
2875
2879
|
let e = { ...o };
|
|
2876
2880
|
return delete e.readonly, {
|
|
2877
2881
|
inline: i.inline && !i.autoLayout,
|
|
@@ -2880,92 +2884,92 @@ var Sr = /* @__PURE__ */ y({
|
|
|
2880
2884
|
...e
|
|
2881
2885
|
};
|
|
2882
2886
|
});
|
|
2883
|
-
function
|
|
2884
|
-
|
|
2887
|
+
function U(e, t) {
|
|
2888
|
+
T.updateFieldValue(e, t), y(e) && v(e.id, t), se(e);
|
|
2885
2889
|
}
|
|
2886
|
-
function
|
|
2890
|
+
function se(e) {
|
|
2887
2891
|
if (!s.value) return;
|
|
2888
|
-
let t = e.validatePeers ?? [], n =
|
|
2889
|
-
!n && !t.length ||
|
|
2892
|
+
let t = e.validatePeers ?? [], n = N(e).length > 0;
|
|
2893
|
+
!n && !t.length || D(() => {
|
|
2890
2894
|
n && s.value?.validateField(e.id).catch(() => {});
|
|
2891
2895
|
for (let e of t) s.value?.validateField(e).catch(() => {});
|
|
2892
2896
|
});
|
|
2893
2897
|
}
|
|
2894
|
-
async function
|
|
2895
|
-
let e =
|
|
2898
|
+
async function ce() {
|
|
2899
|
+
let e = T.getVisibleFieldsValue();
|
|
2896
2900
|
if (!s.value) return e;
|
|
2897
2901
|
try {
|
|
2898
|
-
return await s.value.validate() === !1 ? i.ignoreValidate ? (s.value.clearValidate(), e) : (
|
|
2902
|
+
return await s.value.validate() === !1 ? i.ignoreValidate ? (s.value.clearValidate(), e) : (ue(), null) : e;
|
|
2899
2903
|
} catch {
|
|
2900
|
-
return i.ignoreValidate ? (s.value.clearValidate(), e) : (
|
|
2904
|
+
return i.ignoreValidate ? (s.value.clearValidate(), e) : (ue(), null);
|
|
2901
2905
|
}
|
|
2902
2906
|
}
|
|
2903
|
-
function
|
|
2907
|
+
function ue() {
|
|
2904
2908
|
((s.value?.$el)?.querySelector(".el-form-item.is-error") ?? document.querySelector(".k-form .el-form-item.is-error"))?.scrollIntoView({
|
|
2905
2909
|
block: "center",
|
|
2906
2910
|
behavior: "smooth"
|
|
2907
2911
|
});
|
|
2908
2912
|
}
|
|
2909
|
-
function
|
|
2910
|
-
return
|
|
2913
|
+
function de(e) {
|
|
2914
|
+
return T.getFieldsValue(e);
|
|
2911
2915
|
}
|
|
2912
|
-
function
|
|
2913
|
-
return
|
|
2916
|
+
function fe() {
|
|
2917
|
+
return T.getVisibleFieldsValue();
|
|
2914
2918
|
}
|
|
2915
|
-
function
|
|
2916
|
-
|
|
2919
|
+
function pe(e) {
|
|
2920
|
+
T.setFieldsValue(e);
|
|
2917
2921
|
}
|
|
2918
|
-
function
|
|
2919
|
-
s.value?.resetFields(),
|
|
2922
|
+
function me() {
|
|
2923
|
+
s.value?.resetFields(), T.resetFormModel();
|
|
2920
2924
|
}
|
|
2921
|
-
function
|
|
2922
|
-
|
|
2925
|
+
function he(e) {
|
|
2926
|
+
T.resetFieldsValue(e), e.forEach((e) => s.value?.clearValidate(e));
|
|
2923
2927
|
}
|
|
2924
|
-
function
|
|
2928
|
+
function ge() {
|
|
2925
2929
|
s.value?.clearValidate();
|
|
2926
2930
|
}
|
|
2927
|
-
function
|
|
2931
|
+
function _e() {
|
|
2928
2932
|
return s.value;
|
|
2929
2933
|
}
|
|
2930
2934
|
return t({
|
|
2931
|
-
validateFields:
|
|
2932
|
-
getFieldsValue:
|
|
2933
|
-
getParams:
|
|
2934
|
-
setFieldsValue:
|
|
2935
|
-
resetForm:
|
|
2936
|
-
resetFieldsValue:
|
|
2937
|
-
getFormRef:
|
|
2938
|
-
clearValidate:
|
|
2939
|
-
}), (e, t) => (
|
|
2935
|
+
validateFields: ce,
|
|
2936
|
+
getFieldsValue: de,
|
|
2937
|
+
getParams: fe,
|
|
2938
|
+
setFieldsValue: pe,
|
|
2939
|
+
resetForm: me,
|
|
2940
|
+
resetFieldsValue: he,
|
|
2941
|
+
getFormRef: _e,
|
|
2942
|
+
clearValidate: ge
|
|
2943
|
+
}), (e, t) => (M(), d(B(be), E({
|
|
2940
2944
|
ref_key: "formRef",
|
|
2941
2945
|
ref: s,
|
|
2942
2946
|
class: ["k-form", S.value],
|
|
2943
|
-
style:
|
|
2944
|
-
model:
|
|
2945
|
-
},
|
|
2946
|
-
default:
|
|
2947
|
+
style: C.value,
|
|
2948
|
+
model: B(T).formModel
|
|
2949
|
+
}, oe.value, { onSubmit: t[0] ||= le(() => {}, ["prevent"]) }), {
|
|
2950
|
+
default: G(() => [(M(!0), p(c, null, F(B(A), (n) => (M(), d(B(xe), {
|
|
2947
2951
|
key: n.id,
|
|
2948
2952
|
"data-label": n.label || "",
|
|
2949
2953
|
"data-field-id": n.id,
|
|
2950
2954
|
label: n.label ? `${n.label}:` : void 0,
|
|
2951
2955
|
prop: n.id,
|
|
2952
|
-
rules:
|
|
2953
|
-
class:
|
|
2954
|
-
"k-form__item--readonly":
|
|
2955
|
-
"k-form__item--disabled":
|
|
2956
|
+
rules: B(N)(n),
|
|
2957
|
+
class: O(["k-form__item", [n.class, {
|
|
2958
|
+
"k-form__item--readonly": B(ie)(n),
|
|
2959
|
+
"k-form__item--disabled": B(ae)(n),
|
|
2956
2960
|
"k-form__item--full-row": n.newLineStart,
|
|
2957
|
-
"k-form__item--choice":
|
|
2961
|
+
"k-form__item--choice": B(xr)(n.component) && (n.component === "Radio" || n.component === "Checkbox" || n.component === "Tag")
|
|
2958
2962
|
}]]),
|
|
2959
|
-
style:
|
|
2963
|
+
style: k(z(n))
|
|
2960
2964
|
}, h({
|
|
2961
|
-
default:
|
|
2965
|
+
default: G(() => [!n.slot || !B(r)[n.id] ? (M(), d(wr, {
|
|
2962
2966
|
key: 0,
|
|
2963
2967
|
item: n,
|
|
2964
|
-
"model-value":
|
|
2965
|
-
options:
|
|
2966
|
-
readonly:
|
|
2967
|
-
disabled:
|
|
2968
|
-
"onUpdate:modelValue": (e) =>
|
|
2968
|
+
"model-value": B(T).formModel[n.id],
|
|
2969
|
+
options: B(j)(n),
|
|
2970
|
+
readonly: B(ie)(n),
|
|
2971
|
+
disabled: B(ae)(n),
|
|
2972
|
+
"onUpdate:modelValue": (e) => U(n, e)
|
|
2969
2973
|
}, null, 8, [
|
|
2970
2974
|
"item",
|
|
2971
2975
|
"model-value",
|
|
@@ -2973,26 +2977,26 @@ var Sr = /* @__PURE__ */ y({
|
|
|
2973
2977
|
"readonly",
|
|
2974
2978
|
"disabled",
|
|
2975
2979
|
"onUpdate:modelValue"
|
|
2976
|
-
])) :
|
|
2980
|
+
])) : I(e.$slots, n.id, {
|
|
2977
2981
|
item: n,
|
|
2978
|
-
value:
|
|
2979
|
-
updateValue: (e) =>
|
|
2982
|
+
value: B(T).formModel[n.id],
|
|
2983
|
+
updateValue: (e) => U(n, e)
|
|
2980
2984
|
}, void 0, void 0, 1)]),
|
|
2981
2985
|
_: 2
|
|
2982
2986
|
}, [n.toolTip ? {
|
|
2983
2987
|
name: "label",
|
|
2984
|
-
fn:
|
|
2988
|
+
fn: G(() => [_(B(Re), {
|
|
2985
2989
|
effect: "dark",
|
|
2986
2990
|
placement: "bottom",
|
|
2987
2991
|
"popper-class": "k-form__tooltip"
|
|
2988
2992
|
}, {
|
|
2989
|
-
content:
|
|
2990
|
-
default:
|
|
2993
|
+
content: G(() => [m("span", { innerHTML: n.toolTip }, null, 8, Tr)]),
|
|
2994
|
+
default: G(() => [t[1] ||= m("span", {
|
|
2991
2995
|
class: "k-form__tip-icon",
|
|
2992
2996
|
"aria-hidden": "true"
|
|
2993
2997
|
}, "i", -1)]),
|
|
2994
2998
|
_: 2
|
|
2995
|
-
}, 1024), g(" " +
|
|
2999
|
+
}, 1024), g(" " + L(n.label ? `${n.label}:` : ""), 1)]),
|
|
2996
3000
|
key: "0"
|
|
2997
3001
|
} : void 0]), 1032, [
|
|
2998
3002
|
"data-label",
|
|
@@ -3002,7 +3006,7 @@ var Sr = /* @__PURE__ */ y({
|
|
|
3002
3006
|
"rules",
|
|
3003
3007
|
"class",
|
|
3004
3008
|
"style"
|
|
3005
|
-
]))), 128)),
|
|
3009
|
+
]))), 128)), I(e.$slots, "default")]),
|
|
3006
3010
|
_: 3
|
|
3007
3011
|
}, 16, [
|
|
3008
3012
|
"class",
|
|
@@ -3013,25 +3017,25 @@ var Sr = /* @__PURE__ */ y({
|
|
|
3013
3017
|
});
|
|
3014
3018
|
//#endregion
|
|
3015
3019
|
//#region src/components/k-form/composables/useKFormTemplateRef.ts
|
|
3016
|
-
function
|
|
3017
|
-
return
|
|
3020
|
+
function Dr(e) {
|
|
3021
|
+
return U(e);
|
|
3018
3022
|
}
|
|
3019
3023
|
//#endregion
|
|
3020
3024
|
//#region src/components/k-handle-page/KHandlePage.vue?vue&type=script&setup=true&lang.ts
|
|
3021
|
-
var
|
|
3025
|
+
var Or = { class: "k-handle-page" }, kr = {
|
|
3022
3026
|
key: 0,
|
|
3023
3027
|
class: "k-handle-page__header"
|
|
3024
|
-
},
|
|
3028
|
+
}, Ar = { class: "k-handle-page__body" }, jr = {
|
|
3025
3029
|
key: 0,
|
|
3026
3030
|
class: "k-handle-page__loading",
|
|
3027
3031
|
role: "status",
|
|
3028
3032
|
"aria-live": "polite",
|
|
3029
3033
|
"aria-busy": "true",
|
|
3030
3034
|
"aria-label": "加载中"
|
|
3031
|
-
},
|
|
3035
|
+
}, Mr = { class: "k-handle-page__loading-inner" }, Nr = {
|
|
3032
3036
|
key: 1,
|
|
3033
3037
|
class: "k-handle-page__footer"
|
|
3034
|
-
},
|
|
3038
|
+
}, Pr = /* @__PURE__ */ y({
|
|
3035
3039
|
name: "KHandlePage",
|
|
3036
3040
|
inheritAttrs: !1,
|
|
3037
3041
|
__name: "KHandlePage",
|
|
@@ -3068,7 +3072,7 @@ var Er = { class: "k-handle-page" }, Dr = {
|
|
|
3068
3072
|
},
|
|
3069
3073
|
emits: ["cancel", "submit"],
|
|
3070
3074
|
setup(e, { emit: t }) {
|
|
3071
|
-
let n = e, r = t, i =
|
|
3075
|
+
let n = e, r = t, i = H(), a = P(!1), o = u(() => ({ gap: typeof n.gap == "number" ? `${n.gap}px` : n.gap })), s = u(() => n.cancelText === !1 ? "" : n.cancelText || "取消"), c = u(() => n.submitText === !1 ? "" : n.submitText || "确定"), h = u(() => n.cancelText !== !1), v = u(() => n.showSubmit && n.submitText !== !1), y = u(() => n.submitLoading || n.loading || a.value), b = u(() => !!i.header);
|
|
3072
3076
|
async function x() {
|
|
3073
3077
|
if (!y.value) {
|
|
3074
3078
|
if (n.onSubmit) {
|
|
@@ -3083,34 +3087,34 @@ var Er = { class: "k-handle-page" }, Dr = {
|
|
|
3083
3087
|
r("submit");
|
|
3084
3088
|
}
|
|
3085
3089
|
}
|
|
3086
|
-
return (t, n) => (
|
|
3087
|
-
b.value ? (
|
|
3088
|
-
m("div",
|
|
3089
|
-
default:
|
|
3090
|
+
return (t, n) => (M(), p("div", Or, [
|
|
3091
|
+
b.value ? (M(), p("header", kr, [I(t.$slots, "header")])) : f("", !0),
|
|
3092
|
+
m("div", Ar, [_(l, { name: "k-handle-page-loading" }, {
|
|
3093
|
+
default: G(() => [e.loading ? (M(), p("div", jr, [m("div", Mr, [_(B(Se), {
|
|
3090
3094
|
class: "k-handle-page__loading-icon is-loading",
|
|
3091
3095
|
size: 32
|
|
3092
3096
|
}, {
|
|
3093
|
-
default:
|
|
3097
|
+
default: G(() => [_(B(Ke))]),
|
|
3094
3098
|
_: 1
|
|
3095
3099
|
}), n[1] ||= m("span", { class: "k-handle-page__loading-text" }, "加载中...", -1)])])) : f("", !0)]),
|
|
3096
3100
|
_: 1
|
|
3097
3101
|
}), m("div", {
|
|
3098
|
-
class:
|
|
3099
|
-
style:
|
|
3100
|
-
}, [
|
|
3101
|
-
e.showFooter ? (
|
|
3102
|
+
class: O(["k-handle-page__content", { "k-handle-page__content--loading": e.loading }]),
|
|
3103
|
+
style: k(o.value)
|
|
3104
|
+
}, [I(t.$slots, "default")], 6)]),
|
|
3105
|
+
e.showFooter ? (M(), p("footer", Nr, [I(t.$slots, "footer", {}, () => [h.value ? (M(), d(Y, {
|
|
3102
3106
|
key: 0,
|
|
3103
3107
|
onClick: n[0] ||= (e) => r("cancel")
|
|
3104
3108
|
}, {
|
|
3105
|
-
default:
|
|
3109
|
+
default: G(() => [g(L(s.value), 1)]),
|
|
3106
3110
|
_: 1
|
|
3107
|
-
})) : f("", !0), v.value ? (
|
|
3111
|
+
})) : f("", !0), v.value ? (M(), d(Y, {
|
|
3108
3112
|
key: 1,
|
|
3109
3113
|
type: "primary",
|
|
3110
3114
|
loading: y.value,
|
|
3111
3115
|
onClick: x
|
|
3112
3116
|
}, {
|
|
3113
|
-
default:
|
|
3117
|
+
default: G(() => [g(L(c.value), 1)]),
|
|
3114
3118
|
_: 1
|
|
3115
3119
|
}, 8, ["loading"])) : f("", !0)])])) : f("", !0)
|
|
3116
3120
|
]));
|
|
@@ -3118,17 +3122,17 @@ var Er = { class: "k-handle-page" }, Dr = {
|
|
|
3118
3122
|
});
|
|
3119
3123
|
//#endregion
|
|
3120
3124
|
//#region src/components/k-handle-page/useHandlePageInit.ts
|
|
3121
|
-
function
|
|
3122
|
-
let n =
|
|
3125
|
+
function Fr(e, t) {
|
|
3126
|
+
let n = P(!1);
|
|
3123
3127
|
async function r() {
|
|
3124
|
-
(
|
|
3128
|
+
(z(t?.skipLoading) ?? !1) || (n.value = !0);
|
|
3125
3129
|
try {
|
|
3126
3130
|
await e();
|
|
3127
3131
|
} finally {
|
|
3128
3132
|
n.value = !1;
|
|
3129
3133
|
}
|
|
3130
3134
|
}
|
|
3131
|
-
return t?.immediate !== !1 &&
|
|
3135
|
+
return t?.immediate !== !1 && j(() => {
|
|
3132
3136
|
r();
|
|
3133
3137
|
}), {
|
|
3134
3138
|
pageLoading: n,
|
|
@@ -3137,30 +3141,30 @@ function Nr(e, t) {
|
|
|
3137
3141
|
}
|
|
3138
3142
|
//#endregion
|
|
3139
3143
|
//#region src/components/k-icon/resolveLucideIcon.ts
|
|
3140
|
-
var
|
|
3141
|
-
function
|
|
3144
|
+
var Ir = /* @__PURE__ */ new Map();
|
|
3145
|
+
function Lr(e) {
|
|
3142
3146
|
return e.split("-").filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
3143
3147
|
}
|
|
3144
|
-
function
|
|
3148
|
+
function Rr(e) {
|
|
3145
3149
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
3146
3150
|
}
|
|
3147
|
-
function
|
|
3151
|
+
function zr(e) {
|
|
3148
3152
|
if (!e || e === "#") return tt(e);
|
|
3149
3153
|
let t = e.trim();
|
|
3150
|
-
if (
|
|
3151
|
-
let n = Xe[
|
|
3152
|
-
return
|
|
3154
|
+
if (Ir.has(t)) return Ir.get(t) ?? tt(e);
|
|
3155
|
+
let n = Xe[Lr(t)], r = typeof n == "function" ? n : null;
|
|
3156
|
+
return Ir.set(t, r), r ?? tt(e);
|
|
3153
3157
|
}
|
|
3154
|
-
var
|
|
3155
|
-
function
|
|
3156
|
-
if (
|
|
3158
|
+
var Br = /* @__PURE__ */ new Set(["createLucideIcon"]), Vr = null;
|
|
3159
|
+
function Hr() {
|
|
3160
|
+
if (Vr) return Vr;
|
|
3157
3161
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
3158
|
-
for (let [n, r] of Object.entries(Xe))
|
|
3159
|
-
return
|
|
3162
|
+
for (let [n, r] of Object.entries(Xe)) Br.has(n) || n.endsWith("Icon") || typeof r == "function" && (e.has(r) || (e.add(r), t.push(Rr(n))));
|
|
3163
|
+
return Vr = t.sort((e, t) => e.localeCompare(t)), Vr;
|
|
3160
3164
|
}
|
|
3161
3165
|
//#endregion
|
|
3162
3166
|
//#region src/components/k-icon/KIcon.vue
|
|
3163
|
-
var
|
|
3167
|
+
var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
3164
3168
|
name: "KIcon",
|
|
3165
3169
|
__name: "KIcon",
|
|
3166
3170
|
props: {
|
|
@@ -3169,18 +3173,18 @@ var Vr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3169
3173
|
strokeWidth: { default: 2 }
|
|
3170
3174
|
},
|
|
3171
3175
|
setup(e) {
|
|
3172
|
-
let t = e, n = u(() =>
|
|
3173
|
-
return (t, r) => n.value ? (
|
|
3176
|
+
let t = e, n = u(() => zr(t.name));
|
|
3177
|
+
return (t, r) => n.value ? (M(), d(ie(n.value), {
|
|
3174
3178
|
key: 0,
|
|
3175
3179
|
class: "k-icon",
|
|
3176
3180
|
size: e.size,
|
|
3177
3181
|
"stroke-width": e.strokeWidth
|
|
3178
3182
|
}, null, 8, ["size", "stroke-width"])) : f("", !0);
|
|
3179
3183
|
}
|
|
3180
|
-
}), [["__scopeId", "data-v-6fd081ab"]]),
|
|
3184
|
+
}), [["__scopeId", "data-v-6fd081ab"]]), Wr = { class: "k-link-button__item" }, Gr = {
|
|
3181
3185
|
key: 0,
|
|
3182
3186
|
class: "k-link-button__divider"
|
|
3183
|
-
},
|
|
3187
|
+
}, Kr = ["onClick"], qr = /* @__PURE__ */ y({
|
|
3184
3188
|
name: "KLinkButton",
|
|
3185
3189
|
__name: "KLinkButton",
|
|
3186
3190
|
props: {
|
|
@@ -3213,23 +3217,23 @@ var Vr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3213
3217
|
function h(e) {
|
|
3214
3218
|
return typeof e.slot == "string" ? e.slot : "default";
|
|
3215
3219
|
}
|
|
3216
|
-
return (t, n) => (
|
|
3220
|
+
return (t, n) => (M(), p("div", {
|
|
3217
3221
|
class: "k-link-button",
|
|
3218
|
-
style:
|
|
3219
|
-
}, [(
|
|
3222
|
+
style: k({ justifyContent: e.align })
|
|
3223
|
+
}, [(M(!0), p(c, null, F(i.value, (e, n) => (M(), d(B(Re), {
|
|
3220
3224
|
key: `${e.label}-${n}`,
|
|
3221
3225
|
content: e.tooltip,
|
|
3222
3226
|
placement: "top",
|
|
3223
3227
|
disabled: !e.tooltip
|
|
3224
3228
|
}, {
|
|
3225
|
-
default:
|
|
3226
|
-
class:
|
|
3227
|
-
onClick:
|
|
3228
|
-
}, [l(e) ?
|
|
3229
|
+
default: G(() => [m("div", Wr, [n > 0 ? (M(), p("span", Gr)) : f("", !0), m("a", {
|
|
3230
|
+
class: O(["k-link-button__btn", [o(e), { "k-link-button__btn--readonly": a(e) }]]),
|
|
3231
|
+
onClick: le((t) => s(e, n), ["prevent"])
|
|
3232
|
+
}, [l(e) ? I(t.$slots, h(e), { item: e }, () => [g(L(e.label), 1)], void 0, 0) : (M(), p(c, { key: 1 }, [g(L(e.label), 1)], 64))], 10, Kr)])]),
|
|
3229
3233
|
_: 2
|
|
3230
3234
|
}, 1032, ["content", "disabled"]))), 128))], 4));
|
|
3231
3235
|
}
|
|
3232
|
-
}),
|
|
3236
|
+
}), Jr = /* @__PURE__ */ y({
|
|
3233
3237
|
name: "KPagination",
|
|
3234
3238
|
__name: "KPagination",
|
|
3235
3239
|
props: {
|
|
@@ -3249,7 +3253,7 @@ var Vr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3249
3253
|
] }
|
|
3250
3254
|
},
|
|
3251
3255
|
setup(e) {
|
|
3252
|
-
return (t, n) => (
|
|
3256
|
+
return (t, n) => (M(), d(B(Oe), E(t.$attrs, {
|
|
3253
3257
|
layout: e.layout,
|
|
3254
3258
|
"page-size": e.pageSize,
|
|
3255
3259
|
"page-sizes": e.pageSizes
|
|
@@ -3259,7 +3263,7 @@ var Vr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3259
3263
|
"page-sizes"
|
|
3260
3264
|
]));
|
|
3261
3265
|
}
|
|
3262
|
-
}),
|
|
3266
|
+
}), Yr = ["id"], Xr = { class: "k-long-page-panel__title" }, Zr = { class: "k-long-page-panel__content" }, Qr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
3263
3267
|
name: "KLongPagePanel",
|
|
3264
3268
|
__name: "KLongPagePanel",
|
|
3265
3269
|
props: {
|
|
@@ -3267,18 +3271,18 @@ var Vr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3267
3271
|
title: { default: "" }
|
|
3268
3272
|
},
|
|
3269
3273
|
setup(e) {
|
|
3270
|
-
return (t, n) => (
|
|
3274
|
+
return (t, n) => (M(), p("div", {
|
|
3271
3275
|
id: e.panelId || void 0,
|
|
3272
3276
|
class: "k-long-page-panel"
|
|
3273
|
-
}, [m("div",
|
|
3277
|
+
}, [m("div", Xr, L(e.title), 1), m("div", Zr, [I(t.$slots, "default", {}, void 0, !0)])], 8, Yr));
|
|
3274
3278
|
}
|
|
3275
|
-
}), [["__scopeId", "data-v-9d6e7832"]]),
|
|
3276
|
-
function
|
|
3279
|
+
}), [["__scopeId", "data-v-9d6e7832"]]), $r = 4;
|
|
3280
|
+
function ei(e) {
|
|
3277
3281
|
let t = 0, n = 0, r = !1, i = !1, a = null;
|
|
3278
3282
|
function o(o) {
|
|
3279
3283
|
if (!r || !e.value || o.pointerId !== a) return;
|
|
3280
3284
|
let s = o.clientY - t;
|
|
3281
|
-
if (!i && Math.abs(s) <
|
|
3285
|
+
if (!i && Math.abs(s) < $r) return;
|
|
3282
3286
|
i = !0, o.preventDefault();
|
|
3283
3287
|
let c = Math.min(Math.max(n + s, 0), window.innerHeight - e.value.offsetHeight);
|
|
3284
3288
|
e.value.style.top = `${c}px`;
|
|
@@ -3295,26 +3299,26 @@ function Qr(e) {
|
|
|
3295
3299
|
function u() {
|
|
3296
3300
|
return i ? (i = !1, !0) : !1;
|
|
3297
3301
|
}
|
|
3298
|
-
return
|
|
3302
|
+
return A(s), {
|
|
3299
3303
|
onPointerDown: l,
|
|
3300
3304
|
consumeClickIfDragged: u
|
|
3301
3305
|
};
|
|
3302
3306
|
}
|
|
3303
3307
|
//#endregion
|
|
3304
3308
|
//#region src/components/k-long-page/icons/icon-base.png?no-inline
|
|
3305
|
-
var
|
|
3306
|
-
base: [
|
|
3307
|
-
price: [
|
|
3308
|
-
notice: [
|
|
3309
|
-
setup: [
|
|
3310
|
-
restrict: [
|
|
3309
|
+
var ti = "" + new URL("../assets/icon-base-pYrXWQZO.png", import.meta.url).href, ni = "" + new URL("../assets/icon-base-2-CcPa4bmO.png", import.meta.url).href, ri = "" + new URL("../assets/icon-notice-DNvEYor3.png", import.meta.url).href, ii = "" + new URL("../assets/icon-notice-2-JVyxpYo9.png", import.meta.url).href, ai = "" + new URL("../assets/icon-price-4iIa0b5D.png", import.meta.url).href, oi = "" + new URL("../assets/icon-price-2-DMmEoFbh.png", import.meta.url).href, si = "" + new URL("../assets/icon-restrict-BWJ7LA9s.png", import.meta.url).href, ci = "" + new URL("../assets/icon-restrict-2-BjWtoOXX.png", import.meta.url).href, li = "" + new URL("../assets/icon-setup-DXpIP63L.png", import.meta.url).href, ui = "" + new URL("../assets/icon-setup-2-BO6uKRX4.png", import.meta.url).href, di = {
|
|
3310
|
+
base: [ti, ni],
|
|
3311
|
+
price: [ai, oi],
|
|
3312
|
+
notice: [ri, ii],
|
|
3313
|
+
setup: [li, ui],
|
|
3314
|
+
restrict: [si, ci]
|
|
3311
3315
|
};
|
|
3312
|
-
function
|
|
3313
|
-
return
|
|
3316
|
+
function fi(e) {
|
|
3317
|
+
return di[e] ?? di.base;
|
|
3314
3318
|
}
|
|
3315
3319
|
//#endregion
|
|
3316
3320
|
//#region src/components/k-long-page/KLongPage.vue?vue&type=script&setup=true&lang.ts
|
|
3317
|
-
var
|
|
3321
|
+
var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
3318
3322
|
name: "KLongPage",
|
|
3319
3323
|
__name: "KLongPage",
|
|
3320
3324
|
props: { panels: { default: () => [{
|
|
@@ -3322,37 +3326,37 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3322
3326
|
label: "面板一"
|
|
3323
3327
|
}] } },
|
|
3324
3328
|
setup(e) {
|
|
3325
|
-
let t =
|
|
3329
|
+
let t = U("rootRef"), n = U("navRef"), { onPointerDown: r, consumeClickIfDragged: i } = ei(n);
|
|
3326
3330
|
function a(e) {
|
|
3327
|
-
return
|
|
3331
|
+
return fi(e);
|
|
3328
3332
|
}
|
|
3329
3333
|
async function o(e) {
|
|
3330
3334
|
if (i()) return;
|
|
3331
|
-
await
|
|
3335
|
+
await D();
|
|
3332
3336
|
let n = t.value?.querySelector(`#${CSS.escape(e)}`);
|
|
3333
3337
|
(n?.querySelector(".k-long-page-panel__title") ?? n)?.scrollIntoView({
|
|
3334
3338
|
block: "start",
|
|
3335
3339
|
behavior: "smooth"
|
|
3336
3340
|
});
|
|
3337
3341
|
}
|
|
3338
|
-
return (i, s) => (
|
|
3342
|
+
return (i, s) => (M(), p("div", {
|
|
3339
3343
|
ref_key: "rootRef",
|
|
3340
3344
|
ref: t,
|
|
3341
3345
|
class: "k-long-page"
|
|
3342
|
-
}, [(
|
|
3346
|
+
}, [(M(!0), p(c, null, F(e.panels, (e) => (M(), d(Qr, {
|
|
3343
3347
|
key: e.name,
|
|
3344
3348
|
class: "k-long-page__panel",
|
|
3345
3349
|
"panel-id": e.name,
|
|
3346
3350
|
title: e.label
|
|
3347
3351
|
}, {
|
|
3348
|
-
default:
|
|
3352
|
+
default: G(() => [I(i.$slots, e.name, {}, void 0, !0)]),
|
|
3349
3353
|
_: 2
|
|
3350
3354
|
}, 1032, ["panel-id", "title"]))), 128)), m("div", {
|
|
3351
3355
|
ref_key: "navRef",
|
|
3352
3356
|
ref: n,
|
|
3353
3357
|
class: "k-long-page__nav",
|
|
3354
|
-
onPointerdown: s[0] ||= (...e) =>
|
|
3355
|
-
}, [(
|
|
3358
|
+
onPointerdown: s[0] ||= (...e) => B(r) && B(r)(...e)
|
|
3359
|
+
}, [(M(!0), p(c, null, F(e.panels, (e) => (M(), p("div", {
|
|
3356
3360
|
key: e.name,
|
|
3357
3361
|
class: "k-long-page__nav-item",
|
|
3358
3362
|
role: "button",
|
|
@@ -3366,7 +3370,7 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3366
3370
|
width: "28",
|
|
3367
3371
|
height: "28",
|
|
3368
3372
|
draggable: "false"
|
|
3369
|
-
}, null, 8,
|
|
3373
|
+
}, null, 8, mi),
|
|
3370
3374
|
m("img", {
|
|
3371
3375
|
class: "k-long-page__nav-item-icon k-long-page__nav-item-icon--active",
|
|
3372
3376
|
src: a(e.name)[1],
|
|
@@ -3374,31 +3378,31 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3374
3378
|
width: "28",
|
|
3375
3379
|
height: "28",
|
|
3376
3380
|
draggable: "false"
|
|
3377
|
-
}, null, 8,
|
|
3378
|
-
m("span", null,
|
|
3379
|
-
], 8,
|
|
3381
|
+
}, null, 8, hi),
|
|
3382
|
+
m("span", null, L(e.label), 1)
|
|
3383
|
+
], 8, pi))), 128))], 544)], 512));
|
|
3380
3384
|
}
|
|
3381
|
-
}), [["__scopeId", "data-v-ac934c5d"]]),
|
|
3385
|
+
}), [["__scopeId", "data-v-ac934c5d"]]), _i = /* @__PURE__ */ y({
|
|
3382
3386
|
name: "KCard",
|
|
3383
3387
|
__name: "KCard",
|
|
3384
3388
|
setup(e) {
|
|
3385
|
-
return (e, t) => (
|
|
3386
|
-
default:
|
|
3389
|
+
return (e, t) => (M(), d(B(de), ee(b(e.$attrs)), h({
|
|
3390
|
+
default: G(() => [I(e.$slots, "default")]),
|
|
3387
3391
|
_: 2
|
|
3388
3392
|
}, [e.$slots.header ? {
|
|
3389
3393
|
name: "header",
|
|
3390
|
-
fn:
|
|
3394
|
+
fn: G(() => [I(e.$slots, "header")]),
|
|
3391
3395
|
key: "0"
|
|
3392
3396
|
} : void 0, e.$slots.footer ? {
|
|
3393
3397
|
name: "footer",
|
|
3394
|
-
fn:
|
|
3398
|
+
fn: G(() => [I(e.$slots, "footer")]),
|
|
3395
3399
|
key: "1"
|
|
3396
3400
|
} : void 0]), 1040));
|
|
3397
3401
|
}
|
|
3398
|
-
}),
|
|
3402
|
+
}), vi = {
|
|
3399
3403
|
key: 0,
|
|
3400
3404
|
class: "panel-head"
|
|
3401
|
-
},
|
|
3405
|
+
}, yi = { class: "panel-head_left" }, bi = { class: "panel-content" }, xi = /* @__PURE__ */ y({
|
|
3402
3406
|
name: "KPanel",
|
|
3403
3407
|
__name: "KPanel",
|
|
3404
3408
|
props: {
|
|
@@ -3417,29 +3421,29 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3417
3421
|
}
|
|
3418
3422
|
},
|
|
3419
3423
|
setup(e) {
|
|
3420
|
-
let t = e, n =
|
|
3424
|
+
let t = e, n = P(t.unfold ? ["content"] : []), r = u(() => ({
|
|
3421
3425
|
panel: !0,
|
|
3422
3426
|
"panel-hover": t.hover
|
|
3423
3427
|
}));
|
|
3424
|
-
return (t, i) => (
|
|
3428
|
+
return (t, i) => (M(), p("div", { class: O(r.value) }, [e.isFold ? (M(), d(B(he), {
|
|
3425
3429
|
key: 0,
|
|
3426
3430
|
modelValue: n.value,
|
|
3427
3431
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e
|
|
3428
3432
|
}, {
|
|
3429
|
-
default:
|
|
3433
|
+
default: G(() => [_(B(ge), {
|
|
3430
3434
|
name: "content",
|
|
3431
3435
|
title: e.title
|
|
3432
3436
|
}, {
|
|
3433
|
-
default:
|
|
3437
|
+
default: G(() => [I(t.$slots, "default")]),
|
|
3434
3438
|
_: 3
|
|
3435
3439
|
}, 8, ["title"])]),
|
|
3436
3440
|
_: 3
|
|
3437
|
-
}, 8, ["modelValue"])) : (
|
|
3441
|
+
}, 8, ["modelValue"])) : (M(), p(c, { key: 1 }, [e.title || t.$slots.title ? (M(), p("div", vi, [m("div", yi, [I(t.$slots, "title", {}, () => [g(L(e.title), 1)])])])) : f("", !0), m("div", bi, [I(t.$slots, "default")])], 64))], 2));
|
|
3438
3442
|
}
|
|
3439
|
-
}),
|
|
3443
|
+
}), Si = {
|
|
3440
3444
|
key: 0,
|
|
3441
3445
|
class: "k-panel-query__footer"
|
|
3442
|
-
},
|
|
3446
|
+
}, Ci = /* @__PURE__ */ y({
|
|
3443
3447
|
name: "KPanelQueryActions",
|
|
3444
3448
|
__name: "KPanelQueryActions",
|
|
3445
3449
|
props: { footer: {
|
|
@@ -3449,33 +3453,33 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3449
3453
|
emits: ["query", "reset"],
|
|
3450
3454
|
setup(e, { emit: t }) {
|
|
3451
3455
|
let n = t;
|
|
3452
|
-
return (t, r) => e.footer ? (
|
|
3456
|
+
return (t, r) => e.footer ? (M(), p("div", Si, [_(Y, {
|
|
3453
3457
|
type: "primary",
|
|
3454
3458
|
onClick: r[0] ||= (e) => n("query")
|
|
3455
3459
|
}, {
|
|
3456
|
-
default:
|
|
3460
|
+
default: G(() => [...r[4] ||= [g("查询", -1)]]),
|
|
3457
3461
|
_: 1
|
|
3458
3462
|
}), _(Y, {
|
|
3459
3463
|
class: "k-panel-query__btn-reset",
|
|
3460
3464
|
onClick: r[1] ||= (e) => n("reset")
|
|
3461
3465
|
}, {
|
|
3462
|
-
default:
|
|
3466
|
+
default: G(() => [...r[5] ||= [g("重置", -1)]]),
|
|
3463
3467
|
_: 1
|
|
3464
|
-
})])) : (
|
|
3468
|
+
})])) : (M(), p(c, { key: 1 }, [_(Y, {
|
|
3465
3469
|
type: "primary",
|
|
3466
3470
|
onClick: r[2] ||= (e) => n("query")
|
|
3467
3471
|
}, {
|
|
3468
|
-
default:
|
|
3472
|
+
default: G(() => [...r[6] ||= [g("查询", -1)]]),
|
|
3469
3473
|
_: 1
|
|
3470
3474
|
}), _(Y, {
|
|
3471
3475
|
class: "k-panel-query__btn-reset",
|
|
3472
3476
|
onClick: r[3] ||= (e) => n("reset")
|
|
3473
3477
|
}, {
|
|
3474
|
-
default:
|
|
3478
|
+
default: G(() => [...r[7] ||= [g("重置", -1)]]),
|
|
3475
3479
|
_: 1
|
|
3476
3480
|
})], 64));
|
|
3477
3481
|
}
|
|
3478
|
-
}),
|
|
3482
|
+
}), wi = /* @__PURE__ */ y({
|
|
3479
3483
|
name: "KPanelQueryForm",
|
|
3480
3484
|
__name: "KPanelQueryForm",
|
|
3481
3485
|
props: {
|
|
@@ -3497,13 +3501,13 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3497
3501
|
}
|
|
3498
3502
|
},
|
|
3499
3503
|
setup(e, { expose: t }) {
|
|
3500
|
-
let n =
|
|
3504
|
+
let n = P();
|
|
3501
3505
|
return t({
|
|
3502
3506
|
validateFields: () => n.value?.validateFields(),
|
|
3503
3507
|
getParams: () => n.value?.getParams() ?? {},
|
|
3504
3508
|
resetForm: () => n.value?.resetForm(),
|
|
3505
3509
|
getFormRef: () => n.value?.getFormRef()
|
|
3506
|
-
}), (t, r) => (
|
|
3510
|
+
}), (t, r) => (M(), d(B(Er), {
|
|
3507
3511
|
ref_key: "formRef",
|
|
3508
3512
|
ref: n,
|
|
3509
3513
|
class: "k-panel-query-form",
|
|
@@ -3524,27 +3528,27 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3524
3528
|
"hide-label"
|
|
3525
3529
|
]));
|
|
3526
3530
|
}
|
|
3527
|
-
}),
|
|
3531
|
+
}), Ti = { class: "k-items k-form" }, Ei = { class: "k-items_ul" }, Di = {
|
|
3528
3532
|
key: 0,
|
|
3529
3533
|
class: "k-item_label"
|
|
3530
|
-
},
|
|
3534
|
+
}, Oi = { class: "k-item_input" }, ki = {
|
|
3531
3535
|
key: 0,
|
|
3532
3536
|
class: "k-item k-panel-query__item-actions"
|
|
3533
|
-
},
|
|
3537
|
+
}, Ai = /* @__PURE__ */ y({
|
|
3534
3538
|
name: "KPanelQueryItem",
|
|
3535
3539
|
__name: "KPanelQueryItem",
|
|
3536
3540
|
props: { formConfigs: {} },
|
|
3537
3541
|
setup(e, { expose: t }) {
|
|
3538
|
-
let n = e, r =
|
|
3542
|
+
let n = e, r = H(), i = u(() => ({
|
|
3539
3543
|
colLength: 1,
|
|
3540
3544
|
inline: !0,
|
|
3541
3545
|
autoLayout: !1,
|
|
3542
3546
|
hideLabel: !1
|
|
3543
3547
|
})), a = wt({
|
|
3544
|
-
formConfigs:
|
|
3548
|
+
formConfigs: R(n, "formConfigs"),
|
|
3545
3549
|
controlled: u(() => !1)
|
|
3546
3550
|
}), { normalizedConfigs: o, getFieldOptions: s } = vt({
|
|
3547
|
-
formConfigs:
|
|
3551
|
+
formConfigs: R(n, "formConfigs"),
|
|
3548
3552
|
layout: i
|
|
3549
3553
|
});
|
|
3550
3554
|
function l(e, t) {
|
|
@@ -3564,22 +3568,22 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3564
3568
|
getParams: h,
|
|
3565
3569
|
resetForm: g,
|
|
3566
3570
|
getFormRef: () => void 0
|
|
3567
|
-
}), (e, t) => (
|
|
3571
|
+
}), (e, t) => (M(), p("div", Ti, [m("ul", Ei, [(M(!0), p(c, null, F(B(o), (e) => (M(), p("li", {
|
|
3568
3572
|
key: e.id,
|
|
3569
|
-
class:
|
|
3570
|
-
}, [e.label ? (
|
|
3573
|
+
class: O(["k-item", { "k-item_flex": !!e.label }])
|
|
3574
|
+
}, [e.label ? (M(), p("label", Di, L(e.label), 1)) : f("", !0), m("div", Oi, [_(wr, {
|
|
3571
3575
|
item: e,
|
|
3572
|
-
"model-value":
|
|
3573
|
-
options:
|
|
3576
|
+
"model-value": B(a).formModel[e.id],
|
|
3577
|
+
options: B(s)(e),
|
|
3574
3578
|
"onUpdate:modelValue": (t) => l(e, t)
|
|
3575
3579
|
}, null, 8, [
|
|
3576
3580
|
"item",
|
|
3577
3581
|
"model-value",
|
|
3578
3582
|
"options",
|
|
3579
3583
|
"onUpdate:modelValue"
|
|
3580
|
-
])])], 2))), 128)),
|
|
3584
|
+
])])], 2))), 128)), B(r).button ? (M(), p("li", ki, [I(e.$slots, "button")])) : f("", !0)])]));
|
|
3581
3585
|
}
|
|
3582
|
-
}),
|
|
3586
|
+
}), ji = /* @__PURE__ */ y({
|
|
3583
3587
|
name: "KPanelQuery",
|
|
3584
3588
|
__name: "KPanelQuery",
|
|
3585
3589
|
props: {
|
|
@@ -3613,7 +3617,7 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3613
3617
|
},
|
|
3614
3618
|
emits: ["query", "reset"],
|
|
3615
3619
|
setup(e, { expose: t, emit: n }) {
|
|
3616
|
-
let r = e, i = n, a =
|
|
3620
|
+
let r = e, i = n, a = P(), o = /* @__PURE__ */ new Set([
|
|
3617
3621
|
"Input",
|
|
3618
3622
|
"Select",
|
|
3619
3623
|
"TreeSelect",
|
|
@@ -3649,7 +3653,7 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3649
3653
|
e && i("query", e);
|
|
3650
3654
|
}
|
|
3651
3655
|
async function v() {
|
|
3652
|
-
a.value?.resetForm(), i("reset"), await
|
|
3656
|
+
a.value?.resetForm(), i("reset"), await D();
|
|
3653
3657
|
let e = await a.value?.validateFields();
|
|
3654
3658
|
e && i("query", e);
|
|
3655
3659
|
}
|
|
@@ -3664,31 +3668,31 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3664
3668
|
resetForm: b,
|
|
3665
3669
|
getFormRef: () => a.value?.getFormRef(),
|
|
3666
3670
|
submit: g
|
|
3667
|
-
}), (t, n) => (
|
|
3671
|
+
}), (t, n) => (M(), p("div", { class: O(["k-panel-query", {
|
|
3668
3672
|
"k-panel-query__form": e.model === "form" && !e.showPanel,
|
|
3669
3673
|
"k-panel-query__item": m.value
|
|
3670
|
-
}]) }, [e.showPanel ? (
|
|
3674
|
+
}]) }, [e.showPanel ? (M(), d(B(xi), {
|
|
3671
3675
|
key: 1,
|
|
3672
3676
|
title: e.title,
|
|
3673
3677
|
"is-fold": e.isFold,
|
|
3674
3678
|
unfold: e.unfold,
|
|
3675
3679
|
hover: e.hover
|
|
3676
3680
|
}, {
|
|
3677
|
-
default:
|
|
3681
|
+
default: G(() => [l.value ? (M(), p(c, { key: 0 }, [m.value ? (M(), d(Ai, E({
|
|
3678
3682
|
key: 0,
|
|
3679
3683
|
ref_key: "formRef",
|
|
3680
3684
|
ref: a
|
|
3681
3685
|
}, l.value), h({ _: 2 }, [e.hideButton ? void 0 : {
|
|
3682
3686
|
name: "button",
|
|
3683
|
-
fn:
|
|
3687
|
+
fn: G(() => [_(Ci, {
|
|
3684
3688
|
onQuery: g,
|
|
3685
3689
|
onReset: v
|
|
3686
3690
|
})]),
|
|
3687
3691
|
key: "0"
|
|
3688
|
-
}]), 1040)) : (
|
|
3692
|
+
}]), 1040)) : (M(), p(c, { key: 1 }, [_(wi, E({
|
|
3689
3693
|
ref_key: "formRef",
|
|
3690
3694
|
ref: a
|
|
3691
|
-
}, l.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? f("", !0) : (
|
|
3695
|
+
}, l.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? f("", !0) : (M(), d(Ci, {
|
|
3692
3696
|
key: 0,
|
|
3693
3697
|
footer: "",
|
|
3694
3698
|
onQuery: g,
|
|
@@ -3700,21 +3704,21 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3700
3704
|
"is-fold",
|
|
3701
3705
|
"unfold",
|
|
3702
3706
|
"hover"
|
|
3703
|
-
])) : (
|
|
3707
|
+
])) : (M(), p(c, { key: 0 }, [l.value ? (M(), p(c, { key: 0 }, [m.value ? (M(), d(Ai, E({
|
|
3704
3708
|
key: 0,
|
|
3705
3709
|
ref_key: "formRef",
|
|
3706
3710
|
ref: a
|
|
3707
3711
|
}, l.value), h({ _: 2 }, [e.hideButton ? void 0 : {
|
|
3708
3712
|
name: "button",
|
|
3709
|
-
fn:
|
|
3713
|
+
fn: G(() => [_(Ci, {
|
|
3710
3714
|
onQuery: g,
|
|
3711
3715
|
onReset: v
|
|
3712
3716
|
})]),
|
|
3713
3717
|
key: "0"
|
|
3714
|
-
}]), 1040)) : (
|
|
3718
|
+
}]), 1040)) : (M(), p(c, { key: 1 }, [_(wi, E({
|
|
3715
3719
|
ref_key: "formRef",
|
|
3716
3720
|
ref: a
|
|
3717
|
-
}, l.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? f("", !0) : (
|
|
3721
|
+
}, l.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? f("", !0) : (M(), d(Ci, {
|
|
3718
3722
|
key: 0,
|
|
3719
3723
|
footer: "",
|
|
3720
3724
|
onQuery: g,
|
|
@@ -3724,43 +3728,43 @@ var di = ["onClick"], fi = ["src", "alt"], pi = ["src", "alt"], mi = /*#__PURE__
|
|
|
3724
3728
|
});
|
|
3725
3729
|
//#endregion
|
|
3726
3730
|
//#region src/components/k-table/utils/rowKey.ts
|
|
3727
|
-
function
|
|
3731
|
+
function Mi(e, t) {
|
|
3728
3732
|
return e[t];
|
|
3729
3733
|
}
|
|
3730
|
-
function
|
|
3731
|
-
let n =
|
|
3734
|
+
function Ni(e, t) {
|
|
3735
|
+
let n = Mi(e, t);
|
|
3732
3736
|
return typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? n : n == null ? "" : String(n);
|
|
3733
3737
|
}
|
|
3734
3738
|
//#endregion
|
|
3735
3739
|
//#region src/components/k-table/utils/formatCellValue.ts
|
|
3736
|
-
function
|
|
3740
|
+
function Pi(e) {
|
|
3737
3741
|
return e === "" || e == null;
|
|
3738
3742
|
}
|
|
3739
|
-
function
|
|
3743
|
+
function Fi(e) {
|
|
3740
3744
|
let t = Number(e);
|
|
3741
3745
|
return Number.isNaN(t) ? String(e ?? "") : t.toLocaleString("en-US");
|
|
3742
3746
|
}
|
|
3743
|
-
function
|
|
3747
|
+
function Ii(e) {
|
|
3744
3748
|
return e.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
|
|
3745
3749
|
}
|
|
3746
|
-
function
|
|
3747
|
-
if (
|
|
3750
|
+
function Li(e, t) {
|
|
3751
|
+
if (Pi(t)) return "";
|
|
3748
3752
|
let n = String(t);
|
|
3749
3753
|
switch (e) {
|
|
3750
3754
|
case "date": return q(n).format("YYYY-MM-DD");
|
|
3751
3755
|
case "datetime": return q(n).format("YYYY-MM-DD HH:mm:ss");
|
|
3752
|
-
case "amount": return
|
|
3753
|
-
case "phone": return
|
|
3756
|
+
case "amount": return Fi(t);
|
|
3757
|
+
case "phone": return Ii(n);
|
|
3754
3758
|
default: return n;
|
|
3755
3759
|
}
|
|
3756
3760
|
}
|
|
3757
|
-
function
|
|
3758
|
-
let a = e.prop ?
|
|
3759
|
-
return e.formatter ? e.formatter(t, e, a, n) : e.dict && i !== void 0 ? i :
|
|
3761
|
+
function Ri(e, t, n, r, i) {
|
|
3762
|
+
let a = e.prop ? Mi(t, e.prop) : void 0;
|
|
3763
|
+
return e.formatter ? e.formatter(t, e, a, n) : e.dict && i !== void 0 ? i : Pi(a) ? r : e.showType ? Li(e.showType, a) : String(a);
|
|
3760
3764
|
}
|
|
3761
3765
|
//#endregion
|
|
3762
3766
|
//#region src/components/k-table/composables/useTableColumns.ts
|
|
3763
|
-
var
|
|
3767
|
+
var zi = [
|
|
3764
3768
|
"prop",
|
|
3765
3769
|
"label",
|
|
3766
3770
|
"width",
|
|
@@ -3783,7 +3787,7 @@ var Li = [
|
|
|
3783
3787
|
"filterMethod",
|
|
3784
3788
|
"filteredValue"
|
|
3785
3789
|
];
|
|
3786
|
-
function
|
|
3790
|
+
function Bi(e, t = !1) {
|
|
3787
3791
|
let n = e.some((e) => e.type === "selection"), r = e;
|
|
3788
3792
|
return t && !n && (r = [{
|
|
3789
3793
|
type: "selection",
|
|
@@ -3794,24 +3798,24 @@ function Ri(e, t = !1) {
|
|
|
3794
3798
|
type: "operates"
|
|
3795
3799
|
} : e);
|
|
3796
3800
|
}
|
|
3797
|
-
function
|
|
3801
|
+
function Vi(e) {
|
|
3798
3802
|
let t = {
|
|
3799
3803
|
minWidth: e.minWidth ?? "110",
|
|
3800
3804
|
align: e.align ?? "center",
|
|
3801
3805
|
headerAlign: e.headerAlign ?? "center"
|
|
3802
3806
|
};
|
|
3803
|
-
for (let n of
|
|
3807
|
+
for (let n of zi) e[n] !== void 0 && (t[n] = e[n]);
|
|
3804
3808
|
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;
|
|
3805
3809
|
}
|
|
3806
|
-
function
|
|
3810
|
+
function Hi(e = "--") {
|
|
3807
3811
|
let t = S(dt, null);
|
|
3808
3812
|
function n(n, r, i) {
|
|
3809
|
-
let a = n.prop ?
|
|
3810
|
-
return
|
|
3813
|
+
let a = n.prop ? Mi(r, n.prop) : void 0;
|
|
3814
|
+
return Ri(n, r, i, e, n.dict && t && !Ui(a) ? t.getLabel(n.dict, a) : void 0);
|
|
3811
3815
|
}
|
|
3812
3816
|
return { getCellDisplayValue: n };
|
|
3813
3817
|
}
|
|
3814
|
-
function
|
|
3818
|
+
function Ui(e) {
|
|
3815
3819
|
return e === "" || e == null;
|
|
3816
3820
|
}
|
|
3817
3821
|
//#endregion
|
|
@@ -3821,7 +3825,7 @@ function $(e, t = 0) {
|
|
|
3821
3825
|
}
|
|
3822
3826
|
//#endregion
|
|
3823
3827
|
//#region src/components/k-table/KTableColumn.vue
|
|
3824
|
-
var
|
|
3828
|
+
var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
3825
3829
|
name: "KTableColumn",
|
|
3826
3830
|
__name: "KTableColumn",
|
|
3827
3831
|
props: {
|
|
@@ -3845,11 +3849,11 @@ var Hi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3845
3849
|
},
|
|
3846
3850
|
emits: ["operate-click", "radio-select"],
|
|
3847
3851
|
setup(e, { emit: t }) {
|
|
3848
|
-
let n = e, r = t, i =
|
|
3852
|
+
let n = e, r = t, i = H(), { getCellDisplayValue: a } = Hi(n.nullValueFormat);
|
|
3849
3853
|
function o(e) {
|
|
3850
3854
|
return e ?? "";
|
|
3851
3855
|
}
|
|
3852
|
-
let s = u(() =>
|
|
3856
|
+
let s = u(() => Vi(n.column)), l = (e) => n.indexOffset + e + 1, f = u(() => {
|
|
3853
3857
|
let e = n.column.prop;
|
|
3854
3858
|
return !!(e && i[o(e)]);
|
|
3855
3859
|
}), v = u(() => n.column.type === "operates" ? i.operates ? !0 : !!(n.column.prop && i[o(n.column.prop)]) : !1);
|
|
@@ -3860,21 +3864,21 @@ var Hi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3860
3864
|
return typeof e.slot == "string" ? e.slot : "default";
|
|
3861
3865
|
}
|
|
3862
3866
|
function x(e) {
|
|
3863
|
-
return
|
|
3867
|
+
return Ni(e, n.rowKey);
|
|
3864
3868
|
}
|
|
3865
3869
|
return (t, n) => {
|
|
3866
|
-
let u =
|
|
3867
|
-
return e.column.type === "selection" ? (
|
|
3868
|
-
key: `${
|
|
3870
|
+
let u = ne("KTableColumn", !0);
|
|
3871
|
+
return e.column.type === "selection" ? (M(), d(B(K), E({
|
|
3872
|
+
key: `${B($)(e.column, e.columnIndex)}:selection`,
|
|
3869
3873
|
type: "selection"
|
|
3870
|
-
}, s.value), null, 16)) : e.column.type === "index" ? (
|
|
3871
|
-
default:
|
|
3874
|
+
}, s.value), null, 16)) : e.column.type === "index" ? (M(), d(B(K), E({ key: `${B($)(e.column, e.columnIndex)}:index` }, s.value), {
|
|
3875
|
+
default: G(({ $index: e }) => [I(t.$slots, "index", {
|
|
3872
3876
|
index: e,
|
|
3873
3877
|
displayIndex: l(e)
|
|
3874
|
-
}, () => [g(
|
|
3878
|
+
}, () => [g(L(l(e)), 1)], !0)]),
|
|
3875
3879
|
_: 3
|
|
3876
|
-
}, 16)) : e.column.type === "radio" ? (
|
|
3877
|
-
default:
|
|
3880
|
+
}, 16)) : e.column.type === "radio" ? (M(), d(B(K), E({ key: `${B($)(e.column, e.columnIndex)}:radio` }, s.value), {
|
|
3881
|
+
default: G(({ row: t }) => [_(B(je), {
|
|
3878
3882
|
class: "k-table-column__radio",
|
|
3879
3883
|
"model-value": e.radioSelected,
|
|
3880
3884
|
label: x(t),
|
|
@@ -3885,44 +3889,44 @@ var Hi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3885
3889
|
"onUpdate:modelValue"
|
|
3886
3890
|
])]),
|
|
3887
3891
|
_: 1
|
|
3888
|
-
}, 16)) : e.column.type === "operates" ? (
|
|
3889
|
-
default:
|
|
3892
|
+
}, 16)) : e.column.type === "operates" ? (M(), d(B(K), E({ key: `${B($)(e.column, e.columnIndex)}:operates` }, s.value), {
|
|
3893
|
+
default: G(({ row: n, column: r, $index: a }) => [v.value ? I(t.$slots, B(i).operates ? "operates" : o(e.column.prop), {
|
|
3890
3894
|
row: n,
|
|
3891
3895
|
column: r,
|
|
3892
3896
|
index: a
|
|
3893
|
-
}, void 0, !0, 0) : (
|
|
3897
|
+
}, void 0, !0, 0) : (M(), d(B(qr), {
|
|
3894
3898
|
key: 1,
|
|
3895
3899
|
data: e.column.operates ?? [],
|
|
3896
3900
|
disabled: e.disabled,
|
|
3897
3901
|
"table-mode": "",
|
|
3898
3902
|
onClick: (e, t) => y(e, t, n)
|
|
3899
|
-
}, h({ _: 2 }, [
|
|
3903
|
+
}, h({ _: 2 }, [F(e.column.operates ?? [], (e) => ({
|
|
3900
3904
|
name: b(e),
|
|
3901
|
-
fn:
|
|
3905
|
+
fn: G(({ item: i }) => [I(t.$slots, b(e), {
|
|
3902
3906
|
row: n,
|
|
3903
3907
|
column: r,
|
|
3904
3908
|
index: a,
|
|
3905
3909
|
item: i
|
|
3906
|
-
}, () => [g(
|
|
3910
|
+
}, () => [g(L(i.label), 1)], !0)])
|
|
3907
3911
|
}))]), 1032, [
|
|
3908
3912
|
"data",
|
|
3909
3913
|
"disabled",
|
|
3910
3914
|
"onClick"
|
|
3911
3915
|
]))]),
|
|
3912
3916
|
_: 3
|
|
3913
|
-
}, 16)) : e.column.type === "expand" ? (
|
|
3914
|
-
key: `${
|
|
3917
|
+
}, 16)) : e.column.type === "expand" ? (M(), d(B(K), E({
|
|
3918
|
+
key: `${B($)(e.column, e.columnIndex)}:expand`,
|
|
3915
3919
|
type: "expand"
|
|
3916
3920
|
}, s.value), {
|
|
3917
|
-
default:
|
|
3921
|
+
default: G(({ row: e, column: n, $index: r }) => [I(t.$slots, "expand", {
|
|
3918
3922
|
row: e,
|
|
3919
3923
|
column: n,
|
|
3920
3924
|
index: r
|
|
3921
3925
|
}, void 0, !0)]),
|
|
3922
3926
|
_: 3
|
|
3923
|
-
}, 16)) : e.column.children?.length ? (
|
|
3924
|
-
default:
|
|
3925
|
-
key:
|
|
3927
|
+
}, 16)) : e.column.children?.length ? (M(), d(B(K), E({ key: `${B($)(e.column, e.columnIndex)}:group` }, s.value), {
|
|
3928
|
+
default: G(() => [(M(!0), p(c, null, F(e.column.children, (i, a) => (M(), d(u, {
|
|
3929
|
+
key: B($)(i, a),
|
|
3926
3930
|
column: i,
|
|
3927
3931
|
"column-index": a,
|
|
3928
3932
|
"index-offset": e.indexOffset,
|
|
@@ -3932,9 +3936,9 @@ var Hi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3932
3936
|
"radio-selected": e.radioSelected,
|
|
3933
3937
|
onOperateClick: n[0] ||= (e, t, n) => r("operate-click", e, t, n),
|
|
3934
3938
|
onRadioSelect: n[1] ||= (e) => r("radio-select", e)
|
|
3935
|
-
}, h({ _: 2 }, [
|
|
3939
|
+
}, h({ _: 2 }, [F(t.$slots, (e, n) => ({
|
|
3936
3940
|
name: n,
|
|
3937
|
-
fn:
|
|
3941
|
+
fn: G((e) => [I(t.$slots, n, E({ ref_for: !0 }, e ?? {}), void 0, !0)])
|
|
3938
3942
|
}))]), 1032, [
|
|
3939
3943
|
"column",
|
|
3940
3944
|
"column-index",
|
|
@@ -3945,40 +3949,40 @@ var Hi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3945
3949
|
"radio-selected"
|
|
3946
3950
|
]))), 128))]),
|
|
3947
3951
|
_: 3
|
|
3948
|
-
}, 16)) : (
|
|
3949
|
-
default:
|
|
3952
|
+
}, 16)) : (M(), d(B(K), E({ key: `${B($)(e.column, e.columnIndex)}:default` }, s.value), h({
|
|
3953
|
+
default: G(({ row: n, column: r, $index: i }) => [f.value ? I(t.$slots, o(e.column.prop), {
|
|
3950
3954
|
row: n,
|
|
3951
3955
|
column: r,
|
|
3952
3956
|
index: i
|
|
3953
|
-
}, void 0, !0, 0) : (
|
|
3957
|
+
}, void 0, !0, 0) : (M(), p(c, { key: 1 }, [g(L(B(a)(e.column, n, i)), 1)], 64))]),
|
|
3954
3958
|
_: 2
|
|
3955
3959
|
}, [e.column.toolTip ? {
|
|
3956
3960
|
name: "header",
|
|
3957
|
-
fn:
|
|
3961
|
+
fn: G(() => [m("span", null, L(e.column.label), 1), _(B(Re), {
|
|
3958
3962
|
content: e.column.toolTip,
|
|
3959
3963
|
placement: "top"
|
|
3960
3964
|
}, {
|
|
3961
|
-
default:
|
|
3965
|
+
default: G(() => [...n[2] ||= [m("span", { class: "k-table-column__tip" }, "i", -1)]]),
|
|
3962
3966
|
_: 1
|
|
3963
3967
|
}, 8, ["content"])]),
|
|
3964
3968
|
key: "0"
|
|
3965
3969
|
} : void 0]), 1040));
|
|
3966
3970
|
};
|
|
3967
3971
|
}
|
|
3968
|
-
}), [["__scopeId", "data-v-578909bc"]]),
|
|
3972
|
+
}), [["__scopeId", "data-v-578909bc"]]), Gi = { class: "k-table-column-selector" }, Ki = { class: "k-table-column-selector__header" }, qi = { class: "k-table-column-selector__content" }, Ji = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
3969
3973
|
name: "KTableColumnSelector",
|
|
3970
3974
|
__name: "KTableColumnSelector",
|
|
3971
3975
|
props: { items: {} },
|
|
3972
3976
|
emits: ["change", "reset"],
|
|
3973
3977
|
setup(e, { emit: t }) {
|
|
3974
|
-
let n = t, r =
|
|
3978
|
+
let n = t, r = P(!1);
|
|
3975
3979
|
function i(e, t) {
|
|
3976
3980
|
n("change", e, t);
|
|
3977
3981
|
}
|
|
3978
3982
|
function a() {
|
|
3979
3983
|
n("reset");
|
|
3980
3984
|
}
|
|
3981
|
-
return (t, n) => (
|
|
3985
|
+
return (t, n) => (M(), d(B(ke), {
|
|
3982
3986
|
visible: r.value,
|
|
3983
3987
|
"onUpdate:visible": n[0] ||= (e) => r.value = e,
|
|
3984
3988
|
placement: "bottom-end",
|
|
@@ -3986,28 +3990,28 @@ var Hi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3986
3990
|
trigger: "click",
|
|
3987
3991
|
"popper-class": "k-table-column-selector__popover"
|
|
3988
3992
|
}, {
|
|
3989
|
-
reference:
|
|
3993
|
+
reference: G(() => [...n[1] ||= [m("button", {
|
|
3990
3994
|
type: "button",
|
|
3991
3995
|
class: "k-table-column-selector__trigger",
|
|
3992
3996
|
"aria-label": "列展示设置"
|
|
3993
3997
|
}, [m("span", { class: "k-table-column-selector__icon" })], -1)]]),
|
|
3994
|
-
default:
|
|
3995
|
-
m("div",
|
|
3998
|
+
default: G(() => [m("div", Gi, [
|
|
3999
|
+
m("div", Ki, [n[3] ||= m("span", null, "列展示", -1), _(B(ue), {
|
|
3996
4000
|
type: "primary",
|
|
3997
4001
|
link: "",
|
|
3998
4002
|
onClick: a
|
|
3999
4003
|
}, {
|
|
4000
|
-
default:
|
|
4004
|
+
default: G(() => [...n[2] ||= [g("恢复默认", -1)]]),
|
|
4001
4005
|
_: 1
|
|
4002
4006
|
})]),
|
|
4003
|
-
_(
|
|
4004
|
-
m("div",
|
|
4007
|
+
_(B(ye), { class: "k-table-column-selector__divider" }),
|
|
4008
|
+
m("div", qi, [(M(!0), p(c, null, F(e.items, (e) => (M(), d(B(pe), {
|
|
4005
4009
|
key: e.key,
|
|
4006
4010
|
"model-value": e.checked,
|
|
4007
4011
|
disabled: e.disabled,
|
|
4008
4012
|
onChange: (t) => i(e.key, !!t)
|
|
4009
4013
|
}, {
|
|
4010
|
-
default:
|
|
4014
|
+
default: G(() => [g(L(e.label), 1)]),
|
|
4011
4015
|
_: 2
|
|
4012
4016
|
}, 1032, [
|
|
4013
4017
|
"model-value",
|
|
@@ -4018,25 +4022,25 @@ var Hi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
4018
4022
|
_: 1
|
|
4019
4023
|
}, 8, ["visible"]));
|
|
4020
4024
|
}
|
|
4021
|
-
}), [["__scopeId", "data-v-e0b3cf31"]]),
|
|
4025
|
+
}), [["__scopeId", "data-v-e0b3cf31"]]), Yi = {
|
|
4022
4026
|
key: 0,
|
|
4023
4027
|
class: "k-table-toolbar k-table-header"
|
|
4024
|
-
},
|
|
4028
|
+
}, Xi = {
|
|
4025
4029
|
key: 0,
|
|
4026
4030
|
class: "k-table-toolbar__main"
|
|
4027
|
-
},
|
|
4031
|
+
}, Zi = {
|
|
4028
4032
|
key: 1,
|
|
4029
4033
|
class: "k-table-toolbar__header"
|
|
4030
|
-
},
|
|
4034
|
+
}, Qi = {
|
|
4031
4035
|
key: 2,
|
|
4032
4036
|
class: "k-table-toolbar__extra"
|
|
4033
|
-
},
|
|
4037
|
+
}, $i = {
|
|
4034
4038
|
key: 1,
|
|
4035
4039
|
class: "k-table-toolbar__divider"
|
|
4036
|
-
},
|
|
4040
|
+
}, ea = {
|
|
4037
4041
|
key: 2,
|
|
4038
4042
|
class: "k-table-toolbar__selection"
|
|
4039
|
-
},
|
|
4043
|
+
}, ta = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
4040
4044
|
name: "KTableToolbar",
|
|
4041
4045
|
__name: "KTableToolbar",
|
|
4042
4046
|
props: {
|
|
@@ -4052,41 +4056,41 @@ var Hi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
4052
4056
|
},
|
|
4053
4057
|
emits: ["add"],
|
|
4054
4058
|
setup(e, { emit: t }) {
|
|
4055
|
-
let n = e, r = t, i =
|
|
4056
|
-
return (t, n) => a.value || e.selectionShow ? (
|
|
4057
|
-
a.value ? (
|
|
4058
|
-
e.addButton ? (
|
|
4059
|
+
let n = e, r = t, i = H(), a = u(() => !!(n.addButton || i.header || i.extra)), o = u(() => !!(n.addButton && n.selectionShow));
|
|
4060
|
+
return (t, n) => a.value || e.selectionShow ? (M(), p("div", Yi, [
|
|
4061
|
+
a.value ? (M(), p("div", Xi, [
|
|
4062
|
+
e.addButton ? (M(), d(Y, {
|
|
4059
4063
|
key: 0,
|
|
4060
4064
|
type: "primary",
|
|
4061
|
-
icon:
|
|
4065
|
+
icon: B(qe),
|
|
4062
4066
|
onClick: n[0] ||= (e) => r("add")
|
|
4063
4067
|
}, {
|
|
4064
|
-
default:
|
|
4068
|
+
default: G(() => [g(L(e.addButton === !0 ? "新建" : e.addButton), 1)]),
|
|
4065
4069
|
_: 1
|
|
4066
4070
|
}, 8, ["icon"])) : f("", !0),
|
|
4067
|
-
|
|
4068
|
-
|
|
4071
|
+
B(i).header ? (M(), p("div", Zi, [I(t.$slots, "header", {}, void 0, !0)])) : f("", !0),
|
|
4072
|
+
B(i).extra ? (M(), p("div", Qi, [I(t.$slots, "extra", {}, void 0, !0)])) : f("", !0)
|
|
4069
4073
|
])) : f("", !0),
|
|
4070
|
-
o.value ? (
|
|
4071
|
-
e.selectionShow ? (
|
|
4074
|
+
o.value ? (M(), p("div", $i)) : f("", !0),
|
|
4075
|
+
e.selectionShow ? (M(), p("div", ea, "已选择" + L(e.selectedCount) + "条数据", 1)) : f("", !0)
|
|
4072
4076
|
])) : f("", !0);
|
|
4073
4077
|
}
|
|
4074
|
-
}), [["__scopeId", "data-v-bff19ed1"]]),
|
|
4075
|
-
function
|
|
4078
|
+
}), [["__scopeId", "data-v-bff19ed1"]]), na = "kayak_table_column_display";
|
|
4079
|
+
function ra(e) {
|
|
4076
4080
|
return e.type === "selection" || e.type === "index" || e.type === "radio" || e.type === "expand" || e.required === !0;
|
|
4077
4081
|
}
|
|
4078
|
-
function
|
|
4082
|
+
function ia(e) {
|
|
4079
4083
|
return !(e.type === "radio" || e.type === "expand" || e.children?.length);
|
|
4080
4084
|
}
|
|
4081
|
-
function
|
|
4082
|
-
let t =
|
|
4085
|
+
function aa(e) {
|
|
4086
|
+
let t = P({}), n = P(""), r = Ue(na, {}), i = u(() => !!z(e.enableColumnCache)), a = u(() => z(e.columns).filter((e) => ia(e)));
|
|
4083
4087
|
function o() {
|
|
4084
|
-
return
|
|
4088
|
+
return z(e.tableKey) || n.value;
|
|
4085
4089
|
}
|
|
4086
4090
|
function s() {
|
|
4087
4091
|
let t = {};
|
|
4088
|
-
return
|
|
4089
|
-
|
|
4092
|
+
return z(e.columns).forEach((e, n) => {
|
|
4093
|
+
ia(e) && (t[$(e, n)] = !0);
|
|
4090
4094
|
}), t;
|
|
4091
4095
|
}
|
|
4092
4096
|
function c() {
|
|
@@ -4110,16 +4114,16 @@ function ra(e) {
|
|
|
4110
4114
|
delete t[e], r.value = t;
|
|
4111
4115
|
}
|
|
4112
4116
|
function f(t, n) {
|
|
4113
|
-
let r =
|
|
4117
|
+
let r = z(e.columns), i = r.findIndex((e) => e === t || e.prop && e.prop === t.prop && e.type === t.type);
|
|
4114
4118
|
return i >= 0 ? $(r[i], i) : $(t, n);
|
|
4115
4119
|
}
|
|
4116
4120
|
function p() {
|
|
4117
|
-
n.value =
|
|
4121
|
+
n.value = z(e.tableKey) || `table_${Math.random().toString(36).slice(2, 11)}`;
|
|
4118
4122
|
let r = c();
|
|
4119
4123
|
t.value = r ? J(r) : s();
|
|
4120
4124
|
}
|
|
4121
4125
|
function m() {
|
|
4122
|
-
|
|
4126
|
+
D(() => e.onLayout?.());
|
|
4123
4127
|
}
|
|
4124
4128
|
function h(n, r) {
|
|
4125
4129
|
t.value = {
|
|
@@ -4134,9 +4138,9 @@ function ra(e) {
|
|
|
4134
4138
|
d(), t.value = s(), e.onDisplayChange?.(t.value), m();
|
|
4135
4139
|
}
|
|
4136
4140
|
let v = u(() => {
|
|
4137
|
-
let n =
|
|
4141
|
+
let n = z(e.renderColumns);
|
|
4138
4142
|
return i.value ? n.filter((e, n) => {
|
|
4139
|
-
if (
|
|
4143
|
+
if (ra(e)) return !0;
|
|
4140
4144
|
let r = f(e, n);
|
|
4141
4145
|
return t.value[r] !== !1;
|
|
4142
4146
|
}) : n;
|
|
@@ -4147,15 +4151,15 @@ function ra(e) {
|
|
|
4147
4151
|
key: r,
|
|
4148
4152
|
label: e.label || "未命名列",
|
|
4149
4153
|
checked: t.value[r] !== !1,
|
|
4150
|
-
disabled:
|
|
4154
|
+
disabled: ra(e)
|
|
4151
4155
|
};
|
|
4152
4156
|
}));
|
|
4153
|
-
return
|
|
4157
|
+
return W(() => z(e.columns), () => {
|
|
4154
4158
|
let e = s();
|
|
4155
4159
|
Object.keys(e).forEach((e) => {
|
|
4156
4160
|
t.value[e] === void 0 && (t.value[e] = !0);
|
|
4157
4161
|
});
|
|
4158
|
-
}, { deep: !0 }),
|
|
4162
|
+
}, { deep: !0 }), j(() => {
|
|
4159
4163
|
p();
|
|
4160
4164
|
}), {
|
|
4161
4165
|
columnDisplay: t,
|
|
@@ -4169,19 +4173,19 @@ function ra(e) {
|
|
|
4169
4173
|
}
|
|
4170
4174
|
//#endregion
|
|
4171
4175
|
//#region src/components/k-table/composables/useTableData.ts
|
|
4172
|
-
function
|
|
4173
|
-
let t =
|
|
4176
|
+
function oa(e) {
|
|
4177
|
+
let t = P([]), n = P(e.initialLoading ?? !1), r = P(!1), i = P(!1);
|
|
4174
4178
|
function a() {
|
|
4175
4179
|
return {
|
|
4176
4180
|
...ft,
|
|
4177
|
-
...
|
|
4181
|
+
...z(e.responseConfig)
|
|
4178
4182
|
};
|
|
4179
4183
|
}
|
|
4180
4184
|
function o() {
|
|
4181
4185
|
let t = a(), { currentPage: n, pageSize: r } = e.pagination.state.value;
|
|
4182
4186
|
return {
|
|
4183
|
-
...
|
|
4184
|
-
...
|
|
4187
|
+
...z(e.params) ?? {},
|
|
4188
|
+
...z(e.queryParams) ?? {},
|
|
4185
4189
|
[t.page]: String(n),
|
|
4186
4190
|
[t.limit]: String(r)
|
|
4187
4191
|
};
|
|
@@ -4213,8 +4217,8 @@ function ia(e) {
|
|
|
4213
4217
|
}
|
|
4214
4218
|
//#endregion
|
|
4215
4219
|
//#region src/components/k-table/composables/useTablePagination.ts
|
|
4216
|
-
function
|
|
4217
|
-
let t =
|
|
4220
|
+
function sa(e) {
|
|
4221
|
+
let t = z(e.pagination), n = P({
|
|
4218
4222
|
total: t?.total ?? pt.total,
|
|
4219
4223
|
currentPage: t?.currentPage ?? pt.currentPage,
|
|
4220
4224
|
pageSize: t?.pageSize ?? pt.pageSize,
|
|
@@ -4227,8 +4231,8 @@ function aa(e) {
|
|
|
4227
4231
|
pageSizes: n.value.pageSizes,
|
|
4228
4232
|
layout: n.value.layout
|
|
4229
4233
|
})), i = u(() => (n.value.currentPage - 1) * n.value.pageSize);
|
|
4230
|
-
|
|
4231
|
-
let t =
|
|
4234
|
+
W(() => {
|
|
4235
|
+
let t = z(e.pagination);
|
|
4232
4236
|
return [
|
|
4233
4237
|
t?.total,
|
|
4234
4238
|
t?.currentPage,
|
|
@@ -4262,16 +4266,16 @@ function aa(e) {
|
|
|
4262
4266
|
}
|
|
4263
4267
|
//#endregion
|
|
4264
4268
|
//#region src/components/k-table/composables/useTableRadio.ts
|
|
4265
|
-
function
|
|
4266
|
-
let t =
|
|
4269
|
+
function ca(e) {
|
|
4270
|
+
let t = P(""), n = u(() => z(e.columns).some((e) => e.type === "radio"));
|
|
4267
4271
|
function r(n) {
|
|
4268
|
-
return t.value = n ?
|
|
4272
|
+
return t.value = n ? Ni(n, z(e.rowKey)) : "", n;
|
|
4269
4273
|
}
|
|
4270
4274
|
function i() {
|
|
4271
4275
|
t.value = "";
|
|
4272
4276
|
}
|
|
4273
4277
|
function a(n) {
|
|
4274
|
-
t.value =
|
|
4278
|
+
t.value = Ni(n, z(e.rowKey));
|
|
4275
4279
|
}
|
|
4276
4280
|
function o() {
|
|
4277
4281
|
return t.value;
|
|
@@ -4287,16 +4291,16 @@ function oa(e) {
|
|
|
4287
4291
|
}
|
|
4288
4292
|
//#endregion
|
|
4289
4293
|
//#region src/components/k-table/composables/useTableRowSort.ts
|
|
4290
|
-
function
|
|
4294
|
+
function la(e) {
|
|
4291
4295
|
let t = null;
|
|
4292
4296
|
function n() {
|
|
4293
4297
|
t?.destroy(), t = null;
|
|
4294
4298
|
}
|
|
4295
4299
|
function r() {
|
|
4296
|
-
if (n(), !
|
|
4300
|
+
if (n(), !z(e.enabled)) return;
|
|
4297
4301
|
let r = e.tableRef.value?.$el?.querySelector(".el-table__body-wrapper tbody");
|
|
4298
4302
|
r && (t = Ze.create(r, {
|
|
4299
|
-
disabled:
|
|
4303
|
+
disabled: z(e.disabled),
|
|
4300
4304
|
animation: 300,
|
|
4301
4305
|
handle: ".sort-handle",
|
|
4302
4306
|
filter: ".ignore-elements",
|
|
@@ -4304,26 +4308,26 @@ function sa(e) {
|
|
|
4304
4308
|
onEnd: (t) => e.onSortEnd(t)
|
|
4305
4309
|
}));
|
|
4306
4310
|
}
|
|
4307
|
-
return
|
|
4308
|
-
|
|
4309
|
-
|
|
4311
|
+
return W(() => [
|
|
4312
|
+
z(e.enabled),
|
|
4313
|
+
z(e.rebindKey),
|
|
4310
4314
|
e.tableRef.value
|
|
4311
4315
|
], () => {
|
|
4312
|
-
|
|
4313
|
-
}, { flush: "post" }),
|
|
4316
|
+
D(r);
|
|
4317
|
+
}, { flush: "post" }), W(() => z(e.disabled), (e) => {
|
|
4314
4318
|
t && t.option("disabled", e);
|
|
4315
|
-
}),
|
|
4316
|
-
initSortable: () =>
|
|
4319
|
+
}), A(n), {
|
|
4320
|
+
initSortable: () => D(r),
|
|
4317
4321
|
destroySortable: n
|
|
4318
4322
|
};
|
|
4319
4323
|
}
|
|
4320
4324
|
//#endregion
|
|
4321
4325
|
//#region src/components/k-table/composables/useTableTreeLoad.ts
|
|
4322
|
-
function
|
|
4326
|
+
function ua(e) {
|
|
4323
4327
|
let t = /* @__PURE__ */ new Map();
|
|
4324
4328
|
function n(n) {
|
|
4325
4329
|
return (r, i, a) => {
|
|
4326
|
-
let o =
|
|
4330
|
+
let o = Ni(r, z(e.rowKey));
|
|
4327
4331
|
o != null && t.set(o, {
|
|
4328
4332
|
row: r,
|
|
4329
4333
|
treeNode: i,
|
|
@@ -4332,7 +4336,7 @@ function ca(e) {
|
|
|
4332
4336
|
};
|
|
4333
4337
|
}
|
|
4334
4338
|
function r(n) {
|
|
4335
|
-
let r =
|
|
4339
|
+
let r = z(e.load), i = t.get(n);
|
|
4336
4340
|
if (!i || !r) return;
|
|
4337
4341
|
let a = e.tableRef.value?.store?.states?.lazyTreeNodeMap;
|
|
4338
4342
|
a && n != null && (a[String(n)] = []), r(i.row, i.treeNode, i.resolve);
|
|
@@ -4348,33 +4352,33 @@ function ca(e) {
|
|
|
4348
4352
|
}
|
|
4349
4353
|
//#endregion
|
|
4350
4354
|
//#region src/components/k-table/composables/useKTable.ts
|
|
4351
|
-
function
|
|
4352
|
-
let { props: t, emit: n, attrs: r, slots: i, tableRef: a, queryRef: o } = e, s =
|
|
4355
|
+
function da(e) {
|
|
4356
|
+
let { props: t, emit: n, attrs: r, slots: i, tableRef: a, queryRef: o } = e, s = P({}), c = P(0), l = u(() => !!t.action), d = u(() => !!t.query?.form?.formConfigs?.length), f = u(() => !!i.header);
|
|
4353
4357
|
function p(e) {
|
|
4354
4358
|
let n = { ...e };
|
|
4355
4359
|
s.value = t.convertParams ? t.convertParams(n) : n;
|
|
4356
4360
|
}
|
|
4357
4361
|
let m = u(() => {
|
|
4358
|
-
let e =
|
|
4362
|
+
let e = Bi(t.columns, t.selectionShow);
|
|
4359
4363
|
return t.disabled && (e = e.filter((e) => e.type !== "operates" && e.prop !== "operates")), e;
|
|
4360
|
-
}), h =
|
|
4364
|
+
}), h = aa({
|
|
4361
4365
|
columns: () => t.columns,
|
|
4362
4366
|
renderColumns: m,
|
|
4363
4367
|
enableColumnCache: () => t.enableColumnCache,
|
|
4364
4368
|
tableKey: () => t.tableKey,
|
|
4365
4369
|
onDisplayChange: (e) => n("column-display-change", e),
|
|
4366
4370
|
onLayout: () => a.value?.doLayout()
|
|
4367
|
-
}), g =
|
|
4371
|
+
}), g = ca({
|
|
4368
4372
|
columns: () => t.columns,
|
|
4369
4373
|
rowKey: () => t.rowKey
|
|
4370
|
-
}), _ =
|
|
4374
|
+
}), _ = ua({
|
|
4371
4375
|
tableRef: a,
|
|
4372
4376
|
rowKey: () => t.rowKey,
|
|
4373
4377
|
load: () => t.load
|
|
4374
|
-
}), v =
|
|
4378
|
+
}), v = sa({
|
|
4375
4379
|
pagination: () => t.pagination,
|
|
4376
4380
|
hasAction: l
|
|
4377
|
-
}), y =
|
|
4381
|
+
}), y = oa({
|
|
4378
4382
|
action: t.action,
|
|
4379
4383
|
params: () => t.params,
|
|
4380
4384
|
queryParams: s,
|
|
@@ -4382,11 +4386,11 @@ function la(e) {
|
|
|
4382
4386
|
pagination: v,
|
|
4383
4387
|
initialLoading: !!(t.action && t.initTable),
|
|
4384
4388
|
onDataLoaded: (e, t) => n("data-loaded", e, t)
|
|
4385
|
-
}), b = u(() => t.enableColumnCache ? h.visibleColumns.value : m.value), x = u(() => b.value.map((e, t) => $(e, t)).join("|")), S = u(() => !!(t.addButton || t.selectionShow || f.value || t.enableColumnCache)),
|
|
4389
|
+
}), b = u(() => t.enableColumnCache ? h.visibleColumns.value : m.value), x = u(() => b.value.map((e, t) => $(e, t)).join("|")), S = u(() => !!(t.addButton || t.selectionShow || f.value || t.enableColumnCache)), C = u(() => l.value ? y.tableData.value : t.data), w = u(() => t.loading === void 0 ? l.value ? y.loading.value : !1 : t.loading), T = u(() => w.value || !!(l.value && t.initTable && !y.loaded.value)), E = u(() => {
|
|
4386
4390
|
let e = { ...r };
|
|
4387
4391
|
l.value && "data" in e && delete e.data, t.load && delete e.load;
|
|
4388
4392
|
let n = {
|
|
4389
|
-
data:
|
|
4393
|
+
data: C.value,
|
|
4390
4394
|
rowKey: t.rowKey,
|
|
4391
4395
|
border: !0,
|
|
4392
4396
|
stripe: !0,
|
|
@@ -4398,90 +4402,90 @@ function la(e) {
|
|
|
4398
4402
|
strategy: "absolute"
|
|
4399
4403
|
}), n;
|
|
4400
4404
|
});
|
|
4401
|
-
|
|
4405
|
+
la({
|
|
4402
4406
|
enabled: () => t.sort,
|
|
4403
4407
|
disabled: () => t.disabled,
|
|
4404
4408
|
tableRef: a,
|
|
4405
4409
|
rebindKey: () => x.value,
|
|
4406
4410
|
onSortEnd: (e) => {
|
|
4407
|
-
let t = [...
|
|
4411
|
+
let t = [...C.value];
|
|
4408
4412
|
if (e.oldIndex == null || e.newIndex == null) return;
|
|
4409
4413
|
let [r] = t.splice(e.oldIndex, 1);
|
|
4410
4414
|
t.splice(e.newIndex, 0, r), n("sort-end", e, t);
|
|
4411
4415
|
}
|
|
4412
4416
|
});
|
|
4413
|
-
function
|
|
4417
|
+
function D() {
|
|
4414
4418
|
l.value && y.fetchData();
|
|
4415
4419
|
}
|
|
4416
|
-
|
|
4420
|
+
j(() => {
|
|
4417
4421
|
!t.initTable || !t.action || (d.value && p(o.value?.getParams() ?? {}), y.fetchData());
|
|
4418
4422
|
});
|
|
4419
|
-
function
|
|
4423
|
+
function O(e) {
|
|
4420
4424
|
c.value = e.length, n("selection-change", e);
|
|
4421
4425
|
}
|
|
4422
|
-
function
|
|
4426
|
+
function ee(e) {
|
|
4423
4427
|
n("sort-change", e);
|
|
4424
4428
|
}
|
|
4425
|
-
function
|
|
4429
|
+
function k() {
|
|
4426
4430
|
a.value?.setCurrentRow();
|
|
4427
4431
|
}
|
|
4428
|
-
function
|
|
4429
|
-
p(e), v.resetPage(), t.clearCurrentRowOnQuery &&
|
|
4432
|
+
function A(e) {
|
|
4433
|
+
p(e), v.resetPage(), t.clearCurrentRowOnQuery && k(), n("query", s.value), D();
|
|
4430
4434
|
}
|
|
4431
|
-
function
|
|
4432
|
-
n("reset"), t.selectionShow &&
|
|
4435
|
+
function M() {
|
|
4436
|
+
n("reset"), t.selectionShow && z(), t.clearCurrentRowOnReset && k();
|
|
4433
4437
|
}
|
|
4434
|
-
function
|
|
4435
|
-
v.setCurrentPage(e), n("page-change", e),
|
|
4438
|
+
function te(e) {
|
|
4439
|
+
v.setCurrentPage(e), n("page-change", e), D();
|
|
4436
4440
|
}
|
|
4437
|
-
function
|
|
4438
|
-
v.setPageSize(e), n("size-change", e),
|
|
4441
|
+
function N(e) {
|
|
4442
|
+
v.setPageSize(e), n("size-change", e), D();
|
|
4439
4443
|
}
|
|
4440
|
-
function
|
|
4444
|
+
function F() {
|
|
4441
4445
|
n("add");
|
|
4442
4446
|
}
|
|
4443
|
-
function
|
|
4447
|
+
function I(e, t, r) {
|
|
4444
4448
|
n("operate-click", e, t, r);
|
|
4445
4449
|
}
|
|
4446
|
-
function
|
|
4450
|
+
function ne(e) {
|
|
4447
4451
|
if (!g.hasRadioColumn.value) return;
|
|
4448
4452
|
let t = g.selectRow(e);
|
|
4449
4453
|
t && n("radio-change", t, g.radioSelected.value);
|
|
4450
4454
|
}
|
|
4451
|
-
function
|
|
4452
|
-
|
|
4455
|
+
function re(e) {
|
|
4456
|
+
ne(e);
|
|
4453
4457
|
}
|
|
4454
|
-
function
|
|
4458
|
+
function ie(e, t) {
|
|
4455
4459
|
h.setColumnVisibleByKey(e, t);
|
|
4456
4460
|
}
|
|
4457
|
-
function
|
|
4461
|
+
function ae() {
|
|
4458
4462
|
return a.value;
|
|
4459
4463
|
}
|
|
4460
|
-
function
|
|
4464
|
+
function L() {
|
|
4461
4465
|
return o.value;
|
|
4462
4466
|
}
|
|
4463
|
-
function
|
|
4467
|
+
function R() {
|
|
4464
4468
|
return a.value?.getSelectionRows() ?? [];
|
|
4465
4469
|
}
|
|
4466
|
-
function
|
|
4470
|
+
function z() {
|
|
4467
4471
|
a.value?.clearSelection(), c.value = 0;
|
|
4468
4472
|
}
|
|
4469
|
-
function
|
|
4473
|
+
function B(e, t) {
|
|
4470
4474
|
a.value?.toggleRowSelection(e, t);
|
|
4471
4475
|
}
|
|
4472
|
-
async function
|
|
4476
|
+
async function V(e = !1) {
|
|
4473
4477
|
l.value && await y.refresh(e);
|
|
4474
4478
|
}
|
|
4475
|
-
function
|
|
4479
|
+
function oe() {
|
|
4476
4480
|
g.clearRadioSelection(), a.value?.setCurrentRow();
|
|
4477
4481
|
}
|
|
4478
|
-
function
|
|
4482
|
+
function H(e) {
|
|
4479
4483
|
g.setRadioSelection(e);
|
|
4480
4484
|
}
|
|
4481
|
-
function
|
|
4485
|
+
function U() {
|
|
4482
4486
|
return g.getRadioSelection();
|
|
4483
4487
|
}
|
|
4484
|
-
function
|
|
4488
|
+
function se(e) {
|
|
4485
4489
|
_.refreshTree(e);
|
|
4486
4490
|
}
|
|
4487
4491
|
return {
|
|
@@ -4489,40 +4493,40 @@ function la(e) {
|
|
|
4489
4493
|
showToolbar: S,
|
|
4490
4494
|
hasHeaderSlot: f,
|
|
4491
4495
|
renderColumns: b,
|
|
4492
|
-
tableProps:
|
|
4493
|
-
tableLoading:
|
|
4494
|
-
showLoadingEmpty:
|
|
4496
|
+
tableProps: E,
|
|
4497
|
+
tableLoading: w,
|
|
4498
|
+
showLoadingEmpty: T,
|
|
4495
4499
|
columnSelectorItems: h.selectorItems,
|
|
4496
4500
|
paginationBind: v.bindProps,
|
|
4497
4501
|
indexOffset: v.indexOffset,
|
|
4498
4502
|
selectedCount: c,
|
|
4499
4503
|
radioSelected: g.radioSelected,
|
|
4500
4504
|
getColumnIdentity: $,
|
|
4501
|
-
handleSelectionChange:
|
|
4502
|
-
handleSortChange:
|
|
4503
|
-
handleQuery:
|
|
4504
|
-
handleQueryReset:
|
|
4505
|
-
handlePageChange:
|
|
4506
|
-
handleSizeChange:
|
|
4507
|
-
handleAdd:
|
|
4508
|
-
handleOperateClick:
|
|
4509
|
-
handleRowClick:
|
|
4510
|
-
handleRadioChange:
|
|
4511
|
-
handleColumnVisibleChange:
|
|
4505
|
+
handleSelectionChange: O,
|
|
4506
|
+
handleSortChange: ee,
|
|
4507
|
+
handleQuery: A,
|
|
4508
|
+
handleQueryReset: M,
|
|
4509
|
+
handlePageChange: te,
|
|
4510
|
+
handleSizeChange: N,
|
|
4511
|
+
handleAdd: F,
|
|
4512
|
+
handleOperateClick: I,
|
|
4513
|
+
handleRowClick: re,
|
|
4514
|
+
handleRadioChange: ne,
|
|
4515
|
+
handleColumnVisibleChange: ie,
|
|
4512
4516
|
resetColumnDisplay: h.resetColumnDisplay,
|
|
4513
|
-
getTableRef:
|
|
4514
|
-
getQueryRef:
|
|
4515
|
-
getSelection:
|
|
4516
|
-
clearSelection:
|
|
4517
|
-
toggleRowSelection:
|
|
4518
|
-
refresh:
|
|
4519
|
-
clearRadioSelection:
|
|
4520
|
-
setRadioSelection:
|
|
4521
|
-
getRadioSelection:
|
|
4522
|
-
refreshTree:
|
|
4517
|
+
getTableRef: ae,
|
|
4518
|
+
getQueryRef: L,
|
|
4519
|
+
getSelection: R,
|
|
4520
|
+
clearSelection: z,
|
|
4521
|
+
toggleRowSelection: B,
|
|
4522
|
+
refresh: V,
|
|
4523
|
+
clearRadioSelection: oe,
|
|
4524
|
+
setRadioSelection: H,
|
|
4525
|
+
getRadioSelection: U,
|
|
4526
|
+
refreshTree: se
|
|
4523
4527
|
};
|
|
4524
4528
|
}
|
|
4525
|
-
var
|
|
4529
|
+
var fa = {
|
|
4526
4530
|
hidePagination: !1,
|
|
4527
4531
|
initTable: !0,
|
|
4528
4532
|
nullValueFormat: "--",
|
|
@@ -4536,14 +4540,14 @@ var ua = {
|
|
|
4536
4540
|
sort: !1,
|
|
4537
4541
|
data: () => [],
|
|
4538
4542
|
sortFilter: () => []
|
|
4539
|
-
},
|
|
4543
|
+
}, pa = { class: "k-table__box" }, ma = { class: "k-table" }, ha = {
|
|
4540
4544
|
key: 0,
|
|
4541
4545
|
class: "k-table__loading-empty"
|
|
4542
|
-
},
|
|
4546
|
+
}, ga = { class: "k-table-footer" }, _a = /*@__PURE__*/ y({
|
|
4543
4547
|
name: "KTable",
|
|
4544
4548
|
inheritAttrs: !0,
|
|
4545
4549
|
__name: "KTable",
|
|
4546
|
-
props: /*@__PURE__*/
|
|
4550
|
+
props: /*@__PURE__*/ w({
|
|
4547
4551
|
columns: {},
|
|
4548
4552
|
data: {},
|
|
4549
4553
|
action: { type: Function },
|
|
@@ -4569,7 +4573,7 @@ var ua = {
|
|
|
4569
4573
|
sortFilter: {},
|
|
4570
4574
|
load: { type: Function }
|
|
4571
4575
|
}, {
|
|
4572
|
-
...
|
|
4576
|
+
...fa,
|
|
4573
4577
|
data: () => []
|
|
4574
4578
|
}),
|
|
4575
4579
|
emits: [
|
|
@@ -4587,10 +4591,10 @@ var ua = {
|
|
|
4587
4591
|
"sort-change"
|
|
4588
4592
|
],
|
|
4589
4593
|
setup(e, { expose: t, emit: n }) {
|
|
4590
|
-
let r = e, i = n, a =
|
|
4594
|
+
let r = e, i = n, a = H(), o = P(), s = P(), l = N(da({
|
|
4591
4595
|
props: r,
|
|
4592
4596
|
emit: i,
|
|
4593
|
-
attrs:
|
|
4597
|
+
attrs: V(),
|
|
4594
4598
|
slots: a,
|
|
4595
4599
|
tableRef: o,
|
|
4596
4600
|
queryRef: s
|
|
@@ -4615,8 +4619,8 @@ var ua = {
|
|
|
4615
4619
|
getRadioSelection: l.getRadioSelection,
|
|
4616
4620
|
refreshTree: l.refreshTree
|
|
4617
4621
|
}), (t, n) => {
|
|
4618
|
-
let r =
|
|
4619
|
-
return
|
|
4622
|
+
let r = re("loading");
|
|
4623
|
+
return M(), p("div", pa, [l.showQuery ? (M(), d(B(ji), E({
|
|
4620
4624
|
key: 0,
|
|
4621
4625
|
ref_key: "queryRef",
|
|
4622
4626
|
ref: s,
|
|
@@ -4624,8 +4628,8 @@ var ua = {
|
|
|
4624
4628
|
}, e.query, {
|
|
4625
4629
|
onQuery: l.handleQuery,
|
|
4626
4630
|
onReset: l.handleQueryReset
|
|
4627
|
-
}), null, 16, ["onQuery", "onReset"])) : f("", !0), m("div",
|
|
4628
|
-
l.showToolbar ? (
|
|
4631
|
+
}), null, 16, ["onQuery", "onReset"])) : f("", !0), m("div", ma, [
|
|
4632
|
+
l.showToolbar ? (M(), d(ta, {
|
|
4629
4633
|
key: 0,
|
|
4630
4634
|
"add-button": e.addButton,
|
|
4631
4635
|
"selection-show": e.selectionShow,
|
|
@@ -4633,11 +4637,11 @@ var ua = {
|
|
|
4633
4637
|
onAdd: l.handleAdd
|
|
4634
4638
|
}, h({ _: 2 }, [l.hasHeaderSlot ? {
|
|
4635
4639
|
name: "header",
|
|
4636
|
-
fn:
|
|
4640
|
+
fn: G(() => [I(t.$slots, "header", {}, void 0, !0)]),
|
|
4637
4641
|
key: "0"
|
|
4638
4642
|
} : void 0, e.enableColumnCache ? {
|
|
4639
4643
|
name: "extra",
|
|
4640
|
-
fn:
|
|
4644
|
+
fn: G(() => [_(Ji, {
|
|
4641
4645
|
items: l.columnSelectorItems,
|
|
4642
4646
|
onChange: l.handleColumnVisibleChange,
|
|
4643
4647
|
onReset: l.resetColumnDisplay
|
|
@@ -4653,7 +4657,7 @@ var ua = {
|
|
|
4653
4657
|
"selected-count",
|
|
4654
4658
|
"onAdd"
|
|
4655
4659
|
])) : f("", !0),
|
|
4656
|
-
|
|
4660
|
+
ce((M(), d(B(Fe), E({
|
|
4657
4661
|
ref_key: "tableRef",
|
|
4658
4662
|
ref: o,
|
|
4659
4663
|
class: "k-table__main"
|
|
@@ -4662,23 +4666,23 @@ var ua = {
|
|
|
4662
4666
|
onSortChange: l.handleSortChange,
|
|
4663
4667
|
onRowClick: l.handleRowClick
|
|
4664
4668
|
}), {
|
|
4665
|
-
empty:
|
|
4666
|
-
default:
|
|
4669
|
+
empty: G(() => [l.showLoadingEmpty ? ce((M(), p("span", ha, null, 512)), [[r, l.showLoadingEmpty]]) : I(t.$slots, "empty", {}, () => [g(L(t.$attrs.emptyText ?? t.$attrs["empty-text"] ?? "暂无数据"), 1)], !0, 1)]),
|
|
4670
|
+
default: G(() => [e.sort ? (M(), d(B(K), {
|
|
4667
4671
|
key: 0,
|
|
4668
4672
|
label: "拖拽排序",
|
|
4669
4673
|
align: "center",
|
|
4670
4674
|
width: "100"
|
|
4671
4675
|
}, {
|
|
4672
|
-
default:
|
|
4676
|
+
default: G(({ row: n, column: r, $index: i }) => [I(t.$slots, "sort", {
|
|
4673
4677
|
row: n,
|
|
4674
4678
|
column: r,
|
|
4675
4679
|
index: i
|
|
4676
4680
|
}, () => [m("span", {
|
|
4677
|
-
class:
|
|
4681
|
+
class: O(e.sortFilter.includes(i) ? "ignore-elements" : "sort-handle k-table__sort-handle"),
|
|
4678
4682
|
"aria-hidden": "true"
|
|
4679
4683
|
}, "⋮⋮", 2)], !0)]),
|
|
4680
4684
|
_: 3
|
|
4681
|
-
})) : f("", !0), (
|
|
4685
|
+
})) : f("", !0), (M(!0), p(c, null, F(l.renderColumns, (n, r) => (M(), d(Wi, {
|
|
4682
4686
|
key: l.getColumnIdentity(n, r),
|
|
4683
4687
|
column: n,
|
|
4684
4688
|
"column-index": r,
|
|
@@ -4689,9 +4693,9 @@ var ua = {
|
|
|
4689
4693
|
"radio-selected": l.radioSelected,
|
|
4690
4694
|
onOperateClick: l.handleOperateClick,
|
|
4691
4695
|
onRadioSelect: l.handleRadioChange
|
|
4692
|
-
}, h({ _: 2 }, [
|
|
4696
|
+
}, h({ _: 2 }, [F(v.value, (e) => ({
|
|
4693
4697
|
name: e,
|
|
4694
|
-
fn:
|
|
4698
|
+
fn: G((n) => [I(t.$slots, e, E({ ref_for: !0 }, n ?? {}), void 0, !0)])
|
|
4695
4699
|
}))]), 1032, [
|
|
4696
4700
|
"column",
|
|
4697
4701
|
"column-index",
|
|
@@ -4709,20 +4713,20 @@ var ua = {
|
|
|
4709
4713
|
"onSortChange",
|
|
4710
4714
|
"onRowClick"
|
|
4711
4715
|
])), [[r, l.tableLoading]]),
|
|
4712
|
-
m("div",
|
|
4716
|
+
m("div", ga, [e.hidePagination ? f("", !0) : (M(), d(B(Jr), E({
|
|
4713
4717
|
key: 0,
|
|
4714
4718
|
class: "pagination"
|
|
4715
4719
|
}, l.paginationBind, {
|
|
4716
4720
|
onCurrentChange: l.handlePageChange,
|
|
4717
4721
|
onSizeChange: l.handleSizeChange
|
|
4718
|
-
}), null, 16, ["onCurrentChange", "onSizeChange"])),
|
|
4722
|
+
}), null, 16, ["onCurrentChange", "onSizeChange"])), I(t.$slots, "footer", {}, void 0, !0)])
|
|
4719
4723
|
])]);
|
|
4720
4724
|
};
|
|
4721
4725
|
}
|
|
4722
|
-
}),
|
|
4726
|
+
}), va = /*#__PURE__*/ e(_a, [["__scopeId", "data-v-ccb6f7c6"]]);
|
|
4723
4727
|
//#endregion
|
|
4724
4728
|
//#region src/components/k-table/dictOptions.ts
|
|
4725
|
-
function
|
|
4729
|
+
function ya(e) {
|
|
4726
4730
|
return e.map((e) => ({
|
|
4727
4731
|
value: String(e.item_key ?? ""),
|
|
4728
4732
|
label: String(e.item_value ?? e.item_key ?? "")
|
|
@@ -4730,18 +4734,18 @@ function _a(e) {
|
|
|
4730
4734
|
}
|
|
4731
4735
|
//#endregion
|
|
4732
4736
|
//#region src/components/k-table/composables/useKTableTemplateRef.ts
|
|
4733
|
-
function
|
|
4734
|
-
return
|
|
4737
|
+
function ba(e) {
|
|
4738
|
+
return U(e);
|
|
4735
4739
|
}
|
|
4736
4740
|
//#endregion
|
|
4737
4741
|
//#region src/components/k-table/composables/useKTableCrossPageSelection.ts
|
|
4738
|
-
function
|
|
4739
|
-
let t =
|
|
4742
|
+
function xa(e) {
|
|
4743
|
+
let t = ae([]), n = ae([]), r = ae(!1), i = ba(e.tableRefKey ?? "tableRef");
|
|
4740
4744
|
function a() {
|
|
4741
|
-
return e.tableRef == null ? i.value :
|
|
4745
|
+
return e.tableRef == null ? i.value : z(e.tableRef);
|
|
4742
4746
|
}
|
|
4743
4747
|
function o(t) {
|
|
4744
|
-
return String(
|
|
4748
|
+
return String(Ni(t, z(e.rowKey)));
|
|
4745
4749
|
}
|
|
4746
4750
|
function s(e) {
|
|
4747
4751
|
t.value = [...e];
|
|
@@ -4755,16 +4759,16 @@ function ya(e) {
|
|
|
4755
4759
|
function u(i) {
|
|
4756
4760
|
n.value = i;
|
|
4757
4761
|
let s = new Set(t.value.map(o));
|
|
4758
|
-
if (
|
|
4762
|
+
if (z(e.mode) === "single") {
|
|
4759
4763
|
let e = i.find((e) => s.has(o(e)));
|
|
4760
4764
|
e && a()?.setRadioSelection(e);
|
|
4761
4765
|
return;
|
|
4762
4766
|
}
|
|
4763
|
-
r.value = !0,
|
|
4767
|
+
r.value = !0, D(async () => {
|
|
4764
4768
|
let e = a();
|
|
4765
4769
|
i.forEach((t) => {
|
|
4766
4770
|
s.has(o(t)) && e?.toggleRowSelection(t, !0);
|
|
4767
|
-
}), await
|
|
4771
|
+
}), await D(), r.value = !1;
|
|
4768
4772
|
});
|
|
4769
4773
|
}
|
|
4770
4774
|
function d(e) {
|
|
@@ -4789,7 +4793,7 @@ function ya(e) {
|
|
|
4789
4793
|
}
|
|
4790
4794
|
//#endregion
|
|
4791
4795
|
//#region src/components/k-table/report/convertDownloadCol.ts
|
|
4792
|
-
function
|
|
4796
|
+
function Sa(e) {
|
|
4793
4797
|
return e.filter((e) => e.type !== "expand").map((e) => ({
|
|
4794
4798
|
sTitle: e.label ?? "",
|
|
4795
4799
|
mDataProp: e.prop ?? "",
|
|
@@ -4799,29 +4803,29 @@ function ba(e) {
|
|
|
4799
4803
|
}
|
|
4800
4804
|
//#endregion
|
|
4801
4805
|
//#region src/components/k-table/report/pickExportColumns.ts
|
|
4802
|
-
function
|
|
4806
|
+
function Ca(e, t) {
|
|
4803
4807
|
let n = e;
|
|
4804
4808
|
return t?.excludeLast && (n = n.slice(0, -1)), t?.excludeOperates && (n = n.filter((e) => e.type !== "operates" && e.prop !== "operates")), n.filter((e) => e.type !== "expand" && e.type !== "index" && e.type !== "selection" && e.type !== "radio");
|
|
4805
4809
|
}
|
|
4806
4810
|
//#endregion
|
|
4807
4811
|
//#region src/components/k-table/report/exportKTableReport.ts
|
|
4808
|
-
function
|
|
4809
|
-
let t = e.tableRef.value?.getQueryRef()?.getParams() ?? {}, n = e.convertParams ? e.convertParams(t) : t, r =
|
|
4812
|
+
function wa(e) {
|
|
4813
|
+
let t = e.tableRef.value?.getQueryRef()?.getParams() ?? {}, n = e.convertParams ? e.convertParams(t) : t, r = Ca(e.columns, e);
|
|
4810
4814
|
return e.exportApi({
|
|
4811
|
-
globColumnlist:
|
|
4815
|
+
globColumnlist: Sa(r),
|
|
4812
4816
|
jsondata: n
|
|
4813
4817
|
});
|
|
4814
4818
|
}
|
|
4815
|
-
function
|
|
4816
|
-
let t =
|
|
4819
|
+
function Ta(e) {
|
|
4820
|
+
let t = Ca(e.columns, e);
|
|
4817
4821
|
return e.exportApi({
|
|
4818
|
-
globColumnlist:
|
|
4822
|
+
globColumnlist: Sa(t),
|
|
4819
4823
|
jsondata: e.jsondata
|
|
4820
4824
|
});
|
|
4821
4825
|
}
|
|
4822
4826
|
//#endregion
|
|
4823
4827
|
//#region src/components/k-table/report/mergeQueryConfig.ts
|
|
4824
|
-
function
|
|
4828
|
+
function Ea(e, t) {
|
|
4825
4829
|
return e.map((e) => {
|
|
4826
4830
|
let n = t[e.id];
|
|
4827
4831
|
return n ? {
|
|
@@ -4833,37 +4837,37 @@ function wa(e, t) {
|
|
|
4833
4837
|
} : e;
|
|
4834
4838
|
});
|
|
4835
4839
|
}
|
|
4836
|
-
function
|
|
4840
|
+
function Da(e, t) {
|
|
4837
4841
|
let n = e.form;
|
|
4838
4842
|
return n ? {
|
|
4839
4843
|
...e,
|
|
4840
4844
|
form: {
|
|
4841
4845
|
...n,
|
|
4842
|
-
formConfigs:
|
|
4846
|
+
formConfigs: Ea(n.formConfigs ?? [], t)
|
|
4843
4847
|
}
|
|
4844
4848
|
} : e;
|
|
4845
4849
|
}
|
|
4846
|
-
function
|
|
4850
|
+
function Oa(e, t) {
|
|
4847
4851
|
return e.query ? {
|
|
4848
4852
|
...e,
|
|
4849
|
-
query:
|
|
4853
|
+
query: Da(e.query, t)
|
|
4850
4854
|
} : e;
|
|
4851
4855
|
}
|
|
4852
4856
|
//#endregion
|
|
4853
4857
|
//#region src/components/k-table/report/useExportKTableReport.ts
|
|
4854
|
-
function
|
|
4855
|
-
let t =
|
|
4858
|
+
function ka(e) {
|
|
4859
|
+
let t = P(!1);
|
|
4856
4860
|
async function n() {
|
|
4857
4861
|
if (!t.value) {
|
|
4858
4862
|
t.value = !0;
|
|
4859
4863
|
try {
|
|
4860
|
-
await
|
|
4864
|
+
await wa({
|
|
4861
4865
|
tableRef: e.tableRef,
|
|
4862
|
-
columns:
|
|
4866
|
+
columns: z(e.columns),
|
|
4863
4867
|
exportApi: e.exportApi,
|
|
4864
4868
|
convertParams: e.convertParams,
|
|
4865
|
-
excludeOperates:
|
|
4866
|
-
excludeLast:
|
|
4869
|
+
excludeOperates: z(e.excludeOperates),
|
|
4870
|
+
excludeLast: z(e.excludeLast)
|
|
4867
4871
|
});
|
|
4868
4872
|
} finally {
|
|
4869
4873
|
t.value = !1;
|
|
@@ -4877,7 +4881,7 @@ function Da(e) {
|
|
|
4877
4881
|
}
|
|
4878
4882
|
//#endregion
|
|
4879
4883
|
//#region src/components/k-upload/utils/uploadFileValue.ts
|
|
4880
|
-
function
|
|
4884
|
+
function Aa(e, t, n = {}) {
|
|
4881
4885
|
let r = `${dr(n.listType ?? "text")}${e}`;
|
|
4882
4886
|
return [{
|
|
4883
4887
|
uid: e,
|
|
@@ -4888,10 +4892,10 @@ function Oa(e, t, n = {}) {
|
|
|
4888
4892
|
url: r
|
|
4889
4893
|
}];
|
|
4890
4894
|
}
|
|
4891
|
-
function
|
|
4892
|
-
return Array.isArray(e) ? e : typeof e != "string" || !e ? [] :
|
|
4895
|
+
function ja(e, t = {}) {
|
|
4896
|
+
return Array.isArray(e) ? e : typeof e != "string" || !e ? [] : Aa(e, t.fileName ?? e, { listType: t.listType });
|
|
4893
4897
|
}
|
|
4894
|
-
function
|
|
4898
|
+
function Ma(e, t = {}) {
|
|
4895
4899
|
if (typeof e == "string") return e ? {
|
|
4896
4900
|
resource_id: e,
|
|
4897
4901
|
file_name: t.fileName
|
|
@@ -4905,8 +4909,8 @@ function Aa(e, t = {}) {
|
|
|
4905
4909
|
imp_count: n.imp_count
|
|
4906
4910
|
};
|
|
4907
4911
|
}
|
|
4908
|
-
function
|
|
4909
|
-
let n =
|
|
4912
|
+
function Na(e, t = {}) {
|
|
4913
|
+
let n = Ma(e, t);
|
|
4910
4914
|
return {
|
|
4911
4915
|
resource_id: n?.resource_id ?? "",
|
|
4912
4916
|
file_name: n?.file_name ?? t.fileName ?? "",
|
|
@@ -4914,62 +4918,62 @@ function ja(e, t = {}) {
|
|
|
4914
4918
|
imp_count: n?.imp_count
|
|
4915
4919
|
};
|
|
4916
4920
|
}
|
|
4917
|
-
function
|
|
4921
|
+
function Pa(e) {
|
|
4918
4922
|
return !!(e.resource_id || e.imp_id);
|
|
4919
4923
|
}
|
|
4920
4924
|
//#endregion
|
|
4921
4925
|
//#region src/components/index.ts
|
|
4922
|
-
var
|
|
4926
|
+
var Fa = /* @__PURE__ */ $e({
|
|
4923
4927
|
DICT_KEY: () => dt,
|
|
4924
|
-
KAffix: () =>
|
|
4925
|
-
KBreadcrumb: () =>
|
|
4928
|
+
KAffix: () => Ia,
|
|
4929
|
+
KBreadcrumb: () => La,
|
|
4926
4930
|
KButton: () => Y,
|
|
4927
|
-
KCard: () =>
|
|
4928
|
-
KCascader: () =>
|
|
4931
|
+
KCard: () => _i,
|
|
4932
|
+
KCascader: () => Ra,
|
|
4929
4933
|
KCheckbox: () => Ut,
|
|
4930
|
-
KColorPicker: () =>
|
|
4934
|
+
KColorPicker: () => za,
|
|
4931
4935
|
KDatePicker: () => qt,
|
|
4932
4936
|
KDialog: () => ut,
|
|
4933
4937
|
KDialogHeader: () => ct,
|
|
4934
|
-
KForm: () =>
|
|
4935
|
-
KHandlePage: () =>
|
|
4936
|
-
KIcon: () =>
|
|
4938
|
+
KForm: () => Er,
|
|
4939
|
+
KHandlePage: () => Pr,
|
|
4940
|
+
KIcon: () => Ur,
|
|
4937
4941
|
KInput: () => Zt,
|
|
4938
|
-
KLinkButton: () =>
|
|
4939
|
-
KLongPage: () =>
|
|
4940
|
-
KPagination: () =>
|
|
4941
|
-
KPanel: () =>
|
|
4942
|
-
KPanelQuery: () =>
|
|
4942
|
+
KLinkButton: () => qr,
|
|
4943
|
+
KLongPage: () => gi,
|
|
4944
|
+
KPagination: () => Jr,
|
|
4945
|
+
KPanel: () => xi,
|
|
4946
|
+
KPanelQuery: () => ji,
|
|
4943
4947
|
KRadio: () => _n,
|
|
4944
4948
|
KSelect: () => rn,
|
|
4945
|
-
KTable: () =>
|
|
4949
|
+
KTable: () => va,
|
|
4946
4950
|
KTimePicker: () => zn,
|
|
4947
4951
|
KUpload: () => hr,
|
|
4948
4952
|
countEditorHtmlWords: () => a,
|
|
4949
4953
|
countEditorWords: () => o,
|
|
4950
|
-
createUploadFileItem: () =>
|
|
4951
|
-
exportKTableReport: () =>
|
|
4952
|
-
exportKTableReportData: () =>
|
|
4953
|
-
getAllLucideKebabNames: () =>
|
|
4954
|
+
createUploadFileItem: () => Aa,
|
|
4955
|
+
exportKTableReport: () => wa,
|
|
4956
|
+
exportKTableReportData: () => Ta,
|
|
4957
|
+
getAllLucideKebabNames: () => Hr,
|
|
4954
4958
|
getEditorHtml: () => r,
|
|
4955
4959
|
getEditorWordCount: () => t,
|
|
4956
4960
|
getUploadConfig: () => s,
|
|
4957
|
-
hasUploadSubmitFields: () =>
|
|
4958
|
-
mapGroupDictToOptions: () =>
|
|
4959
|
-
pascalToKebab: () =>
|
|
4960
|
-
registerFormComponents: () =>
|
|
4961
|
-
resolveLucideIcon: () =>
|
|
4961
|
+
hasUploadSubmitFields: () => Pa,
|
|
4962
|
+
mapGroupDictToOptions: () => ya,
|
|
4963
|
+
pascalToKebab: () => Rr,
|
|
4964
|
+
registerFormComponents: () => br,
|
|
4965
|
+
resolveLucideIcon: () => zr,
|
|
4962
4966
|
toKEditorValue: () => i,
|
|
4963
|
-
toLucidePascalName: () =>
|
|
4964
|
-
toUploadFiles: () =>
|
|
4965
|
-
toUploadSubmitFields: () =>
|
|
4967
|
+
toLucidePascalName: () => Lr,
|
|
4968
|
+
toUploadFiles: () => ja,
|
|
4969
|
+
toUploadSubmitFields: () => Na,
|
|
4966
4970
|
updateUploadConfig: () => n,
|
|
4967
|
-
useExportKTableReport: () =>
|
|
4968
|
-
useHandlePageInit: () =>
|
|
4969
|
-
useKFormTemplateRef: () =>
|
|
4970
|
-
useKTableCrossPageSelection: () =>
|
|
4971
|
-
useKTableTemplateRef: () =>
|
|
4972
|
-
withQueryFieldOptions: () =>
|
|
4973
|
-
}),
|
|
4971
|
+
useExportKTableReport: () => ka,
|
|
4972
|
+
useHandlePageInit: () => Fr,
|
|
4973
|
+
useKFormTemplateRef: () => Dr,
|
|
4974
|
+
useKTableCrossPageSelection: () => xa,
|
|
4975
|
+
useKTableTemplateRef: () => ba,
|
|
4976
|
+
withQueryFieldOptions: () => Oa
|
|
4977
|
+
}), Ia = et("KAffix"), La = et("KBreadcrumb"), Ra = et("KCascader"), za = et("KColorPicker");
|
|
4974
4978
|
//#endregion
|
|
4975
|
-
export {
|
|
4979
|
+
export { Pr as A, qt as B, qr as C, zr as D, Rr as E, hr as F, Y as G, dt as H, zn as I, _n as L, Er as M, br as N, Lr as O, yr as P, rn as R, Jr as S, Hr as T, ut as U, Ut as V, ct as W, va as _, Fa as a, _i as b, ja as c, Oa as d, wa as f, ya as g, ba as h, za as i, Dr as j, Fr as k, Na as l, xa as m, La as n, Aa as o, Ta as p, Ra as r, Pa as s, Ia as t, ka as u, ji as v, Ur as w, gi as x, xi as y, Zt as z };
|