@kayak-sj/design 1.0.57 → 1.0.59
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/KEditor-BspWs59E.css +1 -0
- package/dist/assets/componentRegistry-BGWEgJcx.css +1 -0
- package/dist/chunks/{Complex-L-vj_4ya.js → Complex-DgYsYf9M.js} +1 -1
- package/dist/chunks/{Editor-CNxCYFmc.js → Editor-utc9yN52.js} +1 -1
- package/dist/chunks/{KEditor-C882CuWG.js → KEditor-BvqT2vzm.js} +2 -2
- package/dist/chunks/{componentRegistry-D5JgphAl.js → componentRegistry-zdRt3Slb.js} +171 -171
- package/dist/components/k-editor/index.js +1 -1
- package/dist/components/k-form/composables/useFormGridCols.d.ts +17 -0
- package/dist/index.js +645 -582
- package/package.json +1 -1
- package/src/styles/components/_k-form.scss +45 -19
- package/src/styles/tokens/_css-vars.scss +4 -3
- package/src/styles/tokens/_semantic.scss +7 -4
- package/dist/assets/KEditor-LzsE5URl.css +0 -1
- package/dist/assets/componentRegistry-CdMmVVcX.css +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { u as t } from "./editorValue-DSKvW8ty.js";
|
|
3
3
|
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineAsyncComponent as d, defineComponent as f, guardReactiveProps as p, inject as m, isRef as h, mergeModels as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeProps as b, normalizeStyle as x, openBlock as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as E, toDisplayString as D, unref as O, useAttrs as k, useModel as A, useSlots as j, useTemplateRef as ee, vShow as te, watch as M, withCtx as N, withDirectives as ne, withModifiers as P } from "vue";
|
|
4
|
-
import { ElButton as F, ElCascader as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { ElButton as F, ElCascader as I, ElCheckbox as re, ElCheckboxGroup as L, ElDatePicker as ie, ElDialog as R, ElIcon as z, ElImageViewer as ae, ElInput as B, ElInputNumber as oe, ElMessage as V, ElOption as H, ElProgress as se, ElRadio as ce, ElRadioButton as le, ElRadioGroup as ue, ElSelect as U, ElTag as de, ElTimePicker as fe, ElTooltip as pe, ElTreeSelect as me, ElUpload as he } from "element-plus";
|
|
5
|
+
import W from "dayjs";
|
|
6
|
+
import { useDebounceFn as ge, useEventListener as _e } from "@vueuse/core";
|
|
7
|
+
import { cloneDeep as G } from "lodash-es";
|
|
8
8
|
import { Delete as ve, Download as ye, Plus as be, VideoPlay as xe, ZoomIn as Se } from "@element-plus/icons-vue";
|
|
9
|
-
import '../assets/componentRegistry-
|
|
9
|
+
import '../assets/componentRegistry-BGWEgJcx.css';//#endregion
|
|
10
10
|
//#region src/components/k-button/KButton.vue
|
|
11
11
|
var K = /* @__PURE__ */ f({
|
|
12
12
|
name: "KButton",
|
|
@@ -30,7 +30,7 @@ var K = /* @__PURE__ */ f({
|
|
|
30
30
|
}, De = {
|
|
31
31
|
key: 1,
|
|
32
32
|
class: "k-dialog-header__extra"
|
|
33
|
-
},
|
|
33
|
+
}, J = /* @__PURE__ */ f({
|
|
34
34
|
name: "KDialogHeader",
|
|
35
35
|
__name: "KDialogHeader",
|
|
36
36
|
props: {
|
|
@@ -54,7 +54,7 @@ var K = /* @__PURE__ */ f({
|
|
|
54
54
|
t.$slots.extra ? (S(), o("div", De, [T(t.$slots, "extra")])) : a("", !0)
|
|
55
55
|
]));
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), Oe = { class: "k-dialog__body" }, ke = /* @__PURE__ */ f({
|
|
58
58
|
name: "KDialog",
|
|
59
59
|
inheritAttrs: !1,
|
|
60
60
|
__name: "KDialog",
|
|
@@ -123,17 +123,17 @@ var K = /* @__PURE__ */ f({
|
|
|
123
123
|
function E() {
|
|
124
124
|
d("confirm");
|
|
125
125
|
}
|
|
126
|
-
return (t, r) => (S(), i(O(
|
|
126
|
+
return (t, r) => (S(), i(O(R), _({
|
|
127
127
|
modelValue: n.value,
|
|
128
128
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
129
129
|
class: g.value,
|
|
130
130
|
title: h.value
|
|
131
131
|
}, v.value, { onClosed: r[1] ||= (e) => d("closed") }), c({
|
|
132
|
-
default: N(() => [s("div",
|
|
132
|
+
default: N(() => [s("div", Oe, [T(t.$slots, "default")])]),
|
|
133
133
|
_: 2
|
|
134
134
|
}, [x.value ? {
|
|
135
135
|
name: "header",
|
|
136
|
-
fn: N(() => [T(t.$slots, "header", {}, () => [u(
|
|
136
|
+
fn: N(() => [T(t.$slots, "header", {}, () => [u(J, {
|
|
137
137
|
title: e.title,
|
|
138
138
|
description: e.description,
|
|
139
139
|
icon: e.icon
|
|
@@ -175,12 +175,12 @@ var K = /* @__PURE__ */ f({
|
|
|
175
175
|
"title"
|
|
176
176
|
]));
|
|
177
177
|
}
|
|
178
|
-
}),
|
|
178
|
+
}), Ae = Symbol("kayak-dict"), je = {
|
|
179
179
|
list: "rows",
|
|
180
180
|
page: "page_no",
|
|
181
181
|
limit: "page_size",
|
|
182
182
|
total: "total"
|
|
183
|
-
},
|
|
183
|
+
}, Me = {
|
|
184
184
|
total: 0,
|
|
185
185
|
currentPage: 1,
|
|
186
186
|
pageSize: 10,
|
|
@@ -191,7 +191,7 @@ var K = /* @__PURE__ */ f({
|
|
|
191
191
|
100
|
|
192
192
|
],
|
|
193
193
|
layout: "total, sizes, prev, pager, next, jumper"
|
|
194
|
-
},
|
|
194
|
+
}, Ne = Symbol("k-form-date-picker-values"), Pe = [
|
|
195
195
|
"year",
|
|
196
196
|
"month",
|
|
197
197
|
"date",
|
|
@@ -203,44 +203,44 @@ var K = /* @__PURE__ */ f({
|
|
|
203
203
|
"monthrange",
|
|
204
204
|
"yearrange"
|
|
205
205
|
];
|
|
206
|
-
function
|
|
206
|
+
function Fe(e) {
|
|
207
207
|
return typeof e == "string" || typeof e == "number" ? e : String(e);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Y(e) {
|
|
210
210
|
if (e != null) return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : String(e);
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Ie(e) {
|
|
213
213
|
return e == null ? "" : String(e);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function X(e) {
|
|
216
216
|
return Array.isArray(e) ? e.filter((e) => typeof e == "string" || typeof e == "number") : [];
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Le(e) {
|
|
219
219
|
if (typeof e == "number" && !Number.isNaN(e)) return e;
|
|
220
220
|
if (e == null || e === "") return;
|
|
221
221
|
let t = Number(e);
|
|
222
222
|
return Number.isNaN(t) ? void 0 : t;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Re(e) {
|
|
225
225
|
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);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
return e &&
|
|
227
|
+
function ze(e) {
|
|
228
|
+
return e && Pe.includes(e) ? e : "date";
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Be(e) {
|
|
231
231
|
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);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Ve(e) {
|
|
234
234
|
return e === "timerange" ? "timerange" : "time";
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function He(e) {
|
|
237
237
|
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);
|
|
238
238
|
}
|
|
239
239
|
function Ue(e) {
|
|
240
240
|
return Array.isArray(e) ? e : [];
|
|
241
241
|
}
|
|
242
242
|
function We(e, t) {
|
|
243
|
-
let n =
|
|
243
|
+
let n = Y(t);
|
|
244
244
|
if (n !== void 0) for (let t of e) {
|
|
245
245
|
let e = t.value ?? t.id;
|
|
246
246
|
if (e != null && String(e) === String(n)) {
|
|
@@ -255,7 +255,7 @@ function We(e, t) {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
function Ge(e, t, n, r = " / ") {
|
|
258
|
-
let i =
|
|
258
|
+
let i = He(t);
|
|
259
259
|
if (i == null || i === "") return Z(t);
|
|
260
260
|
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 : [];
|
|
261
261
|
for (let e of c) {
|
|
@@ -292,8 +292,8 @@ var Ke = {
|
|
|
292
292
|
},
|
|
293
293
|
emits: ["update:modelValue"],
|
|
294
294
|
setup(e, { emit: t }) {
|
|
295
|
-
let n = e, a = t, s = r(() =>
|
|
296
|
-
return (t, n) => e.readonly ? (S(), o("span", Ke, D(l.value), 1)) : (S(), i(O(
|
|
295
|
+
let n = e, a = t, s = r(() => He(n.modelValue)), c = r(() => n.cascaderProps ?? n.props), l = r(() => Ge(n.options, n.modelValue, c.value, n.separator ?? " / "));
|
|
296
|
+
return (t, n) => e.readonly ? (S(), o("span", Ke, D(l.value), 1)) : (S(), i(O(I), {
|
|
297
297
|
key: 1,
|
|
298
298
|
"model-value": s.value,
|
|
299
299
|
options: e.options ?? [],
|
|
@@ -340,7 +340,7 @@ var Ke = {
|
|
|
340
340
|
return e.length ? e.join(", ") : "--";
|
|
341
341
|
});
|
|
342
342
|
M(() => d.modelValue, (e) => {
|
|
343
|
-
p.value =
|
|
343
|
+
p.value = X(e), v(p.value);
|
|
344
344
|
}, { immediate: !0 });
|
|
345
345
|
function v(e) {
|
|
346
346
|
let t = g.value.length, n = e.length;
|
|
@@ -353,7 +353,7 @@ var Ke = {
|
|
|
353
353
|
function b(e) {
|
|
354
354
|
p.value = e, v(e), f("update:modelValue", e);
|
|
355
355
|
}
|
|
356
|
-
return (t, r) => (S(), o("div", Je, [e.readonly ? (S(), o("span", Ye, D(_.value), 1)) : (S(), o(n, { key: 1 }, [e.showSelectAll ? (S(), i(O(
|
|
356
|
+
return (t, r) => (S(), o("div", Je, [e.readonly ? (S(), o("span", Ye, D(_.value), 1)) : (S(), o(n, { key: 1 }, [e.showSelectAll ? (S(), i(O(re), {
|
|
357
357
|
key: 0,
|
|
358
358
|
modelValue: m.value,
|
|
359
359
|
"onUpdate:modelValue": r[0] ||= (e) => m.value = e,
|
|
@@ -367,19 +367,19 @@ var Ke = {
|
|
|
367
367
|
"modelValue",
|
|
368
368
|
"indeterminate",
|
|
369
369
|
"disabled"
|
|
370
|
-
])) : a("", !0), u(O(
|
|
370
|
+
])) : a("", !0), u(O(L), {
|
|
371
371
|
"model-value": p.value,
|
|
372
372
|
disabled: e.disabled,
|
|
373
373
|
"onUpdate:modelValue": b
|
|
374
374
|
}, {
|
|
375
|
-
default: N(() => [(S(!0), o(n, null, w(e.options, (e) => (S(), i(O(
|
|
375
|
+
default: N(() => [(S(!0), o(n, null, w(e.options, (e) => (S(), i(O(pe), {
|
|
376
376
|
key: String(e.value),
|
|
377
377
|
content: s(e),
|
|
378
378
|
disabled: c(e),
|
|
379
379
|
placement: "top-start"
|
|
380
380
|
}, {
|
|
381
|
-
default: N(() => [u(O(
|
|
382
|
-
value: O(
|
|
381
|
+
default: N(() => [u(O(re), {
|
|
382
|
+
value: O(Y)(e.value),
|
|
383
383
|
disabled: e.disabled
|
|
384
384
|
}, {
|
|
385
385
|
default: N(() => [l(D(e.label), 1)]),
|
|
@@ -438,15 +438,15 @@ var Ke = {
|
|
|
438
438
|
},
|
|
439
439
|
emits: ["update:modelValue"],
|
|
440
440
|
setup(e, { emit: t }) {
|
|
441
|
-
let n = e, s = t, c = m(
|
|
441
|
+
let n = e, s = t, c = m(Ne, null), l = r(() => n.datePickerValues ?? c?.value ?? {}), u = r(() => Re(n.modelValue)), d = r(() => ze(n.type)), f = r(() => d.value === "datetimerange" ? "k-form-date-picker--datetimerange" : ""), p = (e, t) => W(e instanceof Date ? e : String(e)).format(t), h = r(() => {
|
|
442
442
|
if (!n.modelValue) return Z(n.modelValue);
|
|
443
443
|
let e = d.value.includes("datetime") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
444
444
|
if (Array.isArray(n.modelValue)) return n.modelValue.map((t) => p(t, e)).join(" - ");
|
|
445
|
-
let t =
|
|
445
|
+
let t = W(n.modelValue instanceof Date ? n.modelValue : String(n.modelValue));
|
|
446
446
|
return t.isValid() ? t.format(e) : Z(n.modelValue);
|
|
447
447
|
}), g = r(() => {
|
|
448
448
|
if (!n.limitTime) return;
|
|
449
|
-
let e =
|
|
449
|
+
let e = W().hour();
|
|
450
450
|
return () => Array.from({ length: 24 }, (e, t) => t).filter((t) => t < e);
|
|
451
451
|
});
|
|
452
452
|
function _(e) {
|
|
@@ -468,7 +468,7 @@ var Ke = {
|
|
|
468
468
|
let t = l.value[`kitDate-${e.id}`];
|
|
469
469
|
if (!t) return null;
|
|
470
470
|
if (t instanceof Date) return _(t);
|
|
471
|
-
let n =
|
|
471
|
+
let n = W(t);
|
|
472
472
|
return n.isValid() ? _(n.toDate()) : null;
|
|
473
473
|
}
|
|
474
474
|
return null;
|
|
@@ -496,7 +496,7 @@ var Ke = {
|
|
|
496
496
|
class: "k-form-date-picker__text",
|
|
497
497
|
innerHTML: e.prepend
|
|
498
498
|
}, null, 8, Ze)) : a("", !0),
|
|
499
|
-
e.readonly ? (S(), o("span", Qe, D(h.value), 1)) : (S(), i(O(
|
|
499
|
+
e.readonly ? (S(), o("span", Qe, D(h.value), 1)) : (S(), i(O(ie), {
|
|
500
500
|
key: 1,
|
|
501
501
|
"model-value": u.value,
|
|
502
502
|
type: d.value,
|
|
@@ -528,7 +528,7 @@ var Ke = {
|
|
|
528
528
|
}, null, 8, $e)) : a("", !0)
|
|
529
529
|
], 2));
|
|
530
530
|
}
|
|
531
|
-
}), [["__scopeId", "data-v-
|
|
531
|
+
}), [["__scopeId", "data-v-e1f51255"]]), tt = /* @__PURE__ */ f({
|
|
532
532
|
name: "KFormFallback",
|
|
533
533
|
__name: "Fallback",
|
|
534
534
|
props: {
|
|
@@ -536,8 +536,8 @@ var Ke = {
|
|
|
536
536
|
componentType: {}
|
|
537
537
|
},
|
|
538
538
|
setup(e) {
|
|
539
|
-
let t = e, n = r(() => `[${t.componentType ?? "Unknown"}] 待迁移`), a = r(() =>
|
|
540
|
-
return (e, t) => (S(), i(O(
|
|
539
|
+
let t = e, n = r(() => `[${t.componentType ?? "Unknown"}] 待迁移`), a = r(() => Ie(t.modelValue));
|
|
540
|
+
return (e, t) => (S(), i(O(B), {
|
|
541
541
|
"model-value": a.value,
|
|
542
542
|
disabled: "",
|
|
543
543
|
placeholder: n.value
|
|
@@ -581,7 +581,7 @@ var Ke = {
|
|
|
581
581
|
},
|
|
582
582
|
emits: ["update:modelValue"],
|
|
583
583
|
setup(e, { emit: t }) {
|
|
584
|
-
let n = e, s = t, u = r(() =>
|
|
584
|
+
let n = e, s = t, u = r(() => Ie(n.modelValue)), d = r(() => n.maxlength ?? n.maxLength), f = r(() => n.type === "textarea"), p = r(() => n.clearable && !f.value), m = r(() => {
|
|
585
585
|
let e = Z(u.value);
|
|
586
586
|
return e === "--" ? e : `${n.prepend || ""}${e}${n.append || ""}`;
|
|
587
587
|
});
|
|
@@ -597,7 +597,7 @@ var Ke = {
|
|
|
597
597
|
class: y(["k-form-input__side k-form-input__side--left", e.leftClass]),
|
|
598
598
|
onClick: n[0] ||= (...t) => e.leftClick && e.leftClick(...t)
|
|
599
599
|
}, D(e.leftText), 3)) : a("", !0),
|
|
600
|
-
e.readonly ? (S(), o("div", rt, D(m.value), 1)) : (S(), i(O(
|
|
600
|
+
e.readonly ? (S(), o("div", rt, D(m.value), 1)) : (S(), i(O(B), _({ key: 2 }, t.$attrs, {
|
|
601
601
|
"model-value": u.value,
|
|
602
602
|
autocomplete: "off",
|
|
603
603
|
clearable: p.value,
|
|
@@ -759,9 +759,9 @@ var Ke = {
|
|
|
759
759
|
},
|
|
760
760
|
emits: ["update:modelValue"],
|
|
761
761
|
setup(e, { emit: t }) {
|
|
762
|
-
let a = e, s = t, c = r(() =>
|
|
762
|
+
let a = e, s = t, c = r(() => Y(a.modelValue)), l = r(() => X(a.modelValue)), u = r(() => (a.options ?? []).map((e) => ({
|
|
763
763
|
label: e.label,
|
|
764
|
-
value:
|
|
764
|
+
value: Fe(e.value),
|
|
765
765
|
disabled: e.disabled,
|
|
766
766
|
key: String(e.value)
|
|
767
767
|
}))), d = r(() => {
|
|
@@ -775,7 +775,7 @@ var Ke = {
|
|
|
775
775
|
function f(e) {
|
|
776
776
|
s("update:modelValue", e);
|
|
777
777
|
}
|
|
778
|
-
return (t, r) => (S(), o("div", _({ class: ["k-form-select", { "k-form-select--readonly": e.readonly }] }, t.$attrs), [e.readonly ? (S(), o("span", ct, D(d.value), 1)) : (S(), i(O(
|
|
778
|
+
return (t, r) => (S(), o("div", _({ class: ["k-form-select", { "k-form-select--readonly": e.readonly }] }, t.$attrs), [e.readonly ? (S(), o("span", ct, D(d.value), 1)) : (S(), i(O(U), {
|
|
779
779
|
key: 1,
|
|
780
780
|
"model-value": e.multiple ? l.value : c.value,
|
|
781
781
|
placeholder: e.placeholder,
|
|
@@ -785,7 +785,7 @@ var Ke = {
|
|
|
785
785
|
disabled: e.disabled,
|
|
786
786
|
"onUpdate:modelValue": f
|
|
787
787
|
}, {
|
|
788
|
-
default: N(() => [(S(!0), o(n, null, w(u.value, (e) => (S(), i(O(
|
|
788
|
+
default: N(() => [(S(!0), o(n, null, w(u.value, (e) => (S(), i(O(H), {
|
|
789
789
|
key: e.key,
|
|
790
790
|
label: e.label,
|
|
791
791
|
value: e.value,
|
|
@@ -853,11 +853,11 @@ var Ke = {
|
|
|
853
853
|
},
|
|
854
854
|
emits: ["update:modelValue"],
|
|
855
855
|
setup(e, { emit: t }) {
|
|
856
|
-
let i = m(
|
|
857
|
-
let e =
|
|
856
|
+
let i = m(Ae, null), c = e, l = t, d = C({}), f = C(""), p = C(""), h = r(() => c.inputProps.id ?? "input"), g = r(() => c.selectProps.id ?? "select"), v = r(() => {
|
|
857
|
+
let e = G(c.inputProps);
|
|
858
858
|
return delete e.id, e;
|
|
859
859
|
}), b = r(() => {
|
|
860
|
-
let e =
|
|
860
|
+
let e = G(c.selectProps);
|
|
861
861
|
return delete e.id, e;
|
|
862
862
|
});
|
|
863
863
|
function w(e, t) {
|
|
@@ -902,7 +902,7 @@ var Ke = {
|
|
|
902
902
|
d.value[t] = e, f.value = String(d.value[h.value] ?? ""), p.value = d.value[g.value], ne();
|
|
903
903
|
}
|
|
904
904
|
return M(() => c.modelValue, (e) => {
|
|
905
|
-
e && typeof e == "object" && !Array.isArray(e) && (d.value =
|
|
905
|
+
e && typeof e == "object" && !Array.isArray(e) && (d.value = G(e), f.value = String(d.value[h.value] ?? ""), p.value = d.value[g.value]);
|
|
906
906
|
}, {
|
|
907
907
|
immediate: !0,
|
|
908
908
|
deep: !0
|
|
@@ -1006,7 +1006,7 @@ var Ke = {
|
|
|
1006
1006
|
},
|
|
1007
1007
|
emits: ["update:modelValue"],
|
|
1008
1008
|
setup(e, { emit: t }) {
|
|
1009
|
-
let n = e, s = t, c = r(() =>
|
|
1009
|
+
let n = e, s = t, c = r(() => Le(n.modelValue));
|
|
1010
1010
|
function l(e) {
|
|
1011
1011
|
if (e === void 0) {
|
|
1012
1012
|
s("update:modelValue", n.min ?? 0);
|
|
@@ -1021,7 +1021,7 @@ var Ke = {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
return (t, n) => (S(), o("div", ht, [
|
|
1023
1023
|
e.leftText ? (S(), o("div", gt, D(e.leftText), 1)) : a("", !0),
|
|
1024
|
-
e.readonly ? (S(), o("span", _t, D(O(Z)(c.value)), 1)) : (S(), i(O(
|
|
1024
|
+
e.readonly ? (S(), o("span", _t, D(O(Z)(c.value)), 1)) : (S(), i(O(oe), {
|
|
1025
1025
|
key: 2,
|
|
1026
1026
|
"model-value": c.value,
|
|
1027
1027
|
min: e.min,
|
|
@@ -1052,26 +1052,26 @@ var Ke = {
|
|
|
1052
1052
|
},
|
|
1053
1053
|
emits: ["update:modelValue"],
|
|
1054
1054
|
setup(e, { emit: t }) {
|
|
1055
|
-
let a = e, s = t, c = r(() =>
|
|
1055
|
+
let a = e, s = t, c = r(() => Y(a.modelValue)), u = r(() => (a.options ?? []).find((e) => e.value === c.value)?.label ?? Z(c.value));
|
|
1056
1056
|
function d(e) {
|
|
1057
1057
|
s("update:modelValue", e);
|
|
1058
1058
|
}
|
|
1059
|
-
return (t, r) => (S(), o("div", bt, [e.readonly ? (S(), o("span", xt, D(u.value), 1)) : (S(), i(O(
|
|
1059
|
+
return (t, r) => (S(), o("div", bt, [e.readonly ? (S(), o("span", xt, D(u.value), 1)) : (S(), i(O(ue), {
|
|
1060
1060
|
key: 1,
|
|
1061
1061
|
"model-value": c.value,
|
|
1062
1062
|
disabled: e.disabled,
|
|
1063
1063
|
"onUpdate:modelValue": d
|
|
1064
1064
|
}, {
|
|
1065
|
-
default: N(() => [(S(!0), o(n, null, w(e.options, (t) => (S(), o(n, { key: String(t.value) }, [e.type === "button" ? (S(), i(O(
|
|
1065
|
+
default: N(() => [(S(!0), o(n, null, w(e.options, (t) => (S(), o(n, { key: String(t.value) }, [e.type === "button" ? (S(), i(O(le), {
|
|
1066
1066
|
key: 0,
|
|
1067
|
-
value: O(
|
|
1067
|
+
value: O(Y)(t.value),
|
|
1068
1068
|
disabled: t.disabled
|
|
1069
1069
|
}, {
|
|
1070
1070
|
default: N(() => [l(D(t.label), 1)]),
|
|
1071
1071
|
_: 2
|
|
1072
|
-
}, 1032, ["value", "disabled"])) : (S(), i(O(
|
|
1072
|
+
}, 1032, ["value", "disabled"])) : (S(), i(O(ce), {
|
|
1073
1073
|
key: 1,
|
|
1074
|
-
value: O(
|
|
1074
|
+
value: O(Y)(t.value),
|
|
1075
1075
|
disabled: t.disabled
|
|
1076
1076
|
}, {
|
|
1077
1077
|
default: N(() => [l(D(t.label), 1)]),
|
|
@@ -1172,7 +1172,7 @@ var Ke = {
|
|
|
1172
1172
|
]),
|
|
1173
1173
|
!e.readonly && p.value ? (S(), o(n, { key: 0 }, [
|
|
1174
1174
|
e.leftText ? (S(), o("label", Ct, D(e.leftText), 1)) : a("", !0),
|
|
1175
|
-
e.type === "inputNumber" ? (S(), i(O(
|
|
1175
|
+
e.type === "inputNumber" ? (S(), i(O(oe), _({
|
|
1176
1176
|
key: 1,
|
|
1177
1177
|
"model-value": v.value,
|
|
1178
1178
|
class: "k-form-radio-input__input",
|
|
@@ -1182,7 +1182,7 @@ var Ke = {
|
|
|
1182
1182
|
"model-value",
|
|
1183
1183
|
"placeholder",
|
|
1184
1184
|
"disabled"
|
|
1185
|
-
])) : (S(), i(O(
|
|
1185
|
+
])) : (S(), i(O(B), _({
|
|
1186
1186
|
key: 2,
|
|
1187
1187
|
modelValue: f.value,
|
|
1188
1188
|
"onUpdate:modelValue": r[1] ||= (e) => f.value = e,
|
|
@@ -1239,7 +1239,7 @@ var Ke = {
|
|
|
1239
1239
|
setup(e, { emit: t }) {
|
|
1240
1240
|
let a = e, s = t, c = C([]), l = C(!1), u = C(!1), d = C(1), f = C(""), p = C(null), m = C(a.multiple ? [] : "");
|
|
1241
1241
|
M(() => a.modelValue, (e) => {
|
|
1242
|
-
m.value = a.multiple ?
|
|
1242
|
+
m.value = a.multiple ? X(e) : Y(e);
|
|
1243
1243
|
}, { immediate: !0 }), M(() => a.defaultSelectedStr, (e) => {
|
|
1244
1244
|
e?.length && (c.value = [...c.value, ...e]);
|
|
1245
1245
|
}, {
|
|
@@ -1264,9 +1264,9 @@ var Ke = {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
|
-
let g =
|
|
1267
|
+
let g = ge((e) => {
|
|
1268
1268
|
c.value = [], d.value = 1, u.value = !1, f.value = e, h();
|
|
1269
|
-
}, 500), _ =
|
|
1269
|
+
}, 500), _ = ge(() => {
|
|
1270
1270
|
d.value += 1, h();
|
|
1271
1271
|
}, 300);
|
|
1272
1272
|
function y(e) {
|
|
@@ -1277,7 +1277,7 @@ var Ke = {
|
|
|
1277
1277
|
let { scrollHeight: e, scrollTop: t, clientHeight: n } = p.value;
|
|
1278
1278
|
e - t > n + 2 || _();
|
|
1279
1279
|
}
|
|
1280
|
-
|
|
1280
|
+
_e(p, "scroll", b);
|
|
1281
1281
|
function x(e) {
|
|
1282
1282
|
if (!e) {
|
|
1283
1283
|
p.value = null;
|
|
@@ -1292,13 +1292,13 @@ var Ke = {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
let E = r(() => {
|
|
1294
1294
|
if (a.multiple) {
|
|
1295
|
-
let e =
|
|
1295
|
+
let e = X(m.value), t = c.value.filter((t) => e.includes(t.value)).map((e) => String(e.label ?? e.name ?? e.value));
|
|
1296
1296
|
return t.length ? t.join(", ") : Z(e);
|
|
1297
1297
|
}
|
|
1298
|
-
let e =
|
|
1298
|
+
let e = Y(m.value), t = c.value.find((t) => t.value === e);
|
|
1299
1299
|
return t ? String(t.label ?? t.name ?? t.value) : Z(e);
|
|
1300
1300
|
});
|
|
1301
|
-
return h(), (t, r) => e.readonly ? (S(), o("span", kt, D(E.value), 1)) : (S(), i(O(
|
|
1301
|
+
return h(), (t, r) => e.readonly ? (S(), o("span", kt, D(E.value), 1)) : (S(), i(O(U), {
|
|
1302
1302
|
key: 1,
|
|
1303
1303
|
"model-value": m.value,
|
|
1304
1304
|
remote: "",
|
|
@@ -1313,7 +1313,7 @@ var Ke = {
|
|
|
1313
1313
|
onVisibleChange: x,
|
|
1314
1314
|
"onUpdate:modelValue": T
|
|
1315
1315
|
}, {
|
|
1316
|
-
default: N(() => [(S(!0), o(n, null, w(c.value, (e, t) => ne((S(), i(O(
|
|
1316
|
+
default: N(() => [(S(!0), o(n, null, w(c.value, (e, t) => ne((S(), i(O(H), {
|
|
1317
1317
|
key: `${e.value}-${t}`,
|
|
1318
1318
|
label: String(e.label ?? ""),
|
|
1319
1319
|
value: e.value
|
|
@@ -1354,7 +1354,7 @@ var Ke = {
|
|
|
1354
1354
|
}, ...e];
|
|
1355
1355
|
}), u = r(() => l.value.map((e) => ({
|
|
1356
1356
|
label: e.label,
|
|
1357
|
-
value:
|
|
1357
|
+
value: Fe(e.value),
|
|
1358
1358
|
disabled: e.disabled,
|
|
1359
1359
|
key: String(e.value)
|
|
1360
1360
|
}))), d = r(() => u.value.map((e) => e.value)), f = r(() => {
|
|
@@ -1362,7 +1362,7 @@ var Ke = {
|
|
|
1362
1362
|
return e.length ? e.join(", ") : Z(c.value);
|
|
1363
1363
|
});
|
|
1364
1364
|
M(() => a.modelValue, (e) => {
|
|
1365
|
-
c.value =
|
|
1365
|
+
c.value = X(e);
|
|
1366
1366
|
}, { immediate: !0 });
|
|
1367
1367
|
function p(e, t) {
|
|
1368
1368
|
if (!a.showAllItem) {
|
|
@@ -1376,7 +1376,7 @@ var Ke = {
|
|
|
1376
1376
|
function h(e) {
|
|
1377
1377
|
p(e, m), m = [...c.value];
|
|
1378
1378
|
}
|
|
1379
|
-
return (t, r) => e.readonly ? (S(), o("span", jt, D(f.value), 1)) : (S(), i(O(
|
|
1379
|
+
return (t, r) => e.readonly ? (S(), o("span", jt, D(f.value), 1)) : (S(), i(O(U), {
|
|
1380
1380
|
key: 1,
|
|
1381
1381
|
"model-value": c.value,
|
|
1382
1382
|
multiple: "",
|
|
@@ -1387,7 +1387,7 @@ var Ke = {
|
|
|
1387
1387
|
class: "k-form-select-multiple",
|
|
1388
1388
|
"onUpdate:modelValue": h
|
|
1389
1389
|
}, {
|
|
1390
|
-
default: N(() => [(S(!0), o(n, null, w(u.value, (e) => (S(), i(O(
|
|
1390
|
+
default: N(() => [(S(!0), o(n, null, w(u.value, (e) => (S(), i(O(H), {
|
|
1391
1391
|
key: e.key,
|
|
1392
1392
|
label: e.label,
|
|
1393
1393
|
value: e.value,
|
|
@@ -1451,7 +1451,7 @@ var Ke = {
|
|
|
1451
1451
|
c.value = e.map(String);
|
|
1452
1452
|
return;
|
|
1453
1453
|
}
|
|
1454
|
-
let t =
|
|
1454
|
+
let t = Y(e);
|
|
1455
1455
|
c.value = t ? [String(t)] : [];
|
|
1456
1456
|
}
|
|
1457
1457
|
M(() => a.modelValue, f, { immediate: !0 });
|
|
@@ -1471,7 +1471,7 @@ var Ke = {
|
|
|
1471
1471
|
let t = ["k-form-tag__item"];
|
|
1472
1472
|
return a.disabled && t.push("is-disabled"), a.readonly && t.push("is-readonly"), c.value.includes(e) && t.push("is-active"), t.join(" ");
|
|
1473
1473
|
}
|
|
1474
|
-
return (e, t) => (S(), o("div", Nt, [(S(!0), o(n, null, w(d.value, (e) => (S(), i(O(
|
|
1474
|
+
return (e, t) => (S(), o("div", Nt, [(S(!0), o(n, null, w(d.value, (e) => (S(), i(O(de), {
|
|
1475
1475
|
key: e.value || "__all__",
|
|
1476
1476
|
class: y(["k-form-tag__item", h(e.value)]),
|
|
1477
1477
|
type: "info",
|
|
@@ -1493,7 +1493,7 @@ var Ke = {
|
|
|
1493
1493
|
disabled: { type: Boolean }
|
|
1494
1494
|
},
|
|
1495
1495
|
setup(e) {
|
|
1496
|
-
let t = e, n = r(() =>
|
|
1496
|
+
let t = e, n = r(() => Ie(t.modelValue));
|
|
1497
1497
|
return (e, t) => (S(), o("div", Ft, [s("p", null, D(n.value), 1)]));
|
|
1498
1498
|
}
|
|
1499
1499
|
}), [["__scopeId", "data-v-9dc35114"]]), Lt = { class: "k-form-time-picker" }, Rt = ["innerHTML"], zt = {
|
|
@@ -1535,8 +1535,8 @@ var Ke = {
|
|
|
1535
1535
|
},
|
|
1536
1536
|
emits: ["update:modelValue"],
|
|
1537
1537
|
setup(e, { emit: t }) {
|
|
1538
|
-
let n = e, s = t, c = r(() =>
|
|
1539
|
-
let n =
|
|
1538
|
+
let n = e, s = t, c = r(() => Be(n.modelValue)), l = r(() => Ve(n.type)), u = r(() => l.value === "timerange"), d = (e, t) => {
|
|
1539
|
+
let n = W(e instanceof Date ? e : String(e));
|
|
1540
1540
|
return n.isValid() ? n.format(t) : Z(e);
|
|
1541
1541
|
}, f = r(() => {
|
|
1542
1542
|
if (!n.modelValue) return Z(n.modelValue);
|
|
@@ -1544,16 +1544,16 @@ var Ke = {
|
|
|
1544
1544
|
return Array.isArray(n.modelValue) ? n.modelValue.map((t) => d(t, e)).join(" - ") : d(n.modelValue, e);
|
|
1545
1545
|
}), p = r(() => {
|
|
1546
1546
|
if (!n.limitTime) return;
|
|
1547
|
-
let e =
|
|
1547
|
+
let e = W().hour();
|
|
1548
1548
|
return () => Array.from({ length: 24 }, (e, t) => t).filter((t) => t < e);
|
|
1549
1549
|
}), m = r(() => {
|
|
1550
1550
|
if (n.limitTime) return (e) => {
|
|
1551
|
-
let t =
|
|
1551
|
+
let t = W();
|
|
1552
1552
|
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());
|
|
1553
1553
|
};
|
|
1554
1554
|
}), h = r(() => {
|
|
1555
1555
|
if (n.limitTime) return (e, t) => {
|
|
1556
|
-
let n =
|
|
1556
|
+
let n = W();
|
|
1557
1557
|
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());
|
|
1558
1558
|
};
|
|
1559
1559
|
});
|
|
@@ -1567,7 +1567,7 @@ var Ke = {
|
|
|
1567
1567
|
innerHTML: e.prepend
|
|
1568
1568
|
}, null, 8, Rt)) : a("", !0),
|
|
1569
1569
|
e.leftText ? (S(), o("span", zt, D(e.leftText), 1)) : a("", !0),
|
|
1570
|
-
e.readonly ? (S(), o("span", Bt, D(f.value), 1)) : (S(), i(O(
|
|
1570
|
+
e.readonly ? (S(), o("span", Bt, D(f.value), 1)) : (S(), i(O(fe), {
|
|
1571
1571
|
key: 3,
|
|
1572
1572
|
"model-value": c.value,
|
|
1573
1573
|
"is-range": u.value,
|
|
@@ -1604,7 +1604,7 @@ var Ke = {
|
|
|
1604
1604
|
}, null, 8, Ht)) : a("", !0)
|
|
1605
1605
|
]));
|
|
1606
1606
|
}
|
|
1607
|
-
}), [["__scopeId", "data-v-
|
|
1607
|
+
}), [["__scopeId", "data-v-932e4882"]]), Wt = { class: "k-form-tree-select" }, Gt = {
|
|
1608
1608
|
key: 0,
|
|
1609
1609
|
class: "k-form-input__readonly"
|
|
1610
1610
|
}, Kt = /* @__PURE__ */ f({
|
|
@@ -1632,8 +1632,8 @@ var Ke = {
|
|
|
1632
1632
|
},
|
|
1633
1633
|
emits: ["update:modelValue"],
|
|
1634
1634
|
setup(e, { emit: t }) {
|
|
1635
|
-
let n = e, a = t, s = r(() =>
|
|
1636
|
-
return (t, n) => (S(), o("div", Wt, [e.readonly ? (S(), o("div", Gt, D(l.value), 1)) : (S(), i(O(
|
|
1635
|
+
let n = e, a = t, s = r(() => Y(n.modelValue)), c = r(() => Ue(n.data)), l = r(() => We(c.value, s.value) ?? Z(s.value));
|
|
1636
|
+
return (t, n) => (S(), o("div", Wt, [e.readonly ? (S(), o("div", Gt, D(l.value), 1)) : (S(), i(O(me), {
|
|
1637
1637
|
key: 1,
|
|
1638
1638
|
"model-value": s.value,
|
|
1639
1639
|
data: c.value,
|
|
@@ -1675,7 +1675,7 @@ var Ke = {
|
|
|
1675
1675
|
type: "button",
|
|
1676
1676
|
class: "k-upload__media-play",
|
|
1677
1677
|
onClick: r[0] ||= (t) => l("play", e.file)
|
|
1678
|
-
}, [u(O(
|
|
1678
|
+
}, [u(O(z), null, {
|
|
1679
1679
|
default: N(() => [u(O(xe))]),
|
|
1680
1680
|
_: 1
|
|
1681
1681
|
})])) : (S(), o(n, { key: 1 }, [T(t.$slots, "preview", { file: e.file }, () => [s("img", {
|
|
@@ -1686,7 +1686,7 @@ var Ke = {
|
|
|
1686
1686
|
s("span", {
|
|
1687
1687
|
class: "el-upload-list__item-preview",
|
|
1688
1688
|
onClick: r[1] ||= (t) => l("zoom", e.file)
|
|
1689
|
-
}, [u(O(
|
|
1689
|
+
}, [u(O(z), null, {
|
|
1690
1690
|
default: N(() => [u(O(Se))]),
|
|
1691
1691
|
_: 1
|
|
1692
1692
|
})]),
|
|
@@ -1694,7 +1694,7 @@ var Ke = {
|
|
|
1694
1694
|
key: 0,
|
|
1695
1695
|
class: "el-upload-list__item-download",
|
|
1696
1696
|
onClick: r[2] ||= (t) => l("download", e.file)
|
|
1697
|
-
}, [u(O(
|
|
1697
|
+
}, [u(O(z), null, {
|
|
1698
1698
|
default: N(() => [u(O(ye))]),
|
|
1699
1699
|
_: 1
|
|
1700
1700
|
})])),
|
|
@@ -1702,11 +1702,11 @@ var Ke = {
|
|
|
1702
1702
|
key: 1,
|
|
1703
1703
|
class: "el-upload-list__item-delete",
|
|
1704
1704
|
onClick: r[3] ||= (t) => l("remove", e.file)
|
|
1705
|
-
}, [u(O(
|
|
1705
|
+
}, [u(O(z), null, {
|
|
1706
1706
|
default: N(() => [u(O(ve))]),
|
|
1707
1707
|
_: 1
|
|
1708
1708
|
})]))
|
|
1709
|
-
])], 64)), f.value ? (S(), i(O(
|
|
1709
|
+
])], 64)), f.value ? (S(), i(O(se), {
|
|
1710
1710
|
key: 2,
|
|
1711
1711
|
class: "k-upload__file-progress",
|
|
1712
1712
|
type: e.listType === "picture-card" || e.listType === "lottie" ? "circle" : "line",
|
|
@@ -1738,7 +1738,7 @@ var Ke = {
|
|
|
1738
1738
|
type: "button",
|
|
1739
1739
|
class: "k-upload__download",
|
|
1740
1740
|
onClick: r[0] ||= P((e) => n("downloadTemplate"), ["stop"])
|
|
1741
|
-
}, [u(O(
|
|
1741
|
+
}, [u(O(z), { class: "k-upload__download-icon" }, {
|
|
1742
1742
|
default: N(() => [u(O(ye))]),
|
|
1743
1743
|
_: 1
|
|
1744
1744
|
}), s("span", null, D(e.templateBtnText), 1)])) : a("", !0),
|
|
@@ -1747,7 +1747,7 @@ var Ke = {
|
|
|
1747
1747
|
class: "k-upload__inline-tip",
|
|
1748
1748
|
innerHTML: e.tipText
|
|
1749
1749
|
}, null, 8, Qt)) : a("", !0),
|
|
1750
|
-
e.tipType === "tooltip" && e.tipText ? (S(), i(O(
|
|
1750
|
+
e.tipType === "tooltip" && e.tipText ? (S(), i(O(pe), {
|
|
1751
1751
|
key: 2,
|
|
1752
1752
|
placement: "top",
|
|
1753
1753
|
content: e.tipText
|
|
@@ -1776,7 +1776,7 @@ var Ke = {
|
|
|
1776
1776
|
emits: ["update:visible"],
|
|
1777
1777
|
setup(e) {
|
|
1778
1778
|
let t = A(e, "visible");
|
|
1779
|
-
return (n, r) => (S(), i(
|
|
1779
|
+
return (n, r) => (S(), i(ke, {
|
|
1780
1780
|
visible: t.value,
|
|
1781
1781
|
"onUpdate:visible": r[0] ||= (e) => t.value = e,
|
|
1782
1782
|
"show-confirm": !1,
|
|
@@ -2063,21 +2063,21 @@ var vn = {
|
|
|
2063
2063
|
function ne(e) {
|
|
2064
2064
|
return e === "picture2" ? "picture" : e;
|
|
2065
2065
|
}
|
|
2066
|
-
let P = r(() => ne(w.listType)), F = r(() => w.accept ? w.accept.toLowerCase() : g[P.value] ?? ""), { fileList:
|
|
2066
|
+
let P = r(() => ne(w.listType)), F = r(() => w.accept ? w.accept.toLowerCase() : g[P.value] ?? ""), { fileList: I, elFileList: re, removeByUid: L, upsert: ie, findByUid: R } = dn({
|
|
2067
2067
|
getModelValue: () => w.modelValue,
|
|
2068
2068
|
onUpdate: (e) => E("update:modelValue", e),
|
|
2069
2069
|
getLimit: () => w.limit
|
|
2070
|
-
}),
|
|
2070
|
+
}), B = hn({
|
|
2071
2071
|
getAccept: () => F.value,
|
|
2072
2072
|
getMaxSize: () => w.maxSize
|
|
2073
|
-
}),
|
|
2073
|
+
}), oe = mn({ getTemplateCode: () => w.templateCode }), { visible: H, urlList: se, initialIndex: ce, open: le, close: ue } = cn(), { visible: U, url: de, type: fe, open: pe } = ln(), me = r(() => gn(P.value, w.action)), W = r(() => {
|
|
2074
2074
|
switch (P.value) {
|
|
2075
2075
|
case "picture": return "picture";
|
|
2076
2076
|
case "picture-card":
|
|
2077
2077
|
case "lottie": return "picture-card";
|
|
2078
2078
|
default: return "text";
|
|
2079
2079
|
}
|
|
2080
|
-
}),
|
|
2080
|
+
}), ge = r(() => [
|
|
2081
2081
|
"picture",
|
|
2082
2082
|
"picture-card",
|
|
2083
2083
|
"lottie"
|
|
@@ -2086,7 +2086,7 @@ var vn = {
|
|
|
2086
2086
|
"lottie",
|
|
2087
2087
|
"video",
|
|
2088
2088
|
"audio"
|
|
2089
|
-
].includes(P.value)), G = r(() => P.value === "picture-card" || P.value === "lottie"), ve = r(() => !G.value), ye = r(() => !w.openCutter && w.autoUpload), xe = r(() => w.limit === 1 ? void 0 : w.limit), Se = r(() => !!(w.limit && w.limit !== 1 &&
|
|
2089
|
+
].includes(P.value)), G = r(() => P.value === "picture-card" || P.value === "lottie"), ve = r(() => !G.value), ye = r(() => !w.openCutter && w.autoUpload), xe = r(() => w.limit === 1 ? void 0 : w.limit), Se = r(() => !!(w.limit && w.limit !== 1 && I.value.length >= w.limit)), Ce = r(() => !w.disabled), we = r(() => !(G.value || w.disabled || P.value === "picture" && w.tipType === "text")), q = r(() => w.disabled ? "" : w.fileTips || (F.value ? `支持上传 ${F.value} 后缀文件,且不超过${w.maxSize}M` : "")), Te = r(() => q.value && (w.tipType === "tooltip" || w.tipType === "text" && P.value === "picture") ? q.value : ""), Ee = r(() => {
|
|
2090
2090
|
let e = ["k-upload", `k-upload--${P.value}`];
|
|
2091
2091
|
return w.disabled && e.push("k-upload_detail"), Se.value && e.push("k-upload--limit"), e.join(" ");
|
|
2092
2092
|
});
|
|
@@ -2103,106 +2103,106 @@ var vn = {
|
|
|
2103
2103
|
status: "success"
|
|
2104
2104
|
};
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2106
|
+
function J(e, t, n) {
|
|
2107
2107
|
let r = De(e, t, n);
|
|
2108
|
-
|
|
2109
|
-
}
|
|
2110
|
-
let
|
|
2111
|
-
|
|
2112
|
-
},
|
|
2113
|
-
V.error(x(e, "文件上传失败!")),
|
|
2114
|
-
},
|
|
2115
|
-
if (typeof e.uid == "number" &&
|
|
2116
|
-
let n =
|
|
2117
|
-
|
|
2118
|
-
},
|
|
2108
|
+
ie(r), w.showSuccMessage && V.success("文件上传成功!"), E("success", e, r);
|
|
2109
|
+
}
|
|
2110
|
+
let Oe = async (e) => B.validate(e) ? !w.beforeUpload || w.beforeUpload(e) : !1, ke = async (e, t) => !w.beforeRemove || await w.beforeRemove(e, t) !== !1, Ae = (e, t, n) => {
|
|
2111
|
+
J(e ?? {}, t.uid, t.name), w.onSuccess?.(e, t, n);
|
|
2112
|
+
}, je = (e, t, n) => {
|
|
2113
|
+
V.error(x(e, "文件上传失败!")), L(t.uid), E("error", e, t), w.onError?.(e, t, n);
|
|
2114
|
+
}, Me = (e, t) => {
|
|
2115
|
+
if (typeof e.uid == "number" && B.consumeRejected(e.uid)) return;
|
|
2116
|
+
let n = R(e.uid);
|
|
2117
|
+
L(e.uid), n && E("remove", n), w.onRemove?.(e, t);
|
|
2118
|
+
}, Ne = (e) => {
|
|
2119
2119
|
w.onPreview?.(e);
|
|
2120
|
-
let t =
|
|
2121
|
-
t && (E("preview", t), !(
|
|
2122
|
-
},
|
|
2120
|
+
let t = R(e.uid);
|
|
2121
|
+
t && (E("preview", t), !(ge.value && le(t, I.value)) && Ve(t));
|
|
2122
|
+
}, Pe = (e, t) => {
|
|
2123
2123
|
if (E("change", e), w.onChange?.(e, t), !(!w.openCutter || e.status !== "ready" || !e.raw)) {
|
|
2124
|
-
if (
|
|
2125
|
-
|
|
2124
|
+
if (B.validate(e.raw) === !1) {
|
|
2125
|
+
L(e.uid);
|
|
2126
2126
|
return;
|
|
2127
2127
|
}
|
|
2128
|
-
|
|
2128
|
+
L(e.uid), v(() => {
|
|
2129
2129
|
k.value?.handleRemove(e), te({
|
|
2130
2130
|
name: e.name,
|
|
2131
2131
|
raw: e.raw
|
|
2132
2132
|
});
|
|
2133
2133
|
});
|
|
2134
2134
|
}
|
|
2135
|
-
},
|
|
2135
|
+
}, Fe = (e, t, n) => {
|
|
2136
2136
|
E("progress", e, t), w.onProgress?.(e, t, n);
|
|
2137
|
-
},
|
|
2137
|
+
}, Y = (e, t) => {
|
|
2138
2138
|
E("exceed", e, t), w.onExceed?.(e, t);
|
|
2139
2139
|
};
|
|
2140
|
-
function
|
|
2141
|
-
let t =
|
|
2142
|
-
t &&
|
|
2140
|
+
function Ie(e) {
|
|
2141
|
+
let t = R(e.uid);
|
|
2142
|
+
t && le(t, I.value);
|
|
2143
2143
|
}
|
|
2144
|
-
function
|
|
2145
|
-
let t =
|
|
2146
|
-
t &&
|
|
2144
|
+
function X(e) {
|
|
2145
|
+
let t = R(e.uid);
|
|
2146
|
+
t && Ve(t);
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2149
|
-
let t =
|
|
2150
|
-
|
|
2148
|
+
function Le(e) {
|
|
2149
|
+
let t = R(e.uid);
|
|
2150
|
+
L(e.uid), t && E("remove", t), w.onRemove?.(e, re.value);
|
|
2151
2151
|
}
|
|
2152
|
-
function
|
|
2153
|
-
let t =
|
|
2154
|
-
t &&
|
|
2152
|
+
function Re(e) {
|
|
2153
|
+
let t = R(e.uid);
|
|
2154
|
+
t && pe(t, P.value === "audio" ? "audio" : "video");
|
|
2155
2155
|
}
|
|
2156
|
-
async function
|
|
2156
|
+
async function ze(e) {
|
|
2157
2157
|
try {
|
|
2158
2158
|
let t = gn("picture", w.action);
|
|
2159
|
-
|
|
2159
|
+
J(await oe.uploadFile(e, t), -Date.now(), e.name);
|
|
2160
2160
|
} catch (e) {
|
|
2161
2161
|
V.error(x(e, "图片上传失败!"));
|
|
2162
2162
|
}
|
|
2163
2163
|
}
|
|
2164
|
-
function
|
|
2164
|
+
function Be(e, t) {
|
|
2165
2165
|
let n = document.createElement("a");
|
|
2166
2166
|
n.href = e, n.download = t, n.click();
|
|
2167
2167
|
}
|
|
2168
|
-
function
|
|
2169
|
-
e.resource_id &&
|
|
2168
|
+
function Ve(e) {
|
|
2169
|
+
e.resource_id && Be(`${_n(P.value)}${e.resource_id}`, e.name || String(e.resource_id));
|
|
2170
2170
|
}
|
|
2171
|
-
function
|
|
2171
|
+
function He() {
|
|
2172
2172
|
let e = t(), n = e.templateCodeRelation[w.templateCode];
|
|
2173
2173
|
if (!n) {
|
|
2174
2174
|
V.warning("模板未配置");
|
|
2175
2175
|
return;
|
|
2176
2176
|
}
|
|
2177
|
-
|
|
2177
|
+
Be(`${w.templateDownloadUrl || (w.templateDomain === "base" ? e.baseTemplateDownloadBaseUrl : e.templateDownloadBaseUrl) || e.urls.BASE_URL}${n}`, n);
|
|
2178
2178
|
}
|
|
2179
2179
|
return n({
|
|
2180
2180
|
submit: () => k.value?.submit(),
|
|
2181
2181
|
clearFiles: () => k.value?.clearFiles(),
|
|
2182
2182
|
uploadRef: k
|
|
2183
2183
|
}), (t, n) => (S(), o("div", { class: y(["k-upload-wrap", Ee.value]) }, [
|
|
2184
|
-
u(O(
|
|
2184
|
+
u(O(he), _({
|
|
2185
2185
|
ref_key: "uploadRef",
|
|
2186
2186
|
ref: k
|
|
2187
2187
|
}, t.$attrs, {
|
|
2188
2188
|
class: "k-upload__inner",
|
|
2189
|
-
"file-list": O(
|
|
2190
|
-
action:
|
|
2191
|
-
"list-type":
|
|
2189
|
+
"file-list": O(re),
|
|
2190
|
+
action: me.value,
|
|
2191
|
+
"list-type": W.value,
|
|
2192
2192
|
accept: F.value,
|
|
2193
2193
|
limit: xe.value,
|
|
2194
2194
|
disabled: e.disabled,
|
|
2195
2195
|
"auto-upload": ye.value,
|
|
2196
|
-
"http-request": O(
|
|
2197
|
-
"before-upload":
|
|
2198
|
-
"before-remove":
|
|
2199
|
-
"on-success":
|
|
2200
|
-
"on-error":
|
|
2201
|
-
"on-remove":
|
|
2202
|
-
"on-preview":
|
|
2203
|
-
"on-change":
|
|
2204
|
-
"on-progress":
|
|
2205
|
-
"on-exceed":
|
|
2196
|
+
"http-request": O(oe).httpRequest,
|
|
2197
|
+
"before-upload": Oe,
|
|
2198
|
+
"before-remove": ke,
|
|
2199
|
+
"on-success": Ae,
|
|
2200
|
+
"on-error": je,
|
|
2201
|
+
"on-remove": Me,
|
|
2202
|
+
"on-preview": Ne,
|
|
2203
|
+
"on-change": Pe,
|
|
2204
|
+
"on-progress": Fe,
|
|
2205
|
+
"on-exceed": Y
|
|
2206
2206
|
}), c({
|
|
2207
2207
|
tip: N(() => [T(t.$slots, "tip", {}, () => [G.value && (e.templateCode || e.tipType === "tooltip" && q.value) ? (S(), i($t, {
|
|
2208
2208
|
key: 0,
|
|
@@ -2210,7 +2210,7 @@ var vn = {
|
|
|
2210
2210
|
"template-btn-text": e.templateBtnText,
|
|
2211
2211
|
"tip-type": e.tipType,
|
|
2212
2212
|
"tip-text": q.value,
|
|
2213
|
-
onDownloadTemplate:
|
|
2213
|
+
onDownloadTemplate: He
|
|
2214
2214
|
}, null, 8, [
|
|
2215
2215
|
"template-code",
|
|
2216
2216
|
"template-btn-text",
|
|
@@ -2238,7 +2238,7 @@ var vn = {
|
|
|
2238
2238
|
"template-btn-text": e.templateBtnText,
|
|
2239
2239
|
"tip-type": e.tipType,
|
|
2240
2240
|
"tip-text": Te.value,
|
|
2241
|
-
onDownloadTemplate:
|
|
2241
|
+
onDownloadTemplate: He
|
|
2242
2242
|
}, null, 8, [
|
|
2243
2243
|
"template-code",
|
|
2244
2244
|
"template-btn-text",
|
|
@@ -2246,7 +2246,7 @@ var vn = {
|
|
|
2246
2246
|
"tip-text"
|
|
2247
2247
|
]),
|
|
2248
2248
|
T(t.$slots, "buttonAfter", {}, void 0, !0)
|
|
2249
|
-
])) : T(t.$slots, "content", {}, () => [s("div", yn, [u(O(
|
|
2249
|
+
])) : T(t.$slots, "content", {}, () => [s("div", yn, [u(O(z), { class: "k-upload__plus" }, {
|
|
2250
2250
|
default: N(() => [u(O(be))]),
|
|
2251
2251
|
_: 1
|
|
2252
2252
|
}), e.tipType === "text" && q.value ? (S(), o("span", {
|
|
@@ -2261,10 +2261,10 @@ var vn = {
|
|
|
2261
2261
|
file: n,
|
|
2262
2262
|
"list-type": P.value,
|
|
2263
2263
|
disabled: e.disabled,
|
|
2264
|
-
onZoom:
|
|
2265
|
-
onDownload:
|
|
2266
|
-
onRemove:
|
|
2267
|
-
onPlay:
|
|
2264
|
+
onZoom: Ie,
|
|
2265
|
+
onDownload: X,
|
|
2266
|
+
onRemove: Le,
|
|
2267
|
+
onPlay: Re
|
|
2268
2268
|
}, c({ _: 2 }, [t.$slots.preview ? {
|
|
2269
2269
|
name: "preview",
|
|
2270
2270
|
fn: N((e) => [T(t.$slots, "preview", b(p(e)), void 0, !0)]),
|
|
@@ -2290,24 +2290,24 @@ var vn = {
|
|
|
2290
2290
|
ref_key: "cutterRef",
|
|
2291
2291
|
ref: A,
|
|
2292
2292
|
option: e.cutterOption,
|
|
2293
|
-
onCut:
|
|
2293
|
+
onCut: ze
|
|
2294
2294
|
}, null, 8, ["option"])) : a("", !0),
|
|
2295
|
-
O(
|
|
2295
|
+
O(H) ? (S(), i(O(ae), {
|
|
2296
2296
|
key: 1,
|
|
2297
|
-
"url-list": O(
|
|
2298
|
-
"initial-index": O(
|
|
2297
|
+
"url-list": O(se),
|
|
2298
|
+
"initial-index": O(ce),
|
|
2299
2299
|
teleported: "",
|
|
2300
|
-
onClose: O(
|
|
2300
|
+
onClose: O(ue)
|
|
2301
2301
|
}, null, 8, [
|
|
2302
2302
|
"url-list",
|
|
2303
2303
|
"initial-index",
|
|
2304
2304
|
"onClose"
|
|
2305
2305
|
])) : a("", !0),
|
|
2306
2306
|
u(rn, {
|
|
2307
|
-
visible: O(
|
|
2308
|
-
"onUpdate:visible": n[0] ||= (e) => h(
|
|
2309
|
-
url: O(
|
|
2310
|
-
type: O(
|
|
2307
|
+
visible: O(U),
|
|
2308
|
+
"onUpdate:visible": n[0] ||= (e) => h(U) ? U.value = e : null,
|
|
2309
|
+
url: O(de),
|
|
2310
|
+
type: O(fe)
|
|
2311
2311
|
}, null, 8, [
|
|
2312
2312
|
"visible",
|
|
2313
2313
|
"url",
|
|
@@ -2373,7 +2373,7 @@ var vn = {
|
|
|
2373
2373
|
"show-succ-message"
|
|
2374
2374
|
]));
|
|
2375
2375
|
}
|
|
2376
|
-
}), Cn = d(() => import("./Editor-
|
|
2376
|
+
}), Cn = d(() => import("./Editor-utc9yN52.js")), wn = {
|
|
2377
2377
|
Input: Q,
|
|
2378
2378
|
Text: It,
|
|
2379
2379
|
Select: lt,
|
|
@@ -2388,7 +2388,7 @@ var vn = {
|
|
|
2388
2388
|
InputMixInput: st,
|
|
2389
2389
|
InputMixSelect: mt,
|
|
2390
2390
|
RadioInput: Ot,
|
|
2391
|
-
Complex: d(() => import("./Complex-
|
|
2391
|
+
Complex: d(() => import("./Complex-DgYsYf9M.js")),
|
|
2392
2392
|
ScrollSelect: At,
|
|
2393
2393
|
Upload: Sn,
|
|
2394
2394
|
Tag: Pt,
|
|
@@ -2402,4 +2402,4 @@ function En(e) {
|
|
|
2402
2402
|
Object.assign(wn, e);
|
|
2403
2403
|
}
|
|
2404
2404
|
//#endregion
|
|
2405
|
-
export { K as _, Ut as a, Q as c,
|
|
2405
|
+
export { K as _, Ut as a, Q as c, Ne as d, Me as f, J as g, ke as h, _n as i, et as l, Ae as m, Tn as n, St as o, je as p, xn as r, lt as s, En as t, Xe as u };
|