@kayak-sj/design 1.0.4 → 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/{components-DK7g2-zP.css → components-Xvz0PsON.css} +1 -1
- package/dist/chunks/{Complex-RcZnSBVW.js → Complex-DuFZOhG0.js} +1 -1
- package/dist/chunks/{components-4sHzMJbg.js → components-D5GZ1crv.js} +595 -592
- package/dist/components/index.js +1 -1
- package/dist/components/k-form/formComponent/DatePicker.d.ts +5 -0
- package/dist/index.js +1 -1
- package/package.json +3 -3
|
@@ -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",
|
|
@@ -2661,7 +2664,7 @@ var fr = {
|
|
|
2661
2664
|
function a(e) {
|
|
2662
2665
|
r("update:modelValue", e);
|
|
2663
2666
|
}
|
|
2664
|
-
return (e, t) => (
|
|
2667
|
+
return (e, t) => (M(), d(hr, E(e.$attrs, {
|
|
2665
2668
|
"model-value": i.value,
|
|
2666
2669
|
"list-type": n.listType,
|
|
2667
2670
|
action: n.action,
|
|
@@ -2705,7 +2708,7 @@ var fr = {
|
|
|
2705
2708
|
InputMixInput: tn,
|
|
2706
2709
|
InputMixSelect: ln,
|
|
2707
2710
|
RadioInput: Cn,
|
|
2708
|
-
Complex: v(() => import("./Complex-
|
|
2711
|
+
Complex: v(() => import("./Complex-DuFZOhG0.js")),
|
|
2709
2712
|
ScrollSelect: Tn,
|
|
2710
2713
|
Upload: gr,
|
|
2711
2714
|
Tag: An,
|
|
@@ -2763,7 +2766,7 @@ var wr = /* @__PURE__ */ y({
|
|
|
2763
2766
|
function c(e) {
|
|
2764
2767
|
r("update:modelValue", e);
|
|
2765
2768
|
}
|
|
2766
|
-
return (t, n) => (
|
|
2769
|
+
return (t, n) => (M(), d(ie(i.value), E({
|
|
2767
2770
|
"model-value": e.modelValue,
|
|
2768
2771
|
options: s.value,
|
|
2769
2772
|
readonly: e.readonly,
|
|
@@ -2809,8 +2812,8 @@ var wr = /* @__PURE__ */ y({
|
|
|
2809
2812
|
},
|
|
2810
2813
|
emits: ["update:modelValue", "change"],
|
|
2811
2814
|
setup(e, { expose: t, emit: n }) {
|
|
2812
|
-
let r =
|
|
2813
|
-
|
|
2815
|
+
let r = H(), i = e, a = n, o = V(), s = P(), l = P({});
|
|
2816
|
+
te(Tt, l);
|
|
2814
2817
|
function f(e) {
|
|
2815
2818
|
if (e == null || e === "") return;
|
|
2816
2819
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
@@ -2841,38 +2844,38 @@ var wr = /* @__PURE__ */ y({
|
|
|
2841
2844
|
"k-form--inline-layout": i.inline,
|
|
2842
2845
|
"k-form--query-layout": i.autoLayout,
|
|
2843
2846
|
"k-form--grid-layout": !i.autoLayout && !i.inline
|
|
2844
|
-
})),
|
|
2845
|
-
formConfigs:
|
|
2846
|
-
data:
|
|
2847
|
-
modelValue:
|
|
2848
|
-
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,
|
|
2849
2852
|
onChange: (e) => {
|
|
2850
|
-
a("change", e),
|
|
2853
|
+
a("change", e), w.value && a("update:modelValue", e);
|
|
2851
2854
|
}
|
|
2852
2855
|
});
|
|
2853
|
-
function
|
|
2856
|
+
function ee() {
|
|
2854
2857
|
let e = {};
|
|
2855
2858
|
i.formConfigs.forEach((t) => {
|
|
2856
|
-
y(t) && (e[`kitDate-${t.id}`] = f(
|
|
2859
|
+
y(t) && (e[`kitDate-${t.id}`] = f(T.formModel[t.id]));
|
|
2857
2860
|
}), l.value = e;
|
|
2858
2861
|
}
|
|
2859
|
-
let { normalizedConfigs:
|
|
2860
|
-
formConfigs:
|
|
2862
|
+
let { normalizedConfigs: A, getFieldOptions: j, resolveItemRules: N, itemStyle: ne, itemDisplay: re, isItemReadonly: ie, isItemDisabled: ae } = vt({
|
|
2863
|
+
formConfigs: R(i, "formConfigs"),
|
|
2861
2864
|
layout: b,
|
|
2862
|
-
formReadonly:
|
|
2865
|
+
formReadonly: R(i, "readonly")
|
|
2863
2866
|
});
|
|
2864
|
-
|
|
2867
|
+
W(() => i.formConfigs, () => ee(), {
|
|
2865
2868
|
immediate: !0,
|
|
2866
2869
|
deep: !0
|
|
2867
|
-
}),
|
|
2868
|
-
function
|
|
2869
|
-
let t =
|
|
2870
|
+
}), W(() => T.formModel, () => ee(), { deep: !0 });
|
|
2871
|
+
function z(e) {
|
|
2872
|
+
let t = re(e);
|
|
2870
2873
|
return {
|
|
2871
|
-
...
|
|
2874
|
+
...ne(e),
|
|
2872
2875
|
...t ? { display: t } : {}
|
|
2873
2876
|
};
|
|
2874
2877
|
}
|
|
2875
|
-
let
|
|
2878
|
+
let oe = u(() => {
|
|
2876
2879
|
let e = { ...o };
|
|
2877
2880
|
return delete e.readonly, {
|
|
2878
2881
|
inline: i.inline && !i.autoLayout,
|
|
@@ -2881,92 +2884,92 @@ var wr = /* @__PURE__ */ y({
|
|
|
2881
2884
|
...e
|
|
2882
2885
|
};
|
|
2883
2886
|
});
|
|
2884
|
-
function
|
|
2885
|
-
|
|
2887
|
+
function U(e, t) {
|
|
2888
|
+
T.updateFieldValue(e, t), y(e) && v(e.id, t), se(e);
|
|
2886
2889
|
}
|
|
2887
|
-
function
|
|
2890
|
+
function se(e) {
|
|
2888
2891
|
if (!s.value) return;
|
|
2889
|
-
let t = e.validatePeers ?? [], n =
|
|
2890
|
-
!n && !t.length ||
|
|
2892
|
+
let t = e.validatePeers ?? [], n = N(e).length > 0;
|
|
2893
|
+
!n && !t.length || D(() => {
|
|
2891
2894
|
n && s.value?.validateField(e.id).catch(() => {});
|
|
2892
2895
|
for (let e of t) s.value?.validateField(e).catch(() => {});
|
|
2893
2896
|
});
|
|
2894
2897
|
}
|
|
2895
|
-
async function
|
|
2896
|
-
let e =
|
|
2898
|
+
async function ce() {
|
|
2899
|
+
let e = T.getVisibleFieldsValue();
|
|
2897
2900
|
if (!s.value) return e;
|
|
2898
2901
|
try {
|
|
2899
|
-
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;
|
|
2900
2903
|
} catch {
|
|
2901
|
-
return i.ignoreValidate ? (s.value.clearValidate(), e) : (
|
|
2904
|
+
return i.ignoreValidate ? (s.value.clearValidate(), e) : (ue(), null);
|
|
2902
2905
|
}
|
|
2903
2906
|
}
|
|
2904
|
-
function
|
|
2907
|
+
function ue() {
|
|
2905
2908
|
((s.value?.$el)?.querySelector(".el-form-item.is-error") ?? document.querySelector(".k-form .el-form-item.is-error"))?.scrollIntoView({
|
|
2906
2909
|
block: "center",
|
|
2907
2910
|
behavior: "smooth"
|
|
2908
2911
|
});
|
|
2909
2912
|
}
|
|
2910
|
-
function
|
|
2911
|
-
return
|
|
2913
|
+
function de(e) {
|
|
2914
|
+
return T.getFieldsValue(e);
|
|
2912
2915
|
}
|
|
2913
|
-
function
|
|
2914
|
-
return
|
|
2916
|
+
function fe() {
|
|
2917
|
+
return T.getVisibleFieldsValue();
|
|
2915
2918
|
}
|
|
2916
|
-
function
|
|
2917
|
-
|
|
2919
|
+
function pe(e) {
|
|
2920
|
+
T.setFieldsValue(e);
|
|
2918
2921
|
}
|
|
2919
|
-
function
|
|
2920
|
-
s.value?.resetFields(),
|
|
2922
|
+
function me() {
|
|
2923
|
+
s.value?.resetFields(), T.resetFormModel();
|
|
2921
2924
|
}
|
|
2922
|
-
function
|
|
2923
|
-
|
|
2925
|
+
function he(e) {
|
|
2926
|
+
T.resetFieldsValue(e), e.forEach((e) => s.value?.clearValidate(e));
|
|
2924
2927
|
}
|
|
2925
|
-
function
|
|
2928
|
+
function ge() {
|
|
2926
2929
|
s.value?.clearValidate();
|
|
2927
2930
|
}
|
|
2928
|
-
function
|
|
2931
|
+
function _e() {
|
|
2929
2932
|
return s.value;
|
|
2930
2933
|
}
|
|
2931
2934
|
return t({
|
|
2932
|
-
validateFields:
|
|
2933
|
-
getFieldsValue:
|
|
2934
|
-
getParams:
|
|
2935
|
-
setFieldsValue:
|
|
2936
|
-
resetForm:
|
|
2937
|
-
resetFieldsValue:
|
|
2938
|
-
getFormRef:
|
|
2939
|
-
clearValidate:
|
|
2940
|
-
}), (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({
|
|
2941
2944
|
ref_key: "formRef",
|
|
2942
2945
|
ref: s,
|
|
2943
2946
|
class: ["k-form", S.value],
|
|
2944
|
-
style:
|
|
2945
|
-
model:
|
|
2946
|
-
},
|
|
2947
|
-
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), {
|
|
2948
2951
|
key: n.id,
|
|
2949
2952
|
"data-label": n.label || "",
|
|
2950
2953
|
"data-field-id": n.id,
|
|
2951
2954
|
label: n.label ? `${n.label}:` : void 0,
|
|
2952
2955
|
prop: n.id,
|
|
2953
|
-
rules:
|
|
2954
|
-
class:
|
|
2955
|
-
"k-form__item--readonly":
|
|
2956
|
-
"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),
|
|
2957
2960
|
"k-form__item--full-row": n.newLineStart,
|
|
2958
|
-
"k-form__item--choice":
|
|
2961
|
+
"k-form__item--choice": B(xr)(n.component) && (n.component === "Radio" || n.component === "Checkbox" || n.component === "Tag")
|
|
2959
2962
|
}]]),
|
|
2960
|
-
style:
|
|
2963
|
+
style: k(z(n))
|
|
2961
2964
|
}, h({
|
|
2962
|
-
default:
|
|
2965
|
+
default: G(() => [!n.slot || !B(r)[n.id] ? (M(), d(wr, {
|
|
2963
2966
|
key: 0,
|
|
2964
2967
|
item: n,
|
|
2965
|
-
"model-value":
|
|
2966
|
-
options:
|
|
2967
|
-
readonly:
|
|
2968
|
-
disabled:
|
|
2969
|
-
"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)
|
|
2970
2973
|
}, null, 8, [
|
|
2971
2974
|
"item",
|
|
2972
2975
|
"model-value",
|
|
@@ -2974,26 +2977,26 @@ var wr = /* @__PURE__ */ y({
|
|
|
2974
2977
|
"readonly",
|
|
2975
2978
|
"disabled",
|
|
2976
2979
|
"onUpdate:modelValue"
|
|
2977
|
-
])) :
|
|
2980
|
+
])) : I(e.$slots, n.id, {
|
|
2978
2981
|
item: n,
|
|
2979
|
-
value:
|
|
2980
|
-
updateValue: (e) =>
|
|
2982
|
+
value: B(T).formModel[n.id],
|
|
2983
|
+
updateValue: (e) => U(n, e)
|
|
2981
2984
|
}, void 0, void 0, 1)]),
|
|
2982
2985
|
_: 2
|
|
2983
2986
|
}, [n.toolTip ? {
|
|
2984
2987
|
name: "label",
|
|
2985
|
-
fn:
|
|
2988
|
+
fn: G(() => [_(B(Re), {
|
|
2986
2989
|
effect: "dark",
|
|
2987
2990
|
placement: "bottom",
|
|
2988
2991
|
"popper-class": "k-form__tooltip"
|
|
2989
2992
|
}, {
|
|
2990
|
-
content:
|
|
2991
|
-
default:
|
|
2993
|
+
content: G(() => [m("span", { innerHTML: n.toolTip }, null, 8, Tr)]),
|
|
2994
|
+
default: G(() => [t[1] ||= m("span", {
|
|
2992
2995
|
class: "k-form__tip-icon",
|
|
2993
2996
|
"aria-hidden": "true"
|
|
2994
2997
|
}, "i", -1)]),
|
|
2995
2998
|
_: 2
|
|
2996
|
-
}, 1024), g(" " +
|
|
2999
|
+
}, 1024), g(" " + L(n.label ? `${n.label}:` : ""), 1)]),
|
|
2997
3000
|
key: "0"
|
|
2998
3001
|
} : void 0]), 1032, [
|
|
2999
3002
|
"data-label",
|
|
@@ -3003,7 +3006,7 @@ var wr = /* @__PURE__ */ y({
|
|
|
3003
3006
|
"rules",
|
|
3004
3007
|
"class",
|
|
3005
3008
|
"style"
|
|
3006
|
-
]))), 128)),
|
|
3009
|
+
]))), 128)), I(e.$slots, "default")]),
|
|
3007
3010
|
_: 3
|
|
3008
3011
|
}, 16, [
|
|
3009
3012
|
"class",
|
|
@@ -3015,7 +3018,7 @@ var wr = /* @__PURE__ */ y({
|
|
|
3015
3018
|
//#endregion
|
|
3016
3019
|
//#region src/components/k-form/composables/useKFormTemplateRef.ts
|
|
3017
3020
|
function Dr(e) {
|
|
3018
|
-
return
|
|
3021
|
+
return U(e);
|
|
3019
3022
|
}
|
|
3020
3023
|
//#endregion
|
|
3021
3024
|
//#region src/components/k-handle-page/KHandlePage.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -3069,7 +3072,7 @@ var Or = { class: "k-handle-page" }, kr = {
|
|
|
3069
3072
|
},
|
|
3070
3073
|
emits: ["cancel", "submit"],
|
|
3071
3074
|
setup(e, { emit: t }) {
|
|
3072
|
-
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);
|
|
3073
3076
|
async function x() {
|
|
3074
3077
|
if (!y.value) {
|
|
3075
3078
|
if (n.onSubmit) {
|
|
@@ -3084,34 +3087,34 @@ var Or = { class: "k-handle-page" }, kr = {
|
|
|
3084
3087
|
r("submit");
|
|
3085
3088
|
}
|
|
3086
3089
|
}
|
|
3087
|
-
return (t, n) => (
|
|
3088
|
-
b.value ? (
|
|
3090
|
+
return (t, n) => (M(), p("div", Or, [
|
|
3091
|
+
b.value ? (M(), p("header", kr, [I(t.$slots, "header")])) : f("", !0),
|
|
3089
3092
|
m("div", Ar, [_(l, { name: "k-handle-page-loading" }, {
|
|
3090
|
-
default:
|
|
3093
|
+
default: G(() => [e.loading ? (M(), p("div", jr, [m("div", Mr, [_(B(Se), {
|
|
3091
3094
|
class: "k-handle-page__loading-icon is-loading",
|
|
3092
3095
|
size: 32
|
|
3093
3096
|
}, {
|
|
3094
|
-
default:
|
|
3097
|
+
default: G(() => [_(B(Ke))]),
|
|
3095
3098
|
_: 1
|
|
3096
3099
|
}), n[1] ||= m("span", { class: "k-handle-page__loading-text" }, "加载中...", -1)])])) : f("", !0)]),
|
|
3097
3100
|
_: 1
|
|
3098
3101
|
}), m("div", {
|
|
3099
|
-
class:
|
|
3100
|
-
style:
|
|
3101
|
-
}, [
|
|
3102
|
-
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, {
|
|
3103
3106
|
key: 0,
|
|
3104
3107
|
onClick: n[0] ||= (e) => r("cancel")
|
|
3105
3108
|
}, {
|
|
3106
|
-
default:
|
|
3109
|
+
default: G(() => [g(L(s.value), 1)]),
|
|
3107
3110
|
_: 1
|
|
3108
|
-
})) : f("", !0), v.value ? (
|
|
3111
|
+
})) : f("", !0), v.value ? (M(), d(Y, {
|
|
3109
3112
|
key: 1,
|
|
3110
3113
|
type: "primary",
|
|
3111
3114
|
loading: y.value,
|
|
3112
3115
|
onClick: x
|
|
3113
3116
|
}, {
|
|
3114
|
-
default:
|
|
3117
|
+
default: G(() => [g(L(c.value), 1)]),
|
|
3115
3118
|
_: 1
|
|
3116
3119
|
}, 8, ["loading"])) : f("", !0)])])) : f("", !0)
|
|
3117
3120
|
]));
|
|
@@ -3120,16 +3123,16 @@ var Or = { class: "k-handle-page" }, kr = {
|
|
|
3120
3123
|
//#endregion
|
|
3121
3124
|
//#region src/components/k-handle-page/useHandlePageInit.ts
|
|
3122
3125
|
function Fr(e, t) {
|
|
3123
|
-
let n =
|
|
3126
|
+
let n = P(!1);
|
|
3124
3127
|
async function r() {
|
|
3125
|
-
(
|
|
3128
|
+
(z(t?.skipLoading) ?? !1) || (n.value = !0);
|
|
3126
3129
|
try {
|
|
3127
3130
|
await e();
|
|
3128
3131
|
} finally {
|
|
3129
3132
|
n.value = !1;
|
|
3130
3133
|
}
|
|
3131
3134
|
}
|
|
3132
|
-
return t?.immediate !== !1 &&
|
|
3135
|
+
return t?.immediate !== !1 && j(() => {
|
|
3133
3136
|
r();
|
|
3134
3137
|
}), {
|
|
3135
3138
|
pageLoading: n,
|
|
@@ -3171,7 +3174,7 @@ var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3171
3174
|
},
|
|
3172
3175
|
setup(e) {
|
|
3173
3176
|
let t = e, n = u(() => zr(t.name));
|
|
3174
|
-
return (t, r) => n.value ? (
|
|
3177
|
+
return (t, r) => n.value ? (M(), d(ie(n.value), {
|
|
3175
3178
|
key: 0,
|
|
3176
3179
|
class: "k-icon",
|
|
3177
3180
|
size: e.size,
|
|
@@ -3214,19 +3217,19 @@ var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3214
3217
|
function h(e) {
|
|
3215
3218
|
return typeof e.slot == "string" ? e.slot : "default";
|
|
3216
3219
|
}
|
|
3217
|
-
return (t, n) => (
|
|
3220
|
+
return (t, n) => (M(), p("div", {
|
|
3218
3221
|
class: "k-link-button",
|
|
3219
|
-
style:
|
|
3220
|
-
}, [(
|
|
3222
|
+
style: k({ justifyContent: e.align })
|
|
3223
|
+
}, [(M(!0), p(c, null, F(i.value, (e, n) => (M(), d(B(Re), {
|
|
3221
3224
|
key: `${e.label}-${n}`,
|
|
3222
3225
|
content: e.tooltip,
|
|
3223
3226
|
placement: "top",
|
|
3224
3227
|
disabled: !e.tooltip
|
|
3225
3228
|
}, {
|
|
3226
|
-
default:
|
|
3227
|
-
class:
|
|
3228
|
-
onClick:
|
|
3229
|
-
}, [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)])]),
|
|
3230
3233
|
_: 2
|
|
3231
3234
|
}, 1032, ["content", "disabled"]))), 128))], 4));
|
|
3232
3235
|
}
|
|
@@ -3250,7 +3253,7 @@ var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3250
3253
|
] }
|
|
3251
3254
|
},
|
|
3252
3255
|
setup(e) {
|
|
3253
|
-
return (t, n) => (
|
|
3256
|
+
return (t, n) => (M(), d(B(Oe), E(t.$attrs, {
|
|
3254
3257
|
layout: e.layout,
|
|
3255
3258
|
"page-size": e.pageSize,
|
|
3256
3259
|
"page-sizes": e.pageSizes
|
|
@@ -3268,10 +3271,10 @@ var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3268
3271
|
title: { default: "" }
|
|
3269
3272
|
},
|
|
3270
3273
|
setup(e) {
|
|
3271
|
-
return (t, n) => (
|
|
3274
|
+
return (t, n) => (M(), p("div", {
|
|
3272
3275
|
id: e.panelId || void 0,
|
|
3273
3276
|
class: "k-long-page-panel"
|
|
3274
|
-
}, [m("div", Xr,
|
|
3277
|
+
}, [m("div", Xr, L(e.title), 1), m("div", Zr, [I(t.$slots, "default", {}, void 0, !0)])], 8, Yr));
|
|
3275
3278
|
}
|
|
3276
3279
|
}), [["__scopeId", "data-v-9d6e7832"]]), $r = 4;
|
|
3277
3280
|
function ei(e) {
|
|
@@ -3296,7 +3299,7 @@ function ei(e) {
|
|
|
3296
3299
|
function u() {
|
|
3297
3300
|
return i ? (i = !1, !0) : !1;
|
|
3298
3301
|
}
|
|
3299
|
-
return
|
|
3302
|
+
return A(s), {
|
|
3300
3303
|
onPointerDown: l,
|
|
3301
3304
|
consumeClickIfDragged: u
|
|
3302
3305
|
};
|
|
@@ -3323,37 +3326,37 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3323
3326
|
label: "面板一"
|
|
3324
3327
|
}] } },
|
|
3325
3328
|
setup(e) {
|
|
3326
|
-
let t =
|
|
3329
|
+
let t = U("rootRef"), n = U("navRef"), { onPointerDown: r, consumeClickIfDragged: i } = ei(n);
|
|
3327
3330
|
function a(e) {
|
|
3328
3331
|
return fi(e);
|
|
3329
3332
|
}
|
|
3330
3333
|
async function o(e) {
|
|
3331
3334
|
if (i()) return;
|
|
3332
|
-
await
|
|
3335
|
+
await D();
|
|
3333
3336
|
let n = t.value?.querySelector(`#${CSS.escape(e)}`);
|
|
3334
3337
|
(n?.querySelector(".k-long-page-panel__title") ?? n)?.scrollIntoView({
|
|
3335
3338
|
block: "start",
|
|
3336
3339
|
behavior: "smooth"
|
|
3337
3340
|
});
|
|
3338
3341
|
}
|
|
3339
|
-
return (i, s) => (
|
|
3342
|
+
return (i, s) => (M(), p("div", {
|
|
3340
3343
|
ref_key: "rootRef",
|
|
3341
3344
|
ref: t,
|
|
3342
3345
|
class: "k-long-page"
|
|
3343
|
-
}, [(
|
|
3346
|
+
}, [(M(!0), p(c, null, F(e.panels, (e) => (M(), d(Qr, {
|
|
3344
3347
|
key: e.name,
|
|
3345
3348
|
class: "k-long-page__panel",
|
|
3346
3349
|
"panel-id": e.name,
|
|
3347
3350
|
title: e.label
|
|
3348
3351
|
}, {
|
|
3349
|
-
default:
|
|
3352
|
+
default: G(() => [I(i.$slots, e.name, {}, void 0, !0)]),
|
|
3350
3353
|
_: 2
|
|
3351
3354
|
}, 1032, ["panel-id", "title"]))), 128)), m("div", {
|
|
3352
3355
|
ref_key: "navRef",
|
|
3353
3356
|
ref: n,
|
|
3354
3357
|
class: "k-long-page__nav",
|
|
3355
|
-
onPointerdown: s[0] ||= (...e) =>
|
|
3356
|
-
}, [(
|
|
3358
|
+
onPointerdown: s[0] ||= (...e) => B(r) && B(r)(...e)
|
|
3359
|
+
}, [(M(!0), p(c, null, F(e.panels, (e) => (M(), p("div", {
|
|
3357
3360
|
key: e.name,
|
|
3358
3361
|
class: "k-long-page__nav-item",
|
|
3359
3362
|
role: "button",
|
|
@@ -3376,23 +3379,23 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3376
3379
|
height: "28",
|
|
3377
3380
|
draggable: "false"
|
|
3378
3381
|
}, null, 8, hi),
|
|
3379
|
-
m("span", null,
|
|
3382
|
+
m("span", null, L(e.label), 1)
|
|
3380
3383
|
], 8, pi))), 128))], 544)], 512));
|
|
3381
3384
|
}
|
|
3382
3385
|
}), [["__scopeId", "data-v-ac934c5d"]]), _i = /* @__PURE__ */ y({
|
|
3383
3386
|
name: "KCard",
|
|
3384
3387
|
__name: "KCard",
|
|
3385
3388
|
setup(e) {
|
|
3386
|
-
return (e, t) => (
|
|
3387
|
-
default:
|
|
3389
|
+
return (e, t) => (M(), d(B(de), ee(b(e.$attrs)), h({
|
|
3390
|
+
default: G(() => [I(e.$slots, "default")]),
|
|
3388
3391
|
_: 2
|
|
3389
3392
|
}, [e.$slots.header ? {
|
|
3390
3393
|
name: "header",
|
|
3391
|
-
fn:
|
|
3394
|
+
fn: G(() => [I(e.$slots, "header")]),
|
|
3392
3395
|
key: "0"
|
|
3393
3396
|
} : void 0, e.$slots.footer ? {
|
|
3394
3397
|
name: "footer",
|
|
3395
|
-
fn:
|
|
3398
|
+
fn: G(() => [I(e.$slots, "footer")]),
|
|
3396
3399
|
key: "1"
|
|
3397
3400
|
} : void 0]), 1040));
|
|
3398
3401
|
}
|
|
@@ -3418,24 +3421,24 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3418
3421
|
}
|
|
3419
3422
|
},
|
|
3420
3423
|
setup(e) {
|
|
3421
|
-
let t = e, n =
|
|
3424
|
+
let t = e, n = P(t.unfold ? ["content"] : []), r = u(() => ({
|
|
3422
3425
|
panel: !0,
|
|
3423
3426
|
"panel-hover": t.hover
|
|
3424
3427
|
}));
|
|
3425
|
-
return (t, i) => (
|
|
3428
|
+
return (t, i) => (M(), p("div", { class: O(r.value) }, [e.isFold ? (M(), d(B(he), {
|
|
3426
3429
|
key: 0,
|
|
3427
3430
|
modelValue: n.value,
|
|
3428
3431
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e
|
|
3429
3432
|
}, {
|
|
3430
|
-
default:
|
|
3433
|
+
default: G(() => [_(B(ge), {
|
|
3431
3434
|
name: "content",
|
|
3432
3435
|
title: e.title
|
|
3433
3436
|
}, {
|
|
3434
|
-
default:
|
|
3437
|
+
default: G(() => [I(t.$slots, "default")]),
|
|
3435
3438
|
_: 3
|
|
3436
3439
|
}, 8, ["title"])]),
|
|
3437
3440
|
_: 3
|
|
3438
|
-
}, 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));
|
|
3439
3442
|
}
|
|
3440
3443
|
}), Si = {
|
|
3441
3444
|
key: 0,
|
|
@@ -3450,29 +3453,29 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3450
3453
|
emits: ["query", "reset"],
|
|
3451
3454
|
setup(e, { emit: t }) {
|
|
3452
3455
|
let n = t;
|
|
3453
|
-
return (t, r) => e.footer ? (
|
|
3456
|
+
return (t, r) => e.footer ? (M(), p("div", Si, [_(Y, {
|
|
3454
3457
|
type: "primary",
|
|
3455
3458
|
onClick: r[0] ||= (e) => n("query")
|
|
3456
3459
|
}, {
|
|
3457
|
-
default:
|
|
3460
|
+
default: G(() => [...r[4] ||= [g("查询", -1)]]),
|
|
3458
3461
|
_: 1
|
|
3459
3462
|
}), _(Y, {
|
|
3460
3463
|
class: "k-panel-query__btn-reset",
|
|
3461
3464
|
onClick: r[1] ||= (e) => n("reset")
|
|
3462
3465
|
}, {
|
|
3463
|
-
default:
|
|
3466
|
+
default: G(() => [...r[5] ||= [g("重置", -1)]]),
|
|
3464
3467
|
_: 1
|
|
3465
|
-
})])) : (
|
|
3468
|
+
})])) : (M(), p(c, { key: 1 }, [_(Y, {
|
|
3466
3469
|
type: "primary",
|
|
3467
3470
|
onClick: r[2] ||= (e) => n("query")
|
|
3468
3471
|
}, {
|
|
3469
|
-
default:
|
|
3472
|
+
default: G(() => [...r[6] ||= [g("查询", -1)]]),
|
|
3470
3473
|
_: 1
|
|
3471
3474
|
}), _(Y, {
|
|
3472
3475
|
class: "k-panel-query__btn-reset",
|
|
3473
3476
|
onClick: r[3] ||= (e) => n("reset")
|
|
3474
3477
|
}, {
|
|
3475
|
-
default:
|
|
3478
|
+
default: G(() => [...r[7] ||= [g("重置", -1)]]),
|
|
3476
3479
|
_: 1
|
|
3477
3480
|
})], 64));
|
|
3478
3481
|
}
|
|
@@ -3498,13 +3501,13 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3498
3501
|
}
|
|
3499
3502
|
},
|
|
3500
3503
|
setup(e, { expose: t }) {
|
|
3501
|
-
let n =
|
|
3504
|
+
let n = P();
|
|
3502
3505
|
return t({
|
|
3503
3506
|
validateFields: () => n.value?.validateFields(),
|
|
3504
3507
|
getParams: () => n.value?.getParams() ?? {},
|
|
3505
3508
|
resetForm: () => n.value?.resetForm(),
|
|
3506
3509
|
getFormRef: () => n.value?.getFormRef()
|
|
3507
|
-
}), (t, r) => (
|
|
3510
|
+
}), (t, r) => (M(), d(B(Er), {
|
|
3508
3511
|
ref_key: "formRef",
|
|
3509
3512
|
ref: n,
|
|
3510
3513
|
class: "k-panel-query-form",
|
|
@@ -3536,16 +3539,16 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3536
3539
|
__name: "KPanelQueryItem",
|
|
3537
3540
|
props: { formConfigs: {} },
|
|
3538
3541
|
setup(e, { expose: t }) {
|
|
3539
|
-
let n = e, r =
|
|
3542
|
+
let n = e, r = H(), i = u(() => ({
|
|
3540
3543
|
colLength: 1,
|
|
3541
3544
|
inline: !0,
|
|
3542
3545
|
autoLayout: !1,
|
|
3543
3546
|
hideLabel: !1
|
|
3544
3547
|
})), a = wt({
|
|
3545
|
-
formConfigs:
|
|
3548
|
+
formConfigs: R(n, "formConfigs"),
|
|
3546
3549
|
controlled: u(() => !1)
|
|
3547
3550
|
}), { normalizedConfigs: o, getFieldOptions: s } = vt({
|
|
3548
|
-
formConfigs:
|
|
3551
|
+
formConfigs: R(n, "formConfigs"),
|
|
3549
3552
|
layout: i
|
|
3550
3553
|
});
|
|
3551
3554
|
function l(e, t) {
|
|
@@ -3565,20 +3568,20 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3565
3568
|
getParams: h,
|
|
3566
3569
|
resetForm: g,
|
|
3567
3570
|
getFormRef: () => void 0
|
|
3568
|
-
}), (e, t) => (
|
|
3571
|
+
}), (e, t) => (M(), p("div", Ti, [m("ul", Ei, [(M(!0), p(c, null, F(B(o), (e) => (M(), p("li", {
|
|
3569
3572
|
key: e.id,
|
|
3570
|
-
class:
|
|
3571
|
-
}, [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, {
|
|
3572
3575
|
item: e,
|
|
3573
|
-
"model-value":
|
|
3574
|
-
options:
|
|
3576
|
+
"model-value": B(a).formModel[e.id],
|
|
3577
|
+
options: B(s)(e),
|
|
3575
3578
|
"onUpdate:modelValue": (t) => l(e, t)
|
|
3576
3579
|
}, null, 8, [
|
|
3577
3580
|
"item",
|
|
3578
3581
|
"model-value",
|
|
3579
3582
|
"options",
|
|
3580
3583
|
"onUpdate:modelValue"
|
|
3581
|
-
])])], 2))), 128)),
|
|
3584
|
+
])])], 2))), 128)), B(r).button ? (M(), p("li", ki, [I(e.$slots, "button")])) : f("", !0)])]));
|
|
3582
3585
|
}
|
|
3583
3586
|
}), ji = /* @__PURE__ */ y({
|
|
3584
3587
|
name: "KPanelQuery",
|
|
@@ -3614,7 +3617,7 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3614
3617
|
},
|
|
3615
3618
|
emits: ["query", "reset"],
|
|
3616
3619
|
setup(e, { expose: t, emit: n }) {
|
|
3617
|
-
let r = e, i = n, a =
|
|
3620
|
+
let r = e, i = n, a = P(), o = /* @__PURE__ */ new Set([
|
|
3618
3621
|
"Input",
|
|
3619
3622
|
"Select",
|
|
3620
3623
|
"TreeSelect",
|
|
@@ -3650,7 +3653,7 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3650
3653
|
e && i("query", e);
|
|
3651
3654
|
}
|
|
3652
3655
|
async function v() {
|
|
3653
|
-
a.value?.resetForm(), i("reset"), await
|
|
3656
|
+
a.value?.resetForm(), i("reset"), await D();
|
|
3654
3657
|
let e = await a.value?.validateFields();
|
|
3655
3658
|
e && i("query", e);
|
|
3656
3659
|
}
|
|
@@ -3665,31 +3668,31 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3665
3668
|
resetForm: b,
|
|
3666
3669
|
getFormRef: () => a.value?.getFormRef(),
|
|
3667
3670
|
submit: g
|
|
3668
|
-
}), (t, n) => (
|
|
3671
|
+
}), (t, n) => (M(), p("div", { class: O(["k-panel-query", {
|
|
3669
3672
|
"k-panel-query__form": e.model === "form" && !e.showPanel,
|
|
3670
3673
|
"k-panel-query__item": m.value
|
|
3671
|
-
}]) }, [e.showPanel ? (
|
|
3674
|
+
}]) }, [e.showPanel ? (M(), d(B(xi), {
|
|
3672
3675
|
key: 1,
|
|
3673
3676
|
title: e.title,
|
|
3674
3677
|
"is-fold": e.isFold,
|
|
3675
3678
|
unfold: e.unfold,
|
|
3676
3679
|
hover: e.hover
|
|
3677
3680
|
}, {
|
|
3678
|
-
default:
|
|
3681
|
+
default: G(() => [l.value ? (M(), p(c, { key: 0 }, [m.value ? (M(), d(Ai, E({
|
|
3679
3682
|
key: 0,
|
|
3680
3683
|
ref_key: "formRef",
|
|
3681
3684
|
ref: a
|
|
3682
3685
|
}, l.value), h({ _: 2 }, [e.hideButton ? void 0 : {
|
|
3683
3686
|
name: "button",
|
|
3684
|
-
fn:
|
|
3687
|
+
fn: G(() => [_(Ci, {
|
|
3685
3688
|
onQuery: g,
|
|
3686
3689
|
onReset: v
|
|
3687
3690
|
})]),
|
|
3688
3691
|
key: "0"
|
|
3689
|
-
}]), 1040)) : (
|
|
3692
|
+
}]), 1040)) : (M(), p(c, { key: 1 }, [_(wi, E({
|
|
3690
3693
|
ref_key: "formRef",
|
|
3691
3694
|
ref: a
|
|
3692
|
-
}, 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, {
|
|
3693
3696
|
key: 0,
|
|
3694
3697
|
footer: "",
|
|
3695
3698
|
onQuery: g,
|
|
@@ -3701,21 +3704,21 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3701
3704
|
"is-fold",
|
|
3702
3705
|
"unfold",
|
|
3703
3706
|
"hover"
|
|
3704
|
-
])) : (
|
|
3707
|
+
])) : (M(), p(c, { key: 0 }, [l.value ? (M(), p(c, { key: 0 }, [m.value ? (M(), d(Ai, E({
|
|
3705
3708
|
key: 0,
|
|
3706
3709
|
ref_key: "formRef",
|
|
3707
3710
|
ref: a
|
|
3708
3711
|
}, l.value), h({ _: 2 }, [e.hideButton ? void 0 : {
|
|
3709
3712
|
name: "button",
|
|
3710
|
-
fn:
|
|
3713
|
+
fn: G(() => [_(Ci, {
|
|
3711
3714
|
onQuery: g,
|
|
3712
3715
|
onReset: v
|
|
3713
3716
|
})]),
|
|
3714
3717
|
key: "0"
|
|
3715
|
-
}]), 1040)) : (
|
|
3718
|
+
}]), 1040)) : (M(), p(c, { key: 1 }, [_(wi, E({
|
|
3716
3719
|
ref_key: "formRef",
|
|
3717
3720
|
ref: a
|
|
3718
|
-
}, 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, {
|
|
3719
3722
|
key: 0,
|
|
3720
3723
|
footer: "",
|
|
3721
3724
|
onQuery: g,
|
|
@@ -3846,7 +3849,7 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3846
3849
|
},
|
|
3847
3850
|
emits: ["operate-click", "radio-select"],
|
|
3848
3851
|
setup(e, { emit: t }) {
|
|
3849
|
-
let n = e, r = t, i =
|
|
3852
|
+
let n = e, r = t, i = H(), { getCellDisplayValue: a } = Hi(n.nullValueFormat);
|
|
3850
3853
|
function o(e) {
|
|
3851
3854
|
return e ?? "";
|
|
3852
3855
|
}
|
|
@@ -3864,18 +3867,18 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3864
3867
|
return Ni(e, n.rowKey);
|
|
3865
3868
|
}
|
|
3866
3869
|
return (t, n) => {
|
|
3867
|
-
let u =
|
|
3868
|
-
return e.column.type === "selection" ? (
|
|
3869
|
-
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`,
|
|
3870
3873
|
type: "selection"
|
|
3871
|
-
}, s.value), null, 16)) : e.column.type === "index" ? (
|
|
3872
|
-
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", {
|
|
3873
3876
|
index: e,
|
|
3874
3877
|
displayIndex: l(e)
|
|
3875
|
-
}, () => [g(
|
|
3878
|
+
}, () => [g(L(l(e)), 1)], !0)]),
|
|
3876
3879
|
_: 3
|
|
3877
|
-
}, 16)) : e.column.type === "radio" ? (
|
|
3878
|
-
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), {
|
|
3879
3882
|
class: "k-table-column__radio",
|
|
3880
3883
|
"model-value": e.radioSelected,
|
|
3881
3884
|
label: x(t),
|
|
@@ -3886,44 +3889,44 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3886
3889
|
"onUpdate:modelValue"
|
|
3887
3890
|
])]),
|
|
3888
3891
|
_: 1
|
|
3889
|
-
}, 16)) : e.column.type === "operates" ? (
|
|
3890
|
-
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), {
|
|
3891
3894
|
row: n,
|
|
3892
3895
|
column: r,
|
|
3893
3896
|
index: a
|
|
3894
|
-
}, void 0, !0, 0) : (
|
|
3897
|
+
}, void 0, !0, 0) : (M(), d(B(qr), {
|
|
3895
3898
|
key: 1,
|
|
3896
3899
|
data: e.column.operates ?? [],
|
|
3897
3900
|
disabled: e.disabled,
|
|
3898
3901
|
"table-mode": "",
|
|
3899
3902
|
onClick: (e, t) => y(e, t, n)
|
|
3900
|
-
}, h({ _: 2 }, [
|
|
3903
|
+
}, h({ _: 2 }, [F(e.column.operates ?? [], (e) => ({
|
|
3901
3904
|
name: b(e),
|
|
3902
|
-
fn:
|
|
3905
|
+
fn: G(({ item: i }) => [I(t.$slots, b(e), {
|
|
3903
3906
|
row: n,
|
|
3904
3907
|
column: r,
|
|
3905
3908
|
index: a,
|
|
3906
3909
|
item: i
|
|
3907
|
-
}, () => [g(
|
|
3910
|
+
}, () => [g(L(i.label), 1)], !0)])
|
|
3908
3911
|
}))]), 1032, [
|
|
3909
3912
|
"data",
|
|
3910
3913
|
"disabled",
|
|
3911
3914
|
"onClick"
|
|
3912
3915
|
]))]),
|
|
3913
3916
|
_: 3
|
|
3914
|
-
}, 16)) : e.column.type === "expand" ? (
|
|
3915
|
-
key: `${
|
|
3917
|
+
}, 16)) : e.column.type === "expand" ? (M(), d(B(K), E({
|
|
3918
|
+
key: `${B($)(e.column, e.columnIndex)}:expand`,
|
|
3916
3919
|
type: "expand"
|
|
3917
3920
|
}, s.value), {
|
|
3918
|
-
default:
|
|
3921
|
+
default: G(({ row: e, column: n, $index: r }) => [I(t.$slots, "expand", {
|
|
3919
3922
|
row: e,
|
|
3920
3923
|
column: n,
|
|
3921
3924
|
index: r
|
|
3922
3925
|
}, void 0, !0)]),
|
|
3923
3926
|
_: 3
|
|
3924
|
-
}, 16)) : e.column.children?.length ? (
|
|
3925
|
-
default:
|
|
3926
|
-
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),
|
|
3927
3930
|
column: i,
|
|
3928
3931
|
"column-index": a,
|
|
3929
3932
|
"index-offset": e.indexOffset,
|
|
@@ -3933,9 +3936,9 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3933
3936
|
"radio-selected": e.radioSelected,
|
|
3934
3937
|
onOperateClick: n[0] ||= (e, t, n) => r("operate-click", e, t, n),
|
|
3935
3938
|
onRadioSelect: n[1] ||= (e) => r("radio-select", e)
|
|
3936
|
-
}, h({ _: 2 }, [
|
|
3939
|
+
}, h({ _: 2 }, [F(t.$slots, (e, n) => ({
|
|
3937
3940
|
name: n,
|
|
3938
|
-
fn:
|
|
3941
|
+
fn: G((e) => [I(t.$slots, n, E({ ref_for: !0 }, e ?? {}), void 0, !0)])
|
|
3939
3942
|
}))]), 1032, [
|
|
3940
3943
|
"column",
|
|
3941
3944
|
"column-index",
|
|
@@ -3946,20 +3949,20 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3946
3949
|
"radio-selected"
|
|
3947
3950
|
]))), 128))]),
|
|
3948
3951
|
_: 3
|
|
3949
|
-
}, 16)) : (
|
|
3950
|
-
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), {
|
|
3951
3954
|
row: n,
|
|
3952
3955
|
column: r,
|
|
3953
3956
|
index: i
|
|
3954
|
-
}, void 0, !0, 0) : (
|
|
3957
|
+
}, void 0, !0, 0) : (M(), p(c, { key: 1 }, [g(L(B(a)(e.column, n, i)), 1)], 64))]),
|
|
3955
3958
|
_: 2
|
|
3956
3959
|
}, [e.column.toolTip ? {
|
|
3957
3960
|
name: "header",
|
|
3958
|
-
fn:
|
|
3961
|
+
fn: G(() => [m("span", null, L(e.column.label), 1), _(B(Re), {
|
|
3959
3962
|
content: e.column.toolTip,
|
|
3960
3963
|
placement: "top"
|
|
3961
3964
|
}, {
|
|
3962
|
-
default:
|
|
3965
|
+
default: G(() => [...n[2] ||= [m("span", { class: "k-table-column__tip" }, "i", -1)]]),
|
|
3963
3966
|
_: 1
|
|
3964
3967
|
}, 8, ["content"])]),
|
|
3965
3968
|
key: "0"
|
|
@@ -3972,14 +3975,14 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3972
3975
|
props: { items: {} },
|
|
3973
3976
|
emits: ["change", "reset"],
|
|
3974
3977
|
setup(e, { emit: t }) {
|
|
3975
|
-
let n = t, r =
|
|
3978
|
+
let n = t, r = P(!1);
|
|
3976
3979
|
function i(e, t) {
|
|
3977
3980
|
n("change", e, t);
|
|
3978
3981
|
}
|
|
3979
3982
|
function a() {
|
|
3980
3983
|
n("reset");
|
|
3981
3984
|
}
|
|
3982
|
-
return (t, n) => (
|
|
3985
|
+
return (t, n) => (M(), d(B(ke), {
|
|
3983
3986
|
visible: r.value,
|
|
3984
3987
|
"onUpdate:visible": n[0] ||= (e) => r.value = e,
|
|
3985
3988
|
placement: "bottom-end",
|
|
@@ -3987,28 +3990,28 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3987
3990
|
trigger: "click",
|
|
3988
3991
|
"popper-class": "k-table-column-selector__popover"
|
|
3989
3992
|
}, {
|
|
3990
|
-
reference:
|
|
3993
|
+
reference: G(() => [...n[1] ||= [m("button", {
|
|
3991
3994
|
type: "button",
|
|
3992
3995
|
class: "k-table-column-selector__trigger",
|
|
3993
3996
|
"aria-label": "列展示设置"
|
|
3994
3997
|
}, [m("span", { class: "k-table-column-selector__icon" })], -1)]]),
|
|
3995
|
-
default:
|
|
3996
|
-
m("div", Ki, [n[3] ||= m("span", null, "列展示", -1), _(
|
|
3998
|
+
default: G(() => [m("div", Gi, [
|
|
3999
|
+
m("div", Ki, [n[3] ||= m("span", null, "列展示", -1), _(B(ue), {
|
|
3997
4000
|
type: "primary",
|
|
3998
4001
|
link: "",
|
|
3999
4002
|
onClick: a
|
|
4000
4003
|
}, {
|
|
4001
|
-
default:
|
|
4004
|
+
default: G(() => [...n[2] ||= [g("恢复默认", -1)]]),
|
|
4002
4005
|
_: 1
|
|
4003
4006
|
})]),
|
|
4004
|
-
_(
|
|
4005
|
-
m("div", qi, [(
|
|
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), {
|
|
4006
4009
|
key: e.key,
|
|
4007
4010
|
"model-value": e.checked,
|
|
4008
4011
|
disabled: e.disabled,
|
|
4009
4012
|
onChange: (t) => i(e.key, !!t)
|
|
4010
4013
|
}, {
|
|
4011
|
-
default:
|
|
4014
|
+
default: G(() => [g(L(e.label), 1)]),
|
|
4012
4015
|
_: 2
|
|
4013
4016
|
}, 1032, [
|
|
4014
4017
|
"model-value",
|
|
@@ -4053,23 +4056,23 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
4053
4056
|
},
|
|
4054
4057
|
emits: ["add"],
|
|
4055
4058
|
setup(e, { emit: t }) {
|
|
4056
|
-
let n = e, r = t, i =
|
|
4057
|
-
return (t, n) => a.value || e.selectionShow ? (
|
|
4058
|
-
a.value ? (
|
|
4059
|
-
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, {
|
|
4060
4063
|
key: 0,
|
|
4061
4064
|
type: "primary",
|
|
4062
|
-
icon:
|
|
4065
|
+
icon: B(qe),
|
|
4063
4066
|
onClick: n[0] ||= (e) => r("add")
|
|
4064
4067
|
}, {
|
|
4065
|
-
default:
|
|
4068
|
+
default: G(() => [g(L(e.addButton === !0 ? "新建" : e.addButton), 1)]),
|
|
4066
4069
|
_: 1
|
|
4067
4070
|
}, 8, ["icon"])) : f("", !0),
|
|
4068
|
-
|
|
4069
|
-
|
|
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)
|
|
4070
4073
|
])) : f("", !0),
|
|
4071
|
-
o.value ? (
|
|
4072
|
-
e.selectionShow ? (
|
|
4074
|
+
o.value ? (M(), p("div", $i)) : f("", !0),
|
|
4075
|
+
e.selectionShow ? (M(), p("div", ea, "已选择" + L(e.selectedCount) + "条数据", 1)) : f("", !0)
|
|
4073
4076
|
])) : f("", !0);
|
|
4074
4077
|
}
|
|
4075
4078
|
}), [["__scopeId", "data-v-bff19ed1"]]), na = "kayak_table_column_display";
|
|
@@ -4080,13 +4083,13 @@ function ia(e) {
|
|
|
4080
4083
|
return !(e.type === "radio" || e.type === "expand" || e.children?.length);
|
|
4081
4084
|
}
|
|
4082
4085
|
function aa(e) {
|
|
4083
|
-
let t =
|
|
4086
|
+
let t = P({}), n = P(""), r = Ue(na, {}), i = u(() => !!z(e.enableColumnCache)), a = u(() => z(e.columns).filter((e) => ia(e)));
|
|
4084
4087
|
function o() {
|
|
4085
|
-
return
|
|
4088
|
+
return z(e.tableKey) || n.value;
|
|
4086
4089
|
}
|
|
4087
4090
|
function s() {
|
|
4088
4091
|
let t = {};
|
|
4089
|
-
return
|
|
4092
|
+
return z(e.columns).forEach((e, n) => {
|
|
4090
4093
|
ia(e) && (t[$(e, n)] = !0);
|
|
4091
4094
|
}), t;
|
|
4092
4095
|
}
|
|
@@ -4111,16 +4114,16 @@ function aa(e) {
|
|
|
4111
4114
|
delete t[e], r.value = t;
|
|
4112
4115
|
}
|
|
4113
4116
|
function f(t, n) {
|
|
4114
|
-
let r =
|
|
4117
|
+
let r = z(e.columns), i = r.findIndex((e) => e === t || e.prop && e.prop === t.prop && e.type === t.type);
|
|
4115
4118
|
return i >= 0 ? $(r[i], i) : $(t, n);
|
|
4116
4119
|
}
|
|
4117
4120
|
function p() {
|
|
4118
|
-
n.value =
|
|
4121
|
+
n.value = z(e.tableKey) || `table_${Math.random().toString(36).slice(2, 11)}`;
|
|
4119
4122
|
let r = c();
|
|
4120
4123
|
t.value = r ? J(r) : s();
|
|
4121
4124
|
}
|
|
4122
4125
|
function m() {
|
|
4123
|
-
|
|
4126
|
+
D(() => e.onLayout?.());
|
|
4124
4127
|
}
|
|
4125
4128
|
function h(n, r) {
|
|
4126
4129
|
t.value = {
|
|
@@ -4135,7 +4138,7 @@ function aa(e) {
|
|
|
4135
4138
|
d(), t.value = s(), e.onDisplayChange?.(t.value), m();
|
|
4136
4139
|
}
|
|
4137
4140
|
let v = u(() => {
|
|
4138
|
-
let n =
|
|
4141
|
+
let n = z(e.renderColumns);
|
|
4139
4142
|
return i.value ? n.filter((e, n) => {
|
|
4140
4143
|
if (ra(e)) return !0;
|
|
4141
4144
|
let r = f(e, n);
|
|
@@ -4151,12 +4154,12 @@ function aa(e) {
|
|
|
4151
4154
|
disabled: ra(e)
|
|
4152
4155
|
};
|
|
4153
4156
|
}));
|
|
4154
|
-
return
|
|
4157
|
+
return W(() => z(e.columns), () => {
|
|
4155
4158
|
let e = s();
|
|
4156
4159
|
Object.keys(e).forEach((e) => {
|
|
4157
4160
|
t.value[e] === void 0 && (t.value[e] = !0);
|
|
4158
4161
|
});
|
|
4159
|
-
}, { deep: !0 }),
|
|
4162
|
+
}, { deep: !0 }), j(() => {
|
|
4160
4163
|
p();
|
|
4161
4164
|
}), {
|
|
4162
4165
|
columnDisplay: t,
|
|
@@ -4171,18 +4174,18 @@ function aa(e) {
|
|
|
4171
4174
|
//#endregion
|
|
4172
4175
|
//#region src/components/k-table/composables/useTableData.ts
|
|
4173
4176
|
function oa(e) {
|
|
4174
|
-
let t =
|
|
4177
|
+
let t = P([]), n = P(e.initialLoading ?? !1), r = P(!1), i = P(!1);
|
|
4175
4178
|
function a() {
|
|
4176
4179
|
return {
|
|
4177
4180
|
...ft,
|
|
4178
|
-
...
|
|
4181
|
+
...z(e.responseConfig)
|
|
4179
4182
|
};
|
|
4180
4183
|
}
|
|
4181
4184
|
function o() {
|
|
4182
4185
|
let t = a(), { currentPage: n, pageSize: r } = e.pagination.state.value;
|
|
4183
4186
|
return {
|
|
4184
|
-
...
|
|
4185
|
-
...
|
|
4187
|
+
...z(e.params) ?? {},
|
|
4188
|
+
...z(e.queryParams) ?? {},
|
|
4186
4189
|
[t.page]: String(n),
|
|
4187
4190
|
[t.limit]: String(r)
|
|
4188
4191
|
};
|
|
@@ -4215,7 +4218,7 @@ function oa(e) {
|
|
|
4215
4218
|
//#endregion
|
|
4216
4219
|
//#region src/components/k-table/composables/useTablePagination.ts
|
|
4217
4220
|
function sa(e) {
|
|
4218
|
-
let t =
|
|
4221
|
+
let t = z(e.pagination), n = P({
|
|
4219
4222
|
total: t?.total ?? pt.total,
|
|
4220
4223
|
currentPage: t?.currentPage ?? pt.currentPage,
|
|
4221
4224
|
pageSize: t?.pageSize ?? pt.pageSize,
|
|
@@ -4228,8 +4231,8 @@ function sa(e) {
|
|
|
4228
4231
|
pageSizes: n.value.pageSizes,
|
|
4229
4232
|
layout: n.value.layout
|
|
4230
4233
|
})), i = u(() => (n.value.currentPage - 1) * n.value.pageSize);
|
|
4231
|
-
|
|
4232
|
-
let t =
|
|
4234
|
+
W(() => {
|
|
4235
|
+
let t = z(e.pagination);
|
|
4233
4236
|
return [
|
|
4234
4237
|
t?.total,
|
|
4235
4238
|
t?.currentPage,
|
|
@@ -4264,15 +4267,15 @@ function sa(e) {
|
|
|
4264
4267
|
//#endregion
|
|
4265
4268
|
//#region src/components/k-table/composables/useTableRadio.ts
|
|
4266
4269
|
function ca(e) {
|
|
4267
|
-
let t =
|
|
4270
|
+
let t = P(""), n = u(() => z(e.columns).some((e) => e.type === "radio"));
|
|
4268
4271
|
function r(n) {
|
|
4269
|
-
return t.value = n ? Ni(n,
|
|
4272
|
+
return t.value = n ? Ni(n, z(e.rowKey)) : "", n;
|
|
4270
4273
|
}
|
|
4271
4274
|
function i() {
|
|
4272
4275
|
t.value = "";
|
|
4273
4276
|
}
|
|
4274
4277
|
function a(n) {
|
|
4275
|
-
t.value = Ni(n,
|
|
4278
|
+
t.value = Ni(n, z(e.rowKey));
|
|
4276
4279
|
}
|
|
4277
4280
|
function o() {
|
|
4278
4281
|
return t.value;
|
|
@@ -4294,10 +4297,10 @@ function la(e) {
|
|
|
4294
4297
|
t?.destroy(), t = null;
|
|
4295
4298
|
}
|
|
4296
4299
|
function r() {
|
|
4297
|
-
if (n(), !
|
|
4300
|
+
if (n(), !z(e.enabled)) return;
|
|
4298
4301
|
let r = e.tableRef.value?.$el?.querySelector(".el-table__body-wrapper tbody");
|
|
4299
4302
|
r && (t = Ze.create(r, {
|
|
4300
|
-
disabled:
|
|
4303
|
+
disabled: z(e.disabled),
|
|
4301
4304
|
animation: 300,
|
|
4302
4305
|
handle: ".sort-handle",
|
|
4303
4306
|
filter: ".ignore-elements",
|
|
@@ -4305,16 +4308,16 @@ function la(e) {
|
|
|
4305
4308
|
onEnd: (t) => e.onSortEnd(t)
|
|
4306
4309
|
}));
|
|
4307
4310
|
}
|
|
4308
|
-
return
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
+
return W(() => [
|
|
4312
|
+
z(e.enabled),
|
|
4313
|
+
z(e.rebindKey),
|
|
4311
4314
|
e.tableRef.value
|
|
4312
4315
|
], () => {
|
|
4313
|
-
|
|
4314
|
-
}, { flush: "post" }),
|
|
4316
|
+
D(r);
|
|
4317
|
+
}, { flush: "post" }), W(() => z(e.disabled), (e) => {
|
|
4315
4318
|
t && t.option("disabled", e);
|
|
4316
|
-
}),
|
|
4317
|
-
initSortable: () =>
|
|
4319
|
+
}), A(n), {
|
|
4320
|
+
initSortable: () => D(r),
|
|
4318
4321
|
destroySortable: n
|
|
4319
4322
|
};
|
|
4320
4323
|
}
|
|
@@ -4324,7 +4327,7 @@ function ua(e) {
|
|
|
4324
4327
|
let t = /* @__PURE__ */ new Map();
|
|
4325
4328
|
function n(n) {
|
|
4326
4329
|
return (r, i, a) => {
|
|
4327
|
-
let o = Ni(r,
|
|
4330
|
+
let o = Ni(r, z(e.rowKey));
|
|
4328
4331
|
o != null && t.set(o, {
|
|
4329
4332
|
row: r,
|
|
4330
4333
|
treeNode: i,
|
|
@@ -4333,7 +4336,7 @@ function ua(e) {
|
|
|
4333
4336
|
};
|
|
4334
4337
|
}
|
|
4335
4338
|
function r(n) {
|
|
4336
|
-
let r =
|
|
4339
|
+
let r = z(e.load), i = t.get(n);
|
|
4337
4340
|
if (!i || !r) return;
|
|
4338
4341
|
let a = e.tableRef.value?.store?.states?.lazyTreeNodeMap;
|
|
4339
4342
|
a && n != null && (a[String(n)] = []), r(i.row, i.treeNode, i.resolve);
|
|
@@ -4350,7 +4353,7 @@ function ua(e) {
|
|
|
4350
4353
|
//#endregion
|
|
4351
4354
|
//#region src/components/k-table/composables/useKTable.ts
|
|
4352
4355
|
function da(e) {
|
|
4353
|
-
let { props: t, emit: n, attrs: r, slots: i, tableRef: a, queryRef: o } = e, s =
|
|
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);
|
|
4354
4357
|
function p(e) {
|
|
4355
4358
|
let n = { ...e };
|
|
4356
4359
|
s.value = t.convertParams ? t.convertParams(n) : n;
|
|
@@ -4383,11 +4386,11 @@ function da(e) {
|
|
|
4383
4386
|
pagination: v,
|
|
4384
4387
|
initialLoading: !!(t.action && t.initTable),
|
|
4385
4388
|
onDataLoaded: (e, t) => n("data-loaded", e, t)
|
|
4386
|
-
}), 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(() => {
|
|
4387
4390
|
let e = { ...r };
|
|
4388
4391
|
l.value && "data" in e && delete e.data, t.load && delete e.load;
|
|
4389
4392
|
let n = {
|
|
4390
|
-
data:
|
|
4393
|
+
data: C.value,
|
|
4391
4394
|
rowKey: t.rowKey,
|
|
4392
4395
|
border: !0,
|
|
4393
4396
|
stripe: !0,
|
|
@@ -4405,84 +4408,84 @@ function da(e) {
|
|
|
4405
4408
|
tableRef: a,
|
|
4406
4409
|
rebindKey: () => x.value,
|
|
4407
4410
|
onSortEnd: (e) => {
|
|
4408
|
-
let t = [...
|
|
4411
|
+
let t = [...C.value];
|
|
4409
4412
|
if (e.oldIndex == null || e.newIndex == null) return;
|
|
4410
4413
|
let [r] = t.splice(e.oldIndex, 1);
|
|
4411
4414
|
t.splice(e.newIndex, 0, r), n("sort-end", e, t);
|
|
4412
4415
|
}
|
|
4413
4416
|
});
|
|
4414
|
-
function
|
|
4417
|
+
function D() {
|
|
4415
4418
|
l.value && y.fetchData();
|
|
4416
4419
|
}
|
|
4417
|
-
|
|
4420
|
+
j(() => {
|
|
4418
4421
|
!t.initTable || !t.action || (d.value && p(o.value?.getParams() ?? {}), y.fetchData());
|
|
4419
4422
|
});
|
|
4420
|
-
function
|
|
4423
|
+
function O(e) {
|
|
4421
4424
|
c.value = e.length, n("selection-change", e);
|
|
4422
4425
|
}
|
|
4423
|
-
function
|
|
4426
|
+
function ee(e) {
|
|
4424
4427
|
n("sort-change", e);
|
|
4425
4428
|
}
|
|
4426
|
-
function
|
|
4429
|
+
function k() {
|
|
4427
4430
|
a.value?.setCurrentRow();
|
|
4428
4431
|
}
|
|
4429
|
-
function
|
|
4430
|
-
p(e), v.resetPage(), t.clearCurrentRowOnQuery &&
|
|
4432
|
+
function A(e) {
|
|
4433
|
+
p(e), v.resetPage(), t.clearCurrentRowOnQuery && k(), n("query", s.value), D();
|
|
4431
4434
|
}
|
|
4432
|
-
function
|
|
4433
|
-
n("reset"), t.selectionShow &&
|
|
4435
|
+
function M() {
|
|
4436
|
+
n("reset"), t.selectionShow && z(), t.clearCurrentRowOnReset && k();
|
|
4434
4437
|
}
|
|
4435
|
-
function
|
|
4436
|
-
v.setCurrentPage(e), n("page-change", e),
|
|
4438
|
+
function te(e) {
|
|
4439
|
+
v.setCurrentPage(e), n("page-change", e), D();
|
|
4437
4440
|
}
|
|
4438
|
-
function
|
|
4439
|
-
v.setPageSize(e), n("size-change", e),
|
|
4441
|
+
function N(e) {
|
|
4442
|
+
v.setPageSize(e), n("size-change", e), D();
|
|
4440
4443
|
}
|
|
4441
|
-
function
|
|
4444
|
+
function F() {
|
|
4442
4445
|
n("add");
|
|
4443
4446
|
}
|
|
4444
|
-
function
|
|
4447
|
+
function I(e, t, r) {
|
|
4445
4448
|
n("operate-click", e, t, r);
|
|
4446
4449
|
}
|
|
4447
|
-
function
|
|
4450
|
+
function ne(e) {
|
|
4448
4451
|
if (!g.hasRadioColumn.value) return;
|
|
4449
4452
|
let t = g.selectRow(e);
|
|
4450
4453
|
t && n("radio-change", t, g.radioSelected.value);
|
|
4451
4454
|
}
|
|
4452
|
-
function
|
|
4453
|
-
|
|
4455
|
+
function re(e) {
|
|
4456
|
+
ne(e);
|
|
4454
4457
|
}
|
|
4455
|
-
function
|
|
4458
|
+
function ie(e, t) {
|
|
4456
4459
|
h.setColumnVisibleByKey(e, t);
|
|
4457
4460
|
}
|
|
4458
|
-
function
|
|
4461
|
+
function ae() {
|
|
4459
4462
|
return a.value;
|
|
4460
4463
|
}
|
|
4461
|
-
function
|
|
4464
|
+
function L() {
|
|
4462
4465
|
return o.value;
|
|
4463
4466
|
}
|
|
4464
|
-
function
|
|
4467
|
+
function R() {
|
|
4465
4468
|
return a.value?.getSelectionRows() ?? [];
|
|
4466
4469
|
}
|
|
4467
|
-
function
|
|
4470
|
+
function z() {
|
|
4468
4471
|
a.value?.clearSelection(), c.value = 0;
|
|
4469
4472
|
}
|
|
4470
|
-
function
|
|
4473
|
+
function B(e, t) {
|
|
4471
4474
|
a.value?.toggleRowSelection(e, t);
|
|
4472
4475
|
}
|
|
4473
|
-
async function
|
|
4476
|
+
async function V(e = !1) {
|
|
4474
4477
|
l.value && await y.refresh(e);
|
|
4475
4478
|
}
|
|
4476
|
-
function
|
|
4479
|
+
function oe() {
|
|
4477
4480
|
g.clearRadioSelection(), a.value?.setCurrentRow();
|
|
4478
4481
|
}
|
|
4479
|
-
function
|
|
4482
|
+
function H(e) {
|
|
4480
4483
|
g.setRadioSelection(e);
|
|
4481
4484
|
}
|
|
4482
|
-
function
|
|
4485
|
+
function U() {
|
|
4483
4486
|
return g.getRadioSelection();
|
|
4484
4487
|
}
|
|
4485
|
-
function
|
|
4488
|
+
function se(e) {
|
|
4486
4489
|
_.refreshTree(e);
|
|
4487
4490
|
}
|
|
4488
4491
|
return {
|
|
@@ -4490,37 +4493,37 @@ function da(e) {
|
|
|
4490
4493
|
showToolbar: S,
|
|
4491
4494
|
hasHeaderSlot: f,
|
|
4492
4495
|
renderColumns: b,
|
|
4493
|
-
tableProps:
|
|
4494
|
-
tableLoading:
|
|
4495
|
-
showLoadingEmpty:
|
|
4496
|
+
tableProps: E,
|
|
4497
|
+
tableLoading: w,
|
|
4498
|
+
showLoadingEmpty: T,
|
|
4496
4499
|
columnSelectorItems: h.selectorItems,
|
|
4497
4500
|
paginationBind: v.bindProps,
|
|
4498
4501
|
indexOffset: v.indexOffset,
|
|
4499
4502
|
selectedCount: c,
|
|
4500
4503
|
radioSelected: g.radioSelected,
|
|
4501
4504
|
getColumnIdentity: $,
|
|
4502
|
-
handleSelectionChange:
|
|
4503
|
-
handleSortChange:
|
|
4504
|
-
handleQuery:
|
|
4505
|
-
handleQueryReset:
|
|
4506
|
-
handlePageChange:
|
|
4507
|
-
handleSizeChange:
|
|
4508
|
-
handleAdd:
|
|
4509
|
-
handleOperateClick:
|
|
4510
|
-
handleRowClick:
|
|
4511
|
-
handleRadioChange:
|
|
4512
|
-
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,
|
|
4513
4516
|
resetColumnDisplay: h.resetColumnDisplay,
|
|
4514
|
-
getTableRef:
|
|
4515
|
-
getQueryRef:
|
|
4516
|
-
getSelection:
|
|
4517
|
-
clearSelection:
|
|
4518
|
-
toggleRowSelection:
|
|
4519
|
-
refresh:
|
|
4520
|
-
clearRadioSelection:
|
|
4521
|
-
setRadioSelection:
|
|
4522
|
-
getRadioSelection:
|
|
4523
|
-
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
|
|
4524
4527
|
};
|
|
4525
4528
|
}
|
|
4526
4529
|
var fa = {
|
|
@@ -4544,7 +4547,7 @@ var fa = {
|
|
|
4544
4547
|
name: "KTable",
|
|
4545
4548
|
inheritAttrs: !0,
|
|
4546
4549
|
__name: "KTable",
|
|
4547
|
-
props: /*@__PURE__*/
|
|
4550
|
+
props: /*@__PURE__*/ w({
|
|
4548
4551
|
columns: {},
|
|
4549
4552
|
data: {},
|
|
4550
4553
|
action: { type: Function },
|
|
@@ -4588,10 +4591,10 @@ var fa = {
|
|
|
4588
4591
|
"sort-change"
|
|
4589
4592
|
],
|
|
4590
4593
|
setup(e, { expose: t, emit: n }) {
|
|
4591
|
-
let r = e, i = n, a =
|
|
4594
|
+
let r = e, i = n, a = H(), o = P(), s = P(), l = N(da({
|
|
4592
4595
|
props: r,
|
|
4593
4596
|
emit: i,
|
|
4594
|
-
attrs:
|
|
4597
|
+
attrs: V(),
|
|
4595
4598
|
slots: a,
|
|
4596
4599
|
tableRef: o,
|
|
4597
4600
|
queryRef: s
|
|
@@ -4616,8 +4619,8 @@ var fa = {
|
|
|
4616
4619
|
getRadioSelection: l.getRadioSelection,
|
|
4617
4620
|
refreshTree: l.refreshTree
|
|
4618
4621
|
}), (t, n) => {
|
|
4619
|
-
let r =
|
|
4620
|
-
return
|
|
4622
|
+
let r = re("loading");
|
|
4623
|
+
return M(), p("div", pa, [l.showQuery ? (M(), d(B(ji), E({
|
|
4621
4624
|
key: 0,
|
|
4622
4625
|
ref_key: "queryRef",
|
|
4623
4626
|
ref: s,
|
|
@@ -4626,7 +4629,7 @@ var fa = {
|
|
|
4626
4629
|
onQuery: l.handleQuery,
|
|
4627
4630
|
onReset: l.handleQueryReset
|
|
4628
4631
|
}), null, 16, ["onQuery", "onReset"])) : f("", !0), m("div", ma, [
|
|
4629
|
-
l.showToolbar ? (
|
|
4632
|
+
l.showToolbar ? (M(), d(ta, {
|
|
4630
4633
|
key: 0,
|
|
4631
4634
|
"add-button": e.addButton,
|
|
4632
4635
|
"selection-show": e.selectionShow,
|
|
@@ -4634,11 +4637,11 @@ var fa = {
|
|
|
4634
4637
|
onAdd: l.handleAdd
|
|
4635
4638
|
}, h({ _: 2 }, [l.hasHeaderSlot ? {
|
|
4636
4639
|
name: "header",
|
|
4637
|
-
fn:
|
|
4640
|
+
fn: G(() => [I(t.$slots, "header", {}, void 0, !0)]),
|
|
4638
4641
|
key: "0"
|
|
4639
4642
|
} : void 0, e.enableColumnCache ? {
|
|
4640
4643
|
name: "extra",
|
|
4641
|
-
fn:
|
|
4644
|
+
fn: G(() => [_(Ji, {
|
|
4642
4645
|
items: l.columnSelectorItems,
|
|
4643
4646
|
onChange: l.handleColumnVisibleChange,
|
|
4644
4647
|
onReset: l.resetColumnDisplay
|
|
@@ -4654,7 +4657,7 @@ var fa = {
|
|
|
4654
4657
|
"selected-count",
|
|
4655
4658
|
"onAdd"
|
|
4656
4659
|
])) : f("", !0),
|
|
4657
|
-
|
|
4660
|
+
ce((M(), d(B(Fe), E({
|
|
4658
4661
|
ref_key: "tableRef",
|
|
4659
4662
|
ref: o,
|
|
4660
4663
|
class: "k-table__main"
|
|
@@ -4663,23 +4666,23 @@ var fa = {
|
|
|
4663
4666
|
onSortChange: l.handleSortChange,
|
|
4664
4667
|
onRowClick: l.handleRowClick
|
|
4665
4668
|
}), {
|
|
4666
|
-
empty:
|
|
4667
|
-
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), {
|
|
4668
4671
|
key: 0,
|
|
4669
4672
|
label: "拖拽排序",
|
|
4670
4673
|
align: "center",
|
|
4671
4674
|
width: "100"
|
|
4672
4675
|
}, {
|
|
4673
|
-
default:
|
|
4676
|
+
default: G(({ row: n, column: r, $index: i }) => [I(t.$slots, "sort", {
|
|
4674
4677
|
row: n,
|
|
4675
4678
|
column: r,
|
|
4676
4679
|
index: i
|
|
4677
4680
|
}, () => [m("span", {
|
|
4678
|
-
class:
|
|
4681
|
+
class: O(e.sortFilter.includes(i) ? "ignore-elements" : "sort-handle k-table__sort-handle"),
|
|
4679
4682
|
"aria-hidden": "true"
|
|
4680
4683
|
}, "⋮⋮", 2)], !0)]),
|
|
4681
4684
|
_: 3
|
|
4682
|
-
})) : f("", !0), (
|
|
4685
|
+
})) : f("", !0), (M(!0), p(c, null, F(l.renderColumns, (n, r) => (M(), d(Wi, {
|
|
4683
4686
|
key: l.getColumnIdentity(n, r),
|
|
4684
4687
|
column: n,
|
|
4685
4688
|
"column-index": r,
|
|
@@ -4690,9 +4693,9 @@ var fa = {
|
|
|
4690
4693
|
"radio-selected": l.radioSelected,
|
|
4691
4694
|
onOperateClick: l.handleOperateClick,
|
|
4692
4695
|
onRadioSelect: l.handleRadioChange
|
|
4693
|
-
}, h({ _: 2 }, [
|
|
4696
|
+
}, h({ _: 2 }, [F(v.value, (e) => ({
|
|
4694
4697
|
name: e,
|
|
4695
|
-
fn:
|
|
4698
|
+
fn: G((n) => [I(t.$slots, e, E({ ref_for: !0 }, n ?? {}), void 0, !0)])
|
|
4696
4699
|
}))]), 1032, [
|
|
4697
4700
|
"column",
|
|
4698
4701
|
"column-index",
|
|
@@ -4710,13 +4713,13 @@ var fa = {
|
|
|
4710
4713
|
"onSortChange",
|
|
4711
4714
|
"onRowClick"
|
|
4712
4715
|
])), [[r, l.tableLoading]]),
|
|
4713
|
-
m("div", ga, [e.hidePagination ? f("", !0) : (
|
|
4716
|
+
m("div", ga, [e.hidePagination ? f("", !0) : (M(), d(B(Jr), E({
|
|
4714
4717
|
key: 0,
|
|
4715
4718
|
class: "pagination"
|
|
4716
4719
|
}, l.paginationBind, {
|
|
4717
4720
|
onCurrentChange: l.handlePageChange,
|
|
4718
4721
|
onSizeChange: l.handleSizeChange
|
|
4719
|
-
}), null, 16, ["onCurrentChange", "onSizeChange"])),
|
|
4722
|
+
}), null, 16, ["onCurrentChange", "onSizeChange"])), I(t.$slots, "footer", {}, void 0, !0)])
|
|
4720
4723
|
])]);
|
|
4721
4724
|
};
|
|
4722
4725
|
}
|
|
@@ -4732,17 +4735,17 @@ function ya(e) {
|
|
|
4732
4735
|
//#endregion
|
|
4733
4736
|
//#region src/components/k-table/composables/useKTableTemplateRef.ts
|
|
4734
4737
|
function ba(e) {
|
|
4735
|
-
return
|
|
4738
|
+
return U(e);
|
|
4736
4739
|
}
|
|
4737
4740
|
//#endregion
|
|
4738
4741
|
//#region src/components/k-table/composables/useKTableCrossPageSelection.ts
|
|
4739
4742
|
function xa(e) {
|
|
4740
|
-
let t =
|
|
4743
|
+
let t = ae([]), n = ae([]), r = ae(!1), i = ba(e.tableRefKey ?? "tableRef");
|
|
4741
4744
|
function a() {
|
|
4742
|
-
return e.tableRef == null ? i.value :
|
|
4745
|
+
return e.tableRef == null ? i.value : z(e.tableRef);
|
|
4743
4746
|
}
|
|
4744
4747
|
function o(t) {
|
|
4745
|
-
return String(Ni(t,
|
|
4748
|
+
return String(Ni(t, z(e.rowKey)));
|
|
4746
4749
|
}
|
|
4747
4750
|
function s(e) {
|
|
4748
4751
|
t.value = [...e];
|
|
@@ -4756,16 +4759,16 @@ function xa(e) {
|
|
|
4756
4759
|
function u(i) {
|
|
4757
4760
|
n.value = i;
|
|
4758
4761
|
let s = new Set(t.value.map(o));
|
|
4759
|
-
if (
|
|
4762
|
+
if (z(e.mode) === "single") {
|
|
4760
4763
|
let e = i.find((e) => s.has(o(e)));
|
|
4761
4764
|
e && a()?.setRadioSelection(e);
|
|
4762
4765
|
return;
|
|
4763
4766
|
}
|
|
4764
|
-
r.value = !0,
|
|
4767
|
+
r.value = !0, D(async () => {
|
|
4765
4768
|
let e = a();
|
|
4766
4769
|
i.forEach((t) => {
|
|
4767
4770
|
s.has(o(t)) && e?.toggleRowSelection(t, !0);
|
|
4768
|
-
}), await
|
|
4771
|
+
}), await D(), r.value = !1;
|
|
4769
4772
|
});
|
|
4770
4773
|
}
|
|
4771
4774
|
function d(e) {
|
|
@@ -4853,18 +4856,18 @@ function Oa(e, t) {
|
|
|
4853
4856
|
//#endregion
|
|
4854
4857
|
//#region src/components/k-table/report/useExportKTableReport.ts
|
|
4855
4858
|
function ka(e) {
|
|
4856
|
-
let t =
|
|
4859
|
+
let t = P(!1);
|
|
4857
4860
|
async function n() {
|
|
4858
4861
|
if (!t.value) {
|
|
4859
4862
|
t.value = !0;
|
|
4860
4863
|
try {
|
|
4861
4864
|
await wa({
|
|
4862
4865
|
tableRef: e.tableRef,
|
|
4863
|
-
columns:
|
|
4866
|
+
columns: z(e.columns),
|
|
4864
4867
|
exportApi: e.exportApi,
|
|
4865
4868
|
convertParams: e.convertParams,
|
|
4866
|
-
excludeOperates:
|
|
4867
|
-
excludeLast:
|
|
4869
|
+
excludeOperates: z(e.excludeOperates),
|
|
4870
|
+
excludeLast: z(e.excludeLast)
|
|
4868
4871
|
});
|
|
4869
4872
|
} finally {
|
|
4870
4873
|
t.value = !1;
|