@kayak-sj/design 1.0.45 → 1.0.47
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-BbBdjo9j.css → components-crJ55-Y9.css} +1 -1
- package/dist/chunks/{Complex-BggSDwy7.js → Complex-CmH6Cx2G.js} +1 -1
- package/dist/chunks/{components-YIuGuaaJ.js → components-CvNzOcPk.js} +593 -593
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
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 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 ne, openBlock as A, provide as j, reactive as re, ref as M, renderList as N, renderSlot as P, resolveComponent as
|
|
4
|
-
import { ElButton as
|
|
5
|
-
import
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
import { useDebounceFn as
|
|
8
|
-
import { Delete as
|
|
9
|
-
import * as
|
|
10
|
-
import
|
|
11
|
-
import '../assets/components-
|
|
12
|
-
var
|
|
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 ne, openBlock as A, provide as j, reactive as re, ref as M, renderList as N, renderSlot as P, resolveComponent as ie, resolveDirective as ae, resolveDynamicComponent as oe, shallowRef as se, toDisplayString as F, toRef as I, toValue as L, unref as R, useAttrs as ce, useModel as le, useSlots as z, useTemplateRef as B, vShow as ue, watch as V, withCtx as H, withDirectives as de, withModifiers as fe } from "vue";
|
|
4
|
+
import { ElButton as pe, ElCard as me, ElCascader as he, ElCheckbox as U, ElCheckboxGroup as ge, ElCollapse as _e, ElCollapseItem as ve, ElDatePicker as ye, ElDialog as be, ElDivider as xe, ElForm as W, ElFormItem as Se, ElIcon as Ce, ElImageViewer as we, ElInput as Te, ElInputNumber as Ee, ElMessage as De, ElOption as Oe, ElPagination as ke, ElPopover as Ae, ElProgress as je, ElRadio as Me, ElRadioButton as Ne, ElRadioGroup as Pe, ElSelect as Fe, ElTable as Ie, ElTableColumn as G, ElTag as Le, ElTimePicker as Re, ElTooltip as ze, ElTreeSelect as Be, ElUpload as Ve } from "element-plus";
|
|
5
|
+
import K from "dayjs";
|
|
6
|
+
import { cloneDeep as q } from "lodash-es";
|
|
7
|
+
import { useDebounceFn as He, useEventListener as Ue, useLocalStorage as We } from "@vueuse/core";
|
|
8
|
+
import { Delete as Ge, Download as Ke, Loading as qe, Plus as Je, VideoPlay as Ye, ZoomIn as Xe } from "@element-plus/icons-vue";
|
|
9
|
+
import * as Ze from "lucide-vue-next";
|
|
10
|
+
import Qe from "sortablejs";
|
|
11
|
+
import '../assets/components-crJ55-Y9.css';//#region \0rolldown/runtime.js
|
|
12
|
+
var $e = Object.defineProperty, et = (e, t) => {
|
|
13
13
|
let n = {};
|
|
14
|
-
for (var r in e)
|
|
14
|
+
for (var r in e) $e(n, r, {
|
|
15
15
|
get: e[r],
|
|
16
16
|
enumerable: !0
|
|
17
17
|
});
|
|
18
|
-
return t ||
|
|
18
|
+
return t || $e(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
19
19
|
};
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/utils/createStubComponent.ts
|
|
22
|
-
function
|
|
22
|
+
function tt(e) {
|
|
23
23
|
return y({
|
|
24
24
|
name: e,
|
|
25
25
|
inheritAttrs: !0,
|
|
@@ -32,7 +32,7 @@ function et(e) {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function nt(e) {
|
|
36
36
|
return y({
|
|
37
37
|
name: `LucideStub_${e}`,
|
|
38
38
|
inheritAttrs: !0,
|
|
@@ -60,29 +60,29 @@ function tt(e) {
|
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/components/k-button/KButton.vue
|
|
63
|
-
var
|
|
63
|
+
var J = /* @__PURE__ */ y({
|
|
64
64
|
name: "KButton",
|
|
65
65
|
__name: "KButton",
|
|
66
66
|
setup(e) {
|
|
67
|
-
return (e, t) => (A(), d(
|
|
68
|
-
default:
|
|
67
|
+
return (e, t) => (A(), d(R(pe), te(b(e.$attrs)), {
|
|
68
|
+
default: H(() => [P(e.$slots, "default")]),
|
|
69
69
|
_: 3
|
|
70
70
|
}, 16));
|
|
71
71
|
}
|
|
72
|
-
}),
|
|
72
|
+
}), rt = { class: "k-dialog-header" }, it = {
|
|
73
73
|
key: 0,
|
|
74
74
|
class: "k-dialog-header__badge",
|
|
75
75
|
"aria-hidden": "true"
|
|
76
|
-
},
|
|
76
|
+
}, at = { class: "k-dialog-header__text" }, ot = {
|
|
77
77
|
key: 0,
|
|
78
78
|
class: "k-dialog-header__title"
|
|
79
|
-
},
|
|
79
|
+
}, st = {
|
|
80
80
|
key: 1,
|
|
81
81
|
class: "k-dialog-header__desc"
|
|
82
|
-
},
|
|
82
|
+
}, ct = {
|
|
83
83
|
key: 1,
|
|
84
84
|
class: "k-dialog-header__extra"
|
|
85
|
-
},
|
|
85
|
+
}, lt = /* @__PURE__ */ y({
|
|
86
86
|
name: "KDialogHeader",
|
|
87
87
|
__name: "KDialogHeader",
|
|
88
88
|
props: {
|
|
@@ -92,21 +92,21 @@ var Y = /* @__PURE__ */ y({
|
|
|
92
92
|
iconSize: { default: 22 }
|
|
93
93
|
},
|
|
94
94
|
setup(e) {
|
|
95
|
-
return (t, n) => (A(), p("div",
|
|
96
|
-
e.icon || t.$slots.icon ? (A(), p("div",
|
|
95
|
+
return (t, n) => (A(), p("div", rt, [
|
|
96
|
+
e.icon || t.$slots.icon ? (A(), p("div", it, [P(t.$slots, "icon", {}, () => [(A(), d(oe(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
|
-
m("div",
|
|
102
|
-
e.title || t.$slots.title ? (A(), p("p",
|
|
103
|
-
e.description || t.$slots.description ? (A(), p("p",
|
|
101
|
+
m("div", at, [
|
|
102
|
+
e.title || t.$slots.title ? (A(), p("p", ot, [P(t.$slots, "title", {}, () => [g(F(e.title), 1)])])) : f("", !0),
|
|
103
|
+
e.description || t.$slots.description ? (A(), p("p", st, [P(t.$slots, "description", {}, () => [g(F(e.description), 1)])])) : f("", !0),
|
|
104
104
|
P(t.$slots, "default")
|
|
105
105
|
]),
|
|
106
|
-
t.$slots.extra ? (A(), p("div",
|
|
106
|
+
t.$slots.extra ? (A(), p("div", ct, [P(t.$slots, "extra")])) : f("", !0)
|
|
107
107
|
]));
|
|
108
108
|
}
|
|
109
|
-
}),
|
|
109
|
+
}), ut = { class: "k-dialog__body" }, dt = /* @__PURE__ */ y({
|
|
110
110
|
name: "KDialog",
|
|
111
111
|
inheritAttrs: !1,
|
|
112
112
|
__name: "KDialog",
|
|
@@ -152,7 +152,7 @@ var Y = /* @__PURE__ */ y({
|
|
|
152
152
|
"closed"
|
|
153
153
|
], ["update:visible"]),
|
|
154
154
|
setup(e, { emit: t }) {
|
|
155
|
-
let n =
|
|
155
|
+
let n = le(e, "visible"), r = e, i = t, a = ce(), o = z(), 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
|
|
@@ -175,23 +175,23 @@ var Y = /* @__PURE__ */ y({
|
|
|
175
175
|
function ee() {
|
|
176
176
|
i("confirm");
|
|
177
177
|
}
|
|
178
|
-
return (t, r) => (A(), d(
|
|
178
|
+
return (t, r) => (A(), d(R(be), 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: H(() => [m("div", ut, [P(t.$slots, "default")])]),
|
|
185
185
|
_: 2
|
|
186
186
|
}, [b.value ? {
|
|
187
187
|
name: "header",
|
|
188
|
-
fn:
|
|
188
|
+
fn: H(() => [P(t.$slots, "header", {}, () => [_(lt, {
|
|
189
189
|
title: e.title,
|
|
190
190
|
description: e.description,
|
|
191
191
|
icon: e.icon
|
|
192
|
-
}, h({ _: 2 }, [
|
|
192
|
+
}, h({ _: 2 }, [R(o).icon ? {
|
|
193
193
|
name: "icon",
|
|
194
|
-
fn:
|
|
194
|
+
fn: H(() => [P(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, R(o).footer ? {
|
|
203
203
|
name: "footer",
|
|
204
|
-
fn:
|
|
204
|
+
fn: H(() => [P(t.$slots, "footer")]),
|
|
205
205
|
key: "1"
|
|
206
|
-
} : !
|
|
206
|
+
} : !R(o).footer && (e.showConfirm !== !1 || e.showCancel !== !1) ? {
|
|
207
207
|
name: "footer",
|
|
208
|
-
fn:
|
|
208
|
+
fn: H(() => [e.showCancel === !1 ? f("", !0) : (A(), d(J, {
|
|
209
209
|
key: 0,
|
|
210
210
|
onClick: S
|
|
211
211
|
}, {
|
|
212
|
-
default:
|
|
212
|
+
default: H(() => [g(F(y.value), 1)]),
|
|
213
213
|
_: 1
|
|
214
|
-
})), e.showConfirm === !1 ? f("", !0) : (A(), d(
|
|
214
|
+
})), e.showConfirm === !1 ? f("", !0) : (A(), d(J, {
|
|
215
215
|
key: 1,
|
|
216
216
|
type: "primary",
|
|
217
217
|
loading: e.confirmLoading,
|
|
218
218
|
onClick: ee
|
|
219
219
|
}, {
|
|
220
|
-
default:
|
|
220
|
+
default: H(() => [g(F(v.value), 1)]),
|
|
221
221
|
_: 1
|
|
222
222
|
}, 8, ["loading"]))]),
|
|
223
223
|
key: "2"
|
|
@@ -227,12 +227,12 @@ var Y = /* @__PURE__ */ y({
|
|
|
227
227
|
"title"
|
|
228
228
|
]));
|
|
229
229
|
}
|
|
230
|
-
}),
|
|
230
|
+
}), ft = Symbol("kayak-dict"), pt = {
|
|
231
231
|
list: "rows",
|
|
232
232
|
page: "page_no",
|
|
233
233
|
limit: "page_size",
|
|
234
234
|
total: "total"
|
|
235
|
-
},
|
|
235
|
+
}, mt = {
|
|
236
236
|
total: 0,
|
|
237
237
|
currentPage: 1,
|
|
238
238
|
pageSize: 10,
|
|
@@ -243,13 +243,13 @@ var Y = /* @__PURE__ */ y({
|
|
|
243
243
|
100
|
|
244
244
|
],
|
|
245
245
|
layout: "total, sizes, prev, pager, next, jumper"
|
|
246
|
-
},
|
|
246
|
+
}, ht = {
|
|
247
247
|
number: /^\d+$/,
|
|
248
248
|
phone: /^1\d{10}$/,
|
|
249
249
|
money: /^(0|[1-9]\d*)(\.\d{1,2})?$/,
|
|
250
250
|
percentage: /^(?!0(?:\.00?)?$)(?:100(?:\.00?)?|\d{0,2}(?:\.\d{1,2})?)$/
|
|
251
251
|
};
|
|
252
|
-
function
|
|
252
|
+
function gt(e, t) {
|
|
253
253
|
return {
|
|
254
254
|
validator: (n, r, i) => {
|
|
255
255
|
if (r === "" || r == null) {
|
|
@@ -261,7 +261,7 @@ function ht(e, t) {
|
|
|
261
261
|
trigger: "blur"
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function _t(e) {
|
|
265
265
|
return {
|
|
266
266
|
validator: (t, n, r) => {
|
|
267
267
|
let i = Array.isArray(n) ? n : [], a = String(i[0] ?? "").trim(), o = String(i[1] ?? "").trim();
|
|
@@ -274,21 +274,21 @@ function gt(e) {
|
|
|
274
274
|
trigger: ["change", "blur"]
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function vt(e) {
|
|
278
278
|
let t = [...e.rules ?? []];
|
|
279
279
|
if (typeof e.component != "string") return t;
|
|
280
280
|
let n = e.componentProps?.type;
|
|
281
|
-
if (e.component === "Input" && n === "number" && t.push(ht
|
|
281
|
+
if (e.component === "Input" && n === "number" && t.push(gt(ht.number, "请输入合法的正整数")), e.component === "Input" && n === "phone" && t.push(gt(ht.phone, "请输入正常的手机号")), e.component === "Input" && n === "money" && t.push(gt(ht.money, "请输入正确金额数值")), e.component === "Input" && n === "percentage" && t.push(gt(ht.percentage, "请输入正确的数据范围:0.01 ~ 100")), e.component === "InputMixInput") {
|
|
282
282
|
let e = t.find((e) => e.required);
|
|
283
|
-
e && t.push(
|
|
283
|
+
e && t.push(_t(String(e.message || "请完整填写")));
|
|
284
284
|
}
|
|
285
285
|
return t;
|
|
286
286
|
}
|
|
287
287
|
//#endregion
|
|
288
288
|
//#region src/components/k-form/composables/useKFormFields.ts
|
|
289
|
-
function
|
|
290
|
-
let t = S(
|
|
291
|
-
let t =
|
|
289
|
+
function yt(e) {
|
|
290
|
+
let t = S(ft, null), n = u(() => e.formConfigs.value.filter((e) => e.display === void 0 || e.display)), r = u(() => e.layout.value.hideLabel ? n.value.map((e) => {
|
|
291
|
+
let t = q(e);
|
|
292
292
|
return t.componentProps ||= {}, typeof t.component == "string" && [
|
|
293
293
|
"Input",
|
|
294
294
|
"Select",
|
|
@@ -305,7 +305,7 @@ function vt(e) {
|
|
|
305
305
|
}));
|
|
306
306
|
}
|
|
307
307
|
function a(t) {
|
|
308
|
-
return t.display === !1 || t.readonly === !0 || e.formReadonly?.value ? [] :
|
|
308
|
+
return t.display === !1 || t.readonly === !0 || e.formReadonly?.value ? [] : vt(t);
|
|
309
309
|
}
|
|
310
310
|
function o(e) {
|
|
311
311
|
return e.componentProps?.style;
|
|
@@ -331,9 +331,9 @@ function vt(e) {
|
|
|
331
331
|
}
|
|
332
332
|
//#endregion
|
|
333
333
|
//#region src/components/k-form/composables/useKFormModel.ts
|
|
334
|
-
function
|
|
334
|
+
function bt(e) {
|
|
335
335
|
let { componentProps: t = {}, component: n } = e, r = t.value, i = t.type ?? "";
|
|
336
|
-
if (r !== void 0) return
|
|
336
|
+
if (r !== void 0) return q(r);
|
|
337
337
|
if (t.multiple === !0 || n === "Checkbox" || n === "SelectMultiple" || n === "InputMixInput") return [];
|
|
338
338
|
if (n === "InputMixSelect") return {};
|
|
339
339
|
if (n === "DatePicker" && [
|
|
@@ -343,31 +343,31 @@ function yt(e) {
|
|
|
343
343
|
].includes(i)) return [];
|
|
344
344
|
if (n !== "DatePicker") return n === "Upload" || n === "TimePicker" && i === "timerange" ? [] : "";
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
return
|
|
346
|
+
function xt(e, t, n) {
|
|
347
|
+
return Y(t);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function St(e) {
|
|
350
350
|
return e.controlled?.value === !0;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Y(e) {
|
|
353
353
|
if (typeof e != "object" || !e) return e;
|
|
354
354
|
if (e instanceof Date) return new Date(e.getTime());
|
|
355
|
-
if (Array.isArray(e)) return e.map(
|
|
355
|
+
if (Array.isArray(e)) return e.map(Y);
|
|
356
356
|
let t = e, n = {};
|
|
357
|
-
for (let e of Object.keys(t)) n[e] =
|
|
357
|
+
for (let e of Object.keys(t)) n[e] = Y(t[e]);
|
|
358
358
|
return n;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ct(e) {
|
|
361
361
|
let t = {};
|
|
362
362
|
return Object.keys(e).forEach((n) => {
|
|
363
|
-
t[n] =
|
|
363
|
+
t[n] = Y(e[n]);
|
|
364
364
|
}), t;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function wt(e, t) {
|
|
367
367
|
let n = t[e.id];
|
|
368
|
-
return n == null ?
|
|
368
|
+
return n == null ? bt(e) : xt(e, n, t);
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Tt(e) {
|
|
371
371
|
let t = re({}), 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;
|
|
@@ -393,27 +393,27 @@ function wt(e) {
|
|
|
393
393
|
function c() {
|
|
394
394
|
return {
|
|
395
395
|
...s(),
|
|
396
|
-
...
|
|
396
|
+
...Ct(t)
|
|
397
397
|
};
|
|
398
398
|
}
|
|
399
399
|
function l() {
|
|
400
|
-
let n =
|
|
400
|
+
let n = St(e) ? c() : Ct(t);
|
|
401
401
|
return r = n, e.onChange?.(n), n;
|
|
402
402
|
}
|
|
403
403
|
function d(r) {
|
|
404
|
-
let i = s(), a =
|
|
404
|
+
let i = s(), a = St(e), o = {};
|
|
405
405
|
r.forEach((e) => {
|
|
406
406
|
if (e.display !== !1) {
|
|
407
|
-
o[e.id] =
|
|
407
|
+
o[e.id] = wt(e, i);
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
410
410
|
if (a) {
|
|
411
411
|
let t = i[e.id];
|
|
412
|
-
t != null && (o[e.id] =
|
|
412
|
+
t != null && (o[e.id] = Y(t));
|
|
413
413
|
}
|
|
414
414
|
}), Object.keys(t).forEach((e) => {
|
|
415
415
|
e in o || delete t[e];
|
|
416
|
-
}), Object.assign(t, o), n =
|
|
416
|
+
}), Object.assign(t, o), n = q(t);
|
|
417
417
|
}
|
|
418
418
|
function f(e, n) {
|
|
419
419
|
let r = n?.preserveFieldIds, o = r?.length ? new Set(r) : null;
|
|
@@ -421,21 +421,21 @@ function wt(e) {
|
|
|
421
421
|
if (o?.has(r) || !(r in e)) return;
|
|
422
422
|
let i = e[r];
|
|
423
423
|
if (i == null) {
|
|
424
|
-
t[r] =
|
|
424
|
+
t[r] = bt(a(r));
|
|
425
425
|
return;
|
|
426
426
|
}
|
|
427
|
-
t[r] =
|
|
427
|
+
t[r] = xt(n, i, e);
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
430
|
function p(n) {
|
|
431
431
|
let i = s(), a = [];
|
|
432
432
|
if (n.forEach((e) => {
|
|
433
|
-
e.display !== !1 && t[e.id] === void 0 && (t[e.id] =
|
|
433
|
+
e.display !== !1 && t[e.id] === void 0 && (t[e.id] = wt(e, i), a.push(e.id));
|
|
434
434
|
}), a.length) {
|
|
435
|
-
if (
|
|
435
|
+
if (St(e)) {
|
|
436
436
|
let n = {};
|
|
437
437
|
if (a.forEach((e) => {
|
|
438
|
-
e in i || (n[e] =
|
|
438
|
+
e in i || (n[e] = Y(t[e]));
|
|
439
439
|
}), Object.keys(n).length) {
|
|
440
440
|
let t = {
|
|
441
441
|
...i,
|
|
@@ -454,10 +454,10 @@ function wt(e) {
|
|
|
454
454
|
if (!i.value.has(t)) return;
|
|
455
455
|
let o = a(t), s = e[t];
|
|
456
456
|
if (s == null) {
|
|
457
|
-
n[t] =
|
|
457
|
+
n[t] = bt(o);
|
|
458
458
|
return;
|
|
459
459
|
}
|
|
460
|
-
n[t] =
|
|
460
|
+
n[t] = xt(o, s, {
|
|
461
461
|
...r,
|
|
462
462
|
...e
|
|
463
463
|
});
|
|
@@ -467,44 +467,44 @@ function wt(e) {
|
|
|
467
467
|
if (Object.is(t[n.id], r)) return;
|
|
468
468
|
t[n.id] = r;
|
|
469
469
|
let i = l();
|
|
470
|
-
(n.onChange ?? n.componentProps?.onChange)?.(r, n),
|
|
470
|
+
(n.onChange ?? n.componentProps?.onChange)?.(r, n), St(e) && f({
|
|
471
471
|
...i,
|
|
472
472
|
[n.id]: t[n.id]
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
475
|
function g(e) {
|
|
476
|
-
return (e?.length ? e : Object.keys(t)).reduce((e, n) => (n in t && (e[n] =
|
|
476
|
+
return (e?.length ? e : Object.keys(t)).reduce((e, n) => (n in t && (e[n] = Y(t[n])), e), {});
|
|
477
477
|
}
|
|
478
478
|
function _() {
|
|
479
479
|
let n = {};
|
|
480
480
|
return e.formConfigs.value.forEach((e) => {
|
|
481
|
-
e.display !== !1 && t[e.id] !== void 0 && (n[e.id] =
|
|
481
|
+
e.display !== !1 && t[e.id] !== void 0 && (n[e.id] = Y(t[e.id]));
|
|
482
482
|
}), n;
|
|
483
483
|
}
|
|
484
484
|
function v() {
|
|
485
485
|
Object.keys(t).forEach((e) => {
|
|
486
486
|
e in n || delete t[e];
|
|
487
|
-
}), Object.assign(t,
|
|
487
|
+
}), Object.assign(t, q(n)), l();
|
|
488
488
|
}
|
|
489
489
|
function y() {
|
|
490
|
-
n =
|
|
490
|
+
n = q(t);
|
|
491
491
|
}
|
|
492
492
|
function b(r) {
|
|
493
493
|
r.forEach((r) => {
|
|
494
|
-
let i =
|
|
495
|
-
t[r] =
|
|
494
|
+
let i = St(e) ? bt(a(r)) : n[r] ?? "";
|
|
495
|
+
t[r] = Y(i);
|
|
496
496
|
}), l();
|
|
497
497
|
}
|
|
498
|
-
return
|
|
498
|
+
return V(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 }),
|
|
505
|
-
|
|
506
|
-
}, { deep: !0 }),
|
|
507
|
-
!
|
|
504
|
+
}, { immediate: !0 }), V(() => e.data?.value, (t) => {
|
|
505
|
+
St(e) || t && Object.keys(t).length && m(t);
|
|
506
|
+
}, { deep: !0 }), V(() => e.modelValue?.value, (t) => {
|
|
507
|
+
!St(e) || !t || t !== r && f(t);
|
|
508
508
|
}, {
|
|
509
509
|
deep: !0,
|
|
510
510
|
immediate: !0
|
|
@@ -522,7 +522,7 @@ function wt(e) {
|
|
|
522
522
|
}
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region src/components/k-form/constants.ts
|
|
525
|
-
var
|
|
525
|
+
var Et = Symbol("k-form-date-picker-values"), Dt = [
|
|
526
526
|
"year",
|
|
527
527
|
"month",
|
|
528
528
|
"date",
|
|
@@ -534,44 +534,44 @@ var Tt = Symbol("k-form-date-picker-values"), Et = [
|
|
|
534
534
|
"monthrange",
|
|
535
535
|
"yearrange"
|
|
536
536
|
];
|
|
537
|
-
function
|
|
537
|
+
function Ot(e) {
|
|
538
538
|
return typeof e == "string" || typeof e == "number" ? e : String(e);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function X(e) {
|
|
541
541
|
if (e != null) return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : String(e);
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function kt(e) {
|
|
544
544
|
return e == null ? "" : String(e);
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function At(e) {
|
|
547
547
|
return Array.isArray(e) ? e.filter((e) => typeof e == "string" || typeof e == "number") : [];
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function jt(e) {
|
|
550
550
|
if (typeof e == "number" && !Number.isNaN(e)) return e;
|
|
551
551
|
if (e == null || e === "") return;
|
|
552
552
|
let t = Number(e);
|
|
553
553
|
return Number.isNaN(t) ? void 0 : t;
|
|
554
554
|
}
|
|
555
|
-
function jt(e) {
|
|
556
|
-
if (e != null) return e instanceof Date || typeof e == "string" || Array.isArray(e) && e.length === 2 && (e.every((e) => e instanceof Date) || e.every((e) => typeof e == "string")) ? e : String(e);
|
|
557
|
-
}
|
|
558
555
|
function Mt(e) {
|
|
559
|
-
return e &&
|
|
556
|
+
if (e != null) return e instanceof Date || typeof e == "string" || Array.isArray(e) && e.length === 2 && (e.every((e) => e instanceof Date) || e.every((e) => typeof e == "string")) ? e : String(e);
|
|
560
557
|
}
|
|
561
558
|
function Nt(e) {
|
|
562
|
-
|
|
559
|
+
return e && Dt.includes(e) ? e : "date";
|
|
563
560
|
}
|
|
564
561
|
function Pt(e) {
|
|
565
|
-
return e
|
|
562
|
+
if (e != null && e !== "") return e instanceof Date || typeof e == "string" || Array.isArray(e) && e.length === 2 && (e.every((e) => e instanceof Date) || e.every((e) => typeof e == "string")) ? e : String(e);
|
|
566
563
|
}
|
|
567
564
|
function Ft(e) {
|
|
568
|
-
return e
|
|
565
|
+
return e === "timerange" ? "timerange" : "time";
|
|
569
566
|
}
|
|
570
567
|
function It(e) {
|
|
568
|
+
return e == null || typeof e == "string" || typeof e == "number" ? e : Array.isArray(e) ? e.filter((e) => typeof e == "string" || typeof e == "number") : typeof e == "object" ? e : String(e);
|
|
569
|
+
}
|
|
570
|
+
function Lt(e) {
|
|
571
571
|
return Array.isArray(e) ? e : [];
|
|
572
572
|
}
|
|
573
|
-
function
|
|
574
|
-
let n =
|
|
573
|
+
function Rt(e, t) {
|
|
574
|
+
let n = X(t);
|
|
575
575
|
if (n !== void 0) for (let t of e) {
|
|
576
576
|
let e = t.value ?? t.id;
|
|
577
577
|
if (e != null && String(e) === String(n)) {
|
|
@@ -580,34 +580,34 @@ function Lt(e, t) {
|
|
|
580
580
|
}
|
|
581
581
|
let r = t.children;
|
|
582
582
|
if (Array.isArray(r)) {
|
|
583
|
-
let e =
|
|
583
|
+
let e = Rt(r, n);
|
|
584
584
|
if (e) return e;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
let i =
|
|
590
|
-
if (i == null || i === "") return
|
|
588
|
+
function zt(e, t, n, r = " / ") {
|
|
589
|
+
let i = It(t);
|
|
590
|
+
if (i == null || i === "") return Z(t);
|
|
591
591
|
let a = n?.value ?? "value", o = n?.label ?? "label", s = n?.children ?? "children", c = Array.isArray(i) ? i : [i], l = [], u = Array.isArray(e) ? e : [];
|
|
592
592
|
for (let e of c) {
|
|
593
593
|
let t = u.find((t) => t != null && String(t[a]) === String(e));
|
|
594
|
-
if (!t) return l.length ? [...l, ...c.slice(l.length).map(String)].join(r) :
|
|
594
|
+
if (!t) return l.length ? [...l, ...c.slice(l.length).map(String)].join(r) : Z(Array.isArray(i) ? c.join(r) : i);
|
|
595
595
|
let n = t[o];
|
|
596
596
|
l.push(String(n != null && n !== "" ? n : e));
|
|
597
597
|
let d = t[s];
|
|
598
598
|
u = Array.isArray(d) ? d : [];
|
|
599
599
|
}
|
|
600
|
-
return l.length ? l.join(r) :
|
|
600
|
+
return l.length ? l.join(r) : Z(t);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function Z(e, t = "--") {
|
|
603
603
|
return e == null || e === "" ? t : String(e);
|
|
604
604
|
}
|
|
605
605
|
//#endregion
|
|
606
606
|
//#region src/components/k-form/formComponent/Cascader.vue?vue&type=script&setup=true&lang.ts
|
|
607
|
-
var
|
|
607
|
+
var Bt = {
|
|
608
608
|
key: 0,
|
|
609
609
|
class: "k-form-cascader__readonly"
|
|
610
|
-
},
|
|
610
|
+
}, Vt = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
611
611
|
name: "KFormCascader",
|
|
612
612
|
__name: "Cascader",
|
|
613
613
|
props: {
|
|
@@ -623,8 +623,8 @@ var zt = {
|
|
|
623
623
|
},
|
|
624
624
|
emits: ["update:modelValue"],
|
|
625
625
|
setup(e, { emit: t }) {
|
|
626
|
-
let n = e, r = t, i = u(() =>
|
|
627
|
-
return (t, n) => e.readonly ? (A(), p("span",
|
|
626
|
+
let n = e, r = t, i = u(() => It(n.modelValue)), a = u(() => n.cascaderProps ?? n.props), o = u(() => zt(n.options, n.modelValue, a.value, n.separator ?? " / "));
|
|
627
|
+
return (t, n) => e.readonly ? (A(), p("span", Bt, F(o.value), 1)) : (A(), d(R(he), {
|
|
628
628
|
key: 1,
|
|
629
629
|
"model-value": i.value,
|
|
630
630
|
options: e.options ?? [],
|
|
@@ -642,10 +642,10 @@ var zt = {
|
|
|
642
642
|
"disabled"
|
|
643
643
|
]));
|
|
644
644
|
}
|
|
645
|
-
}), [["__scopeId", "data-v-ed0da536"]]),
|
|
645
|
+
}), [["__scopeId", "data-v-ed0da536"]]), Ht = { class: "k-form-checkbox" }, Ut = {
|
|
646
646
|
key: 0,
|
|
647
647
|
class: "k-form-checkbox__readonly"
|
|
648
|
-
},
|
|
648
|
+
}, Wt = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
649
649
|
name: "KFormCheckbox",
|
|
650
650
|
__name: "CheckBox",
|
|
651
651
|
props: {
|
|
@@ -670,8 +670,8 @@ var zt = {
|
|
|
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
|
-
|
|
674
|
-
o.value =
|
|
673
|
+
V(() => i.modelValue, (e) => {
|
|
674
|
+
o.value = At(e), v(o.value);
|
|
675
675
|
}, { immediate: !0 });
|
|
676
676
|
function v(e) {
|
|
677
677
|
let t = m.value.length, n = e.length;
|
|
@@ -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) => (A(), p("div",
|
|
687
|
+
return (t, i) => (A(), p("div", Ht, [e.readonly ? (A(), p("span", Ut, F(h.value), 1)) : (A(), p(c, { key: 1 }, [e.showSelectAll ? (A(), d(R(U), {
|
|
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: H(() => [...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), _(R(ge), {
|
|
702
702
|
"model-value": o.value,
|
|
703
703
|
disabled: e.disabled,
|
|
704
704
|
"onUpdate:modelValue": b
|
|
705
705
|
}, {
|
|
706
|
-
default:
|
|
706
|
+
default: H(() => [(A(!0), p(c, null, N(e.options, (e) => (A(), d(R(ze), {
|
|
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: H(() => [_(R(U), {
|
|
713
|
+
value: R(X)(e.value),
|
|
714
714
|
disabled: e.disabled
|
|
715
715
|
}, {
|
|
716
|
-
default:
|
|
716
|
+
default: H(() => [g(F(e.label), 1)]),
|
|
717
717
|
_: 2
|
|
718
718
|
}, 1032, ["value", "disabled"])]),
|
|
719
719
|
_: 2
|
|
@@ -721,10 +721,10 @@ var zt = {
|
|
|
721
721
|
_: 1
|
|
722
722
|
}, 8, ["model-value", "disabled"])], 64))]));
|
|
723
723
|
}
|
|
724
|
-
}), [["__scopeId", "data-v-fca64c11"]]),
|
|
724
|
+
}), [["__scopeId", "data-v-fca64c11"]]), Gt = ["innerHTML"], Kt = {
|
|
725
725
|
key: 2,
|
|
726
726
|
class: "k-form-date-picker__readonly"
|
|
727
|
-
},
|
|
727
|
+
}, qt = ["innerHTML"], Jt = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
728
728
|
name: "KFormDatePicker",
|
|
729
729
|
inheritAttrs: !1,
|
|
730
730
|
__name: "DatePicker",
|
|
@@ -769,15 +769,15 @@ var zt = {
|
|
|
769
769
|
},
|
|
770
770
|
emits: ["update:modelValue"],
|
|
771
771
|
setup(e, { emit: t }) {
|
|
772
|
-
let n = e, r = t, i = S(
|
|
773
|
-
if (!n.modelValue) return
|
|
772
|
+
let n = e, r = t, i = S(Et, null), a = u(() => n.datePickerValues ?? i?.value ?? {}), o = u(() => Mt(n.modelValue)), s = u(() => Nt(n.type)), c = u(() => s.value === "datetimerange" ? "k-form-date-picker--datetimerange" : ""), l = (e, t) => K(e instanceof Date ? e : String(e)).format(t), m = u(() => {
|
|
773
|
+
if (!n.modelValue) return Z(n.modelValue);
|
|
774
774
|
let e = s.value.includes("datetime") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
775
775
|
if (Array.isArray(n.modelValue)) return n.modelValue.map((t) => l(t, e)).join(" - ");
|
|
776
|
-
let t =
|
|
777
|
-
return t.isValid() ? t.format(e) :
|
|
776
|
+
let t = K(n.modelValue instanceof Date ? n.modelValue : String(n.modelValue));
|
|
777
|
+
return t.isValid() ? t.format(e) : Z(n.modelValue);
|
|
778
778
|
}), h = u(() => {
|
|
779
779
|
if (!n.limitTime) return;
|
|
780
|
-
let e =
|
|
780
|
+
let e = K().hour();
|
|
781
781
|
return () => Array.from({ length: 24 }, (e, t) => t).filter((t) => t < e);
|
|
782
782
|
});
|
|
783
783
|
function g(e) {
|
|
@@ -799,7 +799,7 @@ var zt = {
|
|
|
799
799
|
let t = a.value[`kitDate-${e.id}`];
|
|
800
800
|
if (!t) return null;
|
|
801
801
|
if (t instanceof Date) return g(t);
|
|
802
|
-
let n =
|
|
802
|
+
let n = K(t);
|
|
803
803
|
return n.isValid() ? g(n.toDate()) : null;
|
|
804
804
|
}
|
|
805
805
|
return null;
|
|
@@ -826,8 +826,8 @@ var zt = {
|
|
|
826
826
|
key: 0,
|
|
827
827
|
class: "k-form-date-picker__text",
|
|
828
828
|
innerHTML: e.prepend
|
|
829
|
-
}, null, 8,
|
|
830
|
-
e.readonly ? (A(), p("span",
|
|
829
|
+
}, null, 8, Gt)) : f("", !0),
|
|
830
|
+
e.readonly ? (A(), p("span", Kt, F(m.value), 1)) : (A(), d(R(ye), {
|
|
831
831
|
key: 1,
|
|
832
832
|
"model-value": o.value,
|
|
833
833
|
type: s.value,
|
|
@@ -856,10 +856,10 @@ var zt = {
|
|
|
856
856
|
key: 3,
|
|
857
857
|
class: "k-form-date-picker__text",
|
|
858
858
|
innerHTML: e.append
|
|
859
|
-
}, null, 8,
|
|
859
|
+
}, null, 8, qt)) : f("", !0)
|
|
860
860
|
], 2));
|
|
861
861
|
}
|
|
862
|
-
}), [["__scopeId", "data-v-4885818d"]]),
|
|
862
|
+
}), [["__scopeId", "data-v-4885818d"]]), Yt = /* @__PURE__ */ y({
|
|
863
863
|
name: "KFormFallback",
|
|
864
864
|
__name: "Fallback",
|
|
865
865
|
props: {
|
|
@@ -867,17 +867,17 @@ var zt = {
|
|
|
867
867
|
componentType: {}
|
|
868
868
|
},
|
|
869
869
|
setup(e) {
|
|
870
|
-
let t = e, n = u(() => `[${t.componentType ?? "Unknown"}] 待迁移`), r = u(() =>
|
|
871
|
-
return (e, t) => (A(), d(
|
|
870
|
+
let t = e, n = u(() => `[${t.componentType ?? "Unknown"}] 待迁移`), r = u(() => kt(t.modelValue));
|
|
871
|
+
return (e, t) => (A(), d(R(Te), {
|
|
872
872
|
"model-value": r.value,
|
|
873
873
|
disabled: "",
|
|
874
874
|
placeholder: n.value
|
|
875
875
|
}, null, 8, ["model-value", "placeholder"]));
|
|
876
876
|
}
|
|
877
|
-
}),
|
|
877
|
+
}), Xt = ["type"], Zt = {
|
|
878
878
|
key: 1,
|
|
879
879
|
class: "k-form-input__readonly"
|
|
880
|
-
},
|
|
880
|
+
}, Q = /* @__PURE__ */ y({
|
|
881
881
|
name: "KFormInput",
|
|
882
882
|
inheritAttrs: !1,
|
|
883
883
|
__name: "Input",
|
|
@@ -912,8 +912,8 @@ var zt = {
|
|
|
912
912
|
},
|
|
913
913
|
emits: ["update:modelValue"],
|
|
914
914
|
setup(e, { emit: t }) {
|
|
915
|
-
let n = e, r = t, i = u(() =>
|
|
916
|
-
let e =
|
|
915
|
+
let n = e, r = t, i = u(() => kt(n.modelValue)), a = u(() => n.maxlength ?? n.maxLength), o = u(() => n.type === "textarea"), s = u(() => n.clearable && !o.value), c = u(() => {
|
|
916
|
+
let e = Z(i.value);
|
|
917
917
|
return e === "--" ? e : `${n.prepend || ""}${e}${n.append || ""}`;
|
|
918
918
|
});
|
|
919
919
|
function l(e) {
|
|
@@ -927,8 +927,8 @@ var zt = {
|
|
|
927
927
|
key: 0,
|
|
928
928
|
class: D(["k-form-input__side k-form-input__side--left", e.leftClass]),
|
|
929
929
|
onClick: n[0] ||= (...t) => e.leftClick && e.leftClick(...t)
|
|
930
|
-
},
|
|
931
|
-
e.readonly ? (A(), p("div",
|
|
930
|
+
}, F(e.leftText), 3)) : f("", !0),
|
|
931
|
+
e.readonly ? (A(), p("div", Zt, F(c.value), 1)) : (A(), d(R(Te), T({ key: 2 }, t.$attrs, {
|
|
932
932
|
"model-value": i.value,
|
|
933
933
|
autocomplete: "off",
|
|
934
934
|
clearable: s.value,
|
|
@@ -939,11 +939,11 @@ var zt = {
|
|
|
939
939
|
"onUpdate:modelValue": l
|
|
940
940
|
}), h({ _: 2 }, [e.prepend ? {
|
|
941
941
|
name: "prepend",
|
|
942
|
-
fn:
|
|
942
|
+
fn: H(() => [g(F(e.prepend), 1)]),
|
|
943
943
|
key: "0"
|
|
944
944
|
} : void 0, e.append ? {
|
|
945
945
|
name: "append",
|
|
946
|
-
fn:
|
|
946
|
+
fn: H(() => [g(F(e.append), 1)]),
|
|
947
947
|
key: "1"
|
|
948
948
|
} : void 0]), 1040, [
|
|
949
949
|
"model-value",
|
|
@@ -957,8 +957,8 @@ var zt = {
|
|
|
957
957
|
key: 3,
|
|
958
958
|
class: D(["k-form-input__side k-form-input__side--right", e.rightClass]),
|
|
959
959
|
onClick: n[1] ||= (...t) => e.rightClick && e.rightClick(...t)
|
|
960
|
-
},
|
|
961
|
-
], 8,
|
|
960
|
+
}, F(e.rightText), 3)) : f("", !0)
|
|
961
|
+
], 8, Xt));
|
|
962
962
|
}
|
|
963
963
|
}), Qt = ["innerHTML"], $t = ["innerHTML"], en = ["innerHTML"], tn = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
964
964
|
name: "KFormInputMixInput",
|
|
@@ -1006,7 +1006,7 @@ var zt = {
|
|
|
1006
1006
|
};
|
|
1007
1007
|
}
|
|
1008
1008
|
let c = u(() => o(n.leftProps)), l = u(() => o(n.rightProps)), d = u(() => s(n.leftWidth, n.leftProps)), h = u(() => s(n.rightWidth, n.rightProps));
|
|
1009
|
-
|
|
1009
|
+
V(() => n.modelValue, (e) => {
|
|
1010
1010
|
Array.isArray(e) && (i.value = [String(e[0] ?? ""), String(e[1] ?? "")]);
|
|
1011
1011
|
}, { immediate: !0 });
|
|
1012
1012
|
function g(e, t) {
|
|
@@ -1021,7 +1021,7 @@ var zt = {
|
|
|
1021
1021
|
m("div", {
|
|
1022
1022
|
class: D(["k-form-input-mix-input__control", { "k-form-input-mix-input__control--affix": c.value }]),
|
|
1023
1023
|
style: O(e.readonly ? void 0 : d.value)
|
|
1024
|
-
}, [_(
|
|
1024
|
+
}, [_(Q, T({
|
|
1025
1025
|
clearable: e.clearable,
|
|
1026
1026
|
"model-value": i.value[0],
|
|
1027
1027
|
readonly: e.readonly,
|
|
@@ -1042,7 +1042,7 @@ var zt = {
|
|
|
1042
1042
|
m("div", {
|
|
1043
1043
|
class: D(["k-form-input-mix-input__control", { "k-form-input-mix-input__control--affix": l.value }]),
|
|
1044
1044
|
style: O(e.readonly ? void 0 : h.value)
|
|
1045
|
-
}, [_(
|
|
1045
|
+
}, [_(Q, T({
|
|
1046
1046
|
"model-value": i.value[1],
|
|
1047
1047
|
clearable: e.clearable,
|
|
1048
1048
|
readonly: e.readonly,
|
|
@@ -1090,9 +1090,9 @@ var zt = {
|
|
|
1090
1090
|
},
|
|
1091
1091
|
emits: ["update:modelValue"],
|
|
1092
1092
|
setup(e, { emit: t }) {
|
|
1093
|
-
let n = e, r = t, i = u(() =>
|
|
1093
|
+
let n = e, r = t, i = u(() => X(n.modelValue)), a = u(() => At(n.modelValue)), o = u(() => (n.options ?? []).map((e) => ({
|
|
1094
1094
|
label: e.label,
|
|
1095
|
-
value:
|
|
1095
|
+
value: Ot(e.value),
|
|
1096
1096
|
disabled: e.disabled,
|
|
1097
1097
|
key: String(e.value)
|
|
1098
1098
|
}))), s = u(() => {
|
|
@@ -1101,12 +1101,12 @@ var zt = {
|
|
|
1101
1101
|
let t = a.value, n = e.filter((e) => t.includes(e.value)).map((e) => e.label);
|
|
1102
1102
|
return n.length ? n.join(",") : "--";
|
|
1103
1103
|
}
|
|
1104
|
-
return e.find((e) => e.value === i.value)?.label ??
|
|
1104
|
+
return e.find((e) => e.value === i.value)?.label ?? Z(i.value);
|
|
1105
1105
|
});
|
|
1106
1106
|
function l(e) {
|
|
1107
1107
|
r("update:modelValue", e);
|
|
1108
1108
|
}
|
|
1109
|
-
return (t, n) => (A(), p("div", T({ class: ["k-form-select", { "k-form-select--readonly": e.readonly }] }, t.$attrs), [e.readonly ? (A(), p("span", nn,
|
|
1109
|
+
return (t, n) => (A(), p("div", T({ class: ["k-form-select", { "k-form-select--readonly": e.readonly }] }, t.$attrs), [e.readonly ? (A(), p("span", nn, F(s.value), 1)) : (A(), d(R(Fe), {
|
|
1110
1110
|
key: 1,
|
|
1111
1111
|
"model-value": e.multiple ? a.value : i.value,
|
|
1112
1112
|
placeholder: e.placeholder,
|
|
@@ -1116,7 +1116,7 @@ var zt = {
|
|
|
1116
1116
|
disabled: e.disabled,
|
|
1117
1117
|
"onUpdate:modelValue": l
|
|
1118
1118
|
}, {
|
|
1119
|
-
default:
|
|
1119
|
+
default: H(() => [(A(!0), p(c, null, N(o.value, (e) => (A(), d(R(Oe), {
|
|
1120
1120
|
key: e.key,
|
|
1121
1121
|
label: e.label,
|
|
1122
1122
|
value: e.value,
|
|
@@ -1184,11 +1184,11 @@ var zt = {
|
|
|
1184
1184
|
},
|
|
1185
1185
|
emits: ["update:modelValue"],
|
|
1186
1186
|
setup(e, { emit: t }) {
|
|
1187
|
-
let n = S(
|
|
1188
|
-
let e =
|
|
1187
|
+
let n = S(ft, null), r = e, i = t, a = M({}), o = M(""), s = M(""), l = u(() => r.inputProps.id ?? "input"), d = u(() => r.selectProps.id ?? "select"), h = u(() => {
|
|
1188
|
+
let e = q(r.inputProps);
|
|
1189
1189
|
return delete e.id, e;
|
|
1190
1190
|
}), g = u(() => {
|
|
1191
|
-
let e =
|
|
1191
|
+
let e = q(r.selectProps);
|
|
1192
1192
|
return delete e.id, e;
|
|
1193
1193
|
});
|
|
1194
1194
|
function v(e, t) {
|
|
@@ -1232,8 +1232,8 @@ var zt = {
|
|
|
1232
1232
|
function j(e, t) {
|
|
1233
1233
|
a.value[t] = e, o.value = String(a.value[l.value] ?? ""), s.value = a.value[d.value], ne();
|
|
1234
1234
|
}
|
|
1235
|
-
return
|
|
1236
|
-
e && typeof e == "object" && !Array.isArray(e) && (a.value =
|
|
1235
|
+
return V(() => r.modelValue, (e) => {
|
|
1236
|
+
e && typeof e == "object" && !Array.isArray(e) && (a.value = q(e), o.value = String(a.value[l.value] ?? ""), s.value = a.value[d.value]);
|
|
1237
1237
|
}, {
|
|
1238
1238
|
immediate: !0,
|
|
1239
1239
|
deep: !0
|
|
@@ -1241,13 +1241,13 @@ var zt = {
|
|
|
1241
1241
|
class: "k-form-input-mix-select__row",
|
|
1242
1242
|
style: O(b.value)
|
|
1243
1243
|
}, [
|
|
1244
|
-
e.leftText ? (A(), p("div", an,
|
|
1244
|
+
e.leftText ? (A(), p("div", an, F(e.leftText), 1)) : f("", !0),
|
|
1245
1245
|
e.inputBefore ? (A(), p(c, { key: 1 }, [
|
|
1246
1246
|
e.inputHide ? f("", !0) : (A(), p("div", {
|
|
1247
1247
|
key: 0,
|
|
1248
1248
|
class: D(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": ee.value }]),
|
|
1249
1249
|
style: O(E.value)
|
|
1250
|
-
}, [_(
|
|
1250
|
+
}, [_(Q, T({
|
|
1251
1251
|
"model-value": o.value,
|
|
1252
1252
|
readonly: e.readonly,
|
|
1253
1253
|
disabled: e.disabled,
|
|
@@ -1258,7 +1258,7 @@ var zt = {
|
|
|
1258
1258
|
"disabled",
|
|
1259
1259
|
"placeholder"
|
|
1260
1260
|
])], 6)),
|
|
1261
|
-
e.centerText ? (A(), p("div", on,
|
|
1261
|
+
e.centerText ? (A(), p("div", on, F(e.centerText), 1)) : f("", !0),
|
|
1262
1262
|
m("div", {
|
|
1263
1263
|
class: D(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": C.value }]),
|
|
1264
1264
|
style: O(w.value)
|
|
@@ -1292,12 +1292,12 @@ var zt = {
|
|
|
1292
1292
|
"options",
|
|
1293
1293
|
"placeholder"
|
|
1294
1294
|
])], 6),
|
|
1295
|
-
e.centerText ? (A(), p("div", sn,
|
|
1295
|
+
e.centerText ? (A(), p("div", sn, F(e.centerText), 1)) : f("", !0),
|
|
1296
1296
|
e.inputHide ? f("", !0) : (A(), p("div", {
|
|
1297
1297
|
key: 1,
|
|
1298
1298
|
class: D(["k-form-input-mix-select__control", { "k-form-input-mix-select__control--affix": ee.value }]),
|
|
1299
1299
|
style: O(E.value)
|
|
1300
|
-
}, [_(
|
|
1300
|
+
}, [_(Q, T({
|
|
1301
1301
|
"model-value": o.value,
|
|
1302
1302
|
readonly: e.readonly,
|
|
1303
1303
|
disabled: e.disabled,
|
|
@@ -1309,7 +1309,7 @@ var zt = {
|
|
|
1309
1309
|
"placeholder"
|
|
1310
1310
|
])], 6))
|
|
1311
1311
|
], 64)),
|
|
1312
|
-
e.rightText && !e.inputHide ? (A(), p("div", cn,
|
|
1312
|
+
e.rightText && !e.inputHide ? (A(), p("div", cn, F(e.rightText), 1)) : f("", !0)
|
|
1313
1313
|
], 4)], 2));
|
|
1314
1314
|
}
|
|
1315
1315
|
}), [["__scopeId", "data-v-1f46ef39"]]), un = { class: "k-form-input-number" }, dn = {
|
|
@@ -1337,7 +1337,7 @@ var zt = {
|
|
|
1337
1337
|
},
|
|
1338
1338
|
emits: ["update:modelValue"],
|
|
1339
1339
|
setup(e, { emit: t }) {
|
|
1340
|
-
let n = e, r = t, i = u(() =>
|
|
1340
|
+
let n = e, r = t, i = u(() => jt(n.modelValue));
|
|
1341
1341
|
function a(e) {
|
|
1342
1342
|
if (e === void 0) {
|
|
1343
1343
|
r("update:modelValue", n.min ?? 0);
|
|
@@ -1351,8 +1351,8 @@ var zt = {
|
|
|
1351
1351
|
r("update:modelValue", e);
|
|
1352
1352
|
}
|
|
1353
1353
|
return (t, n) => (A(), p("div", un, [
|
|
1354
|
-
e.leftText ? (A(), p("div", dn,
|
|
1355
|
-
e.readonly ? (A(), p("span", fn,
|
|
1354
|
+
e.leftText ? (A(), p("div", dn, F(e.leftText), 1)) : f("", !0),
|
|
1355
|
+
e.readonly ? (A(), p("span", fn, F(R(Z)(i.value)), 1)) : (A(), d(R(Ee), {
|
|
1356
1356
|
key: 2,
|
|
1357
1357
|
"model-value": i.value,
|
|
1358
1358
|
min: e.min,
|
|
@@ -1365,7 +1365,7 @@ var zt = {
|
|
|
1365
1365
|
"max",
|
|
1366
1366
|
"disabled"
|
|
1367
1367
|
])),
|
|
1368
|
-
e.rightText ? (A(), p("div", pn,
|
|
1368
|
+
e.rightText ? (A(), p("div", pn, F(e.rightText), 1)) : f("", !0)
|
|
1369
1369
|
]));
|
|
1370
1370
|
}
|
|
1371
1371
|
}), [["__scopeId", "data-v-acdc4199"]]), hn = { class: "k-form-radio" }, gn = {
|
|
@@ -1383,29 +1383,29 @@ var zt = {
|
|
|
1383
1383
|
},
|
|
1384
1384
|
emits: ["update:modelValue"],
|
|
1385
1385
|
setup(e, { emit: t }) {
|
|
1386
|
-
let n = e, r = t, i = u(() =>
|
|
1386
|
+
let n = e, r = t, i = u(() => X(n.modelValue)), a = u(() => (n.options ?? []).find((e) => e.value === i.value)?.label ?? Z(i.value));
|
|
1387
1387
|
function o(e) {
|
|
1388
1388
|
r("update:modelValue", e);
|
|
1389
1389
|
}
|
|
1390
|
-
return (t, n) => (A(), p("div", hn, [e.readonly ? (A(), p("span", gn,
|
|
1390
|
+
return (t, n) => (A(), p("div", hn, [e.readonly ? (A(), p("span", gn, F(a.value), 1)) : (A(), d(R(Pe), {
|
|
1391
1391
|
key: 1,
|
|
1392
1392
|
"model-value": i.value,
|
|
1393
1393
|
disabled: e.disabled,
|
|
1394
1394
|
"onUpdate:modelValue": o
|
|
1395
1395
|
}, {
|
|
1396
|
-
default:
|
|
1396
|
+
default: H(() => [(A(!0), p(c, null, N(e.options, (t) => (A(), p(c, { key: String(t.value) }, [e.type === "button" ? (A(), d(R(Ne), {
|
|
1397
1397
|
key: 0,
|
|
1398
|
-
value:
|
|
1398
|
+
value: R(X)(t.value),
|
|
1399
1399
|
disabled: t.disabled
|
|
1400
1400
|
}, {
|
|
1401
|
-
default:
|
|
1401
|
+
default: H(() => [g(F(t.label), 1)]),
|
|
1402
1402
|
_: 2
|
|
1403
|
-
}, 1032, ["value", "disabled"])) : (A(), d(
|
|
1403
|
+
}, 1032, ["value", "disabled"])) : (A(), d(R(Me), {
|
|
1404
1404
|
key: 1,
|
|
1405
|
-
value:
|
|
1405
|
+
value: R(X)(t.value),
|
|
1406
1406
|
disabled: t.disabled
|
|
1407
1407
|
}, {
|
|
1408
|
-
default:
|
|
1408
|
+
default: H(() => [g(F(t.label), 1)]),
|
|
1409
1409
|
_: 2
|
|
1410
1410
|
}, 1032, ["value", "disabled"]))], 64))), 128))]),
|
|
1411
1411
|
_: 1
|
|
@@ -1456,7 +1456,7 @@ var zt = {
|
|
|
1456
1456
|
let e = Number(a.value);
|
|
1457
1457
|
return Number.isFinite(e) ? e : null;
|
|
1458
1458
|
});
|
|
1459
|
-
|
|
1459
|
+
V(() => n.modelValue, (e) => {
|
|
1460
1460
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
1461
1461
|
let t = e;
|
|
1462
1462
|
t.radio !== void 0 && (i.value = t.radio), t.input !== void 0 && (a.value = m(t.input));
|
|
@@ -1483,7 +1483,7 @@ var zt = {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
r("update:modelValue", {});
|
|
1485
1485
|
}
|
|
1486
|
-
|
|
1486
|
+
V([i, a], v, { immediate: !0 });
|
|
1487
1487
|
function y(e) {
|
|
1488
1488
|
e === n.showInput && n.type === "inputNumber" && l(a.value) && (a.value = s()), i.value = e;
|
|
1489
1489
|
}
|
|
@@ -1502,8 +1502,8 @@ var zt = {
|
|
|
1502
1502
|
"disabled"
|
|
1503
1503
|
]),
|
|
1504
1504
|
!e.readonly && o.value ? (A(), p(c, { key: 0 }, [
|
|
1505
|
-
e.leftText ? (A(), p("label", vn,
|
|
1506
|
-
e.type === "inputNumber" ? (A(), d(
|
|
1505
|
+
e.leftText ? (A(), p("label", vn, F(e.leftText), 1)) : f("", !0),
|
|
1506
|
+
e.type === "inputNumber" ? (A(), d(R(Ee), T({
|
|
1507
1507
|
key: 1,
|
|
1508
1508
|
"model-value": h.value,
|
|
1509
1509
|
class: "k-form-radio-input__input",
|
|
@@ -1513,7 +1513,7 @@ var zt = {
|
|
|
1513
1513
|
"model-value",
|
|
1514
1514
|
"placeholder",
|
|
1515
1515
|
"disabled"
|
|
1516
|
-
])) : (A(), d(
|
|
1516
|
+
])) : (A(), d(R(Te), T({
|
|
1517
1517
|
key: 2,
|
|
1518
1518
|
modelValue: a.value,
|
|
1519
1519
|
"onUpdate:modelValue": n[1] ||= (e) => a.value = e,
|
|
@@ -1525,12 +1525,12 @@ var zt = {
|
|
|
1525
1525
|
"placeholder",
|
|
1526
1526
|
"disabled"
|
|
1527
1527
|
])),
|
|
1528
|
-
e.rightText ? (A(), p("label", yn,
|
|
1528
|
+
e.rightText ? (A(), p("label", yn, F(e.rightText), 1)) : f("", !0)
|
|
1529
1529
|
], 64)) : f("", !0),
|
|
1530
1530
|
e.readonly && o.value ? (A(), p("div", bn, [
|
|
1531
|
-
e.leftText ? (A(), p("label", xn,
|
|
1532
|
-
g(" " +
|
|
1533
|
-
e.rightText ? (A(), p("label", Sn,
|
|
1531
|
+
e.leftText ? (A(), p("label", xn, F(e.leftText), 1)) : f("", !0),
|
|
1532
|
+
g(" " + F(a.value) + " ", 1),
|
|
1533
|
+
e.rightText ? (A(), p("label", Sn, F(e.rightText), 1)) : f("", !0)
|
|
1534
1534
|
])) : f("", !0)
|
|
1535
1535
|
], 2));
|
|
1536
1536
|
}
|
|
@@ -1569,14 +1569,14 @@ var zt = {
|
|
|
1569
1569
|
emits: ["update:modelValue"],
|
|
1570
1570
|
setup(e, { emit: t }) {
|
|
1571
1571
|
let n = e, r = t, i = M([]), a = M(!1), o = M(!1), s = M(1), l = M(""), f = M(null), m = M(n.multiple ? [] : "");
|
|
1572
|
-
|
|
1573
|
-
m.value = n.multiple ?
|
|
1574
|
-
}, { immediate: !0 }),
|
|
1572
|
+
V(() => n.modelValue, (e) => {
|
|
1573
|
+
m.value = n.multiple ? At(e) : X(e);
|
|
1574
|
+
}, { immediate: !0 }), V(() => n.defaultSelectedStr, (e) => {
|
|
1575
1575
|
e?.length && (i.value = [...i.value, ...e]);
|
|
1576
1576
|
}, {
|
|
1577
1577
|
immediate: !0,
|
|
1578
1578
|
deep: !0
|
|
1579
|
-
}),
|
|
1579
|
+
}), V(() => n.getListParams, () => {
|
|
1580
1580
|
m.value = n.multiple ? [] : "", i.value = [], s.value = 1, o.value = !1, h();
|
|
1581
1581
|
}, { deep: !0 });
|
|
1582
1582
|
async function h() {
|
|
@@ -1595,9 +1595,9 @@ var zt = {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
1597
1597
|
}
|
|
1598
|
-
let g =
|
|
1598
|
+
let g = He((e) => {
|
|
1599
1599
|
i.value = [], s.value = 1, o.value = !1, l.value = e, h();
|
|
1600
|
-
}, 500), _ =
|
|
1600
|
+
}, 500), _ = He(() => {
|
|
1601
1601
|
s.value += 1, h();
|
|
1602
1602
|
}, 300);
|
|
1603
1603
|
function v(e) {
|
|
@@ -1608,7 +1608,7 @@ var zt = {
|
|
|
1608
1608
|
let { scrollHeight: e, scrollTop: t, clientHeight: n } = f.value;
|
|
1609
1609
|
e - t > n + 2 || _();
|
|
1610
1610
|
}
|
|
1611
|
-
|
|
1611
|
+
Ue(f, "scroll", y);
|
|
1612
1612
|
function b(e) {
|
|
1613
1613
|
if (!e) {
|
|
1614
1614
|
f.value = null;
|
|
@@ -1623,13 +1623,13 @@ var zt = {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
let S = u(() => {
|
|
1625
1625
|
if (n.multiple) {
|
|
1626
|
-
let e =
|
|
1627
|
-
return t.length ? t.join(", ") :
|
|
1626
|
+
let e = At(m.value), t = i.value.filter((t) => e.includes(t.value)).map((e) => String(e.label ?? e.name ?? e.value));
|
|
1627
|
+
return t.length ? t.join(", ") : Z(e);
|
|
1628
1628
|
}
|
|
1629
|
-
let e =
|
|
1630
|
-
return t ? String(t.label ?? t.name ?? t.value) :
|
|
1629
|
+
let e = X(m.value), t = i.value.find((t) => t.value === e);
|
|
1630
|
+
return t ? String(t.label ?? t.name ?? t.value) : Z(e);
|
|
1631
1631
|
});
|
|
1632
|
-
return h(), (t, n) => e.readonly ? (A(), p("span", wn,
|
|
1632
|
+
return h(), (t, n) => e.readonly ? (A(), p("span", wn, F(S.value), 1)) : (A(), d(R(Fe), {
|
|
1633
1633
|
key: 1,
|
|
1634
1634
|
"model-value": m.value,
|
|
1635
1635
|
remote: "",
|
|
@@ -1644,11 +1644,11 @@ var zt = {
|
|
|
1644
1644
|
onVisibleChange: b,
|
|
1645
1645
|
"onUpdate:modelValue": x
|
|
1646
1646
|
}, {
|
|
1647
|
-
default:
|
|
1647
|
+
default: H(() => [(A(!0), p(c, null, N(i.value, (e, t) => de((A(), d(R(Oe), {
|
|
1648
1648
|
key: `${e.value}-${t}`,
|
|
1649
1649
|
label: String(e.label ?? ""),
|
|
1650
1650
|
value: e.value
|
|
1651
|
-
}, null, 8, ["label", "value"])), [[
|
|
1651
|
+
}, null, 8, ["label", "value"])), [[ue, e.isShow !== !1]])), 128))]),
|
|
1652
1652
|
_: 1
|
|
1653
1653
|
}, 8, [
|
|
1654
1654
|
"model-value",
|
|
@@ -1685,15 +1685,15 @@ var zt = {
|
|
|
1685
1685
|
}, ...e];
|
|
1686
1686
|
}), o = u(() => a.value.map((e) => ({
|
|
1687
1687
|
label: e.label,
|
|
1688
|
-
value:
|
|
1688
|
+
value: Ot(e.value),
|
|
1689
1689
|
disabled: e.disabled,
|
|
1690
1690
|
key: String(e.value)
|
|
1691
1691
|
}))), s = u(() => o.value.map((e) => e.value)), l = u(() => {
|
|
1692
1692
|
let e = o.value.filter((e) => i.value.includes(e.value)).map((e) => e.label);
|
|
1693
|
-
return e.length ? e.join(", ") :
|
|
1693
|
+
return e.length ? e.join(", ") : Z(i.value);
|
|
1694
1694
|
});
|
|
1695
|
-
|
|
1696
|
-
i.value =
|
|
1695
|
+
V(() => n.modelValue, (e) => {
|
|
1696
|
+
i.value = At(e);
|
|
1697
1697
|
}, { immediate: !0 });
|
|
1698
1698
|
function f(e, t) {
|
|
1699
1699
|
if (!n.showAllItem) {
|
|
@@ -1707,7 +1707,7 @@ var zt = {
|
|
|
1707
1707
|
function h(e) {
|
|
1708
1708
|
f(e, m), m = [...i.value];
|
|
1709
1709
|
}
|
|
1710
|
-
return (t, n) => e.readonly ? (A(), p("span", En,
|
|
1710
|
+
return (t, n) => e.readonly ? (A(), p("span", En, F(l.value), 1)) : (A(), d(R(Fe), {
|
|
1711
1711
|
key: 1,
|
|
1712
1712
|
"model-value": i.value,
|
|
1713
1713
|
multiple: "",
|
|
@@ -1718,7 +1718,7 @@ var zt = {
|
|
|
1718
1718
|
class: "k-form-select-multiple",
|
|
1719
1719
|
"onUpdate:modelValue": h
|
|
1720
1720
|
}, {
|
|
1721
|
-
default:
|
|
1721
|
+
default: H(() => [(A(!0), p(c, null, N(o.value, (e) => (A(), d(R(Oe), {
|
|
1722
1722
|
key: e.key,
|
|
1723
1723
|
label: e.label,
|
|
1724
1724
|
value: e.value,
|
|
@@ -1782,10 +1782,10 @@ var zt = {
|
|
|
1782
1782
|
i.value = e.map(String);
|
|
1783
1783
|
return;
|
|
1784
1784
|
}
|
|
1785
|
-
let t =
|
|
1785
|
+
let t = X(e);
|
|
1786
1786
|
i.value = t ? [String(t)] : [];
|
|
1787
1787
|
}
|
|
1788
|
-
|
|
1788
|
+
V(() => n.modelValue, s, { immediate: !0 });
|
|
1789
1789
|
function l() {
|
|
1790
1790
|
if (n.multiple) {
|
|
1791
1791
|
r("update:modelValue", [...i.value]);
|
|
@@ -1802,7 +1802,7 @@ var zt = {
|
|
|
1802
1802
|
let t = ["k-form-tag__item"];
|
|
1803
1803
|
return n.disabled && t.push("is-disabled"), n.readonly && t.push("is-readonly"), i.value.includes(e) && t.push("is-active"), t.join(" ");
|
|
1804
1804
|
}
|
|
1805
|
-
return (e, t) => (A(), p("div", kn, [(A(!0), p(c, null, N(o.value, (e) => (A(), d(
|
|
1805
|
+
return (e, t) => (A(), p("div", kn, [(A(!0), p(c, null, N(o.value, (e) => (A(), d(R(Le), {
|
|
1806
1806
|
key: e.value || "__all__",
|
|
1807
1807
|
class: D(["k-form-tag__item", m(e.value)]),
|
|
1808
1808
|
type: "info",
|
|
@@ -1810,7 +1810,7 @@ var zt = {
|
|
|
1810
1810
|
"disable-transitions": !0,
|
|
1811
1811
|
onClick: (t) => f(e.value)
|
|
1812
1812
|
}, {
|
|
1813
|
-
default:
|
|
1813
|
+
default: H(() => [g(F(e.label), 1)]),
|
|
1814
1814
|
_: 2
|
|
1815
1815
|
}, 1032, ["class", "onClick"]))), 128))]));
|
|
1816
1816
|
}
|
|
@@ -1824,8 +1824,8 @@ var zt = {
|
|
|
1824
1824
|
disabled: { type: Boolean }
|
|
1825
1825
|
},
|
|
1826
1826
|
setup(e) {
|
|
1827
|
-
let t = e, n = u(() =>
|
|
1828
|
-
return (e, t) => (A(), p("div", jn, [m("p", null,
|
|
1827
|
+
let t = e, n = u(() => kt(t.modelValue));
|
|
1828
|
+
return (e, t) => (A(), p("div", jn, [m("p", null, F(n.value), 1)]));
|
|
1829
1829
|
}
|
|
1830
1830
|
}), [["__scopeId", "data-v-9dc35114"]]), Nn = { class: "k-form-time-picker" }, Pn = ["innerHTML"], Fn = {
|
|
1831
1831
|
key: 1,
|
|
@@ -1866,25 +1866,25 @@ var zt = {
|
|
|
1866
1866
|
},
|
|
1867
1867
|
emits: ["update:modelValue"],
|
|
1868
1868
|
setup(e, { emit: t }) {
|
|
1869
|
-
let n = e, r = t, i = u(() =>
|
|
1870
|
-
let n =
|
|
1871
|
-
return n.isValid() ? n.format(t) :
|
|
1869
|
+
let n = e, r = t, i = u(() => Pt(n.modelValue)), a = u(() => Ft(n.type)), o = u(() => a.value === "timerange"), s = (e, t) => {
|
|
1870
|
+
let n = K(e instanceof Date ? e : String(e));
|
|
1871
|
+
return n.isValid() ? n.format(t) : Z(e);
|
|
1872
1872
|
}, c = u(() => {
|
|
1873
|
-
if (!n.modelValue) return
|
|
1873
|
+
if (!n.modelValue) return Z(n.modelValue);
|
|
1874
1874
|
let e = n.valueFormat || "HH:mm:ss";
|
|
1875
1875
|
return Array.isArray(n.modelValue) ? n.modelValue.map((t) => s(t, e)).join(" - ") : s(n.modelValue, e);
|
|
1876
1876
|
}), l = u(() => {
|
|
1877
1877
|
if (!n.limitTime) return;
|
|
1878
|
-
let e =
|
|
1878
|
+
let e = K().hour();
|
|
1879
1879
|
return () => Array.from({ length: 24 }, (e, t) => t).filter((t) => t < e);
|
|
1880
1880
|
}), m = u(() => {
|
|
1881
1881
|
if (n.limitTime) return (e) => {
|
|
1882
|
-
let t =
|
|
1882
|
+
let t = K();
|
|
1883
1883
|
return e > t.hour() ? [] : e < t.hour() ? Array.from({ length: 60 }, (e, t) => t) : Array.from({ length: 60 }, (e, t) => t).filter((e) => e < t.minute());
|
|
1884
1884
|
};
|
|
1885
1885
|
}), h = u(() => {
|
|
1886
1886
|
if (n.limitTime) return (e, t) => {
|
|
1887
|
-
let n =
|
|
1887
|
+
let n = K();
|
|
1888
1888
|
return e > n.hour() || e === n.hour() && t > n.minute() ? [] : e < n.hour() || e === n.hour() && t < n.minute() ? Array.from({ length: 60 }, (e, t) => t) : Array.from({ length: 60 }, (e, t) => t).filter((e) => e < n.second());
|
|
1889
1889
|
};
|
|
1890
1890
|
});
|
|
@@ -1897,8 +1897,8 @@ var zt = {
|
|
|
1897
1897
|
class: "k-form-time-picker__text",
|
|
1898
1898
|
innerHTML: e.prepend
|
|
1899
1899
|
}, null, 8, Pn)) : f("", !0),
|
|
1900
|
-
e.leftText ? (A(), p("span", Fn,
|
|
1901
|
-
e.readonly ? (A(), p("span", In,
|
|
1900
|
+
e.leftText ? (A(), p("span", Fn, F(e.leftText), 1)) : f("", !0),
|
|
1901
|
+
e.readonly ? (A(), p("span", In, F(c.value), 1)) : (A(), d(R(Re), {
|
|
1902
1902
|
key: 3,
|
|
1903
1903
|
"model-value": i.value,
|
|
1904
1904
|
"is-range": o.value,
|
|
@@ -1927,7 +1927,7 @@ var zt = {
|
|
|
1927
1927
|
"disabled-minutes",
|
|
1928
1928
|
"disabled-seconds"
|
|
1929
1929
|
])),
|
|
1930
|
-
e.rightText ? (A(), p("span", Ln,
|
|
1930
|
+
e.rightText ? (A(), p("span", Ln, F(e.rightText), 1)) : f("", !0),
|
|
1931
1931
|
e.append ? (A(), p("span", {
|
|
1932
1932
|
key: 5,
|
|
1933
1933
|
class: "k-form-time-picker__text",
|
|
@@ -1963,8 +1963,8 @@ var zt = {
|
|
|
1963
1963
|
},
|
|
1964
1964
|
emits: ["update:modelValue"],
|
|
1965
1965
|
setup(e, { emit: t }) {
|
|
1966
|
-
let n = e, r = t, i = u(() =>
|
|
1967
|
-
return (t, n) => (A(), p("div", Bn, [e.readonly ? (A(), p("div", Vn,
|
|
1966
|
+
let n = e, r = t, i = u(() => X(n.modelValue)), a = u(() => Lt(n.data)), o = u(() => Rt(a.value, i.value) ?? Z(i.value));
|
|
1967
|
+
return (t, n) => (A(), p("div", Bn, [e.readonly ? (A(), p("div", Vn, F(o.value), 1)) : (A(), d(R(Be), {
|
|
1968
1968
|
key: 1,
|
|
1969
1969
|
"model-value": i.value,
|
|
1970
1970
|
data: a.value,
|
|
@@ -2006,8 +2006,8 @@ var zt = {
|
|
|
2006
2006
|
type: "button",
|
|
2007
2007
|
class: "k-upload__media-play",
|
|
2008
2008
|
onClick: n[0] ||= (t) => r("play", e.file)
|
|
2009
|
-
}, [_(
|
|
2010
|
-
default:
|
|
2009
|
+
}, [_(R(Ce), null, {
|
|
2010
|
+
default: H(() => [_(R(Ye))]),
|
|
2011
2011
|
_: 1
|
|
2012
2012
|
})])) : (A(), p(c, { key: 1 }, [P(t.$slots, "preview", { file: e.file }, () => [m("img", {
|
|
2013
2013
|
class: "el-upload-list__item-thumbnail",
|
|
@@ -2017,27 +2017,27 @@ var zt = {
|
|
|
2017
2017
|
m("span", {
|
|
2018
2018
|
class: "el-upload-list__item-preview",
|
|
2019
2019
|
onClick: n[1] ||= (t) => r("zoom", e.file)
|
|
2020
|
-
}, [_(
|
|
2021
|
-
default:
|
|
2020
|
+
}, [_(R(Ce), null, {
|
|
2021
|
+
default: H(() => [_(R(Xe))]),
|
|
2022
2022
|
_: 1
|
|
2023
2023
|
})]),
|
|
2024
2024
|
e.disabled ? f("", !0) : (A(), p("span", {
|
|
2025
2025
|
key: 0,
|
|
2026
2026
|
class: "el-upload-list__item-download",
|
|
2027
2027
|
onClick: n[2] ||= (t) => r("download", e.file)
|
|
2028
|
-
}, [_(
|
|
2029
|
-
default:
|
|
2028
|
+
}, [_(R(Ce), null, {
|
|
2029
|
+
default: H(() => [_(R(Ke))]),
|
|
2030
2030
|
_: 1
|
|
2031
2031
|
})])),
|
|
2032
2032
|
e.disabled ? f("", !0) : (A(), p("span", {
|
|
2033
2033
|
key: 1,
|
|
2034
2034
|
class: "el-upload-list__item-delete",
|
|
2035
2035
|
onClick: n[3] ||= (t) => r("remove", e.file)
|
|
2036
|
-
}, [_(
|
|
2037
|
-
default:
|
|
2036
|
+
}, [_(R(Ce), null, {
|
|
2037
|
+
default: H(() => [_(R(Ge))]),
|
|
2038
2038
|
_: 1
|
|
2039
2039
|
})]))
|
|
2040
|
-
])], 64)), a.value ? (A(), d(
|
|
2040
|
+
])], 64)), a.value ? (A(), d(R(je), {
|
|
2041
2041
|
key: 2,
|
|
2042
2042
|
class: "k-upload__file-progress",
|
|
2043
2043
|
type: e.listType === "picture-card" || e.listType === "lottie" ? "circle" : "line",
|
|
@@ -2068,22 +2068,22 @@ var zt = {
|
|
|
2068
2068
|
key: 0,
|
|
2069
2069
|
type: "button",
|
|
2070
2070
|
class: "k-upload__download",
|
|
2071
|
-
onClick: r[0] ||=
|
|
2072
|
-
}, [_(
|
|
2073
|
-
default:
|
|
2071
|
+
onClick: r[0] ||= fe((e) => n("downloadTemplate"), ["stop"])
|
|
2072
|
+
}, [_(R(Ce), { class: "k-upload__download-icon" }, {
|
|
2073
|
+
default: H(() => [_(R(Ke))]),
|
|
2074
2074
|
_: 1
|
|
2075
|
-
}), m("span", null,
|
|
2075
|
+
}), m("span", null, F(e.templateBtnText), 1)])) : f("", !0),
|
|
2076
2076
|
e.tipType === "text" && e.tipText ? (A(), p("span", {
|
|
2077
2077
|
key: 1,
|
|
2078
2078
|
class: "k-upload__inline-tip",
|
|
2079
2079
|
innerHTML: e.tipText
|
|
2080
2080
|
}, null, 8, Jn)) : f("", !0),
|
|
2081
|
-
e.tipType === "tooltip" && e.tipText ? (A(), d(
|
|
2081
|
+
e.tipType === "tooltip" && e.tipText ? (A(), d(R(ze), {
|
|
2082
2082
|
key: 2,
|
|
2083
2083
|
placement: "top",
|
|
2084
2084
|
content: e.tipText
|
|
2085
2085
|
}, {
|
|
2086
|
-
default:
|
|
2086
|
+
default: H(() => [...r[1] ||= [m("i", {
|
|
2087
2087
|
class: "k-upload__tip-icon",
|
|
2088
2088
|
"aria-label": "上传说明"
|
|
2089
2089
|
}, "?", -1)]]),
|
|
@@ -2106,8 +2106,8 @@ var zt = {
|
|
|
2106
2106
|
}),
|
|
2107
2107
|
emits: ["update:visible"],
|
|
2108
2108
|
setup(e) {
|
|
2109
|
-
let t =
|
|
2110
|
-
return (n, r) => (A(), d(
|
|
2109
|
+
let t = le(e, "visible");
|
|
2110
|
+
return (n, r) => (A(), d(dt, {
|
|
2111
2111
|
visible: t.value,
|
|
2112
2112
|
"onUpdate:visible": r[0] ||= (e) => t.value = e,
|
|
2113
2113
|
"show-confirm": !1,
|
|
@@ -2115,7 +2115,7 @@ var zt = {
|
|
|
2115
2115
|
width: "640px",
|
|
2116
2116
|
title: "预览"
|
|
2117
2117
|
}, {
|
|
2118
|
-
default:
|
|
2118
|
+
default: H(() => [m("div", Xn, [e.type === "video" ? (A(), p("video", {
|
|
2119
2119
|
key: 0,
|
|
2120
2120
|
src: e.url,
|
|
2121
2121
|
controls: "",
|
|
@@ -2190,7 +2190,7 @@ function ar(e, t) {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
function or(e) {
|
|
2192
2192
|
let t = M([]);
|
|
2193
|
-
|
|
2193
|
+
V(() => e.getModelValue(), (e) => {
|
|
2194
2194
|
t.value = Array.isArray(e) ? e.map((e) => ({ ...e })) : [];
|
|
2195
2195
|
}, {
|
|
2196
2196
|
immediate: !0,
|
|
@@ -2274,7 +2274,7 @@ function ur(e) {
|
|
|
2274
2274
|
let t = /* @__PURE__ */ new Set();
|
|
2275
2275
|
function n(t) {
|
|
2276
2276
|
let n = e.getAccept(), i = n.split(",").map((e) => e.trim()).filter(Boolean), a = t.name.slice(t.name.lastIndexOf(".")).toLowerCase();
|
|
2277
|
-
return i.length && !i.includes(a) ? (
|
|
2277
|
+
return i.length && !i.includes(a) ? (De.warning(`只能上传后缀是${n}的文件`), r(t), !1) : t.size / 1024 / 1024 > e.getMaxSize() ? (De.warning(`文件大小不得超过${e.getMaxSize()}M`), r(t), !1) : !0;
|
|
2278
2278
|
}
|
|
2279
2279
|
function r(e) {
|
|
2280
2280
|
let n = e.uid;
|
|
@@ -2362,8 +2362,8 @@ var pr = {
|
|
|
2362
2362
|
let n = e instanceof Error ? e.message : String(e ?? "");
|
|
2363
2363
|
return /timeout/i.test(n) || /ECONNABORTED/i.test(n) ? "请求超时,请稍后重试" : n || t;
|
|
2364
2364
|
}
|
|
2365
|
-
let o = e, c = n, l = M(), y =
|
|
2366
|
-
|
|
2365
|
+
let o = e, c = n, l = M(), y = B("cutterRef"), x = M(null);
|
|
2366
|
+
V(y, (e) => {
|
|
2367
2367
|
if (!e || !x.value) return;
|
|
2368
2368
|
let t = x.value;
|
|
2369
2369
|
x.value = null, e.openImgCutter({
|
|
@@ -2388,30 +2388,30 @@ var pr = {
|
|
|
2388
2388
|
getModelValue: () => o.modelValue,
|
|
2389
2389
|
onUpdate: (e) => c("update:modelValue", e),
|
|
2390
2390
|
getLimit: () => o.limit
|
|
2391
|
-
}),
|
|
2391
|
+
}), ie = ur({
|
|
2392
2392
|
getAccept: () => O.value,
|
|
2393
2393
|
getMaxSize: () => o.maxSize
|
|
2394
|
-
}),
|
|
2394
|
+
}), ae = lr({ getTemplateCode: () => o.templateCode }), { visible: oe, urlList: se, initialIndex: I, open: L, close: ce } = rr(), { visible: le, url: z, type: ue, open: de } = ir(), fe = u(() => dr(w.value, o.action)), pe = u(() => {
|
|
2395
2395
|
switch (w.value) {
|
|
2396
2396
|
case "picture": return "picture";
|
|
2397
2397
|
case "picture-card":
|
|
2398
2398
|
case "lottie": return "picture-card";
|
|
2399
2399
|
default: return "text";
|
|
2400
2400
|
}
|
|
2401
|
-
}),
|
|
2401
|
+
}), me = u(() => [
|
|
2402
2402
|
"picture",
|
|
2403
2403
|
"picture-card",
|
|
2404
2404
|
"lottie"
|
|
2405
|
-
].includes(w.value)),
|
|
2405
|
+
].includes(w.value)), he = u(() => [
|
|
2406
2406
|
"picture-card",
|
|
2407
2407
|
"lottie",
|
|
2408
2408
|
"video",
|
|
2409
2409
|
"audio"
|
|
2410
|
-
].includes(w.value)),
|
|
2410
|
+
].includes(w.value)), U = u(() => w.value === "picture-card" || w.value === "lottie"), ge = u(() => !U.value), _e = u(() => !o.openCutter && o.autoUpload), ve = u(() => o.limit === 1 ? void 0 : o.limit), ye = u(() => !!(o.limit && o.limit !== 1 && k.value.length >= o.limit)), be = u(() => !o.disabled), xe = u(() => !(U.value || o.disabled || w.value === "picture" && o.tipType === "text")), W = u(() => o.disabled ? "" : o.fileTips || (O.value ? `支持上传 ${O.value} 后缀文件,且不超过${o.maxSize}M` : "")), Se = u(() => W.value && (o.tipType === "tooltip" || o.tipType === "text" && w.value === "picture") ? W.value : ""), Te = u(() => {
|
|
2411
2411
|
let e = ["k-upload", `k-upload--${w.value}`];
|
|
2412
|
-
return o.disabled && e.push("k-upload_detail"),
|
|
2412
|
+
return o.disabled && e.push("k-upload_detail"), ye.value && e.push("k-upload--limit"), e.join(" ");
|
|
2413
2413
|
});
|
|
2414
|
-
function
|
|
2414
|
+
function Ee(e, t, n) {
|
|
2415
2415
|
let r = e ?? {}, i = String(r.resource_id ?? ""), a = String(r.file_name ?? n), o = fr(w.value);
|
|
2416
2416
|
return {
|
|
2417
2417
|
...r,
|
|
@@ -2424,24 +2424,24 @@ var pr = {
|
|
|
2424
2424
|
status: "success"
|
|
2425
2425
|
};
|
|
2426
2426
|
}
|
|
2427
|
-
function
|
|
2428
|
-
let r =
|
|
2429
|
-
re(r), o.showSuccMessage &&
|
|
2427
|
+
function Oe(e, t, n) {
|
|
2428
|
+
let r = Ee(e, t, n);
|
|
2429
|
+
re(r), o.showSuccMessage && De.success("文件上传成功!"), c("success", e, r);
|
|
2430
2430
|
}
|
|
2431
|
-
let
|
|
2432
|
-
|
|
2433
|
-
},
|
|
2434
|
-
|
|
2435
|
-
},
|
|
2436
|
-
if (typeof e.uid == "number" &&
|
|
2431
|
+
let ke = (e) => ie.validate(e), Ae = (e, t) => {
|
|
2432
|
+
Oe(e ?? {}, t.uid, t.name);
|
|
2433
|
+
}, je = (e, t) => {
|
|
2434
|
+
De.error(a(e, "文件上传失败!")), j(t.uid), c("error", e, t);
|
|
2435
|
+
}, Me = (e) => {
|
|
2436
|
+
if (typeof e.uid == "number" && ie.consumeRejected(e.uid)) return;
|
|
2437
2437
|
let t = N(e.uid);
|
|
2438
2438
|
j(e.uid), t && c("remove", t);
|
|
2439
|
-
},
|
|
2439
|
+
}, Ne = (e) => {
|
|
2440
2440
|
let t = N(e.uid);
|
|
2441
|
-
t && (c("preview", t), !(
|
|
2442
|
-
},
|
|
2441
|
+
t && (c("preview", t), !(me.value && L(t, k.value)) && K(t));
|
|
2442
|
+
}, Pe = (e) => {
|
|
2443
2443
|
if (c("change", e), !(!o.openCutter || e.status !== "ready" || !e.raw)) {
|
|
2444
|
-
if (
|
|
2444
|
+
if (ie.validate(e.raw) === !1) {
|
|
2445
2445
|
j(e.uid);
|
|
2446
2446
|
return;
|
|
2447
2447
|
}
|
|
@@ -2452,108 +2452,108 @@ var pr = {
|
|
|
2452
2452
|
});
|
|
2453
2453
|
});
|
|
2454
2454
|
}
|
|
2455
|
-
},
|
|
2455
|
+
}, Fe = (e, t) => {
|
|
2456
2456
|
c("exceed", e, t);
|
|
2457
2457
|
};
|
|
2458
|
-
function
|
|
2458
|
+
function Ie(e) {
|
|
2459
2459
|
let t = N(e.uid);
|
|
2460
|
-
t &&
|
|
2460
|
+
t && L(t, k.value);
|
|
2461
2461
|
}
|
|
2462
|
-
function
|
|
2462
|
+
function G(e) {
|
|
2463
2463
|
let t = N(e.uid);
|
|
2464
|
-
t &&
|
|
2464
|
+
t && K(t);
|
|
2465
2465
|
}
|
|
2466
|
-
function
|
|
2466
|
+
function Le(e) {
|
|
2467
2467
|
let t = N(e.uid);
|
|
2468
2468
|
j(e.uid), t && c("remove", t);
|
|
2469
2469
|
}
|
|
2470
|
-
function
|
|
2470
|
+
function Re(e) {
|
|
2471
2471
|
let t = N(e.uid);
|
|
2472
|
-
t &&
|
|
2472
|
+
t && de(t, w.value === "audio" ? "audio" : "video");
|
|
2473
2473
|
}
|
|
2474
|
-
async function
|
|
2474
|
+
async function ze(e) {
|
|
2475
2475
|
try {
|
|
2476
2476
|
let t = dr("picture", o.action);
|
|
2477
|
-
|
|
2477
|
+
Oe(await ae.uploadFile(e, t), -Date.now(), e.name);
|
|
2478
2478
|
} catch (e) {
|
|
2479
|
-
|
|
2479
|
+
De.error(a(e, "图片上传失败!"));
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2482
|
+
function Be(e, t) {
|
|
2483
2483
|
let n = document.createElement("a");
|
|
2484
2484
|
n.href = e, n.download = t, n.click();
|
|
2485
2485
|
}
|
|
2486
|
-
function
|
|
2487
|
-
e.resource_id &&
|
|
2486
|
+
function K(e) {
|
|
2487
|
+
e.resource_id && Be(`${fr(w.value)}${e.resource_id}`, e.name || String(e.resource_id));
|
|
2488
2488
|
}
|
|
2489
2489
|
function q() {
|
|
2490
2490
|
let e = s(), t = e.templateCodeRelation[o.templateCode];
|
|
2491
2491
|
if (!t) {
|
|
2492
|
-
|
|
2492
|
+
De.warning("模板未配置");
|
|
2493
2493
|
return;
|
|
2494
2494
|
}
|
|
2495
|
-
|
|
2495
|
+
Be(`${o.templateDownloadUrl || (o.templateDomain === "base" ? e.baseTemplateDownloadBaseUrl : e.templateDownloadBaseUrl) || e.urls.BASE_URL}${t}`, t);
|
|
2496
2496
|
}
|
|
2497
2497
|
return t({
|
|
2498
2498
|
submit: () => l.value?.submit(),
|
|
2499
2499
|
clearFiles: () => l.value?.clearFiles(),
|
|
2500
2500
|
uploadRef: l
|
|
2501
|
-
}), (t, n) => (A(), p("div", { class: D(["k-upload-wrap",
|
|
2502
|
-
_(
|
|
2501
|
+
}), (t, n) => (A(), p("div", { class: D(["k-upload-wrap", Te.value]) }, [
|
|
2502
|
+
_(R(Ve), T({
|
|
2503
2503
|
ref_key: "uploadRef",
|
|
2504
2504
|
ref: l
|
|
2505
2505
|
}, t.$attrs, {
|
|
2506
2506
|
class: "k-upload__inner",
|
|
2507
|
-
"file-list":
|
|
2508
|
-
action:
|
|
2509
|
-
"list-type":
|
|
2507
|
+
"file-list": R(ne),
|
|
2508
|
+
action: fe.value,
|
|
2509
|
+
"list-type": pe.value,
|
|
2510
2510
|
accept: O.value,
|
|
2511
|
-
limit:
|
|
2511
|
+
limit: ve.value,
|
|
2512
2512
|
disabled: e.disabled,
|
|
2513
|
-
"auto-upload":
|
|
2514
|
-
"http-request":
|
|
2515
|
-
"before-upload":
|
|
2516
|
-
"on-success":
|
|
2517
|
-
"on-error":
|
|
2518
|
-
"on-remove":
|
|
2519
|
-
"on-preview":
|
|
2520
|
-
"on-change":
|
|
2521
|
-
"on-exceed":
|
|
2513
|
+
"auto-upload": _e.value,
|
|
2514
|
+
"http-request": R(ae).httpRequest,
|
|
2515
|
+
"before-upload": ke,
|
|
2516
|
+
"on-success": Ae,
|
|
2517
|
+
"on-error": je,
|
|
2518
|
+
"on-remove": Me,
|
|
2519
|
+
"on-preview": Ne,
|
|
2520
|
+
"on-change": Pe,
|
|
2521
|
+
"on-exceed": Fe
|
|
2522
2522
|
}), h({
|
|
2523
|
-
tip:
|
|
2523
|
+
tip: H(() => [P(t.$slots, "tip", {}, () => [U.value && (e.templateCode || e.tipType === "tooltip" && W.value) ? (A(), d(Yn, {
|
|
2524
2524
|
key: 0,
|
|
2525
2525
|
"template-code": e.templateCode,
|
|
2526
2526
|
"template-btn-text": e.templateBtnText,
|
|
2527
2527
|
"tip-type": e.tipType,
|
|
2528
|
-
"tip-text":
|
|
2528
|
+
"tip-text": W.value,
|
|
2529
2529
|
onDownloadTemplate: q
|
|
2530
2530
|
}, null, 8, [
|
|
2531
2531
|
"template-code",
|
|
2532
2532
|
"template-btn-text",
|
|
2533
2533
|
"tip-type",
|
|
2534
2534
|
"tip-text"
|
|
2535
|
-
])) : f("", !0),
|
|
2535
|
+
])) : f("", !0), xe.value ? (A(), d(nr, {
|
|
2536
2536
|
key: 1,
|
|
2537
2537
|
"tip-type": e.tipType,
|
|
2538
|
-
"tip-text":
|
|
2538
|
+
"tip-text": W.value
|
|
2539
2539
|
}, null, 8, ["tip-type", "tip-text"])) : f("", !0)], !0)]),
|
|
2540
2540
|
_: 2
|
|
2541
|
-
}, [
|
|
2541
|
+
}, [be.value ? {
|
|
2542
2542
|
name: "default",
|
|
2543
|
-
fn:
|
|
2543
|
+
fn: H(() => [ge.value ? (A(), p("div", pr, [
|
|
2544
2544
|
P(t.$slots, "buttonBefore", {}, void 0, !0),
|
|
2545
|
-
P(t.$slots, "content", {}, () => [_(
|
|
2545
|
+
P(t.$slots, "content", {}, () => [_(J, {
|
|
2546
2546
|
type: "primary",
|
|
2547
|
-
disabled:
|
|
2547
|
+
disabled: ye.value
|
|
2548
2548
|
}, {
|
|
2549
|
-
default:
|
|
2549
|
+
default: H(() => [g(F(e.btnText), 1)]),
|
|
2550
2550
|
_: 1
|
|
2551
2551
|
}, 8, ["disabled"])], !0),
|
|
2552
2552
|
_(Yn, {
|
|
2553
2553
|
"template-code": e.templateCode,
|
|
2554
2554
|
"template-btn-text": e.templateBtnText,
|
|
2555
2555
|
"tip-type": e.tipType,
|
|
2556
|
-
"tip-text":
|
|
2556
|
+
"tip-text": Se.value,
|
|
2557
2557
|
onDownloadTemplate: q
|
|
2558
2558
|
}, null, 8, [
|
|
2559
2559
|
"template-code",
|
|
@@ -2562,28 +2562,28 @@ var pr = {
|
|
|
2562
2562
|
"tip-text"
|
|
2563
2563
|
]),
|
|
2564
2564
|
P(t.$slots, "buttonAfter", {}, void 0, !0)
|
|
2565
|
-
])) : P(t.$slots, "content", {}, () => [m("div", mr, [_(
|
|
2566
|
-
default:
|
|
2565
|
+
])) : P(t.$slots, "content", {}, () => [m("div", mr, [_(R(Ce), { class: "k-upload__plus" }, {
|
|
2566
|
+
default: H(() => [_(R(Je))]),
|
|
2567
2567
|
_: 1
|
|
2568
|
-
}), e.tipType === "text" &&
|
|
2568
|
+
}), e.tipType === "text" && W.value ? (A(), p("span", {
|
|
2569
2569
|
key: 0,
|
|
2570
2570
|
class: "picture-card-tips",
|
|
2571
|
-
innerHTML:
|
|
2571
|
+
innerHTML: W.value
|
|
2572
2572
|
}, null, 8, hr)) : f("", !0)])], !0, 1)]),
|
|
2573
2573
|
key: "0"
|
|
2574
|
-
} : void 0,
|
|
2574
|
+
} : void 0, he.value ? {
|
|
2575
2575
|
name: "file",
|
|
2576
|
-
fn:
|
|
2576
|
+
fn: H(({ file: n }) => [P(t.$slots, "file", { file: n }, () => [_(Kn, {
|
|
2577
2577
|
file: n,
|
|
2578
2578
|
"list-type": w.value,
|
|
2579
2579
|
disabled: e.disabled,
|
|
2580
|
-
onZoom:
|
|
2581
|
-
onDownload:
|
|
2582
|
-
onRemove:
|
|
2583
|
-
onPlay:
|
|
2580
|
+
onZoom: Ie,
|
|
2581
|
+
onDownload: G,
|
|
2582
|
+
onRemove: Le,
|
|
2583
|
+
onPlay: Re
|
|
2584
2584
|
}, h({ _: 2 }, [t.$slots.preview ? {
|
|
2585
2585
|
name: "preview",
|
|
2586
|
-
fn:
|
|
2586
|
+
fn: H((e) => [P(t.$slots, "preview", te(b(e)), void 0, !0)]),
|
|
2587
2587
|
key: "0"
|
|
2588
2588
|
} : void 0]), 1032, [
|
|
2589
2589
|
"file",
|
|
@@ -2601,28 +2601,28 @@ var pr = {
|
|
|
2601
2601
|
"auto-upload",
|
|
2602
2602
|
"http-request"
|
|
2603
2603
|
]),
|
|
2604
|
-
e.openCutter ? (A(), d(
|
|
2604
|
+
e.openCutter ? (A(), d(R(r), {
|
|
2605
2605
|
key: 0,
|
|
2606
2606
|
ref_key: "cutterRef",
|
|
2607
2607
|
ref: y,
|
|
2608
2608
|
option: e.cutterOption,
|
|
2609
|
-
onCut:
|
|
2609
|
+
onCut: ze
|
|
2610
2610
|
}, null, 8, ["option"])) : f("", !0),
|
|
2611
|
-
|
|
2611
|
+
R(oe) ? (A(), d(R(we), {
|
|
2612
2612
|
key: 1,
|
|
2613
|
-
"url-list":
|
|
2614
|
-
"initial-index":
|
|
2615
|
-
onClose:
|
|
2613
|
+
"url-list": R(se),
|
|
2614
|
+
"initial-index": R(I),
|
|
2615
|
+
onClose: R(ce)
|
|
2616
2616
|
}, null, 8, [
|
|
2617
2617
|
"url-list",
|
|
2618
2618
|
"initial-index",
|
|
2619
2619
|
"onClose"
|
|
2620
2620
|
])) : f("", !0),
|
|
2621
2621
|
_($n, {
|
|
2622
|
-
visible:
|
|
2623
|
-
"onUpdate:visible": n[0] ||= (e) => ee(
|
|
2624
|
-
url: z
|
|
2625
|
-
type:
|
|
2622
|
+
visible: R(le),
|
|
2623
|
+
"onUpdate:visible": n[0] ||= (e) => ee(le) ? le.value = e : null,
|
|
2624
|
+
url: R(z),
|
|
2625
|
+
type: R(ue)
|
|
2626
2626
|
}, null, 8, [
|
|
2627
2627
|
"visible",
|
|
2628
2628
|
"url",
|
|
@@ -2630,7 +2630,7 @@ var pr = {
|
|
|
2630
2630
|
])
|
|
2631
2631
|
], 2));
|
|
2632
2632
|
}
|
|
2633
|
-
}), [["__scopeId", "data-v-
|
|
2633
|
+
}), [["__scopeId", "data-v-b075bf5b"]]), _r = /* @__PURE__ */ y({
|
|
2634
2634
|
name: "KFormUpload",
|
|
2635
2635
|
inheritAttrs: !1,
|
|
2636
2636
|
__name: "Upload",
|
|
@@ -2689,21 +2689,21 @@ var pr = {
|
|
|
2689
2689
|
]));
|
|
2690
2690
|
}
|
|
2691
2691
|
}), vr = v(() => import("./Editor-CNxCYFmc.js")), yr = {
|
|
2692
|
-
Input:
|
|
2692
|
+
Input: Q,
|
|
2693
2693
|
Text: Mn,
|
|
2694
2694
|
Select: rn,
|
|
2695
2695
|
SelectMultiple: On,
|
|
2696
|
-
DatePicker:
|
|
2696
|
+
DatePicker: Jt,
|
|
2697
2697
|
Radio: _n,
|
|
2698
|
-
Checkbox:
|
|
2698
|
+
Checkbox: Wt,
|
|
2699
2699
|
InputNumber: mn,
|
|
2700
2700
|
KInputNumber: mn,
|
|
2701
|
-
Cascader:
|
|
2701
|
+
Cascader: Vt,
|
|
2702
2702
|
TreeSelect: Hn,
|
|
2703
2703
|
InputMixInput: tn,
|
|
2704
2704
|
InputMixSelect: ln,
|
|
2705
2705
|
RadioInput: Cn,
|
|
2706
|
-
Complex: v(() => import("./Complex-
|
|
2706
|
+
Complex: v(() => import("./Complex-CmH6Cx2G.js")),
|
|
2707
2707
|
ScrollSelect: Tn,
|
|
2708
2708
|
Upload: _r,
|
|
2709
2709
|
Tag: An,
|
|
@@ -2711,7 +2711,7 @@ var pr = {
|
|
|
2711
2711
|
Editor: vr
|
|
2712
2712
|
};
|
|
2713
2713
|
function br(e) {
|
|
2714
|
-
return yr[e] ??
|
|
2714
|
+
return yr[e] ?? Yt;
|
|
2715
2715
|
}
|
|
2716
2716
|
function xr(e) {
|
|
2717
2717
|
Object.assign(yr, e);
|
|
@@ -2761,7 +2761,7 @@ var Tr = /* @__PURE__ */ y({
|
|
|
2761
2761
|
function c(e) {
|
|
2762
2762
|
r("update:modelValue", e);
|
|
2763
2763
|
}
|
|
2764
|
-
return (t, n) => (A(), d(
|
|
2764
|
+
return (t, n) => (A(), d(oe(i.value), T({
|
|
2765
2765
|
"model-value": e.modelValue,
|
|
2766
2766
|
options: s.value,
|
|
2767
2767
|
readonly: e.readonly,
|
|
@@ -2807,8 +2807,8 @@ var Tr = /* @__PURE__ */ y({
|
|
|
2807
2807
|
},
|
|
2808
2808
|
emits: ["update:modelValue", "change"],
|
|
2809
2809
|
setup(e, { expose: t, emit: n }) {
|
|
2810
|
-
let r =
|
|
2811
|
-
j(
|
|
2810
|
+
let r = z(), i = e, a = n, o = ce(), s = M(), l = M({});
|
|
2811
|
+
j(Et, l);
|
|
2812
2812
|
function f(e) {
|
|
2813
2813
|
if (e == null || e === "") return;
|
|
2814
2814
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
@@ -2816,7 +2816,7 @@ var Tr = /* @__PURE__ */ y({
|
|
|
2816
2816
|
let t = e[0];
|
|
2817
2817
|
return t ? f(t) : void 0;
|
|
2818
2818
|
}
|
|
2819
|
-
let t =
|
|
2819
|
+
let t = K(e);
|
|
2820
2820
|
return t.isValid() ? t.toDate() : void 0;
|
|
2821
2821
|
}
|
|
2822
2822
|
function v(e, t) {
|
|
@@ -2839,10 +2839,10 @@ var Tr = /* @__PURE__ */ y({
|
|
|
2839
2839
|
"k-form--inline-layout": i.inline,
|
|
2840
2840
|
"k-form--query-layout": i.autoLayout,
|
|
2841
2841
|
"k-form--grid-layout": !i.autoLayout && !i.inline
|
|
2842
|
-
})), ee = u(() => ({ "--k-form-cols": String(i.colLength) })), C = u(() => i.modelValue !== void 0), w =
|
|
2843
|
-
formConfigs:
|
|
2844
|
-
data:
|
|
2845
|
-
modelValue:
|
|
2842
|
+
})), ee = u(() => ({ "--k-form-cols": String(i.colLength) })), C = u(() => i.modelValue !== void 0), w = Tt({
|
|
2843
|
+
formConfigs: I(i, "formConfigs"),
|
|
2844
|
+
data: I(i, "data"),
|
|
2845
|
+
modelValue: I(i, "modelValue"),
|
|
2846
2846
|
controlled: C,
|
|
2847
2847
|
onChange: (e) => {
|
|
2848
2848
|
a("change", e), C.value && a("update:modelValue", e);
|
|
@@ -2854,23 +2854,23 @@ var Tr = /* @__PURE__ */ y({
|
|
|
2854
2854
|
y(t) && (e[`kitDate-${t.id}`] = f(w.formModel[t.id]));
|
|
2855
2855
|
}), l.value = e;
|
|
2856
2856
|
}
|
|
2857
|
-
let { normalizedConfigs: k, getFieldOptions: ne, resolveItemRules: re, itemStyle:
|
|
2858
|
-
formConfigs:
|
|
2857
|
+
let { normalizedConfigs: k, getFieldOptions: ne, resolveItemRules: re, itemStyle: ie, itemDisplay: ae, isItemReadonly: oe, isItemDisabled: se } = yt({
|
|
2858
|
+
formConfigs: I(i, "formConfigs"),
|
|
2859
2859
|
layout: b,
|
|
2860
|
-
formReadonly:
|
|
2860
|
+
formReadonly: I(i, "readonly")
|
|
2861
2861
|
});
|
|
2862
|
-
|
|
2862
|
+
V(() => i.formConfigs, () => te(), {
|
|
2863
2863
|
immediate: !0,
|
|
2864
2864
|
deep: !0
|
|
2865
|
-
}),
|
|
2866
|
-
function
|
|
2867
|
-
let t =
|
|
2865
|
+
}), V(() => w.formModel, () => te(), { deep: !0 });
|
|
2866
|
+
function L(e) {
|
|
2867
|
+
let t = ae(e);
|
|
2868
2868
|
return {
|
|
2869
|
-
...
|
|
2869
|
+
...ie(e),
|
|
2870
2870
|
...t ? { display: t } : {}
|
|
2871
2871
|
};
|
|
2872
2872
|
}
|
|
2873
|
-
let
|
|
2873
|
+
let le = u(() => {
|
|
2874
2874
|
let e = { ...o };
|
|
2875
2875
|
return delete e.readonly, {
|
|
2876
2876
|
inline: i.inline && !i.autoLayout,
|
|
@@ -2879,10 +2879,10 @@ var Tr = /* @__PURE__ */ y({
|
|
|
2879
2879
|
...e
|
|
2880
2880
|
};
|
|
2881
2881
|
});
|
|
2882
|
-
function
|
|
2883
|
-
w.updateFieldValue(e, t), y(e) && v(e.id, t),
|
|
2882
|
+
function B(e, t) {
|
|
2883
|
+
w.updateFieldValue(e, t), y(e) && v(e.id, t), ue(e);
|
|
2884
2884
|
}
|
|
2885
|
-
function
|
|
2885
|
+
function ue(e) {
|
|
2886
2886
|
if (!s.value) return;
|
|
2887
2887
|
let t = e.validatePeers ?? [], n = re(e).length > 0;
|
|
2888
2888
|
!n && !t.length || E(() => {
|
|
@@ -2890,81 +2890,81 @@ var Tr = /* @__PURE__ */ y({
|
|
|
2890
2890
|
for (let e of t) s.value?.validateField(e).catch(() => {});
|
|
2891
2891
|
});
|
|
2892
2892
|
}
|
|
2893
|
-
async function
|
|
2893
|
+
async function de() {
|
|
2894
2894
|
let e = w.getVisibleFieldsValue();
|
|
2895
2895
|
if (!s.value) return e;
|
|
2896
2896
|
try {
|
|
2897
|
-
return await s.value.validate() === !1 ? i.ignoreValidate ? (s.value.clearValidate(), e) : (
|
|
2897
|
+
return await s.value.validate() === !1 ? i.ignoreValidate ? (s.value.clearValidate(), e) : (pe(), null) : e;
|
|
2898
2898
|
} catch {
|
|
2899
|
-
return i.ignoreValidate ? (s.value.clearValidate(), e) : (
|
|
2899
|
+
return i.ignoreValidate ? (s.value.clearValidate(), e) : (pe(), null);
|
|
2900
2900
|
}
|
|
2901
2901
|
}
|
|
2902
|
-
function
|
|
2902
|
+
function pe() {
|
|
2903
2903
|
((s.value?.$el)?.querySelector(".el-form-item.is-error") ?? document.querySelector(".k-form .el-form-item.is-error"))?.scrollIntoView({
|
|
2904
2904
|
block: "center",
|
|
2905
2905
|
behavior: "smooth"
|
|
2906
2906
|
});
|
|
2907
2907
|
}
|
|
2908
|
-
function
|
|
2908
|
+
function me(e) {
|
|
2909
2909
|
return w.getFieldsValue(e);
|
|
2910
2910
|
}
|
|
2911
|
-
function
|
|
2911
|
+
function he() {
|
|
2912
2912
|
return w.getVisibleFieldsValue();
|
|
2913
2913
|
}
|
|
2914
|
-
function
|
|
2914
|
+
function U(e) {
|
|
2915
2915
|
w.setFieldsValue(e);
|
|
2916
2916
|
}
|
|
2917
|
-
function
|
|
2917
|
+
function ge() {
|
|
2918
2918
|
s.value?.resetFields(), w.resetFormModel();
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2920
|
+
function _e(e) {
|
|
2921
2921
|
w.resetFieldsValue(e), e.forEach((e) => s.value?.clearValidate(e));
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2923
|
+
function ve() {
|
|
2924
2924
|
s.value?.clearValidate();
|
|
2925
2925
|
}
|
|
2926
|
-
function
|
|
2926
|
+
function ye() {
|
|
2927
2927
|
return s.value;
|
|
2928
2928
|
}
|
|
2929
2929
|
return t({
|
|
2930
|
-
validateFields:
|
|
2931
|
-
getFieldsValue:
|
|
2932
|
-
getParams:
|
|
2933
|
-
setFieldsValue:
|
|
2934
|
-
resetForm:
|
|
2935
|
-
resetFieldsValue:
|
|
2936
|
-
getFormRef:
|
|
2937
|
-
clearValidate:
|
|
2938
|
-
}), (e, t) => (A(), d(
|
|
2930
|
+
validateFields: de,
|
|
2931
|
+
getFieldsValue: me,
|
|
2932
|
+
getParams: he,
|
|
2933
|
+
setFieldsValue: U,
|
|
2934
|
+
resetForm: ge,
|
|
2935
|
+
resetFieldsValue: _e,
|
|
2936
|
+
getFormRef: ye,
|
|
2937
|
+
clearValidate: ve
|
|
2938
|
+
}), (e, t) => (A(), d(R(W), T({
|
|
2939
2939
|
ref_key: "formRef",
|
|
2940
2940
|
ref: s,
|
|
2941
2941
|
class: ["k-form", S.value],
|
|
2942
2942
|
style: ee.value,
|
|
2943
|
-
model:
|
|
2944
|
-
},
|
|
2945
|
-
default:
|
|
2943
|
+
model: R(w).formModel
|
|
2944
|
+
}, le.value, { onSubmit: t[0] ||= fe(() => {}, ["prevent"]) }), {
|
|
2945
|
+
default: H(() => [(A(!0), p(c, null, N(R(k), (n) => (A(), d(R(Se), {
|
|
2946
2946
|
key: n.id,
|
|
2947
2947
|
"data-label": n.label || "",
|
|
2948
2948
|
"data-field-id": n.id,
|
|
2949
2949
|
label: n.label ? `${n.label}:` : void 0,
|
|
2950
2950
|
prop: n.id,
|
|
2951
|
-
rules:
|
|
2951
|
+
rules: R(re)(n),
|
|
2952
2952
|
class: D(["k-form__item", [n.class, {
|
|
2953
|
-
"k-form__item--readonly":
|
|
2954
|
-
"k-form__item--disabled":
|
|
2953
|
+
"k-form__item--readonly": R(oe)(n),
|
|
2954
|
+
"k-form__item--disabled": R(se)(n),
|
|
2955
2955
|
"k-form__item--full-row": n.newLineStart,
|
|
2956
|
-
"k-form__item--choice":
|
|
2956
|
+
"k-form__item--choice": R(Sr)(n.component) && (n.component === "Radio" || n.component === "Checkbox" || n.component === "Tag")
|
|
2957
2957
|
}]]),
|
|
2958
|
-
style: O(
|
|
2958
|
+
style: O(L(n))
|
|
2959
2959
|
}, h({
|
|
2960
|
-
default:
|
|
2960
|
+
default: H(() => [!n.slot || !R(r)[n.id] ? (A(), d(Tr, {
|
|
2961
2961
|
key: 0,
|
|
2962
2962
|
item: n,
|
|
2963
|
-
"model-value":
|
|
2964
|
-
options:
|
|
2965
|
-
readonly:
|
|
2966
|
-
disabled:
|
|
2967
|
-
"onUpdate:modelValue": (e) =>
|
|
2963
|
+
"model-value": R(w).formModel[n.id],
|
|
2964
|
+
options: R(ne)(n),
|
|
2965
|
+
readonly: R(oe)(n),
|
|
2966
|
+
disabled: R(se)(n),
|
|
2967
|
+
"onUpdate:modelValue": (e) => B(n, e)
|
|
2968
2968
|
}, null, 8, [
|
|
2969
2969
|
"item",
|
|
2970
2970
|
"model-value",
|
|
@@ -2974,24 +2974,24 @@ var Tr = /* @__PURE__ */ y({
|
|
|
2974
2974
|
"onUpdate:modelValue"
|
|
2975
2975
|
])) : P(e.$slots, n.id, {
|
|
2976
2976
|
item: n,
|
|
2977
|
-
value:
|
|
2978
|
-
updateValue: (e) =>
|
|
2977
|
+
value: R(w).formModel[n.id],
|
|
2978
|
+
updateValue: (e) => B(n, e)
|
|
2979
2979
|
}, void 0, void 0, 1)]),
|
|
2980
2980
|
_: 2
|
|
2981
2981
|
}, [n.toolTip ? {
|
|
2982
2982
|
name: "label",
|
|
2983
|
-
fn:
|
|
2983
|
+
fn: H(() => [_(R(ze), {
|
|
2984
2984
|
effect: "dark",
|
|
2985
2985
|
placement: "bottom",
|
|
2986
2986
|
"popper-class": "k-form__tooltip"
|
|
2987
2987
|
}, {
|
|
2988
|
-
content:
|
|
2989
|
-
default:
|
|
2988
|
+
content: H(() => [m("span", { innerHTML: n.toolTip }, null, 8, Er)]),
|
|
2989
|
+
default: H(() => [t[1] ||= m("span", {
|
|
2990
2990
|
class: "k-form__tip-icon",
|
|
2991
2991
|
"aria-hidden": "true"
|
|
2992
2992
|
}, "i", -1)]),
|
|
2993
2993
|
_: 2
|
|
2994
|
-
}, 1024), g(" " +
|
|
2994
|
+
}, 1024), g(" " + F(n.label ? `${n.label}:` : ""), 1)]),
|
|
2995
2995
|
key: "0"
|
|
2996
2996
|
} : void 0]), 1032, [
|
|
2997
2997
|
"data-label",
|
|
@@ -3013,7 +3013,7 @@ var Tr = /* @__PURE__ */ y({
|
|
|
3013
3013
|
//#endregion
|
|
3014
3014
|
//#region src/components/k-form/composables/useKFormTemplateRef.ts
|
|
3015
3015
|
function Or(e) {
|
|
3016
|
-
return
|
|
3016
|
+
return B(e);
|
|
3017
3017
|
}
|
|
3018
3018
|
//#endregion
|
|
3019
3019
|
//#region src/components/k-handle-page/KHandlePage.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -3067,7 +3067,7 @@ var kr = { class: "k-handle-page" }, Ar = {
|
|
|
3067
3067
|
},
|
|
3068
3068
|
emits: ["cancel", "submit"],
|
|
3069
3069
|
setup(e, { emit: t }) {
|
|
3070
|
-
let n = e, r = t, i =
|
|
3070
|
+
let n = e, r = t, i = z(), a = M(!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);
|
|
3071
3071
|
async function x() {
|
|
3072
3072
|
if (!y.value) {
|
|
3073
3073
|
if (n.onSubmit) {
|
|
@@ -3085,11 +3085,11 @@ var kr = { class: "k-handle-page" }, Ar = {
|
|
|
3085
3085
|
return (t, n) => (A(), p("div", kr, [
|
|
3086
3086
|
b.value ? (A(), p("header", Ar, [P(t.$slots, "header")])) : f("", !0),
|
|
3087
3087
|
m("div", jr, [_(l, { name: "k-handle-page-loading" }, {
|
|
3088
|
-
default:
|
|
3088
|
+
default: H(() => [e.loading ? (A(), p("div", Mr, [m("div", Nr, [_(R(Ce), {
|
|
3089
3089
|
class: "k-handle-page__loading-icon is-loading",
|
|
3090
3090
|
size: 32
|
|
3091
3091
|
}, {
|
|
3092
|
-
default:
|
|
3092
|
+
default: H(() => [_(R(qe))]),
|
|
3093
3093
|
_: 1
|
|
3094
3094
|
}), n[1] ||= m("span", { class: "k-handle-page__loading-text" }, "加载中...", -1)])])) : f("", !0)]),
|
|
3095
3095
|
_: 1
|
|
@@ -3097,19 +3097,19 @@ var kr = { class: "k-handle-page" }, Ar = {
|
|
|
3097
3097
|
class: D(["k-handle-page__content", { "k-handle-page__content--loading": e.loading }]),
|
|
3098
3098
|
style: O(o.value)
|
|
3099
3099
|
}, [P(t.$slots, "default")], 6)]),
|
|
3100
|
-
e.showFooter ? (A(), p("footer", Pr, [P(t.$slots, "footer", {}, () => [h.value ? (A(), d(
|
|
3100
|
+
e.showFooter ? (A(), p("footer", Pr, [P(t.$slots, "footer", {}, () => [h.value ? (A(), d(J, {
|
|
3101
3101
|
key: 0,
|
|
3102
3102
|
onClick: n[0] ||= (e) => r("cancel")
|
|
3103
3103
|
}, {
|
|
3104
|
-
default:
|
|
3104
|
+
default: H(() => [g(F(s.value), 1)]),
|
|
3105
3105
|
_: 1
|
|
3106
|
-
})) : f("", !0), v.value ? (A(), d(
|
|
3106
|
+
})) : f("", !0), v.value ? (A(), d(J, {
|
|
3107
3107
|
key: 1,
|
|
3108
3108
|
type: "primary",
|
|
3109
3109
|
loading: y.value,
|
|
3110
3110
|
onClick: x
|
|
3111
3111
|
}, {
|
|
3112
|
-
default:
|
|
3112
|
+
default: H(() => [g(F(c.value), 1)]),
|
|
3113
3113
|
_: 1
|
|
3114
3114
|
}, 8, ["loading"])) : f("", !0)])])) : f("", !0)
|
|
3115
3115
|
]));
|
|
@@ -3120,7 +3120,7 @@ var kr = { class: "k-handle-page" }, Ar = {
|
|
|
3120
3120
|
function Ir(e, t) {
|
|
3121
3121
|
let n = M(!1);
|
|
3122
3122
|
async function r() {
|
|
3123
|
-
(
|
|
3123
|
+
(L(t?.skipLoading) ?? !1) || (n.value = !0);
|
|
3124
3124
|
try {
|
|
3125
3125
|
await e();
|
|
3126
3126
|
} finally {
|
|
@@ -3144,17 +3144,17 @@ function zr(e) {
|
|
|
3144
3144
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
3145
3145
|
}
|
|
3146
3146
|
function Br(e) {
|
|
3147
|
-
if (!e || e === "#") return
|
|
3147
|
+
if (!e || e === "#") return nt(e);
|
|
3148
3148
|
let t = e.trim();
|
|
3149
|
-
if (Lr.has(t)) return Lr.get(t) ??
|
|
3150
|
-
let n =
|
|
3151
|
-
return Lr.set(t, r), r ??
|
|
3149
|
+
if (Lr.has(t)) return Lr.get(t) ?? nt(e);
|
|
3150
|
+
let n = Ze[Rr(t)], r = typeof n == "function" ? n : null;
|
|
3151
|
+
return Lr.set(t, r), r ?? nt(e);
|
|
3152
3152
|
}
|
|
3153
3153
|
var Vr = /* @__PURE__ */ new Set(["createLucideIcon"]), Hr = null;
|
|
3154
3154
|
function Ur() {
|
|
3155
3155
|
if (Hr) return Hr;
|
|
3156
3156
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
3157
|
-
for (let [n, r] of Object.entries(
|
|
3157
|
+
for (let [n, r] of Object.entries(Ze)) Vr.has(n) || n.endsWith("Icon") || typeof r == "function" && (e.has(r) || (e.add(r), t.push(zr(n))));
|
|
3158
3158
|
return Hr = t.sort((e, t) => e.localeCompare(t)), Hr;
|
|
3159
3159
|
}
|
|
3160
3160
|
//#endregion
|
|
@@ -3169,7 +3169,7 @@ var Wr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3169
3169
|
},
|
|
3170
3170
|
setup(e) {
|
|
3171
3171
|
let t = e, n = u(() => Br(t.name));
|
|
3172
|
-
return (t, r) => n.value ? (A(), d(
|
|
3172
|
+
return (t, r) => n.value ? (A(), d(oe(n.value), {
|
|
3173
3173
|
key: 0,
|
|
3174
3174
|
class: "k-icon",
|
|
3175
3175
|
size: e.size,
|
|
@@ -3215,16 +3215,16 @@ var Wr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3215
3215
|
return (t, n) => (A(), p("div", {
|
|
3216
3216
|
class: "k-link-button",
|
|
3217
3217
|
style: O({ justifyContent: e.align })
|
|
3218
|
-
}, [(A(!0), p(c, null, N(i.value, (e, n) => (A(), d(
|
|
3218
|
+
}, [(A(!0), p(c, null, N(i.value, (e, n) => (A(), d(R(ze), {
|
|
3219
3219
|
key: `${e.label}-${n}`,
|
|
3220
3220
|
content: e.tooltip,
|
|
3221
3221
|
placement: "top",
|
|
3222
3222
|
disabled: !e.tooltip
|
|
3223
3223
|
}, {
|
|
3224
|
-
default:
|
|
3224
|
+
default: H(() => [m("div", Gr, [n > 0 ? (A(), p("span", Kr)) : f("", !0), m("a", {
|
|
3225
3225
|
class: D(["k-link-button__btn", [o(e), { "k-link-button__btn--readonly": a(e) }]]),
|
|
3226
|
-
onClick:
|
|
3227
|
-
}, [l(e) ? P(t.$slots, h(e), { item: e }, () => [g(
|
|
3226
|
+
onClick: fe((t) => s(e, n), ["prevent"])
|
|
3227
|
+
}, [l(e) ? P(t.$slots, h(e), { item: e }, () => [g(F(e.label), 1)], void 0, 0) : (A(), p(c, { key: 1 }, [g(F(e.label), 1)], 64))], 10, qr)])]),
|
|
3228
3228
|
_: 2
|
|
3229
3229
|
}, 1032, ["content", "disabled"]))), 128))], 4));
|
|
3230
3230
|
}
|
|
@@ -3248,7 +3248,7 @@ var Wr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3248
3248
|
] }
|
|
3249
3249
|
},
|
|
3250
3250
|
setup(e) {
|
|
3251
|
-
return (t, n) => (A(), d(
|
|
3251
|
+
return (t, n) => (A(), d(R(ke), T(t.$attrs, {
|
|
3252
3252
|
layout: e.layout,
|
|
3253
3253
|
"page-size": e.pageSize,
|
|
3254
3254
|
"page-sizes": e.pageSizes
|
|
@@ -3269,7 +3269,7 @@ var Wr = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3269
3269
|
return (t, n) => (A(), p("div", {
|
|
3270
3270
|
id: e.panelId || void 0,
|
|
3271
3271
|
class: "k-long-page-panel"
|
|
3272
|
-
}, [m("div", Zr,
|
|
3272
|
+
}, [m("div", Zr, F(e.title), 1), m("div", Qr, [P(t.$slots, "default", {}, void 0, !0)])], 8, Xr));
|
|
3273
3273
|
}
|
|
3274
3274
|
}), [["__scopeId", "data-v-9d6e7832"]]), ei = 4;
|
|
3275
3275
|
function ti(e) {
|
|
@@ -3321,7 +3321,7 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3321
3321
|
label: "面板一"
|
|
3322
3322
|
}] } },
|
|
3323
3323
|
setup(e) {
|
|
3324
|
-
let t =
|
|
3324
|
+
let t = B("rootRef"), n = B("navRef"), { onPointerDown: r, consumeClickIfDragged: i } = ti(n);
|
|
3325
3325
|
function a(e) {
|
|
3326
3326
|
return pi(e);
|
|
3327
3327
|
}
|
|
@@ -3344,13 +3344,13 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3344
3344
|
"panel-id": e.name,
|
|
3345
3345
|
title: e.label
|
|
3346
3346
|
}, {
|
|
3347
|
-
default:
|
|
3347
|
+
default: H(() => [P(i.$slots, e.name, {}, void 0, !0)]),
|
|
3348
3348
|
_: 2
|
|
3349
3349
|
}, 1032, ["panel-id", "title"]))), 128)), m("div", {
|
|
3350
3350
|
ref_key: "navRef",
|
|
3351
3351
|
ref: n,
|
|
3352
3352
|
class: "k-long-page__nav",
|
|
3353
|
-
onPointerdown: s[0] ||= (...e) =>
|
|
3353
|
+
onPointerdown: s[0] ||= (...e) => R(r) && R(r)(...e)
|
|
3354
3354
|
}, [(A(!0), p(c, null, N(e.panels, (e) => (A(), p("div", {
|
|
3355
3355
|
key: e.name,
|
|
3356
3356
|
class: "k-long-page__nav-item",
|
|
@@ -3374,23 +3374,23 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3374
3374
|
height: "28",
|
|
3375
3375
|
draggable: "false"
|
|
3376
3376
|
}, null, 8, gi),
|
|
3377
|
-
m("span", null,
|
|
3377
|
+
m("span", null, F(e.label), 1)
|
|
3378
3378
|
], 8, mi))), 128))], 544)], 512));
|
|
3379
3379
|
}
|
|
3380
3380
|
}), [["__scopeId", "data-v-ac934c5d"]]), vi = /* @__PURE__ */ y({
|
|
3381
3381
|
name: "KCard",
|
|
3382
3382
|
__name: "KCard",
|
|
3383
3383
|
setup(e) {
|
|
3384
|
-
return (e, t) => (A(), d(
|
|
3385
|
-
default:
|
|
3384
|
+
return (e, t) => (A(), d(R(me), te(b(e.$attrs)), h({
|
|
3385
|
+
default: H(() => [P(e.$slots, "default")]),
|
|
3386
3386
|
_: 2
|
|
3387
3387
|
}, [e.$slots.header ? {
|
|
3388
3388
|
name: "header",
|
|
3389
|
-
fn:
|
|
3389
|
+
fn: H(() => [P(e.$slots, "header")]),
|
|
3390
3390
|
key: "0"
|
|
3391
3391
|
} : void 0, e.$slots.footer ? {
|
|
3392
3392
|
name: "footer",
|
|
3393
|
-
fn:
|
|
3393
|
+
fn: H(() => [P(e.$slots, "footer")]),
|
|
3394
3394
|
key: "1"
|
|
3395
3395
|
} : void 0]), 1040));
|
|
3396
3396
|
}
|
|
@@ -3420,20 +3420,20 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3420
3420
|
panel: !0,
|
|
3421
3421
|
"panel-hover": t.hover
|
|
3422
3422
|
}));
|
|
3423
|
-
return (t, i) => (A(), p("div", { class: D(r.value) }, [e.isFold ? (A(), d(
|
|
3423
|
+
return (t, i) => (A(), p("div", { class: D(r.value) }, [e.isFold ? (A(), d(R(_e), {
|
|
3424
3424
|
key: 0,
|
|
3425
3425
|
modelValue: n.value,
|
|
3426
3426
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e
|
|
3427
3427
|
}, {
|
|
3428
|
-
default:
|
|
3428
|
+
default: H(() => [_(R(ve), {
|
|
3429
3429
|
name: "content",
|
|
3430
3430
|
title: e.title
|
|
3431
3431
|
}, {
|
|
3432
|
-
default:
|
|
3432
|
+
default: H(() => [P(t.$slots, "default")]),
|
|
3433
3433
|
_: 3
|
|
3434
3434
|
}, 8, ["title"])]),
|
|
3435
3435
|
_: 3
|
|
3436
|
-
}, 8, ["modelValue"])) : (A(), p(c, { key: 1 }, [e.title || t.$slots.title ? (A(), p("div", yi, [m("div", bi, [P(t.$slots, "title", {}, () => [g(
|
|
3436
|
+
}, 8, ["modelValue"])) : (A(), p(c, { key: 1 }, [e.title || t.$slots.title ? (A(), p("div", yi, [m("div", bi, [P(t.$slots, "title", {}, () => [g(F(e.title), 1)])])])) : f("", !0), m("div", xi, [P(t.$slots, "default")])], 64))], 2));
|
|
3437
3437
|
}
|
|
3438
3438
|
}), Ci = {
|
|
3439
3439
|
key: 0,
|
|
@@ -3448,29 +3448,29 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3448
3448
|
emits: ["query", "reset"],
|
|
3449
3449
|
setup(e, { emit: t }) {
|
|
3450
3450
|
let n = t;
|
|
3451
|
-
return (t, r) => e.footer ? (A(), p("div", Ci, [_(
|
|
3451
|
+
return (t, r) => e.footer ? (A(), p("div", Ci, [_(J, {
|
|
3452
3452
|
type: "primary",
|
|
3453
3453
|
onClick: r[0] ||= (e) => n("query")
|
|
3454
3454
|
}, {
|
|
3455
|
-
default:
|
|
3455
|
+
default: H(() => [...r[4] ||= [g("查询", -1)]]),
|
|
3456
3456
|
_: 1
|
|
3457
|
-
}), _(
|
|
3457
|
+
}), _(J, {
|
|
3458
3458
|
class: "k-panel-query__btn-reset",
|
|
3459
3459
|
onClick: r[1] ||= (e) => n("reset")
|
|
3460
3460
|
}, {
|
|
3461
|
-
default:
|
|
3461
|
+
default: H(() => [...r[5] ||= [g("重置", -1)]]),
|
|
3462
3462
|
_: 1
|
|
3463
|
-
})])) : (A(), p(c, { key: 1 }, [_(
|
|
3463
|
+
})])) : (A(), p(c, { key: 1 }, [_(J, {
|
|
3464
3464
|
type: "primary",
|
|
3465
3465
|
onClick: r[2] ||= (e) => n("query")
|
|
3466
3466
|
}, {
|
|
3467
|
-
default:
|
|
3467
|
+
default: H(() => [...r[6] ||= [g("查询", -1)]]),
|
|
3468
3468
|
_: 1
|
|
3469
|
-
}), _(
|
|
3469
|
+
}), _(J, {
|
|
3470
3470
|
class: "k-panel-query__btn-reset",
|
|
3471
3471
|
onClick: r[3] ||= (e) => n("reset")
|
|
3472
3472
|
}, {
|
|
3473
|
-
default:
|
|
3473
|
+
default: H(() => [...r[7] ||= [g("重置", -1)]]),
|
|
3474
3474
|
_: 1
|
|
3475
3475
|
})], 64));
|
|
3476
3476
|
}
|
|
@@ -3502,7 +3502,7 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3502
3502
|
getParams: () => n.value?.getParams() ?? {},
|
|
3503
3503
|
resetForm: () => n.value?.resetForm(),
|
|
3504
3504
|
getFormRef: () => n.value?.getFormRef()
|
|
3505
|
-
}), (t, r) => (A(), d(
|
|
3505
|
+
}), (t, r) => (A(), d(R(Dr), {
|
|
3506
3506
|
ref_key: "formRef",
|
|
3507
3507
|
ref: n,
|
|
3508
3508
|
class: "k-panel-query-form",
|
|
@@ -3534,16 +3534,16 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3534
3534
|
__name: "KPanelQueryItem",
|
|
3535
3535
|
props: { formConfigs: {} },
|
|
3536
3536
|
setup(e, { expose: t }) {
|
|
3537
|
-
let n = e, r =
|
|
3537
|
+
let n = e, r = z(), i = u(() => ({
|
|
3538
3538
|
colLength: 1,
|
|
3539
3539
|
inline: !0,
|
|
3540
3540
|
autoLayout: !1,
|
|
3541
3541
|
hideLabel: !1
|
|
3542
|
-
})), a =
|
|
3543
|
-
formConfigs:
|
|
3542
|
+
})), a = Tt({
|
|
3543
|
+
formConfigs: I(n, "formConfigs"),
|
|
3544
3544
|
controlled: u(() => !1)
|
|
3545
|
-
}), { normalizedConfigs: o, getFieldOptions: s } =
|
|
3546
|
-
formConfigs:
|
|
3545
|
+
}), { normalizedConfigs: o, getFieldOptions: s } = yt({
|
|
3546
|
+
formConfigs: I(n, "formConfigs"),
|
|
3547
3547
|
layout: i
|
|
3548
3548
|
});
|
|
3549
3549
|
function l(e, t) {
|
|
@@ -3563,20 +3563,20 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3563
3563
|
getParams: h,
|
|
3564
3564
|
resetForm: g,
|
|
3565
3565
|
getFormRef: () => void 0
|
|
3566
|
-
}), (e, t) => (A(), p("div", Ei, [m("ul", Di, [(A(!0), p(c, null, N(
|
|
3566
|
+
}), (e, t) => (A(), p("div", Ei, [m("ul", Di, [(A(!0), p(c, null, N(R(o), (e) => (A(), p("li", {
|
|
3567
3567
|
key: e.id,
|
|
3568
3568
|
class: D(["k-item", { "k-item_flex": !!e.label }])
|
|
3569
|
-
}, [e.label ? (A(), p("label", Oi,
|
|
3569
|
+
}, [e.label ? (A(), p("label", Oi, F(e.label), 1)) : f("", !0), m("div", ki, [_(Tr, {
|
|
3570
3570
|
item: e,
|
|
3571
|
-
"model-value":
|
|
3572
|
-
options:
|
|
3571
|
+
"model-value": R(a).formModel[e.id],
|
|
3572
|
+
options: R(s)(e),
|
|
3573
3573
|
"onUpdate:modelValue": (t) => l(e, t)
|
|
3574
3574
|
}, null, 8, [
|
|
3575
3575
|
"item",
|
|
3576
3576
|
"model-value",
|
|
3577
3577
|
"options",
|
|
3578
3578
|
"onUpdate:modelValue"
|
|
3579
|
-
])])], 2))), 128)),
|
|
3579
|
+
])])], 2))), 128)), R(r).button ? (A(), p("li", Ai, [P(e.$slots, "button")])) : f("", !0)])]));
|
|
3580
3580
|
}
|
|
3581
3581
|
}), Mi = /* @__PURE__ */ y({
|
|
3582
3582
|
name: "KPanelQuery",
|
|
@@ -3666,20 +3666,20 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3666
3666
|
}), (t, n) => (A(), p("div", { class: D(["k-panel-query", {
|
|
3667
3667
|
"k-panel-query__form": e.model === "form" && !e.showPanel,
|
|
3668
3668
|
"k-panel-query__item": m.value
|
|
3669
|
-
}]) }, [e.showPanel ? (A(), d(
|
|
3669
|
+
}]) }, [e.showPanel ? (A(), d(R(Si), {
|
|
3670
3670
|
key: 1,
|
|
3671
3671
|
title: e.title,
|
|
3672
3672
|
"is-fold": e.isFold,
|
|
3673
3673
|
unfold: e.unfold,
|
|
3674
3674
|
hover: e.hover
|
|
3675
3675
|
}, {
|
|
3676
|
-
default:
|
|
3676
|
+
default: H(() => [l.value ? (A(), p(c, { key: 0 }, [m.value ? (A(), d(ji, T({
|
|
3677
3677
|
key: 0,
|
|
3678
3678
|
ref_key: "formRef",
|
|
3679
3679
|
ref: a
|
|
3680
3680
|
}, l.value), h({ _: 2 }, [e.hideButton ? void 0 : {
|
|
3681
3681
|
name: "button",
|
|
3682
|
-
fn:
|
|
3682
|
+
fn: H(() => [_(wi, {
|
|
3683
3683
|
onQuery: g,
|
|
3684
3684
|
onReset: v
|
|
3685
3685
|
})]),
|
|
@@ -3705,7 +3705,7 @@ var mi = ["onClick"], hi = ["src", "alt"], gi = ["src", "alt"], _i = /*#__PURE__
|
|
|
3705
3705
|
ref: a
|
|
3706
3706
|
}, l.value), h({ _: 2 }, [e.hideButton ? void 0 : {
|
|
3707
3707
|
name: "button",
|
|
3708
|
-
fn:
|
|
3708
|
+
fn: H(() => [_(wi, {
|
|
3709
3709
|
onQuery: g,
|
|
3710
3710
|
onReset: v
|
|
3711
3711
|
})]),
|
|
@@ -3746,8 +3746,8 @@ function Ri(e, t) {
|
|
|
3746
3746
|
if (Fi(t)) return "";
|
|
3747
3747
|
let n = String(t);
|
|
3748
3748
|
switch (e) {
|
|
3749
|
-
case "date": return
|
|
3750
|
-
case "datetime": return
|
|
3749
|
+
case "date": return K(n).format("YYYY-MM-DD");
|
|
3750
|
+
case "datetime": return K(n).format("YYYY-MM-DD HH:mm:ss");
|
|
3751
3751
|
case "amount": return Ii(t);
|
|
3752
3752
|
case "phone": return Li(n);
|
|
3753
3753
|
default: return n;
|
|
@@ -3803,7 +3803,7 @@ function Hi(e) {
|
|
|
3803
3803
|
return e.type === "index" && !t.label && (t.label = "序号"), e.type === "expand" && (t.width = e.width ?? 50, delete t.minWidth), e.type !== "selection" && e.type !== "index" && e.type !== "operates" && e.type !== "radio" && e.type !== "expand" && (t.showOverflowTooltip = e.showOverflowTooltip ?? !0), t;
|
|
3804
3804
|
}
|
|
3805
3805
|
function Ui(e = "--") {
|
|
3806
|
-
let t = S(
|
|
3806
|
+
let t = S(ft, null);
|
|
3807
3807
|
function n(n, r, i) {
|
|
3808
3808
|
let a = n.prop ? Ni(r, n.prop) : void 0;
|
|
3809
3809
|
return zi(n, r, i, e, n.dict && t && !Wi(a) ? t.getLabel(n.dict, a) : void 0);
|
|
@@ -3844,7 +3844,7 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3844
3844
|
},
|
|
3845
3845
|
emits: ["operate-click", "radio-select"],
|
|
3846
3846
|
setup(e, { emit: t }) {
|
|
3847
|
-
let n = e, r = t, i =
|
|
3847
|
+
let n = e, r = t, i = z(), { getCellDisplayValue: a } = Ui(n.nullValueFormat);
|
|
3848
3848
|
function o(e) {
|
|
3849
3849
|
return e ?? "";
|
|
3850
3850
|
}
|
|
@@ -3862,18 +3862,18 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3862
3862
|
return Pi(e, n.rowKey);
|
|
3863
3863
|
}
|
|
3864
3864
|
return (t, n) => {
|
|
3865
|
-
let u =
|
|
3866
|
-
return e.column.type === "selection" ? (A(), d(
|
|
3867
|
-
key: `${
|
|
3865
|
+
let u = ie("KTableColumn", !0);
|
|
3866
|
+
return e.column.type === "selection" ? (A(), d(R(G), T({
|
|
3867
|
+
key: `${R($)(e.column, e.columnIndex)}:selection`,
|
|
3868
3868
|
type: "selection"
|
|
3869
|
-
}, s.value), null, 16)) : e.column.type === "index" ? (A(), d(
|
|
3870
|
-
default:
|
|
3869
|
+
}, s.value), null, 16)) : e.column.type === "index" ? (A(), d(R(G), T({ key: `${R($)(e.column, e.columnIndex)}:index` }, s.value), {
|
|
3870
|
+
default: H(({ $index: e }) => [P(t.$slots, "index", {
|
|
3871
3871
|
index: e,
|
|
3872
3872
|
displayIndex: l(e)
|
|
3873
|
-
}, () => [g(
|
|
3873
|
+
}, () => [g(F(l(e)), 1)], !0)]),
|
|
3874
3874
|
_: 3
|
|
3875
|
-
}, 16)) : e.column.type === "radio" ? (A(), d(
|
|
3876
|
-
default:
|
|
3875
|
+
}, 16)) : e.column.type === "radio" ? (A(), d(R(G), T({ key: `${R($)(e.column, e.columnIndex)}:radio` }, s.value), {
|
|
3876
|
+
default: H(({ row: t }) => [_(R(Me), {
|
|
3877
3877
|
class: "k-table-column__radio",
|
|
3878
3878
|
"model-value": e.radioSelected,
|
|
3879
3879
|
label: x(t),
|
|
@@ -3884,12 +3884,12 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3884
3884
|
"onUpdate:modelValue"
|
|
3885
3885
|
])]),
|
|
3886
3886
|
_: 1
|
|
3887
|
-
}, 16)) : e.column.type === "operates" ? (A(), d(
|
|
3888
|
-
default:
|
|
3887
|
+
}, 16)) : e.column.type === "operates" ? (A(), d(R(G), T({ key: `${R($)(e.column, e.columnIndex)}:operates` }, s.value), {
|
|
3888
|
+
default: H(({ row: n, column: r, $index: a }) => [v.value ? P(t.$slots, R(i).operates ? "operates" : o(e.column.prop), {
|
|
3889
3889
|
row: n,
|
|
3890
3890
|
column: r,
|
|
3891
3891
|
index: a
|
|
3892
|
-
}, void 0, !0, 0) : (A(), d(
|
|
3892
|
+
}, void 0, !0, 0) : (A(), d(R(Jr), {
|
|
3893
3893
|
key: 1,
|
|
3894
3894
|
data: e.column.operates ?? [],
|
|
3895
3895
|
disabled: e.disabled,
|
|
@@ -3897,31 +3897,31 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3897
3897
|
onClick: (e, t) => y(e, t, n)
|
|
3898
3898
|
}, h({ _: 2 }, [N(e.column.operates ?? [], (e) => ({
|
|
3899
3899
|
name: b(e),
|
|
3900
|
-
fn:
|
|
3900
|
+
fn: H(({ item: i }) => [P(t.$slots, b(e), {
|
|
3901
3901
|
row: n,
|
|
3902
3902
|
column: r,
|
|
3903
3903
|
index: a,
|
|
3904
3904
|
item: i
|
|
3905
|
-
}, () => [g(
|
|
3905
|
+
}, () => [g(F(i.label), 1)], !0)])
|
|
3906
3906
|
}))]), 1032, [
|
|
3907
3907
|
"data",
|
|
3908
3908
|
"disabled",
|
|
3909
3909
|
"onClick"
|
|
3910
3910
|
]))]),
|
|
3911
3911
|
_: 3
|
|
3912
|
-
}, 16)) : e.column.type === "expand" ? (A(), d(
|
|
3913
|
-
key: `${
|
|
3912
|
+
}, 16)) : e.column.type === "expand" ? (A(), d(R(G), T({
|
|
3913
|
+
key: `${R($)(e.column, e.columnIndex)}:expand`,
|
|
3914
3914
|
type: "expand"
|
|
3915
3915
|
}, s.value), {
|
|
3916
|
-
default:
|
|
3916
|
+
default: H(({ row: e, column: n, $index: r }) => [P(t.$slots, "expand", {
|
|
3917
3917
|
row: e,
|
|
3918
3918
|
column: n,
|
|
3919
3919
|
index: r
|
|
3920
3920
|
}, void 0, !0)]),
|
|
3921
3921
|
_: 3
|
|
3922
|
-
}, 16)) : e.column.children?.length ? (A(), d(
|
|
3923
|
-
default:
|
|
3924
|
-
key:
|
|
3922
|
+
}, 16)) : e.column.children?.length ? (A(), d(R(G), T({ key: `${R($)(e.column, e.columnIndex)}:group` }, s.value), {
|
|
3923
|
+
default: H(() => [(A(!0), p(c, null, N(e.column.children, (i, a) => (A(), d(u, {
|
|
3924
|
+
key: R($)(i, a),
|
|
3925
3925
|
column: i,
|
|
3926
3926
|
"column-index": a,
|
|
3927
3927
|
"index-offset": e.indexOffset,
|
|
@@ -3933,7 +3933,7 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3933
3933
|
onRadioSelect: n[1] ||= (e) => r("radio-select", e)
|
|
3934
3934
|
}, h({ _: 2 }, [N(t.$slots, (e, n) => ({
|
|
3935
3935
|
name: n,
|
|
3936
|
-
fn:
|
|
3936
|
+
fn: H((e) => [P(t.$slots, n, T({ ref_for: !0 }, e ?? {}), void 0, !0)])
|
|
3937
3937
|
}))]), 1032, [
|
|
3938
3938
|
"column",
|
|
3939
3939
|
"column-index",
|
|
@@ -3944,20 +3944,20 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3944
3944
|
"radio-selected"
|
|
3945
3945
|
]))), 128))]),
|
|
3946
3946
|
_: 3
|
|
3947
|
-
}, 16)) : (A(), d(
|
|
3948
|
-
default:
|
|
3947
|
+
}, 16)) : (A(), d(R(G), T({ key: `${R($)(e.column, e.columnIndex)}:default` }, s.value), h({
|
|
3948
|
+
default: H(({ row: n, column: r, $index: i }) => [f.value ? P(t.$slots, o(e.column.prop), {
|
|
3949
3949
|
row: n,
|
|
3950
3950
|
column: r,
|
|
3951
3951
|
index: i
|
|
3952
|
-
}, void 0, !0, 0) : (A(), p(c, { key: 1 }, [g(
|
|
3952
|
+
}, void 0, !0, 0) : (A(), p(c, { key: 1 }, [g(F(R(a)(e.column, n, i)), 1)], 64))]),
|
|
3953
3953
|
_: 2
|
|
3954
3954
|
}, [e.column.toolTip ? {
|
|
3955
3955
|
name: "header",
|
|
3956
|
-
fn:
|
|
3956
|
+
fn: H(() => [m("span", null, F(e.column.label), 1), _(R(ze), {
|
|
3957
3957
|
content: e.column.toolTip,
|
|
3958
3958
|
placement: "top"
|
|
3959
3959
|
}, {
|
|
3960
|
-
default:
|
|
3960
|
+
default: H(() => [...n[2] ||= [m("span", { class: "k-table-column__tip" }, "i", -1)]]),
|
|
3961
3961
|
_: 1
|
|
3962
3962
|
}, 8, ["content"])]),
|
|
3963
3963
|
key: "0"
|
|
@@ -3977,7 +3977,7 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3977
3977
|
function a() {
|
|
3978
3978
|
n("reset");
|
|
3979
3979
|
}
|
|
3980
|
-
return (t, n) => (A(), d(
|
|
3980
|
+
return (t, n) => (A(), d(R(Ae), {
|
|
3981
3981
|
visible: r.value,
|
|
3982
3982
|
"onUpdate:visible": n[0] ||= (e) => r.value = e,
|
|
3983
3983
|
placement: "bottom-end",
|
|
@@ -3985,28 +3985,28 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
3985
3985
|
trigger: "click",
|
|
3986
3986
|
"popper-class": "k-table-column-selector__popover"
|
|
3987
3987
|
}, {
|
|
3988
|
-
reference:
|
|
3988
|
+
reference: H(() => [...n[1] ||= [m("button", {
|
|
3989
3989
|
type: "button",
|
|
3990
3990
|
class: "k-table-column-selector__trigger",
|
|
3991
3991
|
"aria-label": "列展示设置"
|
|
3992
3992
|
}, [m("span", { class: "k-table-column-selector__icon" })], -1)]]),
|
|
3993
|
-
default:
|
|
3994
|
-
m("div", qi, [n[3] ||= m("span", null, "列展示", -1), _(
|
|
3993
|
+
default: H(() => [m("div", Ki, [
|
|
3994
|
+
m("div", qi, [n[3] ||= m("span", null, "列展示", -1), _(R(pe), {
|
|
3995
3995
|
type: "primary",
|
|
3996
3996
|
link: "",
|
|
3997
3997
|
onClick: a
|
|
3998
3998
|
}, {
|
|
3999
|
-
default:
|
|
3999
|
+
default: H(() => [...n[2] ||= [g("恢复默认", -1)]]),
|
|
4000
4000
|
_: 1
|
|
4001
4001
|
})]),
|
|
4002
|
-
_(
|
|
4003
|
-
m("div", Ji, [(A(!0), p(c, null, N(e.items, (e) => (A(), d(
|
|
4002
|
+
_(R(xe), { class: "k-table-column-selector__divider" }),
|
|
4003
|
+
m("div", Ji, [(A(!0), p(c, null, N(e.items, (e) => (A(), d(R(U), {
|
|
4004
4004
|
key: e.key,
|
|
4005
4005
|
"model-value": e.checked,
|
|
4006
4006
|
disabled: e.disabled,
|
|
4007
4007
|
onChange: (t) => i(e.key, !!t)
|
|
4008
4008
|
}, {
|
|
4009
|
-
default:
|
|
4009
|
+
default: H(() => [g(F(e.label), 1)]),
|
|
4010
4010
|
_: 2
|
|
4011
4011
|
}, 1032, [
|
|
4012
4012
|
"model-value",
|
|
@@ -4051,23 +4051,23 @@ var Gi = /*#__PURE__*/ e(/* @__PURE__ */ y({
|
|
|
4051
4051
|
},
|
|
4052
4052
|
emits: ["add"],
|
|
4053
4053
|
setup(e, { emit: t }) {
|
|
4054
|
-
let n = e, r = t, i =
|
|
4054
|
+
let n = e, r = t, i = z(), a = u(() => !!(n.addButton || i.header || i.extra)), o = u(() => !!(n.addButton && n.selectionShow));
|
|
4055
4055
|
return (t, n) => a.value || e.selectionShow ? (A(), p("div", Xi, [
|
|
4056
4056
|
a.value ? (A(), p("div", Zi, [
|
|
4057
|
-
e.addButton ? (A(), d(
|
|
4057
|
+
e.addButton ? (A(), d(J, {
|
|
4058
4058
|
key: 0,
|
|
4059
4059
|
type: "primary",
|
|
4060
|
-
icon:
|
|
4060
|
+
icon: R(Je),
|
|
4061
4061
|
onClick: n[0] ||= (e) => r("add")
|
|
4062
4062
|
}, {
|
|
4063
|
-
default:
|
|
4063
|
+
default: H(() => [g(F(e.addButton === !0 ? "新建" : e.addButton), 1)]),
|
|
4064
4064
|
_: 1
|
|
4065
4065
|
}, 8, ["icon"])) : f("", !0),
|
|
4066
|
-
|
|
4067
|
-
|
|
4066
|
+
R(i).header ? (A(), p("div", Qi, [P(t.$slots, "header", {}, void 0, !0)])) : f("", !0),
|
|
4067
|
+
R(i).extra ? (A(), p("div", $i, [P(t.$slots, "extra", {}, void 0, !0)])) : f("", !0)
|
|
4068
4068
|
])) : f("", !0),
|
|
4069
4069
|
o.value ? (A(), p("div", ea)) : f("", !0),
|
|
4070
|
-
e.selectionShow ? (A(), p("div", ta, "已选择" +
|
|
4070
|
+
e.selectionShow ? (A(), p("div", ta, "已选择" + F(e.selectedCount) + "条数据", 1)) : f("", !0)
|
|
4071
4071
|
])) : f("", !0);
|
|
4072
4072
|
}
|
|
4073
4073
|
}), [["__scopeId", "data-v-bff19ed1"]]), ra = "kayak_table_column_display";
|
|
@@ -4078,13 +4078,13 @@ function aa(e) {
|
|
|
4078
4078
|
return !(e.type === "radio" || e.type === "expand" || e.children?.length);
|
|
4079
4079
|
}
|
|
4080
4080
|
function oa(e) {
|
|
4081
|
-
let t = M({}), n = M(""), r =
|
|
4081
|
+
let t = M({}), n = M(""), r = We(ra, {}), i = u(() => !!L(e.enableColumnCache)), a = u(() => L(e.columns).filter((e) => aa(e)));
|
|
4082
4082
|
function o() {
|
|
4083
|
-
return
|
|
4083
|
+
return L(e.tableKey) || n.value;
|
|
4084
4084
|
}
|
|
4085
4085
|
function s() {
|
|
4086
4086
|
let t = {};
|
|
4087
|
-
return
|
|
4087
|
+
return L(e.columns).forEach((e, n) => {
|
|
4088
4088
|
aa(e) && (t[$(e, n)] = !0);
|
|
4089
4089
|
}), t;
|
|
4090
4090
|
}
|
|
@@ -4109,13 +4109,13 @@ function oa(e) {
|
|
|
4109
4109
|
delete t[e], r.value = t;
|
|
4110
4110
|
}
|
|
4111
4111
|
function f(t, n) {
|
|
4112
|
-
let r =
|
|
4112
|
+
let r = L(e.columns), i = r.findIndex((e) => e === t || e.prop && e.prop === t.prop && e.type === t.type);
|
|
4113
4113
|
return i >= 0 ? $(r[i], i) : $(t, n);
|
|
4114
4114
|
}
|
|
4115
4115
|
function p() {
|
|
4116
|
-
n.value =
|
|
4116
|
+
n.value = L(e.tableKey) || `table_${Math.random().toString(36).slice(2, 11)}`;
|
|
4117
4117
|
let r = c();
|
|
4118
|
-
t.value = r ?
|
|
4118
|
+
t.value = r ? q(r) : s();
|
|
4119
4119
|
}
|
|
4120
4120
|
function m() {
|
|
4121
4121
|
E(() => e.onLayout?.());
|
|
@@ -4133,7 +4133,7 @@ function oa(e) {
|
|
|
4133
4133
|
d(), t.value = s(), e.onDisplayChange?.(t.value), m();
|
|
4134
4134
|
}
|
|
4135
4135
|
let v = u(() => {
|
|
4136
|
-
let n =
|
|
4136
|
+
let n = L(e.renderColumns);
|
|
4137
4137
|
return i.value ? n.filter((e, n) => {
|
|
4138
4138
|
if (ia(e)) return !0;
|
|
4139
4139
|
let r = f(e, n);
|
|
@@ -4149,7 +4149,7 @@ function oa(e) {
|
|
|
4149
4149
|
disabled: ia(e)
|
|
4150
4150
|
};
|
|
4151
4151
|
}));
|
|
4152
|
-
return
|
|
4152
|
+
return V(() => L(e.columns), () => {
|
|
4153
4153
|
let e = s();
|
|
4154
4154
|
Object.keys(e).forEach((e) => {
|
|
4155
4155
|
t.value[e] === void 0 && (t.value[e] = !0);
|
|
@@ -4172,15 +4172,15 @@ function sa(e) {
|
|
|
4172
4172
|
let t = M([]), n = M(e.initialLoading ?? !1), r = M(!1), i = M(!1);
|
|
4173
4173
|
function a() {
|
|
4174
4174
|
return {
|
|
4175
|
-
...
|
|
4176
|
-
...
|
|
4175
|
+
...pt,
|
|
4176
|
+
...L(e.responseConfig)
|
|
4177
4177
|
};
|
|
4178
4178
|
}
|
|
4179
4179
|
function o() {
|
|
4180
4180
|
let t = a(), { currentPage: n, pageSize: r } = e.pagination.state.value;
|
|
4181
4181
|
return {
|
|
4182
|
-
...
|
|
4183
|
-
...
|
|
4182
|
+
...L(e.params) ?? {},
|
|
4183
|
+
...L(e.queryParams) ?? {},
|
|
4184
4184
|
[t.page]: String(n),
|
|
4185
4185
|
[t.limit]: String(r)
|
|
4186
4186
|
};
|
|
@@ -4213,12 +4213,12 @@ function sa(e) {
|
|
|
4213
4213
|
//#endregion
|
|
4214
4214
|
//#region src/components/k-table/composables/useTablePagination.ts
|
|
4215
4215
|
function ca(e) {
|
|
4216
|
-
let t =
|
|
4217
|
-
total: t?.total ??
|
|
4218
|
-
currentPage: t?.currentPage ??
|
|
4219
|
-
pageSize: t?.pageSize ??
|
|
4220
|
-
pageSizes: t?.pageSizes ?? [...
|
|
4221
|
-
layout: t?.layout ??
|
|
4216
|
+
let t = L(e.pagination), n = M({
|
|
4217
|
+
total: t?.total ?? mt.total,
|
|
4218
|
+
currentPage: t?.currentPage ?? mt.currentPage,
|
|
4219
|
+
pageSize: t?.pageSize ?? mt.pageSize,
|
|
4220
|
+
pageSizes: t?.pageSizes ?? [...mt.pageSizes],
|
|
4221
|
+
layout: t?.layout ?? mt.layout
|
|
4222
4222
|
}), r = u(() => ({
|
|
4223
4223
|
total: n.value.total,
|
|
4224
4224
|
currentPage: n.value.currentPage,
|
|
@@ -4226,8 +4226,8 @@ function ca(e) {
|
|
|
4226
4226
|
pageSizes: n.value.pageSizes,
|
|
4227
4227
|
layout: n.value.layout
|
|
4228
4228
|
})), i = u(() => (n.value.currentPage - 1) * n.value.pageSize);
|
|
4229
|
-
|
|
4230
|
-
let t =
|
|
4229
|
+
V(() => {
|
|
4230
|
+
let t = L(e.pagination);
|
|
4231
4231
|
return [
|
|
4232
4232
|
t?.total,
|
|
4233
4233
|
t?.currentPage,
|
|
@@ -4262,15 +4262,15 @@ function ca(e) {
|
|
|
4262
4262
|
//#endregion
|
|
4263
4263
|
//#region src/components/k-table/composables/useTableRadio.ts
|
|
4264
4264
|
function la(e) {
|
|
4265
|
-
let t = M(""), n = u(() =>
|
|
4265
|
+
let t = M(""), n = u(() => L(e.columns).some((e) => e.type === "radio"));
|
|
4266
4266
|
function r(n) {
|
|
4267
|
-
return t.value = n ? Pi(n,
|
|
4267
|
+
return t.value = n ? Pi(n, L(e.rowKey)) : "", n;
|
|
4268
4268
|
}
|
|
4269
4269
|
function i() {
|
|
4270
4270
|
t.value = "";
|
|
4271
4271
|
}
|
|
4272
4272
|
function a(n) {
|
|
4273
|
-
t.value = Pi(n,
|
|
4273
|
+
t.value = Pi(n, L(e.rowKey));
|
|
4274
4274
|
}
|
|
4275
4275
|
function o() {
|
|
4276
4276
|
return t.value;
|
|
@@ -4292,10 +4292,10 @@ function ua(e) {
|
|
|
4292
4292
|
t?.destroy(), t = null;
|
|
4293
4293
|
}
|
|
4294
4294
|
function r() {
|
|
4295
|
-
if (n(), !
|
|
4295
|
+
if (n(), !L(e.enabled)) return;
|
|
4296
4296
|
let r = e.tableRef.value?.$el?.querySelector(".el-table__body-wrapper tbody");
|
|
4297
|
-
r && (t =
|
|
4298
|
-
disabled:
|
|
4297
|
+
r && (t = Qe.create(r, {
|
|
4298
|
+
disabled: L(e.disabled),
|
|
4299
4299
|
animation: 300,
|
|
4300
4300
|
handle: ".sort-handle",
|
|
4301
4301
|
filter: ".ignore-elements",
|
|
@@ -4303,13 +4303,13 @@ function ua(e) {
|
|
|
4303
4303
|
onEnd: (t) => e.onSortEnd(t)
|
|
4304
4304
|
}));
|
|
4305
4305
|
}
|
|
4306
|
-
return
|
|
4307
|
-
|
|
4308
|
-
|
|
4306
|
+
return V(() => [
|
|
4307
|
+
L(e.enabled),
|
|
4308
|
+
L(e.rebindKey),
|
|
4309
4309
|
e.tableRef.value
|
|
4310
4310
|
], () => {
|
|
4311
4311
|
E(r);
|
|
4312
|
-
}, { flush: "post" }),
|
|
4312
|
+
}, { flush: "post" }), V(() => L(e.disabled), (e) => {
|
|
4313
4313
|
t && t.option("disabled", e);
|
|
4314
4314
|
}), k(n), {
|
|
4315
4315
|
initSortable: () => E(r),
|
|
@@ -4322,7 +4322,7 @@ function da(e) {
|
|
|
4322
4322
|
let t = /* @__PURE__ */ new Map();
|
|
4323
4323
|
function n(n) {
|
|
4324
4324
|
return (r, i, a) => {
|
|
4325
|
-
let o = Pi(r,
|
|
4325
|
+
let o = Pi(r, L(e.rowKey));
|
|
4326
4326
|
o != null && t.set(o, {
|
|
4327
4327
|
row: r,
|
|
4328
4328
|
treeNode: i,
|
|
@@ -4331,7 +4331,7 @@ function da(e) {
|
|
|
4331
4331
|
};
|
|
4332
4332
|
}
|
|
4333
4333
|
function r(n) {
|
|
4334
|
-
let r =
|
|
4334
|
+
let r = L(e.load), i = t.get(n);
|
|
4335
4335
|
if (!i || !r) return;
|
|
4336
4336
|
let a = e.tableRef.value?.store?.states?.lazyTreeNodeMap;
|
|
4337
4337
|
a && n != null && (a[String(n)] = []), r(i.row, i.treeNode, i.resolve);
|
|
@@ -4428,7 +4428,7 @@ function fa(e) {
|
|
|
4428
4428
|
p(e), v.resetPage(), t.clearCurrentRowOnQuery && O(), n("query", s.value), E();
|
|
4429
4429
|
}
|
|
4430
4430
|
function A() {
|
|
4431
|
-
n("reset"), t.selectionShow &&
|
|
4431
|
+
n("reset"), t.selectionShow && L(), t.clearCurrentRowOnReset && O();
|
|
4432
4432
|
}
|
|
4433
4433
|
function j(e) {
|
|
4434
4434
|
v.setCurrentPage(e), n("page-change", e), E();
|
|
@@ -4442,45 +4442,45 @@ function fa(e) {
|
|
|
4442
4442
|
function P(e, t, r) {
|
|
4443
4443
|
n("operate-click", e, t, r);
|
|
4444
4444
|
}
|
|
4445
|
-
function
|
|
4445
|
+
function ie(e) {
|
|
4446
4446
|
if (!g.hasRadioColumn.value) return;
|
|
4447
4447
|
let t = g.selectRow(e);
|
|
4448
4448
|
t && n("radio-change", t, g.radioSelected.value);
|
|
4449
4449
|
}
|
|
4450
|
-
function
|
|
4451
|
-
|
|
4450
|
+
function ae(e) {
|
|
4451
|
+
ie(e);
|
|
4452
4452
|
}
|
|
4453
|
-
function
|
|
4453
|
+
function oe(e, t) {
|
|
4454
4454
|
h.setColumnVisibleByKey(e, t);
|
|
4455
4455
|
}
|
|
4456
|
-
function
|
|
4456
|
+
function se() {
|
|
4457
4457
|
return a.value;
|
|
4458
4458
|
}
|
|
4459
|
-
function
|
|
4459
|
+
function F() {
|
|
4460
4460
|
return o.value;
|
|
4461
4461
|
}
|
|
4462
|
-
function
|
|
4462
|
+
function I() {
|
|
4463
4463
|
return a.value?.getSelectionRows() ?? [];
|
|
4464
4464
|
}
|
|
4465
|
-
function
|
|
4465
|
+
function L() {
|
|
4466
4466
|
a.value?.clearSelection(), c.value = 0;
|
|
4467
4467
|
}
|
|
4468
|
-
function
|
|
4468
|
+
function R(e, t) {
|
|
4469
4469
|
a.value?.toggleRowSelection(e, t);
|
|
4470
4470
|
}
|
|
4471
|
-
async function
|
|
4471
|
+
async function ce(e = !1) {
|
|
4472
4472
|
l.value && await y.refresh(e);
|
|
4473
4473
|
}
|
|
4474
|
-
function
|
|
4474
|
+
function le() {
|
|
4475
4475
|
g.clearRadioSelection(), a.value?.setCurrentRow();
|
|
4476
4476
|
}
|
|
4477
|
-
function
|
|
4477
|
+
function z(e) {
|
|
4478
4478
|
g.setRadioSelection(e);
|
|
4479
4479
|
}
|
|
4480
|
-
function
|
|
4480
|
+
function B() {
|
|
4481
4481
|
return g.getRadioSelection();
|
|
4482
4482
|
}
|
|
4483
|
-
function
|
|
4483
|
+
function ue(e) {
|
|
4484
4484
|
_.refreshTree(e);
|
|
4485
4485
|
}
|
|
4486
4486
|
return {
|
|
@@ -4505,20 +4505,20 @@ function fa(e) {
|
|
|
4505
4505
|
handleSizeChange: re,
|
|
4506
4506
|
handleAdd: N,
|
|
4507
4507
|
handleOperateClick: P,
|
|
4508
|
-
handleRowClick:
|
|
4509
|
-
handleRadioChange:
|
|
4510
|
-
handleColumnVisibleChange:
|
|
4508
|
+
handleRowClick: ae,
|
|
4509
|
+
handleRadioChange: ie,
|
|
4510
|
+
handleColumnVisibleChange: oe,
|
|
4511
4511
|
resetColumnDisplay: h.resetColumnDisplay,
|
|
4512
|
-
getTableRef:
|
|
4513
|
-
getQueryRef:
|
|
4514
|
-
getSelection:
|
|
4515
|
-
clearSelection:
|
|
4516
|
-
toggleRowSelection:
|
|
4517
|
-
refresh:
|
|
4518
|
-
clearRadioSelection:
|
|
4519
|
-
setRadioSelection:
|
|
4520
|
-
getRadioSelection:
|
|
4521
|
-
refreshTree:
|
|
4512
|
+
getTableRef: se,
|
|
4513
|
+
getQueryRef: F,
|
|
4514
|
+
getSelection: I,
|
|
4515
|
+
clearSelection: L,
|
|
4516
|
+
toggleRowSelection: R,
|
|
4517
|
+
refresh: ce,
|
|
4518
|
+
clearRadioSelection: le,
|
|
4519
|
+
setRadioSelection: z,
|
|
4520
|
+
getRadioSelection: B,
|
|
4521
|
+
refreshTree: ue
|
|
4522
4522
|
};
|
|
4523
4523
|
}
|
|
4524
4524
|
var pa = {
|
|
@@ -4586,10 +4586,10 @@ var pa = {
|
|
|
4586
4586
|
"sort-change"
|
|
4587
4587
|
],
|
|
4588
4588
|
setup(e, { expose: t, emit: n }) {
|
|
4589
|
-
let r = e, i = n, a =
|
|
4589
|
+
let r = e, i = n, a = z(), o = M(), s = M(), l = re(fa({
|
|
4590
4590
|
props: r,
|
|
4591
4591
|
emit: i,
|
|
4592
|
-
attrs:
|
|
4592
|
+
attrs: ce(),
|
|
4593
4593
|
slots: a,
|
|
4594
4594
|
tableRef: o,
|
|
4595
4595
|
queryRef: s
|
|
@@ -4614,8 +4614,8 @@ var pa = {
|
|
|
4614
4614
|
getRadioSelection: l.getRadioSelection,
|
|
4615
4615
|
refreshTree: l.refreshTree
|
|
4616
4616
|
}), (t, n) => {
|
|
4617
|
-
let r =
|
|
4618
|
-
return A(), p("div", ma, [l.showQuery ? (A(), d(
|
|
4617
|
+
let r = ae("loading");
|
|
4618
|
+
return A(), p("div", ma, [l.showQuery ? (A(), d(R(Mi), T({
|
|
4619
4619
|
key: 0,
|
|
4620
4620
|
ref_key: "queryRef",
|
|
4621
4621
|
ref: s,
|
|
@@ -4632,11 +4632,11 @@ var pa = {
|
|
|
4632
4632
|
onAdd: l.handleAdd
|
|
4633
4633
|
}, h({ _: 2 }, [l.hasHeaderSlot ? {
|
|
4634
4634
|
name: "header",
|
|
4635
|
-
fn:
|
|
4635
|
+
fn: H(() => [P(t.$slots, "header", {}, void 0, !0)]),
|
|
4636
4636
|
key: "0"
|
|
4637
4637
|
} : void 0, e.enableColumnCache ? {
|
|
4638
4638
|
name: "extra",
|
|
4639
|
-
fn:
|
|
4639
|
+
fn: H(() => [_(Yi, {
|
|
4640
4640
|
items: l.columnSelectorItems,
|
|
4641
4641
|
onChange: l.handleColumnVisibleChange,
|
|
4642
4642
|
onReset: l.resetColumnDisplay
|
|
@@ -4652,7 +4652,7 @@ var pa = {
|
|
|
4652
4652
|
"selected-count",
|
|
4653
4653
|
"onAdd"
|
|
4654
4654
|
])) : f("", !0),
|
|
4655
|
-
|
|
4655
|
+
de((A(), d(R(Ie), T({
|
|
4656
4656
|
ref_key: "tableRef",
|
|
4657
4657
|
ref: o,
|
|
4658
4658
|
class: "k-table__main"
|
|
@@ -4661,14 +4661,14 @@ var pa = {
|
|
|
4661
4661
|
onSortChange: l.handleSortChange,
|
|
4662
4662
|
onRowClick: l.handleRowClick
|
|
4663
4663
|
}), {
|
|
4664
|
-
empty:
|
|
4665
|
-
default:
|
|
4664
|
+
empty: H(() => [l.showLoadingEmpty ? de((A(), p("span", ga, null, 512)), [[r, l.showLoadingEmpty]]) : P(t.$slots, "empty", {}, () => [g(F(t.$attrs.emptyText ?? t.$attrs["empty-text"] ?? "暂无数据"), 1)], !0, 1)]),
|
|
4665
|
+
default: H(() => [e.sort ? (A(), d(R(G), {
|
|
4666
4666
|
key: 0,
|
|
4667
4667
|
label: "拖拽排序",
|
|
4668
4668
|
align: "center",
|
|
4669
4669
|
width: "100"
|
|
4670
4670
|
}, {
|
|
4671
|
-
default:
|
|
4671
|
+
default: H(({ row: n, column: r, $index: i }) => [P(t.$slots, "sort", {
|
|
4672
4672
|
row: n,
|
|
4673
4673
|
column: r,
|
|
4674
4674
|
index: i
|
|
@@ -4690,7 +4690,7 @@ var pa = {
|
|
|
4690
4690
|
onRadioSelect: l.handleRadioChange
|
|
4691
4691
|
}, h({ _: 2 }, [N(v.value, (e) => ({
|
|
4692
4692
|
name: e,
|
|
4693
|
-
fn:
|
|
4693
|
+
fn: H((n) => [P(t.$slots, e, T({ ref_for: !0 }, n ?? {}), void 0, !0)])
|
|
4694
4694
|
}))]), 1032, [
|
|
4695
4695
|
"column",
|
|
4696
4696
|
"column-index",
|
|
@@ -4708,7 +4708,7 @@ var pa = {
|
|
|
4708
4708
|
"onSortChange",
|
|
4709
4709
|
"onRowClick"
|
|
4710
4710
|
])), [[r, l.tableLoading]]),
|
|
4711
|
-
m("div", _a, [e.hidePagination ? f("", !0) : (A(), d(
|
|
4711
|
+
m("div", _a, [e.hidePagination ? f("", !0) : (A(), d(R(Yr), T({
|
|
4712
4712
|
key: 0,
|
|
4713
4713
|
class: "pagination"
|
|
4714
4714
|
}, l.paginationBind, {
|
|
@@ -4760,17 +4760,17 @@ function Ca(e, t) {
|
|
|
4760
4760
|
//#endregion
|
|
4761
4761
|
//#region src/components/k-table/composables/useKTableTemplateRef.ts
|
|
4762
4762
|
function wa(e) {
|
|
4763
|
-
return
|
|
4763
|
+
return B(e);
|
|
4764
4764
|
}
|
|
4765
4765
|
//#endregion
|
|
4766
4766
|
//#region src/components/k-table/composables/useKTableCrossPageSelection.ts
|
|
4767
4767
|
function Ta(e) {
|
|
4768
|
-
let t =
|
|
4768
|
+
let t = se([]), n = se([]), r = se(!1), i = wa(e.tableRefKey ?? "tableRef");
|
|
4769
4769
|
function a() {
|
|
4770
|
-
return e.tableRef == null ? i.value :
|
|
4770
|
+
return e.tableRef == null ? i.value : L(e.tableRef);
|
|
4771
4771
|
}
|
|
4772
4772
|
function o(t) {
|
|
4773
|
-
return String(Pi(t,
|
|
4773
|
+
return String(Pi(t, L(e.rowKey)));
|
|
4774
4774
|
}
|
|
4775
4775
|
function s(e) {
|
|
4776
4776
|
t.value = [...e];
|
|
@@ -4784,7 +4784,7 @@ function Ta(e) {
|
|
|
4784
4784
|
function u(i) {
|
|
4785
4785
|
n.value = i;
|
|
4786
4786
|
let s = new Set(t.value.map(o));
|
|
4787
|
-
if (
|
|
4787
|
+
if (L(e.mode) === "single") {
|
|
4788
4788
|
let e = i.find((e) => s.has(o(e)));
|
|
4789
4789
|
e && a()?.setRadioSelection(e);
|
|
4790
4790
|
return;
|
|
@@ -4858,14 +4858,14 @@ function Aa(e) {
|
|
|
4858
4858
|
try {
|
|
4859
4859
|
await Oa({
|
|
4860
4860
|
tableRef: e.tableRef,
|
|
4861
|
-
columns:
|
|
4861
|
+
columns: L(e.columns),
|
|
4862
4862
|
exportApi: e.exportApi,
|
|
4863
4863
|
convertParams: e.convertParams,
|
|
4864
|
-
excludeOperates:
|
|
4865
|
-
excludeLast:
|
|
4864
|
+
excludeOperates: L(e.excludeOperates),
|
|
4865
|
+
excludeLast: L(e.excludeLast)
|
|
4866
4866
|
});
|
|
4867
4867
|
} catch {
|
|
4868
|
-
|
|
4868
|
+
De.error("导出失败");
|
|
4869
4869
|
} finally {
|
|
4870
4870
|
t.value = !1;
|
|
4871
4871
|
}
|
|
@@ -4920,22 +4920,22 @@ function Fa(e) {
|
|
|
4920
4920
|
}
|
|
4921
4921
|
//#endregion
|
|
4922
4922
|
//#region src/components/index.ts
|
|
4923
|
-
var Ia = /* @__PURE__ */
|
|
4924
|
-
DICT_KEY: () =>
|
|
4923
|
+
var Ia = /* @__PURE__ */ et({
|
|
4924
|
+
DICT_KEY: () => ft,
|
|
4925
4925
|
KAffix: () => La,
|
|
4926
4926
|
KBreadcrumb: () => Ra,
|
|
4927
|
-
KButton: () =>
|
|
4927
|
+
KButton: () => J,
|
|
4928
4928
|
KCard: () => vi,
|
|
4929
4929
|
KCascader: () => za,
|
|
4930
|
-
KCheckbox: () =>
|
|
4930
|
+
KCheckbox: () => Wt,
|
|
4931
4931
|
KColorPicker: () => Ba,
|
|
4932
|
-
KDatePicker: () =>
|
|
4933
|
-
KDialog: () =>
|
|
4934
|
-
KDialogHeader: () =>
|
|
4932
|
+
KDatePicker: () => Jt,
|
|
4933
|
+
KDialog: () => dt,
|
|
4934
|
+
KDialogHeader: () => lt,
|
|
4935
4935
|
KForm: () => Dr,
|
|
4936
4936
|
KHandlePage: () => Fr,
|
|
4937
4937
|
KIcon: () => Wr,
|
|
4938
|
-
KInput: () =>
|
|
4938
|
+
KInput: () => Q,
|
|
4939
4939
|
KLinkButton: () => Jr,
|
|
4940
4940
|
KLongPage: () => _i,
|
|
4941
4941
|
KPagination: () => Yr,
|
|
@@ -4971,6 +4971,6 @@ var Ia = /* @__PURE__ */ $e({
|
|
|
4971
4971
|
useKTableCrossPageSelection: () => Ta,
|
|
4972
4972
|
useKTableTemplateRef: () => wa,
|
|
4973
4973
|
withQueryFieldOptions: () => Ca
|
|
4974
|
-
}), La =
|
|
4974
|
+
}), La = tt("KAffix"), Ra = tt("KBreadcrumb"), za = tt("KCascader"), Ba = tt("KColorPicker");
|
|
4975
4975
|
//#endregion
|
|
4976
|
-
export { Fr as A,
|
|
4976
|
+
export { Fr as A, Jt as B, Jr as C, Br as D, zr as E, gr as F, J as G, ft as H, zn as I, _n as L, Dr as M, xr as N, Rr as O, br as P, rn as R, Yr as S, Ur as T, dt as U, Wt as V, lt as W, ya as _, Ia as a, vi as b, Ma as c, Oa as d, ka as f, ba as g, Ca as h, Ba as i, Or as j, Ir as k, Pa as l, wa as m, Ra as n, ja as o, Ta as p, za as r, Fa as s, La as t, Aa as u, Mi as v, Wr as w, _i as x, Si as y, Q as z };
|