@kayak-sj/design 1.0.41 → 1.0.43
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-Xvz0PsON.css → components-DK7g2-zP.css} +1 -1
- package/dist/chunks/{Complex-DuFZOhG0.js → Complex-RcZnSBVW.js} +1 -1
- package/dist/chunks/{components-D5GZ1crv.js → components-4sHzMJbg.js} +592 -595
- package/dist/components/index.js +1 -1
- package/dist/components/k-form/formComponent/DatePicker.d.ts +0 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { a as t, d as n, i as r, l as i, n as a, r as o, u as s } from "./editorValue-DSKvW8ty.js";
|
|
3
|
-
import { Fragment as c, Transition as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as h, createTextVNode as g, createVNode as _, defineAsyncComponent as v, defineComponent as y, guardReactiveProps as b, h as x, inject as S, isRef as
|
|
4
|
-
import { ElButton as
|
|
3
|
+
import { Fragment as c, Transition as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as h, createTextVNode as g, createVNode as _, defineAsyncComponent as v, defineComponent as y, guardReactiveProps as b, h as x, inject as S, isRef as ee, mergeDefaults as C, mergeModels as w, mergeProps as T, nextTick as E, normalizeClass as D, normalizeProps as te, normalizeStyle as O, onBeforeUnmount as k, onMounted as A, openBlock as j, provide as ne, reactive as M, ref as N, renderList as P, renderSlot as F, resolveComponent as re, resolveDirective as ie, resolveDynamicComponent as ae, shallowRef as oe, toDisplayString as I, toRef as L, toValue as R, unref as z, useAttrs as B, useModel as se, useSlots as V, useTemplateRef as H, vShow as ce, watch as U, withCtx as W, withDirectives as le, withModifiers as ue } from "vue";
|
|
4
|
+
import { ElButton as de, ElCard as fe, ElCascader as pe, ElCheckbox as me, ElCheckboxGroup as he, ElCollapse as ge, ElCollapseItem as _e, ElDatePicker as ve, ElDialog as ye, ElDivider as G, 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-DK7g2-zP.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) => (j(), d(z(de), te(b(e.$attrs)), {
|
|
68
|
+
default: W(() => [F(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) => (j(), p("div", nt, [
|
|
96
|
+
e.icon || t.$slots.icon ? (j(), p("div", rt, [F(t.$slots, "icon", {}, () => [(j(), d(ae(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 ? (j(), p("p", at, [F(t.$slots, "title", {}, () => [g(I(e.title), 1)])])) : f("", !0),
|
|
103
|
+
e.description || t.$slots.description ? (j(), p("p", ot, [F(t.$slots, "description", {}, () => [g(I(e.description), 1)])])) : f("", !0),
|
|
104
|
+
F(t.$slots, "default")
|
|
105
105
|
]),
|
|
106
|
-
t.$slots.extra ? (
|
|
106
|
+
t.$slots.extra ? (j(), p("div", st, [F(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__*/ w({
|
|
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__*/ w([
|
|
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 = se(e, "visible"), r = e, i = t, a = B(), o = V(), 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 ee() {
|
|
176
176
|
i("confirm");
|
|
177
177
|
}
|
|
178
|
-
return (t, r) => (
|
|
178
|
+
return (t, r) => (j(), d(z(ye), T({
|
|
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: W(() => [m("div", lt, [F(t.$slots, "default")])]),
|
|
185
185
|
_: 2
|
|
186
186
|
}, [b.value ? {
|
|
187
187
|
name: "header",
|
|
188
|
-
fn:
|
|
188
|
+
fn: W(() => [F(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 }, [z(o).icon ? {
|
|
193
193
|
name: "icon",
|
|
194
|
-
fn:
|
|
194
|
+
fn: W(() => [F(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, z(o).footer ? {
|
|
203
203
|
name: "footer",
|
|
204
|
-
fn:
|
|
204
|
+
fn: W(() => [F(t.$slots, "footer")]),
|
|
205
205
|
key: "1"
|
|
206
|
-
} : !
|
|
206
|
+
} : !z(o).footer && (e.showConfirm !== !1 || e.showCancel !== !1) ? {
|
|
207
207
|
name: "footer",
|
|
208
|
-
fn:
|
|
208
|
+
fn: W(() => [e.showCancel === !1 ? f("", !0) : (j(), d(Y, {
|
|
209
209
|
key: 0,
|
|
210
210
|
onClick: S
|
|
211
211
|
}, {
|
|
212
|
-
default:
|
|
212
|
+
default: W(() => [g(I(y.value), 1)]),
|
|
213
213
|
_: 1
|
|
214
|
-
})), e.showConfirm === !1 ? f("", !0) : (
|
|
214
|
+
})), e.showConfirm === !1 ? f("", !0) : (j(), d(Y, {
|
|
215
215
|
key: 1,
|
|
216
216
|
type: "primary",
|
|
217
217
|
loading: e.confirmLoading,
|
|
218
|
-
onClick:
|
|
218
|
+
onClick: ee
|
|
219
219
|
}, {
|
|
220
|
-
default:
|
|
220
|
+
default: W(() => [g(I(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 = M({}), 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 U(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 }), U(() => e.data?.value, (t) => {
|
|
505
505
|
xt(e) || t && Object.keys(t).length && m(t);
|
|
506
|
-
}, { deep: !0 }),
|
|
506
|
+
}, { deep: !0 }), U(() => 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 ? (j(), p("span", zt, I(o.value), 1)) : (j(), d(z(pe), {
|
|
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 = N([]), s = N(!1), l = N(!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
|
+
U(() => 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) => (j(), p("div", Vt, [e.readonly ? (j(), p("span", Ht, I(h.value), 1)) : (j(), p(c, { key: 1 }, [e.showSelectAll ? (j(), d(z(me), {
|
|
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: W(() => [...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), _(z(he), {
|
|
702
702
|
"model-value": o.value,
|
|
703
703
|
disabled: e.disabled,
|
|
704
704
|
"onUpdate:modelValue": b
|
|
705
705
|
}, {
|
|
706
|
-
default:
|
|
706
|
+
default: W(() => [(j(!0), p(c, null, P(e.options, (e) => (j(), d(z(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: W(() => [_(z(me), {
|
|
713
|
+
value: z(Z)(e.value),
|
|
714
714
|
disabled: e.disabled
|
|
715
715
|
}, {
|
|
716
|
-
default:
|
|
716
|
+
default: W(() => [g(I(e.label), 1)]),
|
|
717
717
|
_: 2
|
|
718
718
|
}, 1032, ["value", "disabled"])]),
|
|
719
719
|
_: 2
|
|
@@ -764,70 +764,69 @@ 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 }
|
|
768
|
-
defaultTime: { default: void 0 }
|
|
767
|
+
valueFormat: { default: void 0 }
|
|
769
768
|
},
|
|
770
769
|
emits: ["update:modelValue"],
|
|
771
770
|
setup(e, { emit: t }) {
|
|
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(() =>
|
|
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" : ""), l = (e, t) => q(e instanceof Date ? e : String(e)).format(t), m = u(() => {
|
|
773
772
|
if (!n.modelValue) return Q(n.modelValue);
|
|
774
773
|
let e = s.value.includes("datetime") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
775
|
-
if (Array.isArray(n.modelValue)) return n.modelValue.map((t) =>
|
|
774
|
+
if (Array.isArray(n.modelValue)) return n.modelValue.map((t) => l(t, e)).join(" - ");
|
|
776
775
|
let t = q(n.modelValue instanceof Date ? n.modelValue : String(n.modelValue));
|
|
777
776
|
return t.isValid() ? t.format(e) : Q(n.modelValue);
|
|
778
|
-
}),
|
|
777
|
+
}), h = u(() => {
|
|
779
778
|
if (!n.limitTime) return;
|
|
780
779
|
let e = q().hour();
|
|
781
780
|
return () => Array.from({ length: 24 }, (e, t) => t).filter((t) => t < e);
|
|
782
781
|
});
|
|
783
|
-
function
|
|
782
|
+
function g(e) {
|
|
784
783
|
let t = new Date(e.getTime());
|
|
785
784
|
return t.setHours(0, 0, 0, 0), t;
|
|
786
785
|
}
|
|
787
|
-
function
|
|
786
|
+
function _(e) {
|
|
788
787
|
if (e == null) return null;
|
|
789
|
-
if (e === "today") return
|
|
788
|
+
if (e === "today") return g(/* @__PURE__ */ new Date());
|
|
790
789
|
if (typeof e == "function") {
|
|
791
790
|
let t = e();
|
|
792
|
-
return t instanceof Date && !Number.isNaN(t.getTime()) ?
|
|
791
|
+
return t instanceof Date && !Number.isNaN(t.getTime()) ? g(t) : null;
|
|
793
792
|
}
|
|
794
|
-
return e instanceof Date && !Number.isNaN(e.getTime()) ?
|
|
793
|
+
return e instanceof Date && !Number.isNaN(e.getTime()) ? g(e) : null;
|
|
795
794
|
}
|
|
796
|
-
function
|
|
797
|
-
if (e.date !== void 0) return
|
|
795
|
+
function v(e) {
|
|
796
|
+
if (e.date !== void 0) return _(e.date);
|
|
798
797
|
if (e.id) {
|
|
799
798
|
let t = a.value[`kitDate-${e.id}`];
|
|
800
799
|
if (!t) return null;
|
|
801
|
-
if (t instanceof Date) return
|
|
800
|
+
if (t instanceof Date) return g(t);
|
|
802
801
|
let n = q(t);
|
|
803
|
-
return n.isValid() ?
|
|
802
|
+
return n.isValid() ? g(n.toDate()) : null;
|
|
804
803
|
}
|
|
805
804
|
return null;
|
|
806
805
|
}
|
|
807
|
-
function
|
|
806
|
+
function y(e, t, n) {
|
|
808
807
|
return n === ">=" ? e >= t : n === ">" ? e > t : n === "<=" ? e <= t : n === "<" ? e < t : n === "==" && e === t;
|
|
809
808
|
}
|
|
810
|
-
function
|
|
811
|
-
let t =
|
|
809
|
+
function b(e) {
|
|
810
|
+
let t = g(e).getTime(), r = _(n.minDate);
|
|
812
811
|
if (r && t < r.getTime()) return !0;
|
|
813
|
-
let i =
|
|
812
|
+
let i = _(n.maxDate);
|
|
814
813
|
if (i && t > i.getTime()) return !0;
|
|
815
814
|
let a = n.dateDisabled;
|
|
816
815
|
return !a || (typeof a == "function" && (a = a()), !a.length) ? !1 : a.some((e) => {
|
|
817
|
-
let n =
|
|
818
|
-
return n ?
|
|
816
|
+
let n = v(e);
|
|
817
|
+
return n ? y(t, n.getTime(), e.condition) : !1;
|
|
819
818
|
});
|
|
820
819
|
}
|
|
821
|
-
function
|
|
820
|
+
function x(e) {
|
|
822
821
|
r("update:modelValue", e);
|
|
823
822
|
}
|
|
824
|
-
return (t, n) => (
|
|
825
|
-
e.prepend ? (
|
|
823
|
+
return (t, n) => (j(), p("div", { class: D(["k-form-date-picker", c.value]) }, [
|
|
824
|
+
e.prepend ? (j(), p("span", {
|
|
826
825
|
key: 0,
|
|
827
826
|
class: "k-form-date-picker__text",
|
|
828
827
|
innerHTML: e.prepend
|
|
829
828
|
}, null, 8, Wt)) : f("", !0),
|
|
830
|
-
e.readonly ? (
|
|
829
|
+
e.readonly ? (j(), p("span", Gt, I(m.value), 1)) : (j(), d(z(ve), {
|
|
831
830
|
key: 1,
|
|
832
831
|
"model-value": o.value,
|
|
833
832
|
type: s.value,
|
|
@@ -836,11 +835,10 @@ var zt = {
|
|
|
836
835
|
"start-placeholder": e.startPlaceholder,
|
|
837
836
|
"end-placeholder": e.endPlaceholder,
|
|
838
837
|
"value-format": e.valueFormat,
|
|
839
|
-
"default-time": c.value,
|
|
840
838
|
disabled: e.disabled,
|
|
841
|
-
"disabled-date":
|
|
842
|
-
"disabled-hours":
|
|
843
|
-
"onUpdate:modelValue":
|
|
839
|
+
"disabled-date": b,
|
|
840
|
+
"disabled-hours": h.value,
|
|
841
|
+
"onUpdate:modelValue": x
|
|
844
842
|
}, null, 8, [
|
|
845
843
|
"model-value",
|
|
846
844
|
"type",
|
|
@@ -848,18 +846,17 @@ var zt = {
|
|
|
848
846
|
"start-placeholder",
|
|
849
847
|
"end-placeholder",
|
|
850
848
|
"value-format",
|
|
851
|
-
"default-time",
|
|
852
849
|
"disabled",
|
|
853
850
|
"disabled-hours"
|
|
854
851
|
])),
|
|
855
|
-
e.append ? (
|
|
852
|
+
e.append ? (j(), p("span", {
|
|
856
853
|
key: 3,
|
|
857
854
|
class: "k-form-date-picker__text",
|
|
858
855
|
innerHTML: e.append
|
|
859
856
|
}, null, 8, Kt)) : f("", !0)
|
|
860
857
|
], 2));
|
|
861
858
|
}
|
|
862
|
-
}), [["__scopeId", "data-v-
|
|
859
|
+
}), [["__scopeId", "data-v-578e2613"]]), Jt = /* @__PURE__ */ y({
|
|
863
860
|
name: "KFormFallback",
|
|
864
861
|
__name: "Fallback",
|
|
865
862
|
props: {
|
|
@@ -868,7 +865,7 @@ var zt = {
|
|
|
868
865
|
},
|
|
869
866
|
setup(e) {
|
|
870
867
|
let t = e, n = u(() => `[${t.componentType ?? "Unknown"}] 待迁移`), r = u(() => Ot(t.modelValue));
|
|
871
|
-
return (e, t) => (
|
|
868
|
+
return (e, t) => (j(), d(z(we), {
|
|
872
869
|
"model-value": r.value,
|
|
873
870
|
disabled: "",
|
|
874
871
|
placeholder: n.value
|
|
@@ -919,16 +916,16 @@ var zt = {
|
|
|
919
916
|
function l(e) {
|
|
920
917
|
r("update:modelValue", e);
|
|
921
918
|
}
|
|
922
|
-
return (t, n) => (
|
|
919
|
+
return (t, n) => (j(), p("div", {
|
|
923
920
|
class: "k-form-input",
|
|
924
921
|
type: o.value ? "textarea" : void 0
|
|
925
922
|
}, [
|
|
926
|
-
e.leftText ? (
|
|
923
|
+
e.leftText ? (j(), p("div", {
|
|
927
924
|
key: 0,
|
|
928
|
-
class:
|
|
925
|
+
class: D(["k-form-input__side k-form-input__side--left", e.leftClass]),
|
|
929
926
|
onClick: n[0] ||= (...t) => e.leftClick && e.leftClick(...t)
|
|
930
|
-
},
|
|
931
|
-
e.readonly ? (
|
|
927
|
+
}, I(e.leftText), 3)) : f("", !0),
|
|
928
|
+
e.readonly ? (j(), p("div", Xt, I(c.value), 1)) : (j(), d(z(we), T({ key: 2 }, t.$attrs, {
|
|
932
929
|
"model-value": i.value,
|
|
933
930
|
autocomplete: "off",
|
|
934
931
|
clearable: s.value,
|
|
@@ -939,11 +936,11 @@ var zt = {
|
|
|
939
936
|
"onUpdate:modelValue": l
|
|
940
937
|
}), h({ _: 2 }, [e.prepend ? {
|
|
941
938
|
name: "prepend",
|
|
942
|
-
fn:
|
|
939
|
+
fn: W(() => [g(I(e.prepend), 1)]),
|
|
943
940
|
key: "0"
|
|
944
941
|
} : void 0, e.append ? {
|
|
945
942
|
name: "append",
|
|
946
|
-
fn:
|
|
943
|
+
fn: W(() => [g(I(e.append), 1)]),
|
|
947
944
|
key: "1"
|
|
948
945
|
} : void 0]), 1040, [
|
|
949
946
|
"model-value",
|
|
@@ -953,11 +950,11 @@ var zt = {
|
|
|
953
950
|
"maxlength",
|
|
954
951
|
"type"
|
|
955
952
|
])),
|
|
956
|
-
e.rightText ? (
|
|
953
|
+
e.rightText ? (j(), p("div", {
|
|
957
954
|
key: 3,
|
|
958
|
-
class:
|
|
955
|
+
class: D(["k-form-input__side k-form-input__side--right", e.rightClass]),
|
|
959
956
|
onClick: n[1] ||= (...t) => e.rightClick && e.rightClick(...t)
|
|
960
|
-
},
|
|
957
|
+
}, I(e.rightText), 3)) : f("", !0)
|
|
961
958
|
], 8, Yt));
|
|
962
959
|
}
|
|
963
960
|
}), Qt = ["innerHTML"], $t = ["innerHTML"], en = ["innerHTML"], tn = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
@@ -985,7 +982,7 @@ var zt = {
|
|
|
985
982
|
},
|
|
986
983
|
emits: ["update:modelValue"],
|
|
987
984
|
setup(e, { emit: t }) {
|
|
988
|
-
let n = e, r = t, i =
|
|
985
|
+
let n = e, r = t, i = N(["", ""]);
|
|
989
986
|
function a(e, t) {
|
|
990
987
|
let n = e ?? t;
|
|
991
988
|
return typeof n == "number" ? `${n}px` : n;
|
|
@@ -1006,22 +1003,22 @@ var zt = {
|
|
|
1006
1003
|
};
|
|
1007
1004
|
}
|
|
1008
1005
|
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));
|
|
1009
|
-
|
|
1006
|
+
U(() => n.modelValue, (e) => {
|
|
1010
1007
|
Array.isArray(e) && (i.value = [String(e[0] ?? ""), String(e[1] ?? "")]);
|
|
1011
1008
|
}, { immediate: !0 });
|
|
1012
1009
|
function g(e, t) {
|
|
1013
1010
|
i.value[e] = t, r("update:modelValue", [...i.value]);
|
|
1014
1011
|
}
|
|
1015
|
-
return (t, n) => (
|
|
1016
|
-
e.leftText ? (
|
|
1012
|
+
return (t, n) => (j(), p("div", { class: D(["k-form-input-mix-input", { "k-form-input-mix-input--readonly": e.readonly }]) }, [
|
|
1013
|
+
e.leftText ? (j(), p("div", {
|
|
1017
1014
|
key: 0,
|
|
1018
1015
|
class: "k-form-input-mix-input__text",
|
|
1019
1016
|
innerHTML: e.leftText
|
|
1020
1017
|
}, null, 8, Qt)) : f("", !0),
|
|
1021
1018
|
m("div", {
|
|
1022
|
-
class:
|
|
1023
|
-
style:
|
|
1024
|
-
}, [_(Zt,
|
|
1019
|
+
class: D(["k-form-input-mix-input__control", { "k-form-input-mix-input__control--affix": c.value }]),
|
|
1020
|
+
style: O(e.readonly ? void 0 : d.value)
|
|
1021
|
+
}, [_(Zt, T({
|
|
1025
1022
|
clearable: e.clearable,
|
|
1026
1023
|
"model-value": i.value[0],
|
|
1027
1024
|
readonly: e.readonly,
|
|
@@ -1034,15 +1031,15 @@ var zt = {
|
|
|
1034
1031
|
"disabled",
|
|
1035
1032
|
"placeholder"
|
|
1036
1033
|
])], 6),
|
|
1037
|
-
e.centerText ? (
|
|
1034
|
+
e.centerText ? (j(), p("div", {
|
|
1038
1035
|
key: 1,
|
|
1039
1036
|
class: "k-form-input-mix-input__text",
|
|
1040
1037
|
innerHTML: e.centerText
|
|
1041
1038
|
}, null, 8, $t)) : f("", !0),
|
|
1042
1039
|
m("div", {
|
|
1043
|
-
class:
|
|
1044
|
-
style:
|
|
1045
|
-
}, [_(Zt,
|
|
1040
|
+
class: D(["k-form-input-mix-input__control", { "k-form-input-mix-input__control--affix": l.value }]),
|
|
1041
|
+
style: O(e.readonly ? void 0 : h.value)
|
|
1042
|
+
}, [_(Zt, T({
|
|
1046
1043
|
"model-value": i.value[1],
|
|
1047
1044
|
clearable: e.clearable,
|
|
1048
1045
|
readonly: e.readonly,
|
|
@@ -1055,7 +1052,7 @@ var zt = {
|
|
|
1055
1052
|
"disabled",
|
|
1056
1053
|
"placeholder"
|
|
1057
1054
|
])], 6),
|
|
1058
|
-
e.rightText ? (
|
|
1055
|
+
e.rightText ? (j(), p("div", {
|
|
1059
1056
|
key: 2,
|
|
1060
1057
|
class: "k-form-input-mix-input__text",
|
|
1061
1058
|
innerHTML: e.rightText
|
|
@@ -1106,7 +1103,7 @@ var zt = {
|
|
|
1106
1103
|
function l(e) {
|
|
1107
1104
|
r("update:modelValue", e);
|
|
1108
1105
|
}
|
|
1109
|
-
return (t, n) => (
|
|
1106
|
+
return (t, n) => (j(), p("div", T({ class: ["k-form-select", { "k-form-select--readonly": e.readonly }] }, t.$attrs), [e.readonly ? (j(), p("span", nn, I(s.value), 1)) : (j(), d(z(Pe), {
|
|
1110
1107
|
key: 1,
|
|
1111
1108
|
"model-value": e.multiple ? a.value : i.value,
|
|
1112
1109
|
placeholder: e.placeholder,
|
|
@@ -1116,7 +1113,7 @@ var zt = {
|
|
|
1116
1113
|
disabled: e.disabled,
|
|
1117
1114
|
"onUpdate:modelValue": l
|
|
1118
1115
|
}, {
|
|
1119
|
-
default:
|
|
1116
|
+
default: W(() => [(j(!0), p(c, null, P(o.value, (e) => (j(), d(z(De), {
|
|
1120
1117
|
key: e.key,
|
|
1121
1118
|
label: e.label,
|
|
1122
1119
|
value: e.value,
|
|
@@ -1184,7 +1181,7 @@ var zt = {
|
|
|
1184
1181
|
},
|
|
1185
1182
|
emits: ["update:modelValue"],
|
|
1186
1183
|
setup(e, { emit: t }) {
|
|
1187
|
-
let n = S(dt, null), r = e, i = t, a =
|
|
1184
|
+
let n = S(dt, null), r = e, i = t, a = N({}), o = N(""), s = N(""), l = u(() => r.inputProps.id ?? "input"), d = u(() => r.selectProps.id ?? "select"), h = u(() => {
|
|
1188
1185
|
let e = J(r.inputProps);
|
|
1189
1186
|
return delete e.id, e;
|
|
1190
1187
|
}), g = u(() => {
|
|
@@ -1211,8 +1208,8 @@ var zt = {
|
|
|
1211
1208
|
flex: "0 0 auto"
|
|
1212
1209
|
};
|
|
1213
1210
|
}
|
|
1214
|
-
let
|
|
1215
|
-
function
|
|
1211
|
+
let ee = u(() => y(r.inputProps)), C = u(() => y(r.selectProps)), w = u(() => x(r.selectWidth, "150px", r.selectProps)), E = u(() => x(r.inputWidth, "140px", r.inputProps));
|
|
1212
|
+
function te(e) {
|
|
1216
1213
|
let { dict: t, options: r = [] } = e;
|
|
1217
1214
|
return t && n?.getGroupOptions ? n.getGroupOptions(t) : r.map((e) => ({
|
|
1218
1215
|
label: String(e.label ?? ""),
|
|
@@ -1220,8 +1217,8 @@ var zt = {
|
|
|
1220
1217
|
disabled: e.disabled
|
|
1221
1218
|
}));
|
|
1222
1219
|
}
|
|
1223
|
-
let
|
|
1224
|
-
function
|
|
1220
|
+
let k = u(() => te(r.selectProps));
|
|
1221
|
+
function A() {
|
|
1225
1222
|
let e = a.value[l.value], t = a.value[d.value];
|
|
1226
1223
|
if (r.integrityCheck) {
|
|
1227
1224
|
e && t || r.inputHide ? i("update:modelValue", { ...a.value }) : i("update:modelValue", "");
|
|
@@ -1229,87 +1226,87 @@ var zt = {
|
|
|
1229
1226
|
}
|
|
1230
1227
|
i("update:modelValue", { ...a.value });
|
|
1231
1228
|
}
|
|
1232
|
-
function
|
|
1233
|
-
a.value[t] = e, o.value = String(a.value[l.value] ?? ""), s.value = a.value[d.value],
|
|
1229
|
+
function ne(e, t) {
|
|
1230
|
+
a.value[t] = e, o.value = String(a.value[l.value] ?? ""), s.value = a.value[d.value], A();
|
|
1234
1231
|
}
|
|
1235
|
-
return
|
|
1232
|
+
return U(() => r.modelValue, (e) => {
|
|
1236
1233
|
e && typeof e == "object" && !Array.isArray(e) && (a.value = J(e), o.value = String(a.value[l.value] ?? ""), s.value = a.value[d.value]);
|
|
1237
1234
|
}, {
|
|
1238
1235
|
immediate: !0,
|
|
1239
1236
|
deep: !0
|
|
1240
|
-
}), (t, n) => (
|
|
1237
|
+
}), (t, n) => (j(), p("div", { class: D(["k-form-input-mix-select", { "k-form-input-mix-select--readonly": e.readonly }]) }, [m("div", {
|
|
1241
1238
|
class: "k-form-input-mix-select__row",
|
|
1242
|
-
style:
|
|
1239
|
+
style: O(b.value)
|
|
1243
1240
|
}, [
|
|
1244
|
-
e.leftText ? (
|
|
1245
|
-
e.inputBefore ? (
|
|
1246
|
-
e.inputHide ? f("", !0) : (
|
|
1241
|
+
e.leftText ? (j(), p("div", an, I(e.leftText), 1)) : f("", !0),
|
|
1242
|
+
e.inputBefore ? (j(), p(c, { key: 1 }, [
|
|
1243
|
+
e.inputHide ? f("", !0) : (j(), p("div", {
|
|
1247
1244
|
key: 0,
|
|
1248
|
-
class:
|
|
1249
|
-
style:
|
|
1250
|
-
}, [_(Zt,
|
|
1245
|
+
class: D(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": ee.value }]),
|
|
1246
|
+
style: O(E.value)
|
|
1247
|
+
}, [_(Zt, T({
|
|
1251
1248
|
"model-value": o.value,
|
|
1252
1249
|
readonly: e.readonly,
|
|
1253
1250
|
disabled: e.disabled,
|
|
1254
1251
|
placeholder: e.inputPlaceholder
|
|
1255
|
-
}, h.value, { "onUpdate:modelValue": n[0] ||= (e) =>
|
|
1252
|
+
}, h.value, { "onUpdate:modelValue": n[0] ||= (e) => ne(e, l.value) }), null, 16, [
|
|
1256
1253
|
"model-value",
|
|
1257
1254
|
"readonly",
|
|
1258
1255
|
"disabled",
|
|
1259
1256
|
"placeholder"
|
|
1260
1257
|
])], 6)),
|
|
1261
|
-
e.centerText ? (
|
|
1258
|
+
e.centerText ? (j(), p("div", on, I(e.centerText), 1)) : f("", !0),
|
|
1262
1259
|
m("div", {
|
|
1263
|
-
class:
|
|
1264
|
-
style:
|
|
1265
|
-
}, [_(rn,
|
|
1260
|
+
class: D(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": C.value }]),
|
|
1261
|
+
style: O(w.value)
|
|
1262
|
+
}, [_(rn, T({
|
|
1266
1263
|
"model-value": s.value,
|
|
1267
1264
|
readonly: e.readonly,
|
|
1268
1265
|
disabled: e.disabled,
|
|
1269
|
-
options:
|
|
1266
|
+
options: k.value,
|
|
1270
1267
|
placeholder: e.selectPlaceholder
|
|
1271
|
-
}, g.value, { "onUpdate:modelValue": n[1] ||= (e) =>
|
|
1268
|
+
}, g.value, { "onUpdate:modelValue": n[1] ||= (e) => ne(e, d.value) }), null, 16, [
|
|
1272
1269
|
"model-value",
|
|
1273
1270
|
"readonly",
|
|
1274
1271
|
"disabled",
|
|
1275
1272
|
"options",
|
|
1276
1273
|
"placeholder"
|
|
1277
1274
|
])], 6)
|
|
1278
|
-
], 64)) : (
|
|
1275
|
+
], 64)) : (j(), p(c, { key: 2 }, [
|
|
1279
1276
|
m("div", {
|
|
1280
|
-
class:
|
|
1281
|
-
style:
|
|
1282
|
-
}, [_(rn,
|
|
1277
|
+
class: D(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": C.value }]),
|
|
1278
|
+
style: O(w.value)
|
|
1279
|
+
}, [_(rn, T({
|
|
1283
1280
|
"model-value": s.value,
|
|
1284
1281
|
readonly: e.readonly,
|
|
1285
1282
|
disabled: e.disabled,
|
|
1286
|
-
options:
|
|
1283
|
+
options: k.value,
|
|
1287
1284
|
placeholder: e.selectPlaceholder
|
|
1288
|
-
}, g.value, { "onUpdate:modelValue": n[2] ||= (e) =>
|
|
1285
|
+
}, g.value, { "onUpdate:modelValue": n[2] ||= (e) => ne(e, d.value) }), null, 16, [
|
|
1289
1286
|
"model-value",
|
|
1290
1287
|
"readonly",
|
|
1291
1288
|
"disabled",
|
|
1292
1289
|
"options",
|
|
1293
1290
|
"placeholder"
|
|
1294
1291
|
])], 6),
|
|
1295
|
-
e.centerText ? (
|
|
1296
|
-
e.inputHide ? f("", !0) : (
|
|
1292
|
+
e.centerText ? (j(), p("div", sn, I(e.centerText), 1)) : f("", !0),
|
|
1293
|
+
e.inputHide ? f("", !0) : (j(), p("div", {
|
|
1297
1294
|
key: 1,
|
|
1298
|
-
class:
|
|
1299
|
-
style:
|
|
1300
|
-
}, [_(Zt,
|
|
1295
|
+
class: D(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": ee.value }]),
|
|
1296
|
+
style: O(E.value)
|
|
1297
|
+
}, [_(Zt, T({
|
|
1301
1298
|
"model-value": o.value,
|
|
1302
1299
|
readonly: e.readonly,
|
|
1303
1300
|
disabled: e.disabled,
|
|
1304
1301
|
placeholder: e.inputPlaceholder
|
|
1305
|
-
}, h.value, { "onUpdate:modelValue": n[3] ||= (e) =>
|
|
1302
|
+
}, h.value, { "onUpdate:modelValue": n[3] ||= (e) => ne(e, l.value) }), null, 16, [
|
|
1306
1303
|
"model-value",
|
|
1307
1304
|
"readonly",
|
|
1308
1305
|
"disabled",
|
|
1309
1306
|
"placeholder"
|
|
1310
1307
|
])], 6))
|
|
1311
1308
|
], 64)),
|
|
1312
|
-
e.rightText && !e.inputHide ? (
|
|
1309
|
+
e.rightText && !e.inputHide ? (j(), p("div", cn, I(e.rightText), 1)) : f("", !0)
|
|
1313
1310
|
], 4)], 2));
|
|
1314
1311
|
}
|
|
1315
1312
|
}), [["__scopeId", "data-v-1f46ef39"]]), un = { class: "k-form-input-number" }, dn = {
|
|
@@ -1350,9 +1347,9 @@ var zt = {
|
|
|
1350
1347
|
}
|
|
1351
1348
|
r("update:modelValue", e);
|
|
1352
1349
|
}
|
|
1353
|
-
return (t, n) => (
|
|
1354
|
-
e.leftText ? (
|
|
1355
|
-
e.readonly ? (
|
|
1350
|
+
return (t, n) => (j(), p("div", un, [
|
|
1351
|
+
e.leftText ? (j(), p("div", dn, I(e.leftText), 1)) : f("", !0),
|
|
1352
|
+
e.readonly ? (j(), p("span", fn, I(z(Q)(i.value)), 1)) : (j(), d(z(Te), {
|
|
1356
1353
|
key: 2,
|
|
1357
1354
|
"model-value": i.value,
|
|
1358
1355
|
min: e.min,
|
|
@@ -1365,7 +1362,7 @@ var zt = {
|
|
|
1365
1362
|
"max",
|
|
1366
1363
|
"disabled"
|
|
1367
1364
|
])),
|
|
1368
|
-
e.rightText ? (
|
|
1365
|
+
e.rightText ? (j(), p("div", pn, I(e.rightText), 1)) : f("", !0)
|
|
1369
1366
|
]));
|
|
1370
1367
|
}
|
|
1371
1368
|
}), [["__scopeId", "data-v-acdc4199"]]), hn = { class: "k-form-radio" }, gn = {
|
|
@@ -1387,25 +1384,25 @@ var zt = {
|
|
|
1387
1384
|
function o(e) {
|
|
1388
1385
|
r("update:modelValue", e);
|
|
1389
1386
|
}
|
|
1390
|
-
return (t, n) => (
|
|
1387
|
+
return (t, n) => (j(), p("div", hn, [e.readonly ? (j(), p("span", gn, I(a.value), 1)) : (j(), d(z(Ne), {
|
|
1391
1388
|
key: 1,
|
|
1392
1389
|
"model-value": i.value,
|
|
1393
1390
|
disabled: e.disabled,
|
|
1394
1391
|
"onUpdate:modelValue": o
|
|
1395
1392
|
}, {
|
|
1396
|
-
default:
|
|
1393
|
+
default: W(() => [(j(!0), p(c, null, P(e.options, (t) => (j(), p(c, { key: String(t.value) }, [e.type === "button" ? (j(), d(z(Me), {
|
|
1397
1394
|
key: 0,
|
|
1398
|
-
value:
|
|
1395
|
+
value: z(Z)(t.value),
|
|
1399
1396
|
disabled: t.disabled
|
|
1400
1397
|
}, {
|
|
1401
|
-
default:
|
|
1398
|
+
default: W(() => [g(I(t.label), 1)]),
|
|
1402
1399
|
_: 2
|
|
1403
|
-
}, 1032, ["value", "disabled"])) : (
|
|
1400
|
+
}, 1032, ["value", "disabled"])) : (j(), d(z(je), {
|
|
1404
1401
|
key: 1,
|
|
1405
|
-
value:
|
|
1402
|
+
value: z(Z)(t.value),
|
|
1406
1403
|
disabled: t.disabled
|
|
1407
1404
|
}, {
|
|
1408
|
-
default:
|
|
1405
|
+
default: W(() => [g(I(t.label), 1)]),
|
|
1409
1406
|
_: 2
|
|
1410
1407
|
}, 1032, ["value", "disabled"]))], 64))), 128))]),
|
|
1411
1408
|
_: 1
|
|
@@ -1437,7 +1434,7 @@ var zt = {
|
|
|
1437
1434
|
},
|
|
1438
1435
|
emits: ["update:modelValue"],
|
|
1439
1436
|
setup(e, { emit: t }) {
|
|
1440
|
-
let n = e, r = t, i =
|
|
1437
|
+
let n = e, r = t, i = N(n.options?.[0]?.value ?? ""), a = N(""), o = u(() => i.value === n.showInput);
|
|
1441
1438
|
function s() {
|
|
1442
1439
|
let e = Number(n.inputProps?.min ?? 1);
|
|
1443
1440
|
return Number.isFinite(e) ? e : 1;
|
|
@@ -1456,7 +1453,7 @@ var zt = {
|
|
|
1456
1453
|
let e = Number(a.value);
|
|
1457
1454
|
return Number.isFinite(e) ? e : null;
|
|
1458
1455
|
});
|
|
1459
|
-
|
|
1456
|
+
U(() => n.modelValue, (e) => {
|
|
1460
1457
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
1461
1458
|
let t = e;
|
|
1462
1459
|
t.radio !== void 0 && (i.value = t.radio), t.input !== void 0 && (a.value = m(t.input));
|
|
@@ -1483,11 +1480,11 @@ var zt = {
|
|
|
1483
1480
|
}
|
|
1484
1481
|
r("update:modelValue", {});
|
|
1485
1482
|
}
|
|
1486
|
-
|
|
1483
|
+
U([i, a], v, { immediate: !0 });
|
|
1487
1484
|
function y(e) {
|
|
1488
1485
|
e === n.showInput && n.type === "inputNumber" && l(a.value) && (a.value = s()), i.value = e;
|
|
1489
1486
|
}
|
|
1490
|
-
return (t, n) => (
|
|
1487
|
+
return (t, n) => (j(), p("div", { class: D(["k-form-radio-input", { "k-form-radio-input--readonly": e.readonly }]) }, [
|
|
1491
1488
|
_(_n, {
|
|
1492
1489
|
"model-value": i.value,
|
|
1493
1490
|
options: e.options,
|
|
@@ -1501,9 +1498,9 @@ var zt = {
|
|
|
1501
1498
|
"readonly",
|
|
1502
1499
|
"disabled"
|
|
1503
1500
|
]),
|
|
1504
|
-
!e.readonly && o.value ? (
|
|
1505
|
-
e.leftText ? (
|
|
1506
|
-
e.type === "inputNumber" ? (
|
|
1501
|
+
!e.readonly && o.value ? (j(), p(c, { key: 0 }, [
|
|
1502
|
+
e.leftText ? (j(), p("label", vn, I(e.leftText), 1)) : f("", !0),
|
|
1503
|
+
e.type === "inputNumber" ? (j(), d(z(Te), T({
|
|
1507
1504
|
key: 1,
|
|
1508
1505
|
"model-value": h.value,
|
|
1509
1506
|
class: "k-form-radio-input__input",
|
|
@@ -1513,7 +1510,7 @@ var zt = {
|
|
|
1513
1510
|
"model-value",
|
|
1514
1511
|
"placeholder",
|
|
1515
1512
|
"disabled"
|
|
1516
|
-
])) : (
|
|
1513
|
+
])) : (j(), d(z(we), T({
|
|
1517
1514
|
key: 2,
|
|
1518
1515
|
modelValue: a.value,
|
|
1519
1516
|
"onUpdate:modelValue": n[1] ||= (e) => a.value = e,
|
|
@@ -1525,12 +1522,12 @@ var zt = {
|
|
|
1525
1522
|
"placeholder",
|
|
1526
1523
|
"disabled"
|
|
1527
1524
|
])),
|
|
1528
|
-
e.rightText ? (
|
|
1525
|
+
e.rightText ? (j(), p("label", yn, I(e.rightText), 1)) : f("", !0)
|
|
1529
1526
|
], 64)) : f("", !0),
|
|
1530
|
-
e.readonly && o.value ? (
|
|
1531
|
-
e.leftText ? (
|
|
1532
|
-
g(" " +
|
|
1533
|
-
e.rightText ? (
|
|
1527
|
+
e.readonly && o.value ? (j(), p("div", bn, [
|
|
1528
|
+
e.leftText ? (j(), p("label", xn, I(e.leftText), 1)) : f("", !0),
|
|
1529
|
+
g(" " + I(a.value) + " ", 1),
|
|
1530
|
+
e.rightText ? (j(), p("label", Sn, I(e.rightText), 1)) : f("", !0)
|
|
1534
1531
|
])) : f("", !0)
|
|
1535
1532
|
], 2));
|
|
1536
1533
|
}
|
|
@@ -1568,15 +1565,15 @@ var zt = {
|
|
|
1568
1565
|
},
|
|
1569
1566
|
emits: ["update:modelValue"],
|
|
1570
1567
|
setup(e, { emit: t }) {
|
|
1571
|
-
let n = e, r = t, i =
|
|
1572
|
-
|
|
1568
|
+
let n = e, r = t, i = N([]), a = N(!1), o = N(!1), s = N(1), l = N(""), f = N(null), m = N(n.multiple ? [] : "");
|
|
1569
|
+
U(() => n.modelValue, (e) => {
|
|
1573
1570
|
m.value = n.multiple ? kt(e) : Z(e);
|
|
1574
|
-
}, { immediate: !0 }),
|
|
1571
|
+
}, { immediate: !0 }), U(() => n.defaultSelectedStr, (e) => {
|
|
1575
1572
|
e?.length && (i.value = [...i.value, ...e]);
|
|
1576
1573
|
}, {
|
|
1577
1574
|
immediate: !0,
|
|
1578
1575
|
deep: !0
|
|
1579
|
-
}),
|
|
1576
|
+
}), U(() => n.getListParams, () => {
|
|
1580
1577
|
m.value = n.multiple ? [] : "", i.value = [], s.value = 1, o.value = !1, h();
|
|
1581
1578
|
}, { deep: !0 });
|
|
1582
1579
|
async function h() {
|
|
@@ -1614,7 +1611,7 @@ var zt = {
|
|
|
1614
1611
|
f.value = null;
|
|
1615
1612
|
return;
|
|
1616
1613
|
}
|
|
1617
|
-
|
|
1614
|
+
E(() => {
|
|
1618
1615
|
f.value = document.querySelector(".k-form-scroll-select__dropdown .el-select-dropdown__wrap");
|
|
1619
1616
|
});
|
|
1620
1617
|
}
|
|
@@ -1629,7 +1626,7 @@ var zt = {
|
|
|
1629
1626
|
let e = Z(m.value), t = i.value.find((t) => t.value === e);
|
|
1630
1627
|
return t ? String(t.label ?? t.name ?? t.value) : Q(e);
|
|
1631
1628
|
});
|
|
1632
|
-
return h(), (t, n) => e.readonly ? (
|
|
1629
|
+
return h(), (t, n) => e.readonly ? (j(), p("span", wn, I(S.value), 1)) : (j(), d(z(Pe), {
|
|
1633
1630
|
key: 1,
|
|
1634
1631
|
"model-value": m.value,
|
|
1635
1632
|
remote: "",
|
|
@@ -1644,11 +1641,11 @@ var zt = {
|
|
|
1644
1641
|
onVisibleChange: b,
|
|
1645
1642
|
"onUpdate:modelValue": x
|
|
1646
1643
|
}, {
|
|
1647
|
-
default:
|
|
1644
|
+
default: W(() => [(j(!0), p(c, null, P(i.value, (e, t) => le((j(), d(z(De), {
|
|
1648
1645
|
key: `${e.value}-${t}`,
|
|
1649
1646
|
label: String(e.label ?? ""),
|
|
1650
1647
|
value: e.value
|
|
1651
|
-
}, null, 8, ["label", "value"])), [[
|
|
1648
|
+
}, null, 8, ["label", "value"])), [[ce, e.isShow !== !1]])), 128))]),
|
|
1652
1649
|
_: 1
|
|
1653
1650
|
}, 8, [
|
|
1654
1651
|
"model-value",
|
|
@@ -1677,7 +1674,7 @@ var zt = {
|
|
|
1677
1674
|
},
|
|
1678
1675
|
emits: ["update:modelValue"],
|
|
1679
1676
|
setup(e, { emit: t }) {
|
|
1680
|
-
let n = e, r = t, i =
|
|
1677
|
+
let n = e, r = t, i = N([]), a = u(() => {
|
|
1681
1678
|
let e = n.options ?? [];
|
|
1682
1679
|
return !n.showAllItem || e.some((e) => e.value === Dn) ? e : [{
|
|
1683
1680
|
label: "全选",
|
|
@@ -1692,7 +1689,7 @@ var zt = {
|
|
|
1692
1689
|
let e = o.value.filter((e) => i.value.includes(e.value)).map((e) => e.label);
|
|
1693
1690
|
return e.length ? e.join(", ") : Q(i.value);
|
|
1694
1691
|
});
|
|
1695
|
-
|
|
1692
|
+
U(() => n.modelValue, (e) => {
|
|
1696
1693
|
i.value = kt(e);
|
|
1697
1694
|
}, { immediate: !0 });
|
|
1698
1695
|
function f(e, t) {
|
|
@@ -1707,7 +1704,7 @@ var zt = {
|
|
|
1707
1704
|
function h(e) {
|
|
1708
1705
|
f(e, m), m = [...i.value];
|
|
1709
1706
|
}
|
|
1710
|
-
return (t, n) => e.readonly ? (
|
|
1707
|
+
return (t, n) => e.readonly ? (j(), p("span", En, I(l.value), 1)) : (j(), d(z(Pe), {
|
|
1711
1708
|
key: 1,
|
|
1712
1709
|
"model-value": i.value,
|
|
1713
1710
|
multiple: "",
|
|
@@ -1718,7 +1715,7 @@ var zt = {
|
|
|
1718
1715
|
class: "k-form-select-multiple",
|
|
1719
1716
|
"onUpdate:modelValue": h
|
|
1720
1717
|
}, {
|
|
1721
|
-
default:
|
|
1718
|
+
default: W(() => [(j(!0), p(c, null, P(o.value, (e) => (j(), d(z(De), {
|
|
1722
1719
|
key: e.key,
|
|
1723
1720
|
label: e.label,
|
|
1724
1721
|
value: e.value,
|
|
@@ -1766,7 +1763,7 @@ var zt = {
|
|
|
1766
1763
|
},
|
|
1767
1764
|
emits: ["update:modelValue"],
|
|
1768
1765
|
setup(e, { emit: t }) {
|
|
1769
|
-
let n = e, r = t, i =
|
|
1766
|
+
let n = e, r = t, i = N([]), a = u(() => n.hasDefaultOption || n.hasAllTag), o = u(() => {
|
|
1770
1767
|
let e = (n.options ?? []).map((e) => ({
|
|
1771
1768
|
label: e.label,
|
|
1772
1769
|
value: String(e.value)
|
|
@@ -1785,7 +1782,7 @@ var zt = {
|
|
|
1785
1782
|
let t = Z(e);
|
|
1786
1783
|
i.value = t ? [String(t)] : [];
|
|
1787
1784
|
}
|
|
1788
|
-
|
|
1785
|
+
U(() => n.modelValue, s, { immediate: !0 });
|
|
1789
1786
|
function l() {
|
|
1790
1787
|
if (n.multiple) {
|
|
1791
1788
|
r("update:modelValue", [...i.value]);
|
|
@@ -1802,15 +1799,15 @@ var zt = {
|
|
|
1802
1799
|
let t = ["k-form-tag__item"];
|
|
1803
1800
|
return n.disabled && t.push("is-disabled"), n.readonly && t.push("is-readonly"), i.value.includes(e) && t.push("is-active"), t.join(" ");
|
|
1804
1801
|
}
|
|
1805
|
-
return (e, t) => (
|
|
1802
|
+
return (e, t) => (j(), p("div", kn, [(j(!0), p(c, null, P(o.value, (e) => (j(), d(z(Ie), {
|
|
1806
1803
|
key: e.value || "__all__",
|
|
1807
|
-
class:
|
|
1804
|
+
class: D(["k-form-tag__item", m(e.value)]),
|
|
1808
1805
|
type: "info",
|
|
1809
1806
|
effect: "plain",
|
|
1810
1807
|
"disable-transitions": !0,
|
|
1811
1808
|
onClick: (t) => f(e.value)
|
|
1812
1809
|
}, {
|
|
1813
|
-
default:
|
|
1810
|
+
default: W(() => [g(I(e.label), 1)]),
|
|
1814
1811
|
_: 2
|
|
1815
1812
|
}, 1032, ["class", "onClick"]))), 128))]));
|
|
1816
1813
|
}
|
|
@@ -1825,7 +1822,7 @@ var zt = {
|
|
|
1825
1822
|
},
|
|
1826
1823
|
setup(e) {
|
|
1827
1824
|
let t = e, n = u(() => Ot(t.modelValue));
|
|
1828
|
-
return (e, t) => (
|
|
1825
|
+
return (e, t) => (j(), p("div", jn, [m("p", null, I(n.value), 1)]));
|
|
1829
1826
|
}
|
|
1830
1827
|
}), [["__scopeId", "data-v-9dc35114"]]), Nn = { class: "k-form-time-picker" }, Pn = ["innerHTML"], Fn = {
|
|
1831
1828
|
key: 1,
|
|
@@ -1891,14 +1888,14 @@ var zt = {
|
|
|
1891
1888
|
function g(e) {
|
|
1892
1889
|
r("update:modelValue", e);
|
|
1893
1890
|
}
|
|
1894
|
-
return (t, n) => (
|
|
1895
|
-
e.prepend ? (
|
|
1891
|
+
return (t, n) => (j(), p("div", Nn, [
|
|
1892
|
+
e.prepend ? (j(), p("span", {
|
|
1896
1893
|
key: 0,
|
|
1897
1894
|
class: "k-form-time-picker__text",
|
|
1898
1895
|
innerHTML: e.prepend
|
|
1899
1896
|
}, null, 8, Pn)) : f("", !0),
|
|
1900
|
-
e.leftText ? (
|
|
1901
|
-
e.readonly ? (
|
|
1897
|
+
e.leftText ? (j(), p("span", Fn, I(e.leftText), 1)) : f("", !0),
|
|
1898
|
+
e.readonly ? (j(), p("span", In, I(c.value), 1)) : (j(), d(z(Le), {
|
|
1902
1899
|
key: 3,
|
|
1903
1900
|
"model-value": i.value,
|
|
1904
1901
|
"is-range": o.value,
|
|
@@ -1927,8 +1924,8 @@ var zt = {
|
|
|
1927
1924
|
"disabled-minutes",
|
|
1928
1925
|
"disabled-seconds"
|
|
1929
1926
|
])),
|
|
1930
|
-
e.rightText ? (
|
|
1931
|
-
e.append ? (
|
|
1927
|
+
e.rightText ? (j(), p("span", Ln, I(e.rightText), 1)) : f("", !0),
|
|
1928
|
+
e.append ? (j(), p("span", {
|
|
1932
1929
|
key: 5,
|
|
1933
1930
|
class: "k-form-time-picker__text",
|
|
1934
1931
|
innerHTML: e.append
|
|
@@ -1964,7 +1961,7 @@ var zt = {
|
|
|
1964
1961
|
emits: ["update:modelValue"],
|
|
1965
1962
|
setup(e, { emit: t }) {
|
|
1966
1963
|
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));
|
|
1967
|
-
return (t, n) => (
|
|
1964
|
+
return (t, n) => (j(), p("div", Bn, [e.readonly ? (j(), p("div", Vn, I(o.value), 1)) : (j(), d(z(ze), {
|
|
1968
1965
|
key: 1,
|
|
1969
1966
|
"model-value": i.value,
|
|
1970
1967
|
data: a.value,
|
|
@@ -2001,15 +1998,15 @@ var zt = {
|
|
|
2001
1998
|
],
|
|
2002
1999
|
setup(e, { emit: t }) {
|
|
2003
2000
|
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)));
|
|
2004
|
-
return (t, n) => (
|
|
2001
|
+
return (t, n) => (j(), p("div", Un, [i.value ? (j(), p("button", {
|
|
2005
2002
|
key: 0,
|
|
2006
2003
|
type: "button",
|
|
2007
2004
|
class: "k-upload__media-play",
|
|
2008
2005
|
onClick: n[0] ||= (t) => r("play", e.file)
|
|
2009
|
-
}, [_(
|
|
2010
|
-
default:
|
|
2006
|
+
}, [_(z(Se), null, {
|
|
2007
|
+
default: W(() => [_(z(Je))]),
|
|
2011
2008
|
_: 1
|
|
2012
|
-
})])) : (
|
|
2009
|
+
})])) : (j(), p(c, { key: 1 }, [F(t.$slots, "preview", { file: e.file }, () => [m("img", {
|
|
2013
2010
|
class: "el-upload-list__item-thumbnail",
|
|
2014
2011
|
src: e.file.url,
|
|
2015
2012
|
alt: ""
|
|
@@ -2017,27 +2014,27 @@ var zt = {
|
|
|
2017
2014
|
m("span", {
|
|
2018
2015
|
class: "el-upload-list__item-preview",
|
|
2019
2016
|
onClick: n[1] ||= (t) => r("zoom", e.file)
|
|
2020
|
-
}, [_(
|
|
2021
|
-
default:
|
|
2017
|
+
}, [_(z(Se), null, {
|
|
2018
|
+
default: W(() => [_(z(Ye))]),
|
|
2022
2019
|
_: 1
|
|
2023
2020
|
})]),
|
|
2024
|
-
e.disabled ? f("", !0) : (
|
|
2021
|
+
e.disabled ? f("", !0) : (j(), p("span", {
|
|
2025
2022
|
key: 0,
|
|
2026
2023
|
class: "el-upload-list__item-download",
|
|
2027
2024
|
onClick: n[2] ||= (t) => r("download", e.file)
|
|
2028
|
-
}, [_(
|
|
2029
|
-
default:
|
|
2025
|
+
}, [_(z(Se), null, {
|
|
2026
|
+
default: W(() => [_(z(Ge))]),
|
|
2030
2027
|
_: 1
|
|
2031
2028
|
})])),
|
|
2032
|
-
e.disabled ? f("", !0) : (
|
|
2029
|
+
e.disabled ? f("", !0) : (j(), p("span", {
|
|
2033
2030
|
key: 1,
|
|
2034
2031
|
class: "el-upload-list__item-delete",
|
|
2035
2032
|
onClick: n[3] ||= (t) => r("remove", e.file)
|
|
2036
|
-
}, [_(
|
|
2037
|
-
default:
|
|
2033
|
+
}, [_(z(Se), null, {
|
|
2034
|
+
default: W(() => [_(z(We))]),
|
|
2038
2035
|
_: 1
|
|
2039
2036
|
})]))
|
|
2040
|
-
])], 64)), a.value ? (
|
|
2037
|
+
])], 64)), a.value ? (j(), d(z(Ae), {
|
|
2041
2038
|
key: 2,
|
|
2042
2039
|
class: "k-upload__file-progress",
|
|
2043
2040
|
type: e.listType === "picture-card" || e.listType === "lottie" ? "circle" : "line",
|
|
@@ -2063,20 +2060,20 @@ var zt = {
|
|
|
2063
2060
|
emits: ["downloadTemplate"],
|
|
2064
2061
|
setup(e, { emit: t }) {
|
|
2065
2062
|
let n = t;
|
|
2066
|
-
return (t, r) => (
|
|
2063
|
+
return (t, r) => (j(), p("div", qn, [e.templateCode ? (j(), p("button", {
|
|
2067
2064
|
key: 0,
|
|
2068
2065
|
type: "button",
|
|
2069
2066
|
class: "k-upload__download",
|
|
2070
|
-
onClick: r[0] ||=
|
|
2071
|
-
}, [_(
|
|
2072
|
-
default:
|
|
2067
|
+
onClick: r[0] ||= ue((e) => n("downloadTemplate"), ["stop"])
|
|
2068
|
+
}, [_(z(Se), { class: "k-upload__download-icon" }, {
|
|
2069
|
+
default: W(() => [_(z(Ge))]),
|
|
2073
2070
|
_: 1
|
|
2074
|
-
}), m("span", null,
|
|
2071
|
+
}), m("span", null, I(e.templateBtnText), 1)])) : f("", !0), e.tipType === "tooltip" && e.tipText ? (j(), d(z(Re), {
|
|
2075
2072
|
key: 1,
|
|
2076
2073
|
placement: "top",
|
|
2077
2074
|
content: e.tipText
|
|
2078
2075
|
}, {
|
|
2079
|
-
default:
|
|
2076
|
+
default: W(() => [...r[1] ||= [m("i", {
|
|
2080
2077
|
class: "k-upload__tip-icon",
|
|
2081
2078
|
"aria-label": "上传说明"
|
|
2082
2079
|
}, "?", -1)]]),
|
|
@@ -2086,7 +2083,7 @@ var zt = {
|
|
|
2086
2083
|
}), [["__scopeId", "data-v-55d9c320"]]), Yn = { class: "k-upload__media-wrap" }, Xn = ["src"], Zn = ["src"], Qn = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
2087
2084
|
name: "KUploadMediaDialog",
|
|
2088
2085
|
__name: "UploadMediaDialog",
|
|
2089
|
-
props: /*@__PURE__*/
|
|
2086
|
+
props: /*@__PURE__*/ w({
|
|
2090
2087
|
url: {},
|
|
2091
2088
|
type: {}
|
|
2092
2089
|
}, {
|
|
@@ -2098,8 +2095,8 @@ var zt = {
|
|
|
2098
2095
|
}),
|
|
2099
2096
|
emits: ["update:visible"],
|
|
2100
2097
|
setup(e) {
|
|
2101
|
-
let t =
|
|
2102
|
-
return (n, r) => (
|
|
2098
|
+
let t = se(e, "visible");
|
|
2099
|
+
return (n, r) => (j(), d(ut, {
|
|
2103
2100
|
visible: t.value,
|
|
2104
2101
|
"onUpdate:visible": r[0] ||= (e) => t.value = e,
|
|
2105
2102
|
"show-confirm": !1,
|
|
@@ -2107,12 +2104,12 @@ var zt = {
|
|
|
2107
2104
|
width: "640px",
|
|
2108
2105
|
title: "预览"
|
|
2109
2106
|
}, {
|
|
2110
|
-
default:
|
|
2107
|
+
default: W(() => [m("div", Yn, [e.type === "video" ? (j(), p("video", {
|
|
2111
2108
|
key: 0,
|
|
2112
2109
|
src: e.url,
|
|
2113
2110
|
controls: "",
|
|
2114
2111
|
class: "k-upload__media"
|
|
2115
|
-
}, "您的浏览器不支持视频播放", 8, Xn)) : (
|
|
2112
|
+
}, "您的浏览器不支持视频播放", 8, Xn)) : (j(), p("audio", {
|
|
2116
2113
|
key: 1,
|
|
2117
2114
|
src: e.url,
|
|
2118
2115
|
controls: "",
|
|
@@ -2130,11 +2127,11 @@ var zt = {
|
|
|
2130
2127
|
percentage: { default: 0 }
|
|
2131
2128
|
},
|
|
2132
2129
|
setup(e) {
|
|
2133
|
-
return (t, n) => (
|
|
2130
|
+
return (t, n) => (j(), p("div", $n, [e.tipType === "text" && e.tipText ? (j(), p("div", {
|
|
2134
2131
|
key: 0,
|
|
2135
2132
|
class: "el-upload__tip",
|
|
2136
2133
|
innerHTML: e.tipText
|
|
2137
|
-
}, null, 8, er)) : f("", !0), e.percentage > 0 ? (
|
|
2134
|
+
}, null, 8, er)) : f("", !0), e.percentage > 0 ? (j(), d(z(Ae), {
|
|
2138
2135
|
key: 1,
|
|
2139
2136
|
class: "k-upload__progress",
|
|
2140
2137
|
percentage: e.percentage,
|
|
@@ -2145,7 +2142,7 @@ var zt = {
|
|
|
2145
2142
|
//#endregion
|
|
2146
2143
|
//#region src/components/k-upload/composables/useImagePreview.ts
|
|
2147
2144
|
function nr() {
|
|
2148
|
-
let e =
|
|
2145
|
+
let e = N(!1), t = N([]), n = N(0);
|
|
2149
2146
|
function r(r, i) {
|
|
2150
2147
|
let a = i.map((e) => e.url).filter((e) => !!e), o = r.url;
|
|
2151
2148
|
if (o && !a.includes(o) && a.unshift(o), !a.length) return !1;
|
|
@@ -2166,7 +2163,7 @@ function nr() {
|
|
|
2166
2163
|
//#endregion
|
|
2167
2164
|
//#region src/components/k-upload/composables/useMediaPreview.ts
|
|
2168
2165
|
function rr() {
|
|
2169
|
-
let e =
|
|
2166
|
+
let e = N(!1), t = N(""), n = N("video");
|
|
2170
2167
|
function r(r, i) {
|
|
2171
2168
|
r.url && (t.value = r.url, n.value = i, e.value = !0);
|
|
2172
2169
|
}
|
|
@@ -2187,8 +2184,8 @@ function ir(e, t) {
|
|
|
2187
2184
|
return String(e) === String(t);
|
|
2188
2185
|
}
|
|
2189
2186
|
function ar(e) {
|
|
2190
|
-
let t =
|
|
2191
|
-
|
|
2187
|
+
let t = N([]);
|
|
2188
|
+
U(() => e.getModelValue(), (e) => {
|
|
2192
2189
|
t.value = Array.isArray(e) ? e.map((e) => ({ ...e })) : [];
|
|
2193
2190
|
}, {
|
|
2194
2191
|
immediate: !0,
|
|
@@ -2360,8 +2357,8 @@ var fr = {
|
|
|
2360
2357
|
let n = e instanceof Error ? e.message : String(e ?? "");
|
|
2361
2358
|
return /timeout/i.test(n) || /ECONNABORTED/i.test(n) ? "请求超时,请稍后重试" : n || t;
|
|
2362
2359
|
}
|
|
2363
|
-
let o = e, c = n, l =
|
|
2364
|
-
|
|
2360
|
+
let o = e, c = n, l = N(), y = H("cutterRef"), x = N(null), S = N(0);
|
|
2361
|
+
U(y, (e) => {
|
|
2365
2362
|
if (!e || !x.value) return;
|
|
2366
2363
|
let t = x.value;
|
|
2367
2364
|
x.value = null, e.openImgCutter({
|
|
@@ -2369,7 +2366,7 @@ var fr = {
|
|
|
2369
2366
|
raw: t.raw
|
|
2370
2367
|
});
|
|
2371
2368
|
});
|
|
2372
|
-
function
|
|
2369
|
+
function C(e) {
|
|
2373
2370
|
if (y.value) {
|
|
2374
2371
|
y.value.openImgCutter({
|
|
2375
2372
|
name: e.name,
|
|
@@ -2379,14 +2376,14 @@ var fr = {
|
|
|
2379
2376
|
}
|
|
2380
2377
|
x.value = e;
|
|
2381
2378
|
}
|
|
2382
|
-
let
|
|
2379
|
+
let w = u(() => o.accept ? o.accept.toLowerCase() : i[o.listType] ?? ""), { fileList: O, elFileList: k, removeByUid: A, upsert: ne, findByUid: M } = ar({
|
|
2383
2380
|
getModelValue: () => o.modelValue,
|
|
2384
2381
|
onUpdate: (e) => c("update:modelValue", e),
|
|
2385
2382
|
getLimit: () => o.limit
|
|
2386
|
-
}),
|
|
2387
|
-
getAccept: () =>
|
|
2383
|
+
}), P = lr({
|
|
2384
|
+
getAccept: () => w.value,
|
|
2388
2385
|
getMaxSize: () => o.maxSize
|
|
2389
|
-
}),
|
|
2386
|
+
}), re = cr({ getTemplateCode: () => o.templateCode }), { visible: ie, urlList: ae, initialIndex: oe, open: L, close: R } = nr(), { visible: B, url: se, type: V, open: ce } = rr(), le = u(() => ur(o.listType, o.action)), ue = u(() => {
|
|
2390
2387
|
switch (o.listType) {
|
|
2391
2388
|
case "picture": return "picture";
|
|
2392
2389
|
case "picture-card":
|
|
@@ -2394,19 +2391,19 @@ var fr = {
|
|
|
2394
2391
|
case "lottie": return "picture-card";
|
|
2395
2392
|
default: return "text";
|
|
2396
2393
|
}
|
|
2397
|
-
}),
|
|
2394
|
+
}), de = u(() => [
|
|
2398
2395
|
"picture",
|
|
2399
2396
|
"picture-card",
|
|
2400
2397
|
"picture2",
|
|
2401
2398
|
"lottie"
|
|
2402
|
-
].includes(o.listType)),
|
|
2399
|
+
].includes(o.listType)), fe = u(() => [
|
|
2403
2400
|
"picture-card",
|
|
2404
2401
|
"lottie",
|
|
2405
2402
|
"video",
|
|
2406
2403
|
"audio"
|
|
2407
|
-
].includes(o.listType)),
|
|
2404
|
+
].includes(o.listType)), pe = u(() => o.listType === "picture-card" || o.listType === "lottie"), me = u(() => !pe.value), he = u(() => !o.openCutter && o.autoUpload), ge = u(() => o.limit === 1 ? void 0 : o.limit), _e = u(() => !!(o.limit && o.limit !== 1 && O.value.length >= o.limit)), ve = u(() => !o.disabled), ye = u(() => !pe.value && !o.disabled), G = u(() => o.disabled ? "" : o.fileTips || (w.value ? `支持上传 ${w.value} 后缀文件,且不超过${o.maxSize}M` : "")), be = u(() => {
|
|
2408
2405
|
let e = ["k-upload", `k-upload--${o.listType}`];
|
|
2409
|
-
return o.disabled && e.push("k-upload_detail"),
|
|
2406
|
+
return o.disabled && e.push("k-upload_detail"), _e.value && e.push("k-upload--limit"), e.join(" ");
|
|
2410
2407
|
});
|
|
2411
2408
|
function xe(e, t, n) {
|
|
2412
2409
|
let r = e ?? {}, i = String(r.resource_id ?? ""), a = String(r.file_name ?? n), s = dr(o.listType);
|
|
@@ -2423,29 +2420,29 @@ var fr = {
|
|
|
2423
2420
|
}
|
|
2424
2421
|
function we(e, t, n) {
|
|
2425
2422
|
let r = xe(e, t, n);
|
|
2426
|
-
|
|
2423
|
+
ne(r), S.value = 0, o.showSuccMessage && Ee.success("文件上传成功!"), c("success", e, r);
|
|
2427
2424
|
}
|
|
2428
|
-
let Te = (e) =>
|
|
2425
|
+
let Te = (e) => P.validate(e), De = (e, t) => {
|
|
2429
2426
|
we(e ?? {}, t.uid, t.name);
|
|
2430
2427
|
}, Oe = (e, t) => {
|
|
2431
|
-
S.value = 0, Ee.error(a(e, "文件上传失败!")),
|
|
2428
|
+
S.value = 0, Ee.error(a(e, "文件上传失败!")), A(t.uid), c("error", e, t);
|
|
2432
2429
|
}, ke = (e) => {
|
|
2433
|
-
if (typeof e.uid == "number" &&
|
|
2434
|
-
let t =
|
|
2435
|
-
|
|
2430
|
+
if (typeof e.uid == "number" && P.consumeRejected(e.uid)) return;
|
|
2431
|
+
let t = M(e.uid);
|
|
2432
|
+
A(e.uid), t && c("remove", t);
|
|
2436
2433
|
}, Ae = (e) => {
|
|
2437
|
-
let t =
|
|
2438
|
-
t && (c("preview", t), !(
|
|
2434
|
+
let t = M(e.uid);
|
|
2435
|
+
t && (c("preview", t), !(de.value && L(t, O.value)) && ze(t));
|
|
2439
2436
|
}, je = (e) => {
|
|
2440
2437
|
o.listType === "picture2" && (S.value = Math.round(e.percent ?? 0));
|
|
2441
2438
|
}, Me = (e) => {
|
|
2442
2439
|
if (c("change", e), !(!o.openCutter || e.status !== "ready" || !e.raw)) {
|
|
2443
|
-
if (
|
|
2444
|
-
|
|
2440
|
+
if (P.validate(e.raw) === !1) {
|
|
2441
|
+
A(e.uid);
|
|
2445
2442
|
return;
|
|
2446
2443
|
}
|
|
2447
|
-
|
|
2448
|
-
l.value?.handleRemove(e),
|
|
2444
|
+
A(e.uid), E(() => {
|
|
2445
|
+
l.value?.handleRemove(e), C({
|
|
2449
2446
|
name: e.name,
|
|
2450
2447
|
raw: e.raw
|
|
2451
2448
|
});
|
|
@@ -2455,25 +2452,25 @@ var fr = {
|
|
|
2455
2452
|
c("exceed", e, t);
|
|
2456
2453
|
};
|
|
2457
2454
|
function Pe(e) {
|
|
2458
|
-
let t =
|
|
2459
|
-
t &&
|
|
2455
|
+
let t = M(e.uid);
|
|
2456
|
+
t && L(t, O.value);
|
|
2460
2457
|
}
|
|
2461
2458
|
function Fe(e) {
|
|
2462
|
-
let t =
|
|
2459
|
+
let t = M(e.uid);
|
|
2463
2460
|
t && ze(t);
|
|
2464
2461
|
}
|
|
2465
2462
|
function K(e) {
|
|
2466
|
-
let t =
|
|
2467
|
-
|
|
2463
|
+
let t = M(e.uid);
|
|
2464
|
+
A(e.uid), t && c("remove", t);
|
|
2468
2465
|
}
|
|
2469
2466
|
function Ie(e) {
|
|
2470
|
-
let t =
|
|
2471
|
-
t &&
|
|
2467
|
+
let t = M(e.uid);
|
|
2468
|
+
t && ce(t, o.listType === "audio" ? "audio" : "video");
|
|
2472
2469
|
}
|
|
2473
2470
|
async function Le(e) {
|
|
2474
2471
|
try {
|
|
2475
2472
|
let t = ur("picture", o.action);
|
|
2476
|
-
we(await
|
|
2473
|
+
we(await re.uploadFile(e, t), -Date.now(), e.name);
|
|
2477
2474
|
} catch (e) {
|
|
2478
2475
|
Ee.error(a(e, "图片上传失败!"));
|
|
2479
2476
|
}
|
|
@@ -2497,20 +2494,20 @@ var fr = {
|
|
|
2497
2494
|
submit: () => l.value?.submit(),
|
|
2498
2495
|
clearFiles: () => l.value?.clearFiles(),
|
|
2499
2496
|
uploadRef: l
|
|
2500
|
-
}), (t, n) => (
|
|
2501
|
-
_(
|
|
2497
|
+
}), (t, n) => (j(), p("div", { class: D(["k-upload-wrap", be.value]) }, [
|
|
2498
|
+
_(z(Be), T({
|
|
2502
2499
|
ref_key: "uploadRef",
|
|
2503
2500
|
ref: l
|
|
2504
2501
|
}, t.$attrs, {
|
|
2505
2502
|
class: "k-upload__inner",
|
|
2506
|
-
"file-list":
|
|
2507
|
-
action:
|
|
2508
|
-
"list-type":
|
|
2509
|
-
accept:
|
|
2510
|
-
limit:
|
|
2503
|
+
"file-list": z(k),
|
|
2504
|
+
action: le.value,
|
|
2505
|
+
"list-type": ue.value,
|
|
2506
|
+
accept: w.value,
|
|
2507
|
+
limit: ge.value,
|
|
2511
2508
|
disabled: e.disabled,
|
|
2512
|
-
"auto-upload":
|
|
2513
|
-
"http-request":
|
|
2509
|
+
"auto-upload": he.value,
|
|
2510
|
+
"http-request": z(re).httpRequest,
|
|
2514
2511
|
"before-upload": Te,
|
|
2515
2512
|
"on-success": De,
|
|
2516
2513
|
"on-error": Oe,
|
|
@@ -2520,22 +2517,22 @@ var fr = {
|
|
|
2520
2517
|
"on-change": Me,
|
|
2521
2518
|
"on-exceed": Ne
|
|
2522
2519
|
}), h({
|
|
2523
|
-
tip:
|
|
2520
|
+
tip: W(() => [F(t.$slots, "tip", {}, () => [pe.value && (e.templateCode || e.tipType === "tooltip" && G.value) ? (j(), d(Jn, {
|
|
2524
2521
|
key: 0,
|
|
2525
2522
|
"template-code": e.templateCode,
|
|
2526
2523
|
"template-btn-text": e.templateBtnText,
|
|
2527
2524
|
"tip-type": e.tipType,
|
|
2528
|
-
"tip-text":
|
|
2525
|
+
"tip-text": G.value,
|
|
2529
2526
|
onDownloadTemplate: q
|
|
2530
2527
|
}, null, 8, [
|
|
2531
2528
|
"template-code",
|
|
2532
2529
|
"template-btn-text",
|
|
2533
2530
|
"tip-type",
|
|
2534
2531
|
"tip-text"
|
|
2535
|
-
])) : f("", !0),
|
|
2532
|
+
])) : f("", !0), ye.value ? (j(), d(tr, {
|
|
2536
2533
|
key: 1,
|
|
2537
2534
|
"tip-type": e.tipType,
|
|
2538
|
-
"tip-text":
|
|
2535
|
+
"tip-text": G.value,
|
|
2539
2536
|
percentage: S.value
|
|
2540
2537
|
}, null, 8, [
|
|
2541
2538
|
"tip-type",
|
|
@@ -2543,22 +2540,22 @@ var fr = {
|
|
|
2543
2540
|
"percentage"
|
|
2544
2541
|
])) : f("", !0)], !0)]),
|
|
2545
2542
|
_: 2
|
|
2546
|
-
}, [
|
|
2543
|
+
}, [ve.value ? {
|
|
2547
2544
|
name: "default",
|
|
2548
|
-
fn:
|
|
2549
|
-
|
|
2550
|
-
|
|
2545
|
+
fn: W(() => [me.value ? (j(), p("div", fr, [
|
|
2546
|
+
F(t.$slots, "buttonBefore", {}, void 0, !0),
|
|
2547
|
+
F(t.$slots, "content", {}, () => [_(Y, {
|
|
2551
2548
|
type: "primary",
|
|
2552
|
-
disabled:
|
|
2549
|
+
disabled: _e.value
|
|
2553
2550
|
}, {
|
|
2554
|
-
default:
|
|
2551
|
+
default: W(() => [g(I(e.btnText), 1)]),
|
|
2555
2552
|
_: 1
|
|
2556
2553
|
}, 8, ["disabled"])], !0),
|
|
2557
2554
|
_(Jn, {
|
|
2558
2555
|
"template-code": e.templateCode,
|
|
2559
2556
|
"template-btn-text": e.templateBtnText,
|
|
2560
2557
|
"tip-type": e.tipType,
|
|
2561
|
-
"tip-text":
|
|
2558
|
+
"tip-text": G.value,
|
|
2562
2559
|
onDownloadTemplate: q
|
|
2563
2560
|
}, null, 8, [
|
|
2564
2561
|
"template-code",
|
|
@@ -2566,19 +2563,19 @@ var fr = {
|
|
|
2566
2563
|
"tip-type",
|
|
2567
2564
|
"tip-text"
|
|
2568
2565
|
]),
|
|
2569
|
-
|
|
2570
|
-
])) :
|
|
2571
|
-
default:
|
|
2566
|
+
F(t.$slots, "buttonAfter", {}, void 0, !0)
|
|
2567
|
+
])) : F(t.$slots, "content", {}, () => [m("div", pr, [_(z(Se), { class: "k-upload__plus" }, {
|
|
2568
|
+
default: W(() => [_(z(qe))]),
|
|
2572
2569
|
_: 1
|
|
2573
|
-
}), e.tipType === "text" &&
|
|
2570
|
+
}), e.tipType === "text" && G.value ? (j(), p("span", {
|
|
2574
2571
|
key: 0,
|
|
2575
2572
|
class: "picture-card-tips",
|
|
2576
|
-
innerHTML:
|
|
2573
|
+
innerHTML: G.value
|
|
2577
2574
|
}, null, 8, mr)) : f("", !0)])], !0, 1)]),
|
|
2578
2575
|
key: "0"
|
|
2579
|
-
} : void 0,
|
|
2576
|
+
} : void 0, fe.value ? {
|
|
2580
2577
|
name: "file",
|
|
2581
|
-
fn:
|
|
2578
|
+
fn: W(({ file: n }) => [F(t.$slots, "file", { file: n }, () => [_(Kn, {
|
|
2582
2579
|
file: n,
|
|
2583
2580
|
"list-type": e.listType,
|
|
2584
2581
|
disabled: e.disabled,
|
|
@@ -2588,7 +2585,7 @@ var fr = {
|
|
|
2588
2585
|
onPlay: Ie
|
|
2589
2586
|
}, h({ _: 2 }, [t.$slots.preview ? {
|
|
2590
2587
|
name: "preview",
|
|
2591
|
-
fn:
|
|
2588
|
+
fn: W((e) => [F(t.$slots, "preview", te(b(e)), void 0, !0)]),
|
|
2592
2589
|
key: "0"
|
|
2593
2590
|
} : void 0]), 1032, [
|
|
2594
2591
|
"file",
|
|
@@ -2606,28 +2603,28 @@ var fr = {
|
|
|
2606
2603
|
"auto-upload",
|
|
2607
2604
|
"http-request"
|
|
2608
2605
|
]),
|
|
2609
|
-
e.openCutter ? (
|
|
2606
|
+
e.openCutter ? (j(), d(z(r), {
|
|
2610
2607
|
key: 0,
|
|
2611
2608
|
ref_key: "cutterRef",
|
|
2612
2609
|
ref: y,
|
|
2613
2610
|
option: e.cutterOption,
|
|
2614
2611
|
onCut: Le
|
|
2615
2612
|
}, null, 8, ["option"])) : f("", !0),
|
|
2616
|
-
|
|
2613
|
+
z(ie) ? (j(), d(z(Ce), {
|
|
2617
2614
|
key: 1,
|
|
2618
|
-
"url-list":
|
|
2619
|
-
"initial-index":
|
|
2620
|
-
onClose:
|
|
2615
|
+
"url-list": z(ae),
|
|
2616
|
+
"initial-index": z(oe),
|
|
2617
|
+
onClose: z(R)
|
|
2621
2618
|
}, null, 8, [
|
|
2622
2619
|
"url-list",
|
|
2623
2620
|
"initial-index",
|
|
2624
2621
|
"onClose"
|
|
2625
2622
|
])) : f("", !0),
|
|
2626
2623
|
_(Qn, {
|
|
2627
|
-
visible: B
|
|
2628
|
-
"onUpdate:visible": n[0] ||= (e) =>
|
|
2629
|
-
url:
|
|
2630
|
-
type:
|
|
2624
|
+
visible: z(B),
|
|
2625
|
+
"onUpdate:visible": n[0] ||= (e) => ee(B) ? B.value = e : null,
|
|
2626
|
+
url: z(se),
|
|
2627
|
+
type: z(V)
|
|
2631
2628
|
}, null, 8, [
|
|
2632
2629
|
"visible",
|
|
2633
2630
|
"url",
|
|
@@ -2664,7 +2661,7 @@ var fr = {
|
|
|
2664
2661
|
function a(e) {
|
|
2665
2662
|
r("update:modelValue", e);
|
|
2666
2663
|
}
|
|
2667
|
-
return (e, t) => (
|
|
2664
|
+
return (e, t) => (j(), d(hr, T(e.$attrs, {
|
|
2668
2665
|
"model-value": i.value,
|
|
2669
2666
|
"list-type": n.listType,
|
|
2670
2667
|
action: n.action,
|
|
@@ -2708,7 +2705,7 @@ var fr = {
|
|
|
2708
2705
|
InputMixInput: tn,
|
|
2709
2706
|
InputMixSelect: ln,
|
|
2710
2707
|
RadioInput: Cn,
|
|
2711
|
-
Complex: v(() => import("./Complex-
|
|
2708
|
+
Complex: v(() => import("./Complex-RcZnSBVW.js")),
|
|
2712
2709
|
ScrollSelect: Tn,
|
|
2713
2710
|
Upload: gr,
|
|
2714
2711
|
Tag: An,
|
|
@@ -2766,7 +2763,7 @@ var wr = /* @__PURE__ */ y({
|
|
|
2766
2763
|
function c(e) {
|
|
2767
2764
|
r("update:modelValue", e);
|
|
2768
2765
|
}
|
|
2769
|
-
return (t, n) => (
|
|
2766
|
+
return (t, n) => (j(), d(ae(i.value), T({
|
|
2770
2767
|
"model-value": e.modelValue,
|
|
2771
2768
|
options: s.value,
|
|
2772
2769
|
readonly: e.readonly,
|
|
@@ -2812,8 +2809,8 @@ var wr = /* @__PURE__ */ y({
|
|
|
2812
2809
|
},
|
|
2813
2810
|
emits: ["update:modelValue", "change"],
|
|
2814
2811
|
setup(e, { expose: t, emit: n }) {
|
|
2815
|
-
let r =
|
|
2816
|
-
|
|
2812
|
+
let r = V(), i = e, a = n, o = B(), s = N(), l = N({});
|
|
2813
|
+
ne(Tt, l);
|
|
2817
2814
|
function f(e) {
|
|
2818
2815
|
if (e == null || e === "") return;
|
|
2819
2816
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
@@ -2844,38 +2841,38 @@ var wr = /* @__PURE__ */ y({
|
|
|
2844
2841
|
"k-form--inline-layout": i.inline,
|
|
2845
2842
|
"k-form--query-layout": i.autoLayout,
|
|
2846
2843
|
"k-form--grid-layout": !i.autoLayout && !i.inline
|
|
2847
|
-
})),
|
|
2848
|
-
formConfigs:
|
|
2849
|
-
data:
|
|
2850
|
-
modelValue:
|
|
2851
|
-
controlled:
|
|
2844
|
+
})), ee = u(() => ({ "--k-form-cols": String(i.colLength) })), C = u(() => i.modelValue !== void 0), w = wt({
|
|
2845
|
+
formConfigs: L(i, "formConfigs"),
|
|
2846
|
+
data: L(i, "data"),
|
|
2847
|
+
modelValue: L(i, "modelValue"),
|
|
2848
|
+
controlled: C,
|
|
2852
2849
|
onChange: (e) => {
|
|
2853
|
-
a("change", e),
|
|
2850
|
+
a("change", e), C.value && a("update:modelValue", e);
|
|
2854
2851
|
}
|
|
2855
2852
|
});
|
|
2856
|
-
function
|
|
2853
|
+
function te() {
|
|
2857
2854
|
let e = {};
|
|
2858
2855
|
i.formConfigs.forEach((t) => {
|
|
2859
|
-
y(t) && (e[`kitDate-${t.id}`] = f(
|
|
2856
|
+
y(t) && (e[`kitDate-${t.id}`] = f(w.formModel[t.id]));
|
|
2860
2857
|
}), l.value = e;
|
|
2861
2858
|
}
|
|
2862
|
-
let { normalizedConfigs:
|
|
2863
|
-
formConfigs:
|
|
2859
|
+
let { normalizedConfigs: k, getFieldOptions: A, resolveItemRules: M, itemStyle: re, itemDisplay: ie, isItemReadonly: ae, isItemDisabled: oe } = vt({
|
|
2860
|
+
formConfigs: L(i, "formConfigs"),
|
|
2864
2861
|
layout: b,
|
|
2865
|
-
formReadonly:
|
|
2862
|
+
formReadonly: L(i, "readonly")
|
|
2866
2863
|
});
|
|
2867
|
-
|
|
2864
|
+
U(() => i.formConfigs, () => te(), {
|
|
2868
2865
|
immediate: !0,
|
|
2869
2866
|
deep: !0
|
|
2870
|
-
}),
|
|
2871
|
-
function
|
|
2872
|
-
let t =
|
|
2867
|
+
}), U(() => w.formModel, () => te(), { deep: !0 });
|
|
2868
|
+
function R(e) {
|
|
2869
|
+
let t = ie(e);
|
|
2873
2870
|
return {
|
|
2874
|
-
...
|
|
2871
|
+
...re(e),
|
|
2875
2872
|
...t ? { display: t } : {}
|
|
2876
2873
|
};
|
|
2877
2874
|
}
|
|
2878
|
-
let
|
|
2875
|
+
let se = u(() => {
|
|
2879
2876
|
let e = { ...o };
|
|
2880
2877
|
return delete e.readonly, {
|
|
2881
2878
|
inline: i.inline && !i.autoLayout,
|
|
@@ -2884,92 +2881,92 @@ var wr = /* @__PURE__ */ y({
|
|
|
2884
2881
|
...e
|
|
2885
2882
|
};
|
|
2886
2883
|
});
|
|
2887
|
-
function
|
|
2888
|
-
|
|
2884
|
+
function H(e, t) {
|
|
2885
|
+
w.updateFieldValue(e, t), y(e) && v(e.id, t), ce(e);
|
|
2889
2886
|
}
|
|
2890
|
-
function
|
|
2887
|
+
function ce(e) {
|
|
2891
2888
|
if (!s.value) return;
|
|
2892
|
-
let t = e.validatePeers ?? [], n =
|
|
2893
|
-
!n && !t.length ||
|
|
2889
|
+
let t = e.validatePeers ?? [], n = M(e).length > 0;
|
|
2890
|
+
!n && !t.length || E(() => {
|
|
2894
2891
|
n && s.value?.validateField(e.id).catch(() => {});
|
|
2895
2892
|
for (let e of t) s.value?.validateField(e).catch(() => {});
|
|
2896
2893
|
});
|
|
2897
2894
|
}
|
|
2898
|
-
async function
|
|
2899
|
-
let e =
|
|
2895
|
+
async function le() {
|
|
2896
|
+
let e = w.getVisibleFieldsValue();
|
|
2900
2897
|
if (!s.value) return e;
|
|
2901
2898
|
try {
|
|
2902
|
-
return await s.value.validate() === !1 ? i.ignoreValidate ? (s.value.clearValidate(), e) : (
|
|
2899
|
+
return await s.value.validate() === !1 ? i.ignoreValidate ? (s.value.clearValidate(), e) : (de(), null) : e;
|
|
2903
2900
|
} catch {
|
|
2904
|
-
return i.ignoreValidate ? (s.value.clearValidate(), e) : (
|
|
2901
|
+
return i.ignoreValidate ? (s.value.clearValidate(), e) : (de(), null);
|
|
2905
2902
|
}
|
|
2906
2903
|
}
|
|
2907
|
-
function
|
|
2904
|
+
function de() {
|
|
2908
2905
|
((s.value?.$el)?.querySelector(".el-form-item.is-error") ?? document.querySelector(".k-form .el-form-item.is-error"))?.scrollIntoView({
|
|
2909
2906
|
block: "center",
|
|
2910
2907
|
behavior: "smooth"
|
|
2911
2908
|
});
|
|
2912
2909
|
}
|
|
2913
|
-
function
|
|
2914
|
-
return
|
|
2910
|
+
function fe(e) {
|
|
2911
|
+
return w.getFieldsValue(e);
|
|
2915
2912
|
}
|
|
2916
|
-
function
|
|
2917
|
-
return
|
|
2913
|
+
function pe() {
|
|
2914
|
+
return w.getVisibleFieldsValue();
|
|
2918
2915
|
}
|
|
2919
|
-
function
|
|
2920
|
-
|
|
2916
|
+
function me(e) {
|
|
2917
|
+
w.setFieldsValue(e);
|
|
2921
2918
|
}
|
|
2922
|
-
function
|
|
2923
|
-
s.value?.resetFields(),
|
|
2919
|
+
function he() {
|
|
2920
|
+
s.value?.resetFields(), w.resetFormModel();
|
|
2924
2921
|
}
|
|
2925
|
-
function
|
|
2926
|
-
|
|
2922
|
+
function ge(e) {
|
|
2923
|
+
w.resetFieldsValue(e), e.forEach((e) => s.value?.clearValidate(e));
|
|
2927
2924
|
}
|
|
2928
|
-
function
|
|
2925
|
+
function _e() {
|
|
2929
2926
|
s.value?.clearValidate();
|
|
2930
2927
|
}
|
|
2931
|
-
function
|
|
2928
|
+
function ve() {
|
|
2932
2929
|
return s.value;
|
|
2933
2930
|
}
|
|
2934
2931
|
return t({
|
|
2935
|
-
validateFields:
|
|
2936
|
-
getFieldsValue:
|
|
2937
|
-
getParams:
|
|
2938
|
-
setFieldsValue:
|
|
2939
|
-
resetForm:
|
|
2940
|
-
resetFieldsValue:
|
|
2941
|
-
getFormRef:
|
|
2942
|
-
clearValidate:
|
|
2943
|
-
}), (e, t) => (
|
|
2932
|
+
validateFields: le,
|
|
2933
|
+
getFieldsValue: fe,
|
|
2934
|
+
getParams: pe,
|
|
2935
|
+
setFieldsValue: me,
|
|
2936
|
+
resetForm: he,
|
|
2937
|
+
resetFieldsValue: ge,
|
|
2938
|
+
getFormRef: ve,
|
|
2939
|
+
clearValidate: _e
|
|
2940
|
+
}), (e, t) => (j(), d(z(be), T({
|
|
2944
2941
|
ref_key: "formRef",
|
|
2945
2942
|
ref: s,
|
|
2946
2943
|
class: ["k-form", S.value],
|
|
2947
|
-
style:
|
|
2948
|
-
model:
|
|
2949
|
-
},
|
|
2950
|
-
default:
|
|
2944
|
+
style: ee.value,
|
|
2945
|
+
model: z(w).formModel
|
|
2946
|
+
}, se.value, { onSubmit: t[0] ||= ue(() => {}, ["prevent"]) }), {
|
|
2947
|
+
default: W(() => [(j(!0), p(c, null, P(z(k), (n) => (j(), d(z(xe), {
|
|
2951
2948
|
key: n.id,
|
|
2952
2949
|
"data-label": n.label || "",
|
|
2953
2950
|
"data-field-id": n.id,
|
|
2954
2951
|
label: n.label ? `${n.label}:` : void 0,
|
|
2955
2952
|
prop: n.id,
|
|
2956
|
-
rules:
|
|
2957
|
-
class:
|
|
2958
|
-
"k-form__item--readonly":
|
|
2959
|
-
"k-form__item--disabled":
|
|
2953
|
+
rules: z(M)(n),
|
|
2954
|
+
class: D(["k-form__item", [n.class, {
|
|
2955
|
+
"k-form__item--readonly": z(ae)(n),
|
|
2956
|
+
"k-form__item--disabled": z(oe)(n),
|
|
2960
2957
|
"k-form__item--full-row": n.newLineStart,
|
|
2961
|
-
"k-form__item--choice":
|
|
2958
|
+
"k-form__item--choice": z(xr)(n.component) && (n.component === "Radio" || n.component === "Checkbox" || n.component === "Tag")
|
|
2962
2959
|
}]]),
|
|
2963
|
-
style:
|
|
2960
|
+
style: O(R(n))
|
|
2964
2961
|
}, h({
|
|
2965
|
-
default:
|
|
2962
|
+
default: W(() => [!n.slot || !z(r)[n.id] ? (j(), d(wr, {
|
|
2966
2963
|
key: 0,
|
|
2967
2964
|
item: n,
|
|
2968
|
-
"model-value":
|
|
2969
|
-
options:
|
|
2970
|
-
readonly:
|
|
2971
|
-
disabled:
|
|
2972
|
-
"onUpdate:modelValue": (e) =>
|
|
2965
|
+
"model-value": z(w).formModel[n.id],
|
|
2966
|
+
options: z(A)(n),
|
|
2967
|
+
readonly: z(ae)(n),
|
|
2968
|
+
disabled: z(oe)(n),
|
|
2969
|
+
"onUpdate:modelValue": (e) => H(n, e)
|
|
2973
2970
|
}, null, 8, [
|
|
2974
2971
|
"item",
|
|
2975
2972
|
"model-value",
|
|
@@ -2977,26 +2974,26 @@ var wr = /* @__PURE__ */ y({
|
|
|
2977
2974
|
"readonly",
|
|
2978
2975
|
"disabled",
|
|
2979
2976
|
"onUpdate:modelValue"
|
|
2980
|
-
])) :
|
|
2977
|
+
])) : F(e.$slots, n.id, {
|
|
2981
2978
|
item: n,
|
|
2982
|
-
value:
|
|
2983
|
-
updateValue: (e) =>
|
|
2979
|
+
value: z(w).formModel[n.id],
|
|
2980
|
+
updateValue: (e) => H(n, e)
|
|
2984
2981
|
}, void 0, void 0, 1)]),
|
|
2985
2982
|
_: 2
|
|
2986
2983
|
}, [n.toolTip ? {
|
|
2987
2984
|
name: "label",
|
|
2988
|
-
fn:
|
|
2985
|
+
fn: W(() => [_(z(Re), {
|
|
2989
2986
|
effect: "dark",
|
|
2990
2987
|
placement: "bottom",
|
|
2991
2988
|
"popper-class": "k-form__tooltip"
|
|
2992
2989
|
}, {
|
|
2993
|
-
content:
|
|
2994
|
-
default:
|
|
2990
|
+
content: W(() => [m("span", { innerHTML: n.toolTip }, null, 8, Tr)]),
|
|
2991
|
+
default: W(() => [t[1] ||= m("span", {
|
|
2995
2992
|
class: "k-form__tip-icon",
|
|
2996
2993
|
"aria-hidden": "true"
|
|
2997
2994
|
}, "i", -1)]),
|
|
2998
2995
|
_: 2
|
|
2999
|
-
}, 1024), g(" " +
|
|
2996
|
+
}, 1024), g(" " + I(n.label ? `${n.label}:` : ""), 1)]),
|
|
3000
2997
|
key: "0"
|
|
3001
2998
|
} : void 0]), 1032, [
|
|
3002
2999
|
"data-label",
|
|
@@ -3006,7 +3003,7 @@ var wr = /* @__PURE__ */ y({
|
|
|
3006
3003
|
"rules",
|
|
3007
3004
|
"class",
|
|
3008
3005
|
"style"
|
|
3009
|
-
]))), 128)),
|
|
3006
|
+
]))), 128)), F(e.$slots, "default")]),
|
|
3010
3007
|
_: 3
|
|
3011
3008
|
}, 16, [
|
|
3012
3009
|
"class",
|
|
@@ -3018,7 +3015,7 @@ var wr = /* @__PURE__ */ y({
|
|
|
3018
3015
|
//#endregion
|
|
3019
3016
|
//#region src/components/k-form/composables/useKFormTemplateRef.ts
|
|
3020
3017
|
function Dr(e) {
|
|
3021
|
-
return
|
|
3018
|
+
return H(e);
|
|
3022
3019
|
}
|
|
3023
3020
|
//#endregion
|
|
3024
3021
|
//#region src/components/k-handle-page/KHandlePage.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -3072,7 +3069,7 @@ var Or = { class: "k-handle-page" }, kr = {
|
|
|
3072
3069
|
},
|
|
3073
3070
|
emits: ["cancel", "submit"],
|
|
3074
3071
|
setup(e, { emit: t }) {
|
|
3075
|
-
let n = e, r = t, i =
|
|
3072
|
+
let n = e, r = t, i = V(), a = N(!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);
|
|
3076
3073
|
async function x() {
|
|
3077
3074
|
if (!y.value) {
|
|
3078
3075
|
if (n.onSubmit) {
|
|
@@ -3087,34 +3084,34 @@ var Or = { class: "k-handle-page" }, kr = {
|
|
|
3087
3084
|
r("submit");
|
|
3088
3085
|
}
|
|
3089
3086
|
}
|
|
3090
|
-
return (t, n) => (
|
|
3091
|
-
b.value ? (
|
|
3087
|
+
return (t, n) => (j(), p("div", Or, [
|
|
3088
|
+
b.value ? (j(), p("header", kr, [F(t.$slots, "header")])) : f("", !0),
|
|
3092
3089
|
m("div", Ar, [_(l, { name: "k-handle-page-loading" }, {
|
|
3093
|
-
default:
|
|
3090
|
+
default: W(() => [e.loading ? (j(), p("div", jr, [m("div", Mr, [_(z(Se), {
|
|
3094
3091
|
class: "k-handle-page__loading-icon is-loading",
|
|
3095
3092
|
size: 32
|
|
3096
3093
|
}, {
|
|
3097
|
-
default:
|
|
3094
|
+
default: W(() => [_(z(Ke))]),
|
|
3098
3095
|
_: 1
|
|
3099
3096
|
}), n[1] ||= m("span", { class: "k-handle-page__loading-text" }, "加载中...", -1)])])) : f("", !0)]),
|
|
3100
3097
|
_: 1
|
|
3101
3098
|
}), m("div", {
|
|
3102
|
-
class:
|
|
3103
|
-
style:
|
|
3104
|
-
}, [
|
|
3105
|
-
e.showFooter ? (
|
|
3099
|
+
class: D(["k-handle-page__content", { "k-handle-page__content--loading": e.loading }]),
|
|
3100
|
+
style: O(o.value)
|
|
3101
|
+
}, [F(t.$slots, "default")], 6)]),
|
|
3102
|
+
e.showFooter ? (j(), p("footer", Nr, [F(t.$slots, "footer", {}, () => [h.value ? (j(), d(Y, {
|
|
3106
3103
|
key: 0,
|
|
3107
3104
|
onClick: n[0] ||= (e) => r("cancel")
|
|
3108
3105
|
}, {
|
|
3109
|
-
default:
|
|
3106
|
+
default: W(() => [g(I(s.value), 1)]),
|
|
3110
3107
|
_: 1
|
|
3111
|
-
})) : f("", !0), v.value ? (
|
|
3108
|
+
})) : f("", !0), v.value ? (j(), d(Y, {
|
|
3112
3109
|
key: 1,
|
|
3113
3110
|
type: "primary",
|
|
3114
3111
|
loading: y.value,
|
|
3115
3112
|
onClick: x
|
|
3116
3113
|
}, {
|
|
3117
|
-
default:
|
|
3114
|
+
default: W(() => [g(I(c.value), 1)]),
|
|
3118
3115
|
_: 1
|
|
3119
3116
|
}, 8, ["loading"])) : f("", !0)])])) : f("", !0)
|
|
3120
3117
|
]));
|
|
@@ -3123,16 +3120,16 @@ var Or = { class: "k-handle-page" }, kr = {
|
|
|
3123
3120
|
//#endregion
|
|
3124
3121
|
//#region src/components/k-handle-page/useHandlePageInit.ts
|
|
3125
3122
|
function Fr(e, t) {
|
|
3126
|
-
let n =
|
|
3123
|
+
let n = N(!1);
|
|
3127
3124
|
async function r() {
|
|
3128
|
-
(
|
|
3125
|
+
(R(t?.skipLoading) ?? !1) || (n.value = !0);
|
|
3129
3126
|
try {
|
|
3130
3127
|
await e();
|
|
3131
3128
|
} finally {
|
|
3132
3129
|
n.value = !1;
|
|
3133
3130
|
}
|
|
3134
3131
|
}
|
|
3135
|
-
return t?.immediate !== !1 &&
|
|
3132
|
+
return t?.immediate !== !1 && A(() => {
|
|
3136
3133
|
r();
|
|
3137
3134
|
}), {
|
|
3138
3135
|
pageLoading: n,
|
|
@@ -3174,7 +3171,7 @@ var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3174
3171
|
},
|
|
3175
3172
|
setup(e) {
|
|
3176
3173
|
let t = e, n = u(() => zr(t.name));
|
|
3177
|
-
return (t, r) => n.value ? (
|
|
3174
|
+
return (t, r) => n.value ? (j(), d(ae(n.value), {
|
|
3178
3175
|
key: 0,
|
|
3179
3176
|
class: "k-icon",
|
|
3180
3177
|
size: e.size,
|
|
@@ -3217,19 +3214,19 @@ var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3217
3214
|
function h(e) {
|
|
3218
3215
|
return typeof e.slot == "string" ? e.slot : "default";
|
|
3219
3216
|
}
|
|
3220
|
-
return (t, n) => (
|
|
3217
|
+
return (t, n) => (j(), p("div", {
|
|
3221
3218
|
class: "k-link-button",
|
|
3222
|
-
style:
|
|
3223
|
-
}, [(
|
|
3219
|
+
style: O({ justifyContent: e.align })
|
|
3220
|
+
}, [(j(!0), p(c, null, P(i.value, (e, n) => (j(), d(z(Re), {
|
|
3224
3221
|
key: `${e.label}-${n}`,
|
|
3225
3222
|
content: e.tooltip,
|
|
3226
3223
|
placement: "top",
|
|
3227
3224
|
disabled: !e.tooltip
|
|
3228
3225
|
}, {
|
|
3229
|
-
default:
|
|
3230
|
-
class:
|
|
3231
|
-
onClick:
|
|
3232
|
-
}, [l(e) ?
|
|
3226
|
+
default: W(() => [m("div", Wr, [n > 0 ? (j(), p("span", Gr)) : f("", !0), m("a", {
|
|
3227
|
+
class: D(["k-link-button__btn", [o(e), { "k-link-button__btn--readonly": a(e) }]]),
|
|
3228
|
+
onClick: ue((t) => s(e, n), ["prevent"])
|
|
3229
|
+
}, [l(e) ? F(t.$slots, h(e), { item: e }, () => [g(I(e.label), 1)], void 0, 0) : (j(), p(c, { key: 1 }, [g(I(e.label), 1)], 64))], 10, Kr)])]),
|
|
3233
3230
|
_: 2
|
|
3234
3231
|
}, 1032, ["content", "disabled"]))), 128))], 4));
|
|
3235
3232
|
}
|
|
@@ -3253,7 +3250,7 @@ var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3253
3250
|
] }
|
|
3254
3251
|
},
|
|
3255
3252
|
setup(e) {
|
|
3256
|
-
return (t, n) => (
|
|
3253
|
+
return (t, n) => (j(), d(z(Oe), T(t.$attrs, {
|
|
3257
3254
|
layout: e.layout,
|
|
3258
3255
|
"page-size": e.pageSize,
|
|
3259
3256
|
"page-sizes": e.pageSizes
|
|
@@ -3271,10 +3268,10 @@ var Ur = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3271
3268
|
title: { default: "" }
|
|
3272
3269
|
},
|
|
3273
3270
|
setup(e) {
|
|
3274
|
-
return (t, n) => (
|
|
3271
|
+
return (t, n) => (j(), p("div", {
|
|
3275
3272
|
id: e.panelId || void 0,
|
|
3276
3273
|
class: "k-long-page-panel"
|
|
3277
|
-
}, [m("div", Xr,
|
|
3274
|
+
}, [m("div", Xr, I(e.title), 1), m("div", Zr, [F(t.$slots, "default", {}, void 0, !0)])], 8, Yr));
|
|
3278
3275
|
}
|
|
3279
3276
|
}), [["__scopeId", "data-v-9d6e7832"]]), $r = 4;
|
|
3280
3277
|
function ei(e) {
|
|
@@ -3299,7 +3296,7 @@ function ei(e) {
|
|
|
3299
3296
|
function u() {
|
|
3300
3297
|
return i ? (i = !1, !0) : !1;
|
|
3301
3298
|
}
|
|
3302
|
-
return
|
|
3299
|
+
return k(s), {
|
|
3303
3300
|
onPointerDown: l,
|
|
3304
3301
|
consumeClickIfDragged: u
|
|
3305
3302
|
};
|
|
@@ -3326,37 +3323,37 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3326
3323
|
label: "面板一"
|
|
3327
3324
|
}] } },
|
|
3328
3325
|
setup(e) {
|
|
3329
|
-
let t =
|
|
3326
|
+
let t = H("rootRef"), n = H("navRef"), { onPointerDown: r, consumeClickIfDragged: i } = ei(n);
|
|
3330
3327
|
function a(e) {
|
|
3331
3328
|
return fi(e);
|
|
3332
3329
|
}
|
|
3333
3330
|
async function o(e) {
|
|
3334
3331
|
if (i()) return;
|
|
3335
|
-
await
|
|
3332
|
+
await E();
|
|
3336
3333
|
let n = t.value?.querySelector(`#${CSS.escape(e)}`);
|
|
3337
3334
|
(n?.querySelector(".k-long-page-panel__title") ?? n)?.scrollIntoView({
|
|
3338
3335
|
block: "start",
|
|
3339
3336
|
behavior: "smooth"
|
|
3340
3337
|
});
|
|
3341
3338
|
}
|
|
3342
|
-
return (i, s) => (
|
|
3339
|
+
return (i, s) => (j(), p("div", {
|
|
3343
3340
|
ref_key: "rootRef",
|
|
3344
3341
|
ref: t,
|
|
3345
3342
|
class: "k-long-page"
|
|
3346
|
-
}, [(
|
|
3343
|
+
}, [(j(!0), p(c, null, P(e.panels, (e) => (j(), d(Qr, {
|
|
3347
3344
|
key: e.name,
|
|
3348
3345
|
class: "k-long-page__panel",
|
|
3349
3346
|
"panel-id": e.name,
|
|
3350
3347
|
title: e.label
|
|
3351
3348
|
}, {
|
|
3352
|
-
default:
|
|
3349
|
+
default: W(() => [F(i.$slots, e.name, {}, void 0, !0)]),
|
|
3353
3350
|
_: 2
|
|
3354
3351
|
}, 1032, ["panel-id", "title"]))), 128)), m("div", {
|
|
3355
3352
|
ref_key: "navRef",
|
|
3356
3353
|
ref: n,
|
|
3357
3354
|
class: "k-long-page__nav",
|
|
3358
|
-
onPointerdown: s[0] ||= (...e) =>
|
|
3359
|
-
}, [(
|
|
3355
|
+
onPointerdown: s[0] ||= (...e) => z(r) && z(r)(...e)
|
|
3356
|
+
}, [(j(!0), p(c, null, P(e.panels, (e) => (j(), p("div", {
|
|
3360
3357
|
key: e.name,
|
|
3361
3358
|
class: "k-long-page__nav-item",
|
|
3362
3359
|
role: "button",
|
|
@@ -3379,23 +3376,23 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3379
3376
|
height: "28",
|
|
3380
3377
|
draggable: "false"
|
|
3381
3378
|
}, null, 8, hi),
|
|
3382
|
-
m("span", null,
|
|
3379
|
+
m("span", null, I(e.label), 1)
|
|
3383
3380
|
], 8, pi))), 128))], 544)], 512));
|
|
3384
3381
|
}
|
|
3385
3382
|
}), [["__scopeId", "data-v-ac934c5d"]]), _i = /* @__PURE__ */ y({
|
|
3386
3383
|
name: "KCard",
|
|
3387
3384
|
__name: "KCard",
|
|
3388
3385
|
setup(e) {
|
|
3389
|
-
return (e, t) => (
|
|
3390
|
-
default:
|
|
3386
|
+
return (e, t) => (j(), d(z(fe), te(b(e.$attrs)), h({
|
|
3387
|
+
default: W(() => [F(e.$slots, "default")]),
|
|
3391
3388
|
_: 2
|
|
3392
3389
|
}, [e.$slots.header ? {
|
|
3393
3390
|
name: "header",
|
|
3394
|
-
fn:
|
|
3391
|
+
fn: W(() => [F(e.$slots, "header")]),
|
|
3395
3392
|
key: "0"
|
|
3396
3393
|
} : void 0, e.$slots.footer ? {
|
|
3397
3394
|
name: "footer",
|
|
3398
|
-
fn:
|
|
3395
|
+
fn: W(() => [F(e.$slots, "footer")]),
|
|
3399
3396
|
key: "1"
|
|
3400
3397
|
} : void 0]), 1040));
|
|
3401
3398
|
}
|
|
@@ -3421,24 +3418,24 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3421
3418
|
}
|
|
3422
3419
|
},
|
|
3423
3420
|
setup(e) {
|
|
3424
|
-
let t = e, n =
|
|
3421
|
+
let t = e, n = N(t.unfold ? ["content"] : []), r = u(() => ({
|
|
3425
3422
|
panel: !0,
|
|
3426
3423
|
"panel-hover": t.hover
|
|
3427
3424
|
}));
|
|
3428
|
-
return (t, i) => (
|
|
3425
|
+
return (t, i) => (j(), p("div", { class: D(r.value) }, [e.isFold ? (j(), d(z(ge), {
|
|
3429
3426
|
key: 0,
|
|
3430
3427
|
modelValue: n.value,
|
|
3431
3428
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e
|
|
3432
3429
|
}, {
|
|
3433
|
-
default:
|
|
3430
|
+
default: W(() => [_(z(_e), {
|
|
3434
3431
|
name: "content",
|
|
3435
3432
|
title: e.title
|
|
3436
3433
|
}, {
|
|
3437
|
-
default:
|
|
3434
|
+
default: W(() => [F(t.$slots, "default")]),
|
|
3438
3435
|
_: 3
|
|
3439
3436
|
}, 8, ["title"])]),
|
|
3440
3437
|
_: 3
|
|
3441
|
-
}, 8, ["modelValue"])) : (
|
|
3438
|
+
}, 8, ["modelValue"])) : (j(), p(c, { key: 1 }, [e.title || t.$slots.title ? (j(), p("div", vi, [m("div", yi, [F(t.$slots, "title", {}, () => [g(I(e.title), 1)])])])) : f("", !0), m("div", bi, [F(t.$slots, "default")])], 64))], 2));
|
|
3442
3439
|
}
|
|
3443
3440
|
}), Si = {
|
|
3444
3441
|
key: 0,
|
|
@@ -3453,29 +3450,29 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3453
3450
|
emits: ["query", "reset"],
|
|
3454
3451
|
setup(e, { emit: t }) {
|
|
3455
3452
|
let n = t;
|
|
3456
|
-
return (t, r) => e.footer ? (
|
|
3453
|
+
return (t, r) => e.footer ? (j(), p("div", Si, [_(Y, {
|
|
3457
3454
|
type: "primary",
|
|
3458
3455
|
onClick: r[0] ||= (e) => n("query")
|
|
3459
3456
|
}, {
|
|
3460
|
-
default:
|
|
3457
|
+
default: W(() => [...r[4] ||= [g("查询", -1)]]),
|
|
3461
3458
|
_: 1
|
|
3462
3459
|
}), _(Y, {
|
|
3463
3460
|
class: "k-panel-query__btn-reset",
|
|
3464
3461
|
onClick: r[1] ||= (e) => n("reset")
|
|
3465
3462
|
}, {
|
|
3466
|
-
default:
|
|
3463
|
+
default: W(() => [...r[5] ||= [g("重置", -1)]]),
|
|
3467
3464
|
_: 1
|
|
3468
|
-
})])) : (
|
|
3465
|
+
})])) : (j(), p(c, { key: 1 }, [_(Y, {
|
|
3469
3466
|
type: "primary",
|
|
3470
3467
|
onClick: r[2] ||= (e) => n("query")
|
|
3471
3468
|
}, {
|
|
3472
|
-
default:
|
|
3469
|
+
default: W(() => [...r[6] ||= [g("查询", -1)]]),
|
|
3473
3470
|
_: 1
|
|
3474
3471
|
}), _(Y, {
|
|
3475
3472
|
class: "k-panel-query__btn-reset",
|
|
3476
3473
|
onClick: r[3] ||= (e) => n("reset")
|
|
3477
3474
|
}, {
|
|
3478
|
-
default:
|
|
3475
|
+
default: W(() => [...r[7] ||= [g("重置", -1)]]),
|
|
3479
3476
|
_: 1
|
|
3480
3477
|
})], 64));
|
|
3481
3478
|
}
|
|
@@ -3501,13 +3498,13 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3501
3498
|
}
|
|
3502
3499
|
},
|
|
3503
3500
|
setup(e, { expose: t }) {
|
|
3504
|
-
let n =
|
|
3501
|
+
let n = N();
|
|
3505
3502
|
return t({
|
|
3506
3503
|
validateFields: () => n.value?.validateFields(),
|
|
3507
3504
|
getParams: () => n.value?.getParams() ?? {},
|
|
3508
3505
|
resetForm: () => n.value?.resetForm(),
|
|
3509
3506
|
getFormRef: () => n.value?.getFormRef()
|
|
3510
|
-
}), (t, r) => (
|
|
3507
|
+
}), (t, r) => (j(), d(z(Er), {
|
|
3511
3508
|
ref_key: "formRef",
|
|
3512
3509
|
ref: n,
|
|
3513
3510
|
class: "k-panel-query-form",
|
|
@@ -3539,16 +3536,16 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3539
3536
|
__name: "KPanelQueryItem",
|
|
3540
3537
|
props: { formConfigs: {} },
|
|
3541
3538
|
setup(e, { expose: t }) {
|
|
3542
|
-
let n = e, r =
|
|
3539
|
+
let n = e, r = V(), i = u(() => ({
|
|
3543
3540
|
colLength: 1,
|
|
3544
3541
|
inline: !0,
|
|
3545
3542
|
autoLayout: !1,
|
|
3546
3543
|
hideLabel: !1
|
|
3547
3544
|
})), a = wt({
|
|
3548
|
-
formConfigs:
|
|
3545
|
+
formConfigs: L(n, "formConfigs"),
|
|
3549
3546
|
controlled: u(() => !1)
|
|
3550
3547
|
}), { normalizedConfigs: o, getFieldOptions: s } = vt({
|
|
3551
|
-
formConfigs:
|
|
3548
|
+
formConfigs: L(n, "formConfigs"),
|
|
3552
3549
|
layout: i
|
|
3553
3550
|
});
|
|
3554
3551
|
function l(e, t) {
|
|
@@ -3568,20 +3565,20 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3568
3565
|
getParams: h,
|
|
3569
3566
|
resetForm: g,
|
|
3570
3567
|
getFormRef: () => void 0
|
|
3571
|
-
}), (e, t) => (
|
|
3568
|
+
}), (e, t) => (j(), p("div", Ti, [m("ul", Ei, [(j(!0), p(c, null, P(z(o), (e) => (j(), p("li", {
|
|
3572
3569
|
key: e.id,
|
|
3573
|
-
class:
|
|
3574
|
-
}, [e.label ? (
|
|
3570
|
+
class: D(["k-item", { "k-item_flex": !!e.label }])
|
|
3571
|
+
}, [e.label ? (j(), p("label", Di, I(e.label), 1)) : f("", !0), m("div", Oi, [_(wr, {
|
|
3575
3572
|
item: e,
|
|
3576
|
-
"model-value":
|
|
3577
|
-
options:
|
|
3573
|
+
"model-value": z(a).formModel[e.id],
|
|
3574
|
+
options: z(s)(e),
|
|
3578
3575
|
"onUpdate:modelValue": (t) => l(e, t)
|
|
3579
3576
|
}, null, 8, [
|
|
3580
3577
|
"item",
|
|
3581
3578
|
"model-value",
|
|
3582
3579
|
"options",
|
|
3583
3580
|
"onUpdate:modelValue"
|
|
3584
|
-
])])], 2))), 128)),
|
|
3581
|
+
])])], 2))), 128)), z(r).button ? (j(), p("li", ki, [F(e.$slots, "button")])) : f("", !0)])]));
|
|
3585
3582
|
}
|
|
3586
3583
|
}), ji = /* @__PURE__ */ y({
|
|
3587
3584
|
name: "KPanelQuery",
|
|
@@ -3617,7 +3614,7 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3617
3614
|
},
|
|
3618
3615
|
emits: ["query", "reset"],
|
|
3619
3616
|
setup(e, { expose: t, emit: n }) {
|
|
3620
|
-
let r = e, i = n, a =
|
|
3617
|
+
let r = e, i = n, a = N(), o = /* @__PURE__ */ new Set([
|
|
3621
3618
|
"Input",
|
|
3622
3619
|
"Select",
|
|
3623
3620
|
"TreeSelect",
|
|
@@ -3653,7 +3650,7 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3653
3650
|
e && i("query", e);
|
|
3654
3651
|
}
|
|
3655
3652
|
async function v() {
|
|
3656
|
-
a.value?.resetForm(), i("reset"), await
|
|
3653
|
+
a.value?.resetForm(), i("reset"), await E();
|
|
3657
3654
|
let e = await a.value?.validateFields();
|
|
3658
3655
|
e && i("query", e);
|
|
3659
3656
|
}
|
|
@@ -3668,31 +3665,31 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3668
3665
|
resetForm: b,
|
|
3669
3666
|
getFormRef: () => a.value?.getFormRef(),
|
|
3670
3667
|
submit: g
|
|
3671
|
-
}), (t, n) => (
|
|
3668
|
+
}), (t, n) => (j(), p("div", { class: D(["k-panel-query", {
|
|
3672
3669
|
"k-panel-query__form": e.model === "form" && !e.showPanel,
|
|
3673
3670
|
"k-panel-query__item": m.value
|
|
3674
|
-
}]) }, [e.showPanel ? (
|
|
3671
|
+
}]) }, [e.showPanel ? (j(), d(z(xi), {
|
|
3675
3672
|
key: 1,
|
|
3676
3673
|
title: e.title,
|
|
3677
3674
|
"is-fold": e.isFold,
|
|
3678
3675
|
unfold: e.unfold,
|
|
3679
3676
|
hover: e.hover
|
|
3680
3677
|
}, {
|
|
3681
|
-
default:
|
|
3678
|
+
default: W(() => [l.value ? (j(), p(c, { key: 0 }, [m.value ? (j(), d(Ai, T({
|
|
3682
3679
|
key: 0,
|
|
3683
3680
|
ref_key: "formRef",
|
|
3684
3681
|
ref: a
|
|
3685
3682
|
}, l.value), h({ _: 2 }, [e.hideButton ? void 0 : {
|
|
3686
3683
|
name: "button",
|
|
3687
|
-
fn:
|
|
3684
|
+
fn: W(() => [_(Ci, {
|
|
3688
3685
|
onQuery: g,
|
|
3689
3686
|
onReset: v
|
|
3690
3687
|
})]),
|
|
3691
3688
|
key: "0"
|
|
3692
|
-
}]), 1040)) : (
|
|
3689
|
+
}]), 1040)) : (j(), p(c, { key: 1 }, [_(wi, T({
|
|
3693
3690
|
ref_key: "formRef",
|
|
3694
3691
|
ref: a
|
|
3695
|
-
}, l.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? f("", !0) : (
|
|
3692
|
+
}, l.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? f("", !0) : (j(), d(Ci, {
|
|
3696
3693
|
key: 0,
|
|
3697
3694
|
footer: "",
|
|
3698
3695
|
onQuery: g,
|
|
@@ -3704,21 +3701,21 @@ var pi = ["onClick"], mi = ["src", "alt"], hi = ["src", "alt"], gi = /*#__PURE__
|
|
|
3704
3701
|
"is-fold",
|
|
3705
3702
|
"unfold",
|
|
3706
3703
|
"hover"
|
|
3707
|
-
])) : (
|
|
3704
|
+
])) : (j(), p(c, { key: 0 }, [l.value ? (j(), p(c, { key: 0 }, [m.value ? (j(), d(Ai, T({
|
|
3708
3705
|
key: 0,
|
|
3709
3706
|
ref_key: "formRef",
|
|
3710
3707
|
ref: a
|
|
3711
3708
|
}, l.value), h({ _: 2 }, [e.hideButton ? void 0 : {
|
|
3712
3709
|
name: "button",
|
|
3713
|
-
fn:
|
|
3710
|
+
fn: W(() => [_(Ci, {
|
|
3714
3711
|
onQuery: g,
|
|
3715
3712
|
onReset: v
|
|
3716
3713
|
})]),
|
|
3717
3714
|
key: "0"
|
|
3718
|
-
}]), 1040)) : (
|
|
3715
|
+
}]), 1040)) : (j(), p(c, { key: 1 }, [_(wi, T({
|
|
3719
3716
|
ref_key: "formRef",
|
|
3720
3717
|
ref: a
|
|
3721
|
-
}, l.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? f("", !0) : (
|
|
3718
|
+
}, l.value, { "hide-label": e.hideLabel }), null, 16, ["hide-label"]), e.hideButton ? f("", !0) : (j(), d(Ci, {
|
|
3722
3719
|
key: 0,
|
|
3723
3720
|
footer: "",
|
|
3724
3721
|
onQuery: g,
|
|
@@ -3849,7 +3846,7 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3849
3846
|
},
|
|
3850
3847
|
emits: ["operate-click", "radio-select"],
|
|
3851
3848
|
setup(e, { emit: t }) {
|
|
3852
|
-
let n = e, r = t, i =
|
|
3849
|
+
let n = e, r = t, i = V(), { getCellDisplayValue: a } = Hi(n.nullValueFormat);
|
|
3853
3850
|
function o(e) {
|
|
3854
3851
|
return e ?? "";
|
|
3855
3852
|
}
|
|
@@ -3867,18 +3864,18 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3867
3864
|
return Ni(e, n.rowKey);
|
|
3868
3865
|
}
|
|
3869
3866
|
return (t, n) => {
|
|
3870
|
-
let u =
|
|
3871
|
-
return e.column.type === "selection" ? (
|
|
3872
|
-
key: `${
|
|
3867
|
+
let u = re("KTableColumn", !0);
|
|
3868
|
+
return e.column.type === "selection" ? (j(), d(z(K), T({
|
|
3869
|
+
key: `${z($)(e.column, e.columnIndex)}:selection`,
|
|
3873
3870
|
type: "selection"
|
|
3874
|
-
}, s.value), null, 16)) : e.column.type === "index" ? (
|
|
3875
|
-
default:
|
|
3871
|
+
}, s.value), null, 16)) : e.column.type === "index" ? (j(), d(z(K), T({ key: `${z($)(e.column, e.columnIndex)}:index` }, s.value), {
|
|
3872
|
+
default: W(({ $index: e }) => [F(t.$slots, "index", {
|
|
3876
3873
|
index: e,
|
|
3877
3874
|
displayIndex: l(e)
|
|
3878
|
-
}, () => [g(
|
|
3875
|
+
}, () => [g(I(l(e)), 1)], !0)]),
|
|
3879
3876
|
_: 3
|
|
3880
|
-
}, 16)) : e.column.type === "radio" ? (
|
|
3881
|
-
default:
|
|
3877
|
+
}, 16)) : e.column.type === "radio" ? (j(), d(z(K), T({ key: `${z($)(e.column, e.columnIndex)}:radio` }, s.value), {
|
|
3878
|
+
default: W(({ row: t }) => [_(z(je), {
|
|
3882
3879
|
class: "k-table-column__radio",
|
|
3883
3880
|
"model-value": e.radioSelected,
|
|
3884
3881
|
label: x(t),
|
|
@@ -3889,44 +3886,44 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3889
3886
|
"onUpdate:modelValue"
|
|
3890
3887
|
])]),
|
|
3891
3888
|
_: 1
|
|
3892
|
-
}, 16)) : e.column.type === "operates" ? (
|
|
3893
|
-
default:
|
|
3889
|
+
}, 16)) : e.column.type === "operates" ? (j(), d(z(K), T({ key: `${z($)(e.column, e.columnIndex)}:operates` }, s.value), {
|
|
3890
|
+
default: W(({ row: n, column: r, $index: a }) => [v.value ? F(t.$slots, z(i).operates ? "operates" : o(e.column.prop), {
|
|
3894
3891
|
row: n,
|
|
3895
3892
|
column: r,
|
|
3896
3893
|
index: a
|
|
3897
|
-
}, void 0, !0, 0) : (
|
|
3894
|
+
}, void 0, !0, 0) : (j(), d(z(qr), {
|
|
3898
3895
|
key: 1,
|
|
3899
3896
|
data: e.column.operates ?? [],
|
|
3900
3897
|
disabled: e.disabled,
|
|
3901
3898
|
"table-mode": "",
|
|
3902
3899
|
onClick: (e, t) => y(e, t, n)
|
|
3903
|
-
}, h({ _: 2 }, [
|
|
3900
|
+
}, h({ _: 2 }, [P(e.column.operates ?? [], (e) => ({
|
|
3904
3901
|
name: b(e),
|
|
3905
|
-
fn:
|
|
3902
|
+
fn: W(({ item: i }) => [F(t.$slots, b(e), {
|
|
3906
3903
|
row: n,
|
|
3907
3904
|
column: r,
|
|
3908
3905
|
index: a,
|
|
3909
3906
|
item: i
|
|
3910
|
-
}, () => [g(
|
|
3907
|
+
}, () => [g(I(i.label), 1)], !0)])
|
|
3911
3908
|
}))]), 1032, [
|
|
3912
3909
|
"data",
|
|
3913
3910
|
"disabled",
|
|
3914
3911
|
"onClick"
|
|
3915
3912
|
]))]),
|
|
3916
3913
|
_: 3
|
|
3917
|
-
}, 16)) : e.column.type === "expand" ? (
|
|
3918
|
-
key: `${
|
|
3914
|
+
}, 16)) : e.column.type === "expand" ? (j(), d(z(K), T({
|
|
3915
|
+
key: `${z($)(e.column, e.columnIndex)}:expand`,
|
|
3919
3916
|
type: "expand"
|
|
3920
3917
|
}, s.value), {
|
|
3921
|
-
default:
|
|
3918
|
+
default: W(({ row: e, column: n, $index: r }) => [F(t.$slots, "expand", {
|
|
3922
3919
|
row: e,
|
|
3923
3920
|
column: n,
|
|
3924
3921
|
index: r
|
|
3925
3922
|
}, void 0, !0)]),
|
|
3926
3923
|
_: 3
|
|
3927
|
-
}, 16)) : e.column.children?.length ? (
|
|
3928
|
-
default:
|
|
3929
|
-
key:
|
|
3924
|
+
}, 16)) : e.column.children?.length ? (j(), d(z(K), T({ key: `${z($)(e.column, e.columnIndex)}:group` }, s.value), {
|
|
3925
|
+
default: W(() => [(j(!0), p(c, null, P(e.column.children, (i, a) => (j(), d(u, {
|
|
3926
|
+
key: z($)(i, a),
|
|
3930
3927
|
column: i,
|
|
3931
3928
|
"column-index": a,
|
|
3932
3929
|
"index-offset": e.indexOffset,
|
|
@@ -3936,9 +3933,9 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3936
3933
|
"radio-selected": e.radioSelected,
|
|
3937
3934
|
onOperateClick: n[0] ||= (e, t, n) => r("operate-click", e, t, n),
|
|
3938
3935
|
onRadioSelect: n[1] ||= (e) => r("radio-select", e)
|
|
3939
|
-
}, h({ _: 2 }, [
|
|
3936
|
+
}, h({ _: 2 }, [P(t.$slots, (e, n) => ({
|
|
3940
3937
|
name: n,
|
|
3941
|
-
fn:
|
|
3938
|
+
fn: W((e) => [F(t.$slots, n, T({ ref_for: !0 }, e ?? {}), void 0, !0)])
|
|
3942
3939
|
}))]), 1032, [
|
|
3943
3940
|
"column",
|
|
3944
3941
|
"column-index",
|
|
@@ -3949,20 +3946,20 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3949
3946
|
"radio-selected"
|
|
3950
3947
|
]))), 128))]),
|
|
3951
3948
|
_: 3
|
|
3952
|
-
}, 16)) : (
|
|
3953
|
-
default:
|
|
3949
|
+
}, 16)) : (j(), d(z(K), T({ key: `${z($)(e.column, e.columnIndex)}:default` }, s.value), h({
|
|
3950
|
+
default: W(({ row: n, column: r, $index: i }) => [f.value ? F(t.$slots, o(e.column.prop), {
|
|
3954
3951
|
row: n,
|
|
3955
3952
|
column: r,
|
|
3956
3953
|
index: i
|
|
3957
|
-
}, void 0, !0, 0) : (
|
|
3954
|
+
}, void 0, !0, 0) : (j(), p(c, { key: 1 }, [g(I(z(a)(e.column, n, i)), 1)], 64))]),
|
|
3958
3955
|
_: 2
|
|
3959
3956
|
}, [e.column.toolTip ? {
|
|
3960
3957
|
name: "header",
|
|
3961
|
-
fn:
|
|
3958
|
+
fn: W(() => [m("span", null, I(e.column.label), 1), _(z(Re), {
|
|
3962
3959
|
content: e.column.toolTip,
|
|
3963
3960
|
placement: "top"
|
|
3964
3961
|
}, {
|
|
3965
|
-
default:
|
|
3962
|
+
default: W(() => [...n[2] ||= [m("span", { class: "k-table-column__tip" }, "i", -1)]]),
|
|
3966
3963
|
_: 1
|
|
3967
3964
|
}, 8, ["content"])]),
|
|
3968
3965
|
key: "0"
|
|
@@ -3975,14 +3972,14 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3975
3972
|
props: { items: {} },
|
|
3976
3973
|
emits: ["change", "reset"],
|
|
3977
3974
|
setup(e, { emit: t }) {
|
|
3978
|
-
let n = t, r =
|
|
3975
|
+
let n = t, r = N(!1);
|
|
3979
3976
|
function i(e, t) {
|
|
3980
3977
|
n("change", e, t);
|
|
3981
3978
|
}
|
|
3982
3979
|
function a() {
|
|
3983
3980
|
n("reset");
|
|
3984
3981
|
}
|
|
3985
|
-
return (t, n) => (
|
|
3982
|
+
return (t, n) => (j(), d(z(ke), {
|
|
3986
3983
|
visible: r.value,
|
|
3987
3984
|
"onUpdate:visible": n[0] ||= (e) => r.value = e,
|
|
3988
3985
|
placement: "bottom-end",
|
|
@@ -3990,28 +3987,28 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3990
3987
|
trigger: "click",
|
|
3991
3988
|
"popper-class": "k-table-column-selector__popover"
|
|
3992
3989
|
}, {
|
|
3993
|
-
reference:
|
|
3990
|
+
reference: W(() => [...n[1] ||= [m("button", {
|
|
3994
3991
|
type: "button",
|
|
3995
3992
|
class: "k-table-column-selector__trigger",
|
|
3996
3993
|
"aria-label": "列展示设置"
|
|
3997
3994
|
}, [m("span", { class: "k-table-column-selector__icon" })], -1)]]),
|
|
3998
|
-
default:
|
|
3999
|
-
m("div", Ki, [n[3] ||= m("span", null, "列展示", -1), _(
|
|
3995
|
+
default: W(() => [m("div", Gi, [
|
|
3996
|
+
m("div", Ki, [n[3] ||= m("span", null, "列展示", -1), _(z(de), {
|
|
4000
3997
|
type: "primary",
|
|
4001
3998
|
link: "",
|
|
4002
3999
|
onClick: a
|
|
4003
4000
|
}, {
|
|
4004
|
-
default:
|
|
4001
|
+
default: W(() => [...n[2] ||= [g("恢复默认", -1)]]),
|
|
4005
4002
|
_: 1
|
|
4006
4003
|
})]),
|
|
4007
|
-
_(
|
|
4008
|
-
m("div", qi, [(
|
|
4004
|
+
_(z(G), { class: "k-table-column-selector__divider" }),
|
|
4005
|
+
m("div", qi, [(j(!0), p(c, null, P(e.items, (e) => (j(), d(z(me), {
|
|
4009
4006
|
key: e.key,
|
|
4010
4007
|
"model-value": e.checked,
|
|
4011
4008
|
disabled: e.disabled,
|
|
4012
4009
|
onChange: (t) => i(e.key, !!t)
|
|
4013
4010
|
}, {
|
|
4014
|
-
default:
|
|
4011
|
+
default: W(() => [g(I(e.label), 1)]),
|
|
4015
4012
|
_: 2
|
|
4016
4013
|
}, 1032, [
|
|
4017
4014
|
"model-value",
|
|
@@ -4056,23 +4053,23 @@ var Wi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
4056
4053
|
},
|
|
4057
4054
|
emits: ["add"],
|
|
4058
4055
|
setup(e, { emit: t }) {
|
|
4059
|
-
let n = e, r = t, i =
|
|
4060
|
-
return (t, n) => a.value || e.selectionShow ? (
|
|
4061
|
-
a.value ? (
|
|
4062
|
-
e.addButton ? (
|
|
4056
|
+
let n = e, r = t, i = V(), a = u(() => !!(n.addButton || i.header || i.extra)), o = u(() => !!(n.addButton && n.selectionShow));
|
|
4057
|
+
return (t, n) => a.value || e.selectionShow ? (j(), p("div", Yi, [
|
|
4058
|
+
a.value ? (j(), p("div", Xi, [
|
|
4059
|
+
e.addButton ? (j(), d(Y, {
|
|
4063
4060
|
key: 0,
|
|
4064
4061
|
type: "primary",
|
|
4065
|
-
icon:
|
|
4062
|
+
icon: z(qe),
|
|
4066
4063
|
onClick: n[0] ||= (e) => r("add")
|
|
4067
4064
|
}, {
|
|
4068
|
-
default:
|
|
4065
|
+
default: W(() => [g(I(e.addButton === !0 ? "新建" : e.addButton), 1)]),
|
|
4069
4066
|
_: 1
|
|
4070
4067
|
}, 8, ["icon"])) : f("", !0),
|
|
4071
|
-
|
|
4072
|
-
|
|
4068
|
+
z(i).header ? (j(), p("div", Zi, [F(t.$slots, "header", {}, void 0, !0)])) : f("", !0),
|
|
4069
|
+
z(i).extra ? (j(), p("div", Qi, [F(t.$slots, "extra", {}, void 0, !0)])) : f("", !0)
|
|
4073
4070
|
])) : f("", !0),
|
|
4074
|
-
o.value ? (
|
|
4075
|
-
e.selectionShow ? (
|
|
4071
|
+
o.value ? (j(), p("div", $i)) : f("", !0),
|
|
4072
|
+
e.selectionShow ? (j(), p("div", ea, "已选择" + I(e.selectedCount) + "条数据", 1)) : f("", !0)
|
|
4076
4073
|
])) : f("", !0);
|
|
4077
4074
|
}
|
|
4078
4075
|
}), [["__scopeId", "data-v-bff19ed1"]]), na = "kayak_table_column_display";
|
|
@@ -4083,13 +4080,13 @@ function ia(e) {
|
|
|
4083
4080
|
return !(e.type === "radio" || e.type === "expand" || e.children?.length);
|
|
4084
4081
|
}
|
|
4085
4082
|
function aa(e) {
|
|
4086
|
-
let t =
|
|
4083
|
+
let t = N({}), n = N(""), r = Ue(na, {}), i = u(() => !!R(e.enableColumnCache)), a = u(() => R(e.columns).filter((e) => ia(e)));
|
|
4087
4084
|
function o() {
|
|
4088
|
-
return
|
|
4085
|
+
return R(e.tableKey) || n.value;
|
|
4089
4086
|
}
|
|
4090
4087
|
function s() {
|
|
4091
4088
|
let t = {};
|
|
4092
|
-
return
|
|
4089
|
+
return R(e.columns).forEach((e, n) => {
|
|
4093
4090
|
ia(e) && (t[$(e, n)] = !0);
|
|
4094
4091
|
}), t;
|
|
4095
4092
|
}
|
|
@@ -4114,16 +4111,16 @@ function aa(e) {
|
|
|
4114
4111
|
delete t[e], r.value = t;
|
|
4115
4112
|
}
|
|
4116
4113
|
function f(t, n) {
|
|
4117
|
-
let r =
|
|
4114
|
+
let r = R(e.columns), i = r.findIndex((e) => e === t || e.prop && e.prop === t.prop && e.type === t.type);
|
|
4118
4115
|
return i >= 0 ? $(r[i], i) : $(t, n);
|
|
4119
4116
|
}
|
|
4120
4117
|
function p() {
|
|
4121
|
-
n.value =
|
|
4118
|
+
n.value = R(e.tableKey) || `table_${Math.random().toString(36).slice(2, 11)}`;
|
|
4122
4119
|
let r = c();
|
|
4123
4120
|
t.value = r ? J(r) : s();
|
|
4124
4121
|
}
|
|
4125
4122
|
function m() {
|
|
4126
|
-
|
|
4123
|
+
E(() => e.onLayout?.());
|
|
4127
4124
|
}
|
|
4128
4125
|
function h(n, r) {
|
|
4129
4126
|
t.value = {
|
|
@@ -4138,7 +4135,7 @@ function aa(e) {
|
|
|
4138
4135
|
d(), t.value = s(), e.onDisplayChange?.(t.value), m();
|
|
4139
4136
|
}
|
|
4140
4137
|
let v = u(() => {
|
|
4141
|
-
let n =
|
|
4138
|
+
let n = R(e.renderColumns);
|
|
4142
4139
|
return i.value ? n.filter((e, n) => {
|
|
4143
4140
|
if (ra(e)) return !0;
|
|
4144
4141
|
let r = f(e, n);
|
|
@@ -4154,12 +4151,12 @@ function aa(e) {
|
|
|
4154
4151
|
disabled: ra(e)
|
|
4155
4152
|
};
|
|
4156
4153
|
}));
|
|
4157
|
-
return
|
|
4154
|
+
return U(() => R(e.columns), () => {
|
|
4158
4155
|
let e = s();
|
|
4159
4156
|
Object.keys(e).forEach((e) => {
|
|
4160
4157
|
t.value[e] === void 0 && (t.value[e] = !0);
|
|
4161
4158
|
});
|
|
4162
|
-
}, { deep: !0 }),
|
|
4159
|
+
}, { deep: !0 }), A(() => {
|
|
4163
4160
|
p();
|
|
4164
4161
|
}), {
|
|
4165
4162
|
columnDisplay: t,
|
|
@@ -4174,18 +4171,18 @@ function aa(e) {
|
|
|
4174
4171
|
//#endregion
|
|
4175
4172
|
//#region src/components/k-table/composables/useTableData.ts
|
|
4176
4173
|
function oa(e) {
|
|
4177
|
-
let t =
|
|
4174
|
+
let t = N([]), n = N(e.initialLoading ?? !1), r = N(!1), i = N(!1);
|
|
4178
4175
|
function a() {
|
|
4179
4176
|
return {
|
|
4180
4177
|
...ft,
|
|
4181
|
-
...
|
|
4178
|
+
...R(e.responseConfig)
|
|
4182
4179
|
};
|
|
4183
4180
|
}
|
|
4184
4181
|
function o() {
|
|
4185
4182
|
let t = a(), { currentPage: n, pageSize: r } = e.pagination.state.value;
|
|
4186
4183
|
return {
|
|
4187
|
-
...
|
|
4188
|
-
...
|
|
4184
|
+
...R(e.params) ?? {},
|
|
4185
|
+
...R(e.queryParams) ?? {},
|
|
4189
4186
|
[t.page]: String(n),
|
|
4190
4187
|
[t.limit]: String(r)
|
|
4191
4188
|
};
|
|
@@ -4218,7 +4215,7 @@ function oa(e) {
|
|
|
4218
4215
|
//#endregion
|
|
4219
4216
|
//#region src/components/k-table/composables/useTablePagination.ts
|
|
4220
4217
|
function sa(e) {
|
|
4221
|
-
let t =
|
|
4218
|
+
let t = R(e.pagination), n = N({
|
|
4222
4219
|
total: t?.total ?? pt.total,
|
|
4223
4220
|
currentPage: t?.currentPage ?? pt.currentPage,
|
|
4224
4221
|
pageSize: t?.pageSize ?? pt.pageSize,
|
|
@@ -4231,8 +4228,8 @@ function sa(e) {
|
|
|
4231
4228
|
pageSizes: n.value.pageSizes,
|
|
4232
4229
|
layout: n.value.layout
|
|
4233
4230
|
})), i = u(() => (n.value.currentPage - 1) * n.value.pageSize);
|
|
4234
|
-
|
|
4235
|
-
let t =
|
|
4231
|
+
U(() => {
|
|
4232
|
+
let t = R(e.pagination);
|
|
4236
4233
|
return [
|
|
4237
4234
|
t?.total,
|
|
4238
4235
|
t?.currentPage,
|
|
@@ -4267,15 +4264,15 @@ function sa(e) {
|
|
|
4267
4264
|
//#endregion
|
|
4268
4265
|
//#region src/components/k-table/composables/useTableRadio.ts
|
|
4269
4266
|
function ca(e) {
|
|
4270
|
-
let t =
|
|
4267
|
+
let t = N(""), n = u(() => R(e.columns).some((e) => e.type === "radio"));
|
|
4271
4268
|
function r(n) {
|
|
4272
|
-
return t.value = n ? Ni(n,
|
|
4269
|
+
return t.value = n ? Ni(n, R(e.rowKey)) : "", n;
|
|
4273
4270
|
}
|
|
4274
4271
|
function i() {
|
|
4275
4272
|
t.value = "";
|
|
4276
4273
|
}
|
|
4277
4274
|
function a(n) {
|
|
4278
|
-
t.value = Ni(n,
|
|
4275
|
+
t.value = Ni(n, R(e.rowKey));
|
|
4279
4276
|
}
|
|
4280
4277
|
function o() {
|
|
4281
4278
|
return t.value;
|
|
@@ -4297,10 +4294,10 @@ function la(e) {
|
|
|
4297
4294
|
t?.destroy(), t = null;
|
|
4298
4295
|
}
|
|
4299
4296
|
function r() {
|
|
4300
|
-
if (n(), !
|
|
4297
|
+
if (n(), !R(e.enabled)) return;
|
|
4301
4298
|
let r = e.tableRef.value?.$el?.querySelector(".el-table__body-wrapper tbody");
|
|
4302
4299
|
r && (t = Ze.create(r, {
|
|
4303
|
-
disabled:
|
|
4300
|
+
disabled: R(e.disabled),
|
|
4304
4301
|
animation: 300,
|
|
4305
4302
|
handle: ".sort-handle",
|
|
4306
4303
|
filter: ".ignore-elements",
|
|
@@ -4308,16 +4305,16 @@ function la(e) {
|
|
|
4308
4305
|
onEnd: (t) => e.onSortEnd(t)
|
|
4309
4306
|
}));
|
|
4310
4307
|
}
|
|
4311
|
-
return
|
|
4312
|
-
|
|
4313
|
-
|
|
4308
|
+
return U(() => [
|
|
4309
|
+
R(e.enabled),
|
|
4310
|
+
R(e.rebindKey),
|
|
4314
4311
|
e.tableRef.value
|
|
4315
4312
|
], () => {
|
|
4316
|
-
|
|
4317
|
-
}, { flush: "post" }),
|
|
4313
|
+
E(r);
|
|
4314
|
+
}, { flush: "post" }), U(() => R(e.disabled), (e) => {
|
|
4318
4315
|
t && t.option("disabled", e);
|
|
4319
|
-
}),
|
|
4320
|
-
initSortable: () =>
|
|
4316
|
+
}), k(n), {
|
|
4317
|
+
initSortable: () => E(r),
|
|
4321
4318
|
destroySortable: n
|
|
4322
4319
|
};
|
|
4323
4320
|
}
|
|
@@ -4327,7 +4324,7 @@ function ua(e) {
|
|
|
4327
4324
|
let t = /* @__PURE__ */ new Map();
|
|
4328
4325
|
function n(n) {
|
|
4329
4326
|
return (r, i, a) => {
|
|
4330
|
-
let o = Ni(r,
|
|
4327
|
+
let o = Ni(r, R(e.rowKey));
|
|
4331
4328
|
o != null && t.set(o, {
|
|
4332
4329
|
row: r,
|
|
4333
4330
|
treeNode: i,
|
|
@@ -4336,7 +4333,7 @@ function ua(e) {
|
|
|
4336
4333
|
};
|
|
4337
4334
|
}
|
|
4338
4335
|
function r(n) {
|
|
4339
|
-
let r =
|
|
4336
|
+
let r = R(e.load), i = t.get(n);
|
|
4340
4337
|
if (!i || !r) return;
|
|
4341
4338
|
let a = e.tableRef.value?.store?.states?.lazyTreeNodeMap;
|
|
4342
4339
|
a && n != null && (a[String(n)] = []), r(i.row, i.treeNode, i.resolve);
|
|
@@ -4353,7 +4350,7 @@ function ua(e) {
|
|
|
4353
4350
|
//#endregion
|
|
4354
4351
|
//#region src/components/k-table/composables/useKTable.ts
|
|
4355
4352
|
function da(e) {
|
|
4356
|
-
let { props: t, emit: n, attrs: r, slots: i, tableRef: a, queryRef: o } = e, s =
|
|
4353
|
+
let { props: t, emit: n, attrs: r, slots: i, tableRef: a, queryRef: o } = e, s = N({}), c = N(0), l = u(() => !!t.action), d = u(() => !!t.query?.form?.formConfigs?.length), f = u(() => !!i.header);
|
|
4357
4354
|
function p(e) {
|
|
4358
4355
|
let n = { ...e };
|
|
4359
4356
|
s.value = t.convertParams ? t.convertParams(n) : n;
|
|
@@ -4386,11 +4383,11 @@ function da(e) {
|
|
|
4386
4383
|
pagination: v,
|
|
4387
4384
|
initialLoading: !!(t.action && t.initTable),
|
|
4388
4385
|
onDataLoaded: (e, t) => n("data-loaded", e, t)
|
|
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)),
|
|
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)), ee = u(() => l.value ? y.tableData.value : t.data), C = u(() => t.loading === void 0 ? l.value ? y.loading.value : !1 : t.loading), w = u(() => C.value || !!(l.value && t.initTable && !y.loaded.value)), T = u(() => {
|
|
4390
4387
|
let e = { ...r };
|
|
4391
4388
|
l.value && "data" in e && delete e.data, t.load && delete e.load;
|
|
4392
4389
|
let n = {
|
|
4393
|
-
data:
|
|
4390
|
+
data: ee.value,
|
|
4394
4391
|
rowKey: t.rowKey,
|
|
4395
4392
|
border: !0,
|
|
4396
4393
|
stripe: !0,
|
|
@@ -4408,84 +4405,84 @@ function da(e) {
|
|
|
4408
4405
|
tableRef: a,
|
|
4409
4406
|
rebindKey: () => x.value,
|
|
4410
4407
|
onSortEnd: (e) => {
|
|
4411
|
-
let t = [...
|
|
4408
|
+
let t = [...ee.value];
|
|
4412
4409
|
if (e.oldIndex == null || e.newIndex == null) return;
|
|
4413
4410
|
let [r] = t.splice(e.oldIndex, 1);
|
|
4414
4411
|
t.splice(e.newIndex, 0, r), n("sort-end", e, t);
|
|
4415
4412
|
}
|
|
4416
4413
|
});
|
|
4417
|
-
function
|
|
4414
|
+
function E() {
|
|
4418
4415
|
l.value && y.fetchData();
|
|
4419
4416
|
}
|
|
4420
|
-
|
|
4417
|
+
A(() => {
|
|
4421
4418
|
!t.initTable || !t.action || (d.value && p(o.value?.getParams() ?? {}), y.fetchData());
|
|
4422
4419
|
});
|
|
4423
|
-
function
|
|
4420
|
+
function D(e) {
|
|
4424
4421
|
c.value = e.length, n("selection-change", e);
|
|
4425
4422
|
}
|
|
4426
|
-
function
|
|
4423
|
+
function te(e) {
|
|
4427
4424
|
n("sort-change", e);
|
|
4428
4425
|
}
|
|
4429
|
-
function
|
|
4426
|
+
function O() {
|
|
4430
4427
|
a.value?.setCurrentRow();
|
|
4431
4428
|
}
|
|
4432
|
-
function
|
|
4433
|
-
p(e), v.resetPage(), t.clearCurrentRowOnQuery &&
|
|
4429
|
+
function k(e) {
|
|
4430
|
+
p(e), v.resetPage(), t.clearCurrentRowOnQuery && O(), n("query", s.value), E();
|
|
4434
4431
|
}
|
|
4435
|
-
function
|
|
4436
|
-
n("reset"), t.selectionShow &&
|
|
4432
|
+
function j() {
|
|
4433
|
+
n("reset"), t.selectionShow && R(), t.clearCurrentRowOnReset && O();
|
|
4437
4434
|
}
|
|
4438
|
-
function
|
|
4439
|
-
v.setCurrentPage(e), n("page-change", e),
|
|
4435
|
+
function ne(e) {
|
|
4436
|
+
v.setCurrentPage(e), n("page-change", e), E();
|
|
4440
4437
|
}
|
|
4441
|
-
function
|
|
4442
|
-
v.setPageSize(e), n("size-change", e),
|
|
4438
|
+
function M(e) {
|
|
4439
|
+
v.setPageSize(e), n("size-change", e), E();
|
|
4443
4440
|
}
|
|
4444
|
-
function
|
|
4441
|
+
function P() {
|
|
4445
4442
|
n("add");
|
|
4446
4443
|
}
|
|
4447
|
-
function
|
|
4444
|
+
function F(e, t, r) {
|
|
4448
4445
|
n("operate-click", e, t, r);
|
|
4449
4446
|
}
|
|
4450
|
-
function
|
|
4447
|
+
function re(e) {
|
|
4451
4448
|
if (!g.hasRadioColumn.value) return;
|
|
4452
4449
|
let t = g.selectRow(e);
|
|
4453
4450
|
t && n("radio-change", t, g.radioSelected.value);
|
|
4454
4451
|
}
|
|
4455
|
-
function
|
|
4456
|
-
|
|
4452
|
+
function ie(e) {
|
|
4453
|
+
re(e);
|
|
4457
4454
|
}
|
|
4458
|
-
function
|
|
4455
|
+
function ae(e, t) {
|
|
4459
4456
|
h.setColumnVisibleByKey(e, t);
|
|
4460
4457
|
}
|
|
4461
|
-
function
|
|
4458
|
+
function oe() {
|
|
4462
4459
|
return a.value;
|
|
4463
4460
|
}
|
|
4464
|
-
function
|
|
4461
|
+
function I() {
|
|
4465
4462
|
return o.value;
|
|
4466
4463
|
}
|
|
4467
|
-
function
|
|
4464
|
+
function L() {
|
|
4468
4465
|
return a.value?.getSelectionRows() ?? [];
|
|
4469
4466
|
}
|
|
4470
|
-
function
|
|
4467
|
+
function R() {
|
|
4471
4468
|
a.value?.clearSelection(), c.value = 0;
|
|
4472
4469
|
}
|
|
4473
|
-
function
|
|
4470
|
+
function z(e, t) {
|
|
4474
4471
|
a.value?.toggleRowSelection(e, t);
|
|
4475
4472
|
}
|
|
4476
|
-
async function
|
|
4473
|
+
async function B(e = !1) {
|
|
4477
4474
|
l.value && await y.refresh(e);
|
|
4478
4475
|
}
|
|
4479
|
-
function
|
|
4476
|
+
function se() {
|
|
4480
4477
|
g.clearRadioSelection(), a.value?.setCurrentRow();
|
|
4481
4478
|
}
|
|
4482
|
-
function
|
|
4479
|
+
function V(e) {
|
|
4483
4480
|
g.setRadioSelection(e);
|
|
4484
4481
|
}
|
|
4485
|
-
function
|
|
4482
|
+
function H() {
|
|
4486
4483
|
return g.getRadioSelection();
|
|
4487
4484
|
}
|
|
4488
|
-
function
|
|
4485
|
+
function ce(e) {
|
|
4489
4486
|
_.refreshTree(e);
|
|
4490
4487
|
}
|
|
4491
4488
|
return {
|
|
@@ -4493,37 +4490,37 @@ function da(e) {
|
|
|
4493
4490
|
showToolbar: S,
|
|
4494
4491
|
hasHeaderSlot: f,
|
|
4495
4492
|
renderColumns: b,
|
|
4496
|
-
tableProps:
|
|
4497
|
-
tableLoading:
|
|
4498
|
-
showLoadingEmpty:
|
|
4493
|
+
tableProps: T,
|
|
4494
|
+
tableLoading: C,
|
|
4495
|
+
showLoadingEmpty: w,
|
|
4499
4496
|
columnSelectorItems: h.selectorItems,
|
|
4500
4497
|
paginationBind: v.bindProps,
|
|
4501
4498
|
indexOffset: v.indexOffset,
|
|
4502
4499
|
selectedCount: c,
|
|
4503
4500
|
radioSelected: g.radioSelected,
|
|
4504
4501
|
getColumnIdentity: $,
|
|
4505
|
-
handleSelectionChange:
|
|
4506
|
-
handleSortChange:
|
|
4507
|
-
handleQuery:
|
|
4508
|
-
handleQueryReset:
|
|
4509
|
-
handlePageChange:
|
|
4510
|
-
handleSizeChange:
|
|
4511
|
-
handleAdd:
|
|
4512
|
-
handleOperateClick:
|
|
4513
|
-
handleRowClick:
|
|
4514
|
-
handleRadioChange:
|
|
4515
|
-
handleColumnVisibleChange:
|
|
4502
|
+
handleSelectionChange: D,
|
|
4503
|
+
handleSortChange: te,
|
|
4504
|
+
handleQuery: k,
|
|
4505
|
+
handleQueryReset: j,
|
|
4506
|
+
handlePageChange: ne,
|
|
4507
|
+
handleSizeChange: M,
|
|
4508
|
+
handleAdd: P,
|
|
4509
|
+
handleOperateClick: F,
|
|
4510
|
+
handleRowClick: ie,
|
|
4511
|
+
handleRadioChange: re,
|
|
4512
|
+
handleColumnVisibleChange: ae,
|
|
4516
4513
|
resetColumnDisplay: h.resetColumnDisplay,
|
|
4517
|
-
getTableRef:
|
|
4518
|
-
getQueryRef:
|
|
4519
|
-
getSelection:
|
|
4520
|
-
clearSelection:
|
|
4521
|
-
toggleRowSelection:
|
|
4522
|
-
refresh:
|
|
4523
|
-
clearRadioSelection:
|
|
4524
|
-
setRadioSelection:
|
|
4525
|
-
getRadioSelection:
|
|
4526
|
-
refreshTree:
|
|
4514
|
+
getTableRef: oe,
|
|
4515
|
+
getQueryRef: I,
|
|
4516
|
+
getSelection: L,
|
|
4517
|
+
clearSelection: R,
|
|
4518
|
+
toggleRowSelection: z,
|
|
4519
|
+
refresh: B,
|
|
4520
|
+
clearRadioSelection: se,
|
|
4521
|
+
setRadioSelection: V,
|
|
4522
|
+
getRadioSelection: H,
|
|
4523
|
+
refreshTree: ce
|
|
4527
4524
|
};
|
|
4528
4525
|
}
|
|
4529
4526
|
var fa = {
|
|
@@ -4547,7 +4544,7 @@ var fa = {
|
|
|
4547
4544
|
name: "KTable",
|
|
4548
4545
|
inheritAttrs: !0,
|
|
4549
4546
|
__name: "KTable",
|
|
4550
|
-
props: /*@__PURE__*/
|
|
4547
|
+
props: /*@__PURE__*/ C({
|
|
4551
4548
|
columns: {},
|
|
4552
4549
|
data: {},
|
|
4553
4550
|
action: { type: Function },
|
|
@@ -4591,10 +4588,10 @@ var fa = {
|
|
|
4591
4588
|
"sort-change"
|
|
4592
4589
|
],
|
|
4593
4590
|
setup(e, { expose: t, emit: n }) {
|
|
4594
|
-
let r = e, i = n, a =
|
|
4591
|
+
let r = e, i = n, a = V(), o = N(), s = N(), l = M(da({
|
|
4595
4592
|
props: r,
|
|
4596
4593
|
emit: i,
|
|
4597
|
-
attrs:
|
|
4594
|
+
attrs: B(),
|
|
4598
4595
|
slots: a,
|
|
4599
4596
|
tableRef: o,
|
|
4600
4597
|
queryRef: s
|
|
@@ -4619,8 +4616,8 @@ var fa = {
|
|
|
4619
4616
|
getRadioSelection: l.getRadioSelection,
|
|
4620
4617
|
refreshTree: l.refreshTree
|
|
4621
4618
|
}), (t, n) => {
|
|
4622
|
-
let r =
|
|
4623
|
-
return
|
|
4619
|
+
let r = ie("loading");
|
|
4620
|
+
return j(), p("div", pa, [l.showQuery ? (j(), d(z(ji), T({
|
|
4624
4621
|
key: 0,
|
|
4625
4622
|
ref_key: "queryRef",
|
|
4626
4623
|
ref: s,
|
|
@@ -4629,7 +4626,7 @@ var fa = {
|
|
|
4629
4626
|
onQuery: l.handleQuery,
|
|
4630
4627
|
onReset: l.handleQueryReset
|
|
4631
4628
|
}), null, 16, ["onQuery", "onReset"])) : f("", !0), m("div", ma, [
|
|
4632
|
-
l.showToolbar ? (
|
|
4629
|
+
l.showToolbar ? (j(), d(ta, {
|
|
4633
4630
|
key: 0,
|
|
4634
4631
|
"add-button": e.addButton,
|
|
4635
4632
|
"selection-show": e.selectionShow,
|
|
@@ -4637,11 +4634,11 @@ var fa = {
|
|
|
4637
4634
|
onAdd: l.handleAdd
|
|
4638
4635
|
}, h({ _: 2 }, [l.hasHeaderSlot ? {
|
|
4639
4636
|
name: "header",
|
|
4640
|
-
fn:
|
|
4637
|
+
fn: W(() => [F(t.$slots, "header", {}, void 0, !0)]),
|
|
4641
4638
|
key: "0"
|
|
4642
4639
|
} : void 0, e.enableColumnCache ? {
|
|
4643
4640
|
name: "extra",
|
|
4644
|
-
fn:
|
|
4641
|
+
fn: W(() => [_(Ji, {
|
|
4645
4642
|
items: l.columnSelectorItems,
|
|
4646
4643
|
onChange: l.handleColumnVisibleChange,
|
|
4647
4644
|
onReset: l.resetColumnDisplay
|
|
@@ -4657,7 +4654,7 @@ var fa = {
|
|
|
4657
4654
|
"selected-count",
|
|
4658
4655
|
"onAdd"
|
|
4659
4656
|
])) : f("", !0),
|
|
4660
|
-
|
|
4657
|
+
le((j(), d(z(Fe), T({
|
|
4661
4658
|
ref_key: "tableRef",
|
|
4662
4659
|
ref: o,
|
|
4663
4660
|
class: "k-table__main"
|
|
@@ -4666,23 +4663,23 @@ var fa = {
|
|
|
4666
4663
|
onSortChange: l.handleSortChange,
|
|
4667
4664
|
onRowClick: l.handleRowClick
|
|
4668
4665
|
}), {
|
|
4669
|
-
empty:
|
|
4670
|
-
default:
|
|
4666
|
+
empty: W(() => [l.showLoadingEmpty ? le((j(), p("span", ha, null, 512)), [[r, l.showLoadingEmpty]]) : F(t.$slots, "empty", {}, () => [g(I(t.$attrs.emptyText ?? t.$attrs["empty-text"] ?? "暂无数据"), 1)], !0, 1)]),
|
|
4667
|
+
default: W(() => [e.sort ? (j(), d(z(K), {
|
|
4671
4668
|
key: 0,
|
|
4672
4669
|
label: "拖拽排序",
|
|
4673
4670
|
align: "center",
|
|
4674
4671
|
width: "100"
|
|
4675
4672
|
}, {
|
|
4676
|
-
default:
|
|
4673
|
+
default: W(({ row: n, column: r, $index: i }) => [F(t.$slots, "sort", {
|
|
4677
4674
|
row: n,
|
|
4678
4675
|
column: r,
|
|
4679
4676
|
index: i
|
|
4680
4677
|
}, () => [m("span", {
|
|
4681
|
-
class:
|
|
4678
|
+
class: D(e.sortFilter.includes(i) ? "ignore-elements" : "sort-handle k-table__sort-handle"),
|
|
4682
4679
|
"aria-hidden": "true"
|
|
4683
4680
|
}, "⋮⋮", 2)], !0)]),
|
|
4684
4681
|
_: 3
|
|
4685
|
-
})) : f("", !0), (
|
|
4682
|
+
})) : f("", !0), (j(!0), p(c, null, P(l.renderColumns, (n, r) => (j(), d(Wi, {
|
|
4686
4683
|
key: l.getColumnIdentity(n, r),
|
|
4687
4684
|
column: n,
|
|
4688
4685
|
"column-index": r,
|
|
@@ -4693,9 +4690,9 @@ var fa = {
|
|
|
4693
4690
|
"radio-selected": l.radioSelected,
|
|
4694
4691
|
onOperateClick: l.handleOperateClick,
|
|
4695
4692
|
onRadioSelect: l.handleRadioChange
|
|
4696
|
-
}, h({ _: 2 }, [
|
|
4693
|
+
}, h({ _: 2 }, [P(v.value, (e) => ({
|
|
4697
4694
|
name: e,
|
|
4698
|
-
fn:
|
|
4695
|
+
fn: W((n) => [F(t.$slots, e, T({ ref_for: !0 }, n ?? {}), void 0, !0)])
|
|
4699
4696
|
}))]), 1032, [
|
|
4700
4697
|
"column",
|
|
4701
4698
|
"column-index",
|
|
@@ -4713,13 +4710,13 @@ var fa = {
|
|
|
4713
4710
|
"onSortChange",
|
|
4714
4711
|
"onRowClick"
|
|
4715
4712
|
])), [[r, l.tableLoading]]),
|
|
4716
|
-
m("div", ga, [e.hidePagination ? f("", !0) : (
|
|
4713
|
+
m("div", ga, [e.hidePagination ? f("", !0) : (j(), d(z(Jr), T({
|
|
4717
4714
|
key: 0,
|
|
4718
4715
|
class: "pagination"
|
|
4719
4716
|
}, l.paginationBind, {
|
|
4720
4717
|
onCurrentChange: l.handlePageChange,
|
|
4721
4718
|
onSizeChange: l.handleSizeChange
|
|
4722
|
-
}), null, 16, ["onCurrentChange", "onSizeChange"])),
|
|
4719
|
+
}), null, 16, ["onCurrentChange", "onSizeChange"])), F(t.$slots, "footer", {}, void 0, !0)])
|
|
4723
4720
|
])]);
|
|
4724
4721
|
};
|
|
4725
4722
|
}
|
|
@@ -4735,17 +4732,17 @@ function ya(e) {
|
|
|
4735
4732
|
//#endregion
|
|
4736
4733
|
//#region src/components/k-table/composables/useKTableTemplateRef.ts
|
|
4737
4734
|
function ba(e) {
|
|
4738
|
-
return
|
|
4735
|
+
return H(e);
|
|
4739
4736
|
}
|
|
4740
4737
|
//#endregion
|
|
4741
4738
|
//#region src/components/k-table/composables/useKTableCrossPageSelection.ts
|
|
4742
4739
|
function xa(e) {
|
|
4743
|
-
let t =
|
|
4740
|
+
let t = oe([]), n = oe([]), r = oe(!1), i = ba(e.tableRefKey ?? "tableRef");
|
|
4744
4741
|
function a() {
|
|
4745
|
-
return e.tableRef == null ? i.value :
|
|
4742
|
+
return e.tableRef == null ? i.value : R(e.tableRef);
|
|
4746
4743
|
}
|
|
4747
4744
|
function o(t) {
|
|
4748
|
-
return String(Ni(t,
|
|
4745
|
+
return String(Ni(t, R(e.rowKey)));
|
|
4749
4746
|
}
|
|
4750
4747
|
function s(e) {
|
|
4751
4748
|
t.value = [...e];
|
|
@@ -4759,16 +4756,16 @@ function xa(e) {
|
|
|
4759
4756
|
function u(i) {
|
|
4760
4757
|
n.value = i;
|
|
4761
4758
|
let s = new Set(t.value.map(o));
|
|
4762
|
-
if (
|
|
4759
|
+
if (R(e.mode) === "single") {
|
|
4763
4760
|
let e = i.find((e) => s.has(o(e)));
|
|
4764
4761
|
e && a()?.setRadioSelection(e);
|
|
4765
4762
|
return;
|
|
4766
4763
|
}
|
|
4767
|
-
r.value = !0,
|
|
4764
|
+
r.value = !0, E(async () => {
|
|
4768
4765
|
let e = a();
|
|
4769
4766
|
i.forEach((t) => {
|
|
4770
4767
|
s.has(o(t)) && e?.toggleRowSelection(t, !0);
|
|
4771
|
-
}), await
|
|
4768
|
+
}), await E(), r.value = !1;
|
|
4772
4769
|
});
|
|
4773
4770
|
}
|
|
4774
4771
|
function d(e) {
|
|
@@ -4856,18 +4853,18 @@ function Oa(e, t) {
|
|
|
4856
4853
|
//#endregion
|
|
4857
4854
|
//#region src/components/k-table/report/useExportKTableReport.ts
|
|
4858
4855
|
function ka(e) {
|
|
4859
|
-
let t =
|
|
4856
|
+
let t = N(!1);
|
|
4860
4857
|
async function n() {
|
|
4861
4858
|
if (!t.value) {
|
|
4862
4859
|
t.value = !0;
|
|
4863
4860
|
try {
|
|
4864
4861
|
await wa({
|
|
4865
4862
|
tableRef: e.tableRef,
|
|
4866
|
-
columns:
|
|
4863
|
+
columns: R(e.columns),
|
|
4867
4864
|
exportApi: e.exportApi,
|
|
4868
4865
|
convertParams: e.convertParams,
|
|
4869
|
-
excludeOperates:
|
|
4870
|
-
excludeLast:
|
|
4866
|
+
excludeOperates: R(e.excludeOperates),
|
|
4867
|
+
excludeLast: R(e.excludeLast)
|
|
4871
4868
|
});
|
|
4872
4869
|
} finally {
|
|
4873
4870
|
t.value = !1;
|