@maxtan/ez-ui 1.0.1 → 1.0.3
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/index.cjs +1 -1
- package/dist/index.js +533 -528
- package/dist/types/index.d.ts +17 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { useAttrs as
|
|
2
|
-
import { useLocale as
|
|
1
|
+
import { useAttrs as _e, computed as P, defineComponent as x, mergeModels as _, useModel as ee, createBlock as g, openBlock as r, unref as l, mergeProps as S, withCtx as k, createElementBlock as C, Fragment as X, renderList as re, resolveDynamicComponent as xe, createTextVNode as he, toDisplayString as ue, resolveDirective as et, renderSlot as R, createCommentVNode as O, withDirectives as tt, createElementVNode as Q, ref as G, createVNode as W, withModifiers as Ne, normalizeStyle as $e, createSlots as Se, useSlots as mt, shallowRef as Me, watch as ye, onMounted as Oe, normalizeClass as De, nextTick as Re, onUnmounted as pt, normalizeProps as Ce, guardReactiveProps as Le } from "vue";
|
|
2
|
+
import { useLocale as vt, ElCheckbox as at, ElCheckboxButton as gt, ElCheckboxGroup as yt, ElLoading as Be, ElDialog as bt, ElButton as be, ElSelect as ht, ElOptionGroup as Et, ElOption as qe, ElRadio as Vt, ElRadioButton as wt, ElRadioGroup as $t, ElUpload as He, ElImage as Ge, ElImageViewer as St, ElMessage as ge, ElFormItem as kt, ElInput as Te, ElInputNumber as zt, ElDatePicker as Ae, ElTimePicker as Ke, ElSwitch as Ct, ElTreeSelect as At, ElCascader as Dt, ElSlider as xt, ElRate as Pt, ElForm as Ut, ElRow as Tt, ElCol as Mt, ElTable as Rt, ElTableColumn as je, ElPagination as It, ElDrawer as Ot, ElInfiniteScroll as Bt, ElMessageBox as Ft, ElNotification as Nt, ElPopoverDirective as Lt } from "element-plus";
|
|
3
3
|
const te = (e, s) => (e.install = (t) => {
|
|
4
4
|
for (const a of [e, ...Object.values({})])
|
|
5
5
|
a.name ? t.component(a.name, a) : process.env.NODE_ENV !== "production" && console.warn("[withInstall] Component is missing name property:", a);
|
|
6
|
-
}, e),
|
|
7
|
-
const s = e.startsWith("onUpdate:") ? e.slice(9) : e, t = /* @__PURE__ */ new Set([e, s,
|
|
8
|
-
return e.startsWith("onUpdate:") || (t.add(`onUpdate:${s}`), t.add(`onUpdate:${
|
|
9
|
-
},
|
|
6
|
+
}, e), We = (e) => e.replace(/\B([A-Z])/g, "-$1").toLowerCase(), Qe = (e) => e.replace(/-([a-z])/g, (s, t) => t.toUpperCase()), qt = (e) => {
|
|
7
|
+
const s = e.startsWith("onUpdate:") ? e.slice(9) : e, t = /* @__PURE__ */ new Set([e, s, We(s), Qe(s)]);
|
|
8
|
+
return e.startsWith("onUpdate:") || (t.add(`onUpdate:${s}`), t.add(`onUpdate:${We(s)}`), t.add(`onUpdate:${Qe(s)}`)), t;
|
|
9
|
+
}, Ht = (e, s) => {
|
|
10
10
|
for (const t of e)
|
|
11
|
-
if (
|
|
11
|
+
if (qt(t).has(s))
|
|
12
12
|
return !0;
|
|
13
13
|
return !1;
|
|
14
14
|
};
|
|
15
15
|
function Ee(e = []) {
|
|
16
|
-
const s =
|
|
16
|
+
const s = _e(), t = P(() => {
|
|
17
17
|
const o = {};
|
|
18
18
|
for (const c in s)
|
|
19
|
-
|
|
19
|
+
Ht(e, c) || (o[c] = s[c]);
|
|
20
20
|
return o;
|
|
21
|
-
}), a =
|
|
21
|
+
}), a = P(() => {
|
|
22
22
|
const o = {};
|
|
23
23
|
for (const c in t.value)
|
|
24
24
|
c.startsWith("on") || (o[c] = t.value[c]);
|
|
25
25
|
return o;
|
|
26
|
-
}), i =
|
|
26
|
+
}), i = P(() => {
|
|
27
27
|
const o = {};
|
|
28
28
|
for (const c in t.value)
|
|
29
29
|
c.startsWith("on") && (o[c] = t.value[c]);
|
|
@@ -38,7 +38,7 @@ function Ee(e = []) {
|
|
|
38
38
|
listeners: i
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
var
|
|
41
|
+
var Gt = {
|
|
42
42
|
s: {
|
|
43
43
|
label: {
|
|
44
44
|
name: "姓名",
|
|
@@ -118,41 +118,41 @@ var qt = {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
|
-
const { s:
|
|
122
|
-
function
|
|
121
|
+
const { s: Kt } = Gt;
|
|
122
|
+
function jt(e, s) {
|
|
123
123
|
return s.split(".").reduce((t, a) => t && typeof t == "object" ? t[a] : void 0, e);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Wt(e, s = {}) {
|
|
126
126
|
return e.replace(/\{\s*(\w+)\s*\}/g, (t, a) => {
|
|
127
127
|
const i = s[a];
|
|
128
128
|
return i !== void 0 ? String(i) : `{${a}}`;
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
function ke() {
|
|
132
|
-
const { t: e, lang: s } =
|
|
132
|
+
const { t: e, lang: s } = vt();
|
|
133
133
|
return {
|
|
134
134
|
t: (a, i = {}) => {
|
|
135
135
|
const o = e(a, i);
|
|
136
136
|
if (o !== a) return o;
|
|
137
|
-
const c =
|
|
138
|
-
return typeof c == "string" ?
|
|
137
|
+
const c = jt({ s: Kt }, a);
|
|
138
|
+
return typeof c == "string" ? Wt(c, i) : a;
|
|
139
139
|
},
|
|
140
140
|
lang: s
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function H(e) {
|
|
144
144
|
if (e === null || typeof e != "object") return e;
|
|
145
145
|
if (e instanceof Date) return new Date(e.getTime());
|
|
146
|
-
if (e instanceof Array) return e.map((t) =>
|
|
147
|
-
if (e instanceof Set) return new Set(Array.from(e).map((t) =>
|
|
146
|
+
if (e instanceof Array) return e.map((t) => H(t));
|
|
147
|
+
if (e instanceof Set) return new Set(Array.from(e).map((t) => H(t)));
|
|
148
148
|
if (e instanceof Map)
|
|
149
|
-
return new Map(Array.from(e.entries()).map(([t, a]) => [
|
|
149
|
+
return new Map(Array.from(e.entries()).map(([t, a]) => [H(t), H(a)]));
|
|
150
150
|
const s = Object.create(Object.getPrototypeOf(e));
|
|
151
151
|
for (const t in e)
|
|
152
|
-
e.hasOwnProperty(t) && (s[t] =
|
|
152
|
+
e.hasOwnProperty(t) && (s[t] = H(e[t]));
|
|
153
153
|
return s;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Qt(e, s = 200) {
|
|
156
156
|
let t = null;
|
|
157
157
|
return function(...a) {
|
|
158
158
|
t || (t = setTimeout(() => {
|
|
@@ -160,8 +160,8 @@ function jt(e, s = 200) {
|
|
|
160
160
|
}, s));
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
const
|
|
164
|
-
...
|
|
163
|
+
const Yt = x({ name: "EzCheckbox", inheritAttrs: !1 }), Xt = /* @__PURE__ */ x({
|
|
164
|
+
...Yt,
|
|
165
165
|
props: /* @__PURE__ */ _({
|
|
166
166
|
type: { default: "default" },
|
|
167
167
|
options: { default: () => [] }
|
|
@@ -171,22 +171,22 @@ const Wt = x({ name: "EzCheckbox", inheritAttrs: !1 }), Yt = /* @__PURE__ */ x({
|
|
|
171
171
|
}),
|
|
172
172
|
emits: ["update:modelValue"],
|
|
173
173
|
setup(e) {
|
|
174
|
-
const s = e, t = ee(e, "modelValue"), { attrs: a } = Ee(["options", "type", "modelValue"]), i =
|
|
175
|
-
() => ["default", "border"].includes(s.type) ?
|
|
174
|
+
const s = e, t = ee(e, "modelValue"), { attrs: a } = Ee(["options", "type", "modelValue"]), i = P(
|
|
175
|
+
() => ["default", "border"].includes(s.type) ? at : gt
|
|
176
176
|
);
|
|
177
|
-
return (o, c) => (r(), g(l(
|
|
177
|
+
return (o, c) => (r(), g(l(yt), S({
|
|
178
178
|
modelValue: t.value,
|
|
179
179
|
"onUpdate:modelValue": c[0] || (c[0] = (h) => t.value = h)
|
|
180
180
|
}, l(a)), {
|
|
181
181
|
default: k(() => [
|
|
182
|
-
(r(!0), C(X, null,
|
|
182
|
+
(r(!0), C(X, null, re(e.options, (h) => (r(), g(xe(i.value), S({
|
|
183
183
|
key: String(h.value),
|
|
184
184
|
ref_for: !0
|
|
185
185
|
}, h, {
|
|
186
186
|
border: e.type === "border"
|
|
187
187
|
}), {
|
|
188
188
|
default: k(() => [
|
|
189
|
-
he(
|
|
189
|
+
he(ue(h.label), 1)
|
|
190
190
|
]),
|
|
191
191
|
_: 2
|
|
192
192
|
}, 1040, ["border"]))), 128))
|
|
@@ -194,18 +194,18 @@ const Wt = x({ name: "EzCheckbox", inheritAttrs: !1 }), Yt = /* @__PURE__ */ x({
|
|
|
194
194
|
_: 1
|
|
195
195
|
}, 16, ["modelValue"]));
|
|
196
196
|
}
|
|
197
|
-
}),
|
|
198
|
-
var
|
|
199
|
-
const
|
|
197
|
+
}), lt = te(Xt);
|
|
198
|
+
var we = /* @__PURE__ */ ((e) => (e.CANCEL = "取消", e.CONFIRM = "确定", e))(we || {});
|
|
199
|
+
const Zt = { key: 1 }, Jt = {
|
|
200
200
|
key: 0,
|
|
201
201
|
class: "ez-dialog__body"
|
|
202
|
-
},
|
|
203
|
-
...
|
|
202
|
+
}, _t = { key: 1 }, ea = x({ name: "EzDialog", inheritAttrs: !1, directives: { loading: Be.directive } }), ta = /* @__PURE__ */ x({
|
|
203
|
+
...ea,
|
|
204
204
|
props: /* @__PURE__ */ _({
|
|
205
205
|
title: { default: "" },
|
|
206
206
|
loading: { type: Boolean, default: !1 },
|
|
207
|
-
cancelText: { default:
|
|
208
|
-
confirmText: { default:
|
|
207
|
+
cancelText: { default: we.CANCEL },
|
|
208
|
+
confirmText: { default: we.CONFIRM }
|
|
209
209
|
}, {
|
|
210
210
|
modelValue: { type: Boolean, default: !1 },
|
|
211
211
|
modelModifiers: {}
|
|
@@ -218,10 +218,10 @@ const Qt = { key: 1 }, Xt = {
|
|
|
218
218
|
i("confirm");
|
|
219
219
|
};
|
|
220
220
|
return (y, E) => {
|
|
221
|
-
const D =
|
|
222
|
-
return r(), g(l(
|
|
221
|
+
const D = et("loading");
|
|
222
|
+
return r(), g(l(bt), S({
|
|
223
223
|
modelValue: o.value,
|
|
224
|
-
"onUpdate:modelValue": E[0] || (E[0] = (
|
|
224
|
+
"onUpdate:modelValue": E[0] || (E[0] = (q) => o.value = q),
|
|
225
225
|
class: "ez-dialog",
|
|
226
226
|
width: 800,
|
|
227
227
|
"append-to-body": !1,
|
|
@@ -230,24 +230,24 @@ const Qt = { key: 1 }, Xt = {
|
|
|
230
230
|
"close-on-press-escape": !1
|
|
231
231
|
}, l(c)), {
|
|
232
232
|
header: k(() => [
|
|
233
|
-
y.$slots.header ? R(y.$slots, "header", { key: 0 }) : (r(), C("p",
|
|
233
|
+
y.$slots.header ? R(y.$slots, "header", { key: 0 }) : (r(), C("p", Zt, ue(a.title), 1))
|
|
234
234
|
]),
|
|
235
235
|
default: k(() => [
|
|
236
|
-
y.$slots.default ?
|
|
236
|
+
y.$slots.default ? tt((r(), C("div", Jt, [
|
|
237
237
|
R(y.$slots, "default")
|
|
238
238
|
])), [
|
|
239
239
|
[D, a.loading]
|
|
240
240
|
]) : O("", !0)
|
|
241
241
|
]),
|
|
242
242
|
footer: k(() => [
|
|
243
|
-
y.$slots.footer ? R(y.$slots, "footer", { key: 0 }) : (r(), C("div",
|
|
243
|
+
y.$slots.footer ? R(y.$slots, "footer", { key: 0 }) : (r(), C("div", _t, [
|
|
244
244
|
a.cancelText ? (r(), g(l(be), {
|
|
245
245
|
key: 0,
|
|
246
246
|
type: "default",
|
|
247
247
|
onClick: h
|
|
248
248
|
}, {
|
|
249
249
|
default: k(() => [
|
|
250
|
-
he(
|
|
250
|
+
he(ue(a.cancelText === l(we).CANCEL ? l(t)("s.button.cancel") : a.cancelText), 1)
|
|
251
251
|
]),
|
|
252
252
|
_: 1
|
|
253
253
|
})) : O("", !0),
|
|
@@ -258,7 +258,7 @@ const Qt = { key: 1 }, Xt = {
|
|
|
258
258
|
onClick: V
|
|
259
259
|
}, {
|
|
260
260
|
default: k(() => [
|
|
261
|
-
he(
|
|
261
|
+
he(ue(a.confirmText === l(we).CONFIRM ? l(t)("s.button.confirm") : a.confirmText), 1)
|
|
262
262
|
]),
|
|
263
263
|
_: 1
|
|
264
264
|
}, 8, ["loading"])) : O("", !0)
|
|
@@ -268,8 +268,8 @@ const Qt = { key: 1 }, Xt = {
|
|
|
268
268
|
}, 16, ["modelValue"]);
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
}),
|
|
272
|
-
...
|
|
271
|
+
}), aa = te(ta), la = x({ name: "EzSelect", inheritAttrs: !1 }), oa = /* @__PURE__ */ x({
|
|
272
|
+
...la,
|
|
273
273
|
props: /* @__PURE__ */ _({
|
|
274
274
|
options: { default: () => [] }
|
|
275
275
|
}, {
|
|
@@ -279,25 +279,25 @@ const Qt = { key: 1 }, Xt = {
|
|
|
279
279
|
emits: ["update:modelValue"],
|
|
280
280
|
setup(e) {
|
|
281
281
|
const s = ee(e, "modelValue"), { attrs: t } = Ee(["options", "modelValue"]), a = (c) => typeof c > "u", i = (c) => !a(c.options), o = (c, h) => i(c) ? `group-${c.label}-${h}` : c.value != null && typeof c.value != "object" ? String(c.value) : `option-${h}`;
|
|
282
|
-
return (c, h) => (r(), g(l(
|
|
282
|
+
return (c, h) => (r(), g(l(ht), S({
|
|
283
283
|
modelValue: s.value,
|
|
284
284
|
"onUpdate:modelValue": h[0] || (h[0] = (V) => s.value = V)
|
|
285
285
|
}, l(t)), {
|
|
286
286
|
default: k(() => [
|
|
287
|
-
(r(!0), C(X, null,
|
|
287
|
+
(r(!0), C(X, null, re(e.options, (V, y) => (r(), C(X, {
|
|
288
288
|
key: o(V, y)
|
|
289
289
|
}, [
|
|
290
|
-
i(V) ? (r(), g(l(
|
|
290
|
+
i(V) ? (r(), g(l(Et), S({
|
|
291
291
|
key: 0,
|
|
292
292
|
ref_for: !0
|
|
293
293
|
}, V), {
|
|
294
294
|
default: k(() => [
|
|
295
|
-
(r(!0), C(X, null,
|
|
295
|
+
(r(!0), C(X, null, re(V.options, (E, D) => (r(), g(l(qe), S({
|
|
296
296
|
key: o(E, D)
|
|
297
297
|
}, { ref_for: !0 }, E), null, 16))), 128))
|
|
298
298
|
]),
|
|
299
299
|
_: 2
|
|
300
|
-
}, 1040)) : (r(), g(l(
|
|
300
|
+
}, 1040)) : (r(), g(l(qe), S({
|
|
301
301
|
key: 1,
|
|
302
302
|
ref_for: !0
|
|
303
303
|
}, V), null, 16))
|
|
@@ -306,8 +306,8 @@ const Qt = { key: 1 }, Xt = {
|
|
|
306
306
|
_: 1
|
|
307
307
|
}, 16, ["modelValue"]));
|
|
308
308
|
}
|
|
309
|
-
}),
|
|
310
|
-
...
|
|
309
|
+
}), ot = te(oa), na = x({ name: "EzRadio", inheritAttrs: !1 }), ra = /* @__PURE__ */ x({
|
|
310
|
+
...na,
|
|
311
311
|
props: /* @__PURE__ */ _({
|
|
312
312
|
type: { default: "default" },
|
|
313
313
|
options: { default: () => [] }
|
|
@@ -317,20 +317,20 @@ const Qt = { key: 1 }, Xt = {
|
|
|
317
317
|
}),
|
|
318
318
|
emits: ["update:modelValue"],
|
|
319
319
|
setup(e) {
|
|
320
|
-
const s = e, t = ee(e, "modelValue"), { attrs: a } = Ee(["options", "type", "modelValue"]), i =
|
|
321
|
-
return (o, c) => (r(), g(l(
|
|
320
|
+
const s = e, t = ee(e, "modelValue"), { attrs: a } = Ee(["options", "type", "modelValue"]), i = P(() => ["default", "border"].includes(s.type) ? Vt : wt);
|
|
321
|
+
return (o, c) => (r(), g(l($t), S({
|
|
322
322
|
modelValue: t.value,
|
|
323
323
|
"onUpdate:modelValue": c[0] || (c[0] = (h) => t.value = h)
|
|
324
324
|
}, l(a)), {
|
|
325
325
|
default: k(() => [
|
|
326
|
-
(r(!0), C(X, null,
|
|
326
|
+
(r(!0), C(X, null, re(e.options, (h) => (r(), g(xe(i.value), S({
|
|
327
327
|
key: String(h.value),
|
|
328
328
|
ref_for: !0
|
|
329
329
|
}, h, {
|
|
330
330
|
border: e.type === "border"
|
|
331
331
|
}), {
|
|
332
332
|
default: k(() => [
|
|
333
|
-
he(
|
|
333
|
+
he(ue(h.label), 1)
|
|
334
334
|
]),
|
|
335
335
|
_: 2
|
|
336
336
|
}, 1040, ["border"]))), 128))
|
|
@@ -338,8 +338,8 @@ const Qt = { key: 1 }, Xt = {
|
|
|
338
338
|
_: 1
|
|
339
339
|
}, 16, ["modelValue"]));
|
|
340
340
|
}
|
|
341
|
-
}),
|
|
342
|
-
...
|
|
341
|
+
}), nt = te(ra), sa = x({ name: "EzIcon", inheritAttrs: !1 }), ia = /* @__PURE__ */ x({
|
|
342
|
+
...sa,
|
|
343
343
|
props: {
|
|
344
344
|
size: { default: 20 },
|
|
345
345
|
color: { default: "inherit" }
|
|
@@ -348,7 +348,7 @@ const Qt = { key: 1 }, Xt = {
|
|
|
348
348
|
const s = e, t = (i) => {
|
|
349
349
|
if (!(i == null || i === ""))
|
|
350
350
|
return typeof i == "number" ? `${i}px` : i;
|
|
351
|
-
}, a =
|
|
351
|
+
}, a = P(() => {
|
|
352
352
|
const { size: i, color: o } = s;
|
|
353
353
|
return !i && !o ? {} : {
|
|
354
354
|
fontSize: t(i),
|
|
@@ -362,114 +362,114 @@ const Qt = { key: 1 }, Xt = {
|
|
|
362
362
|
R(i.$slots, "default", { class: "w-[1em] h-[1em]" })
|
|
363
363
|
], 16));
|
|
364
364
|
}
|
|
365
|
-
}),
|
|
365
|
+
}), ve = te(ia), ua = {
|
|
366
366
|
xmlns: "http://www.w3.org/2000/svg",
|
|
367
367
|
width: "200",
|
|
368
368
|
height: "200",
|
|
369
369
|
viewBox: "0 0 1024 1024"
|
|
370
|
-
},
|
|
370
|
+
}, da = /* @__PURE__ */ x({
|
|
371
371
|
name: "ArrowDown",
|
|
372
372
|
__name: "ArrowDown",
|
|
373
373
|
setup(e) {
|
|
374
|
-
return (s, t) => (r(), C("svg",
|
|
375
|
-
|
|
374
|
+
return (s, t) => (r(), C("svg", ua, [...t[0] || (t[0] = [
|
|
375
|
+
Q("path", {
|
|
376
376
|
fill: "currentColor",
|
|
377
377
|
d: "m832 340.992-320 312-320-312a28.8 28.8 0 0 0-20.992-8.96 28.8 28.8 0 0 0-20.992 8.96 28.8 28.8 0 0 0-8.96 20.992c0 8 2.624 14.72 8 19.968l340.992 332.032c5.952 6.016 13.312 8.96 22.016 8.96 8.64 0 16-2.944 22.016-8.96l340.992-331.008a31.23 31.23 0 0 0 8-21.504c0-8.32-3.008-15.36-8.96-20.992a29.76 29.76 0 0 0-42.048.448v.064z"
|
|
378
378
|
}, null, -1)
|
|
379
379
|
])]));
|
|
380
380
|
}
|
|
381
|
-
}),
|
|
381
|
+
}), ca = {
|
|
382
382
|
xmlns: "http://www.w3.org/2000/svg",
|
|
383
383
|
width: "200",
|
|
384
384
|
height: "200",
|
|
385
385
|
viewBox: "0 0 1024 1024"
|
|
386
|
-
},
|
|
386
|
+
}, fa = /* @__PURE__ */ x({
|
|
387
387
|
name: "ArrowUp",
|
|
388
388
|
__name: "ArrowUp",
|
|
389
389
|
setup(e) {
|
|
390
|
-
return (s, t) => (r(), C("svg",
|
|
391
|
-
|
|
390
|
+
return (s, t) => (r(), C("svg", ca, [...t[0] || (t[0] = [
|
|
391
|
+
Q("path", {
|
|
392
392
|
fill: "currentColor",
|
|
393
393
|
d: "M488.96 344 148.992 700.992a32.26 32.26 0 0 0-8.96 22.016c0 8 2.944 15.36 8.96 22.016v1.024c6.016 5.952 13.184 8.96 21.504 8.96S185.984 752 192 746.048l320-336 320 336c6.016 5.952 13.184 8.96 21.504 8.96s15.488-3.008 21.504-8.96v-1.024a32.26 32.26 0 0 0 8.96-22.016 32.26 32.26 0 0 0-8.96-22.016L534.976 344A31.17 31.17 0 0 0 512 335.04a31.17 31.17 0 0 0-23.04 8.96"
|
|
394
394
|
}, null, -1)
|
|
395
395
|
])]));
|
|
396
396
|
}
|
|
397
|
-
}),
|
|
397
|
+
}), ma = {
|
|
398
398
|
xmlns: "http://www.w3.org/2000/svg",
|
|
399
399
|
width: "200",
|
|
400
400
|
height: "200",
|
|
401
401
|
viewBox: "0 0 1024 1024"
|
|
402
|
-
},
|
|
402
|
+
}, Ye = /* @__PURE__ */ x({
|
|
403
403
|
name: "Delete",
|
|
404
404
|
__name: "delete",
|
|
405
405
|
setup(e) {
|
|
406
|
-
return (s, t) => (r(), C("svg",
|
|
407
|
-
|
|
406
|
+
return (s, t) => (r(), C("svg", ma, [...t[0] || (t[0] = [
|
|
407
|
+
Q("path", {
|
|
408
408
|
fill: "currentColor",
|
|
409
409
|
d: "M218.88 118.592C208 139.968 208 168 208 245.376V272H96a32 32 0 1 0 0 64h832a32 32 0 0 0 0-64H816v-26.624c0-77.44 0-105.408-10.88-126.72a100.03 100.03 0 0 0-43.712-43.776C740.032 64 712 64 634.624 64H389.376c-77.44 0-105.408 0-126.72 10.88-18.88 9.6-34.176 24.96-43.776 43.712M752 272H272v-64c0-28.032 0-42.304 5.568-52.992a50.24 50.24 0 0 1 21.44-21.44C309.76 128.064 323.968 128 352 128h320c28.032 0 42.304 0 52.992 5.568 9.152 4.736 16.64 12.288 21.44 21.44C751.936 165.696 752 179.968 752 208zM192 416a32 32 0 0 0-32 32v358.4c0 53.76.128 81.28 10.688 101.76a96.54 96.54 0 0 0 41.216 41.152C232.384 959.872 259.84 960 313.6 960h396.8c53.76 0 81.28-.128 101.76-10.688a96.54 96.54 0 0 0 41.152-41.216C863.872 887.616 864 860.16 864 806.4V448a32 32 0 0 0-64 0v371.2c0 26.88 0 40.64-5.376 50.88a48.2 48.2 0 0 1-20.544 20.544c-10.24 5.312-24 5.376-50.88 5.376H300.8c-26.88 0-40.64 0-50.88-5.376a48.2 48.2 0 0 1-20.544-20.544c-5.312-10.24-5.376-24-5.376-50.88V448a32 32 0 0 0-32-32m216 0a32 32 0 0 0-32 32v320a32 32 0 0 0 64 0V448a32 32 0 0 0-32-32m208 0a32 32 0 0 0-32 32v320a32 32 0 0 0 64 0V448a32 32 0 0 0-32-32"
|
|
410
410
|
}, null, -1)
|
|
411
411
|
])]));
|
|
412
412
|
}
|
|
413
|
-
}),
|
|
413
|
+
}), pa = {
|
|
414
414
|
xmlns: "http://www.w3.org/2000/svg",
|
|
415
415
|
width: "200",
|
|
416
416
|
height: "200",
|
|
417
417
|
viewBox: "0 0 1024 1024"
|
|
418
|
-
},
|
|
418
|
+
}, Xe = /* @__PURE__ */ x({
|
|
419
419
|
name: "Plus",
|
|
420
420
|
__name: "plus",
|
|
421
421
|
setup(e) {
|
|
422
|
-
return (s, t) => (r(), C("svg",
|
|
423
|
-
|
|
422
|
+
return (s, t) => (r(), C("svg", pa, [...t[0] || (t[0] = [
|
|
423
|
+
Q("path", {
|
|
424
424
|
fill: "currentColor",
|
|
425
425
|
d: "M512 96a32 32 0 0 0-32 32v352H128a32 32 0 1 0 0 64h352v352a32 32 0 0 0 64 0V544h352a32 32 0 0 0 0-64H544V128a32 32 0 0 0-32-32"
|
|
426
426
|
}, null, -1)
|
|
427
427
|
])]));
|
|
428
428
|
}
|
|
429
|
-
}),
|
|
429
|
+
}), va = {
|
|
430
430
|
xmlns: "http://www.w3.org/2000/svg",
|
|
431
431
|
width: "200",
|
|
432
432
|
height: "200",
|
|
433
433
|
viewBox: "0 0 1024 1024"
|
|
434
|
-
},
|
|
434
|
+
}, ga = /* @__PURE__ */ x({
|
|
435
435
|
name: "Setting",
|
|
436
436
|
__name: "setting",
|
|
437
437
|
setup(e) {
|
|
438
|
-
return (s, t) => (r(), C("svg",
|
|
439
|
-
|
|
438
|
+
return (s, t) => (r(), C("svg", va, [...t[0] || (t[0] = [
|
|
439
|
+
Q("path", {
|
|
440
440
|
fill: "currentColor",
|
|
441
441
|
d: "M218.688 848q27.712 48 83.2 48h374.08q55.424 0 83.136-48l187.008-323.968q27.776-48 0-96L759.104 104.064q-27.712-48-83.2-48H301.952q-55.488 0-83.2 48L31.68 428.032q-27.712 48 0 96zm55.424-32L87.104 492.032q-9.216-16 0-32l187.008-323.968q9.28-16 27.776-16h374.08q18.432 0 27.712 16l187.008 323.968q9.28 16 0 32L703.68 816q-9.28 16-27.712 16h-374.08q-18.56 0-27.776-16m54.784-339.968a160 160 0 1 0 320 0 160 160 0 0 0-320 0m64 0a96 96 0 1 1 192 0 96 96 0 0 1-192 0"
|
|
442
442
|
}, null, -1)
|
|
443
443
|
])]));
|
|
444
444
|
}
|
|
445
|
-
}),
|
|
445
|
+
}), ya = {
|
|
446
446
|
xmlns: "http://www.w3.org/2000/svg",
|
|
447
447
|
width: "200",
|
|
448
448
|
height: "200",
|
|
449
449
|
viewBox: "0 0 1024 1024"
|
|
450
|
-
},
|
|
450
|
+
}, Ze = /* @__PURE__ */ x({
|
|
451
451
|
name: "ZoomIn",
|
|
452
452
|
__name: "ZoomIn",
|
|
453
453
|
setup(e) {
|
|
454
|
-
return (s, t) => (r(), C("svg",
|
|
455
|
-
|
|
454
|
+
return (s, t) => (r(), C("svg", ya, [...t[0] || (t[0] = [
|
|
455
|
+
Q("path", {
|
|
456
456
|
fill: "currentColor",
|
|
457
457
|
d: "M764.352 809.6a424 424 0 1 1 45.184-45.184l139.456 139.392a31.936 31.936 0 1 1-45.184 45.184L764.352 809.536zM848 488a360 360 0 1 0-720 0 360 360 0 0 0 720 0"
|
|
458
458
|
}, null, -1),
|
|
459
|
-
|
|
459
|
+
Q("path", {
|
|
460
460
|
fill: "currentColor",
|
|
461
461
|
d: "M294.4 486.4a32 32 0 0 0 32 32h128v128a32 32 0 0 0 64 0v-128h128a32 32 0 0 0 0-64h-128v-128a32 32 0 0 0-64 0v128h-128a32 32 0 0 0-32 32"
|
|
462
462
|
}, null, -1)
|
|
463
463
|
])]));
|
|
464
464
|
}
|
|
465
|
-
}),
|
|
465
|
+
}), ba = { class: "ez-image-upload" }, ha = {
|
|
466
466
|
key: 0,
|
|
467
467
|
class: "ez-image-upload__image"
|
|
468
|
-
},
|
|
468
|
+
}, Ea = {
|
|
469
469
|
key: 1,
|
|
470
470
|
class: "ez-image-upload__list"
|
|
471
|
-
},
|
|
472
|
-
...
|
|
471
|
+
}, Va = { class: "flex items-center justify-center h-full" }, wa = x({ name: "EzImageUpload", inheritAttrs: !1 }), $a = /* @__PURE__ */ x({
|
|
472
|
+
...wa,
|
|
473
473
|
props: /* @__PURE__ */ _({
|
|
474
474
|
api: { type: Function, default: () => Promise.resolve({ url: "" }) },
|
|
475
475
|
imageTypes: { default: () => ["image/webp", "image/png", "image/jpg", "image/gif", "image/bmp", "image/jpeg"] },
|
|
@@ -495,114 +495,114 @@ const Qt = { key: 1 }, Xt = {
|
|
|
495
495
|
"limit",
|
|
496
496
|
"disabled",
|
|
497
497
|
"modelValue"
|
|
498
|
-
]), o = t, { t: c } = ke(), h = G(!1), V = G(0), y = ee(e, "modelValue"), E =
|
|
499
|
-
function A(
|
|
500
|
-
if (!
|
|
501
|
-
const $ =
|
|
498
|
+
]), o = t, { t: c } = ke(), h = G(!1), V = G(0), y = ee(e, "modelValue"), E = P(() => a.multiple), D = P(() => a.imageTypes.join(",")), q = /^(https?:\/\/|data:|blob:)/i, m = P(() => y.value ? A(y.value) : []);
|
|
499
|
+
function A(U) {
|
|
500
|
+
if (!U) return [];
|
|
501
|
+
const $ = U.trim().replace(/^[,\s]+|[,\s]+$/g, "");
|
|
502
502
|
if (!$) return [];
|
|
503
503
|
const I = /(blob:https?:\/\/|https?:\/\/|data:)/gi, J = Array.from($.matchAll(I));
|
|
504
504
|
if (J.length === 0) return [];
|
|
505
505
|
const ae = [];
|
|
506
|
-
for (let
|
|
507
|
-
const oe = J[
|
|
506
|
+
for (let se = 0; se < J.length; se++) {
|
|
507
|
+
const oe = J[se].index ?? -1;
|
|
508
508
|
if (oe < 0) continue;
|
|
509
|
-
const ne = J[
|
|
510
|
-
|
|
509
|
+
const ne = J[se + 1]?.index, de = $.slice(oe, ne).trim().replace(/^[,\s]+|[,\s]+$/g, "");
|
|
510
|
+
de && q.test(de) && ae.push(de);
|
|
511
511
|
}
|
|
512
512
|
return ae;
|
|
513
513
|
}
|
|
514
|
-
function v(
|
|
515
|
-
return !
|
|
514
|
+
function v(U) {
|
|
515
|
+
return !U || U.length === 0 ? "" : U.filter(($) => $.trim()).map(($) => $.trim()).join(",");
|
|
516
516
|
}
|
|
517
|
-
const d = (
|
|
517
|
+
const d = (U) => a.disabled ? (ge.warning(c("s.message.disabled")), !1) : E.value && m.value.length >= a.limit ? (ge.warning(c("s.validate.upload.limit", { max: a.limit })), !1) : a.imageTypes.includes(U.type.toLocaleLowerCase()) ? U.size > a.limitSize * 1024 * 1024 ? (ge.error(c("s.validate.upload.limit", { max: a.limitSize })), !1) : !0 : (ge.error(c("s.validate.upload.image")), !1), p = async ({ file: U }) => {
|
|
518
518
|
if (!a.disabled)
|
|
519
519
|
try {
|
|
520
|
-
const { url: $ } = await a.api(
|
|
520
|
+
const { url: $ } = await a.api(U);
|
|
521
521
|
if (!$) throw new Error(c("s.message.uploadFail"));
|
|
522
522
|
if (E.value) {
|
|
523
523
|
const I = y.value ? A(y.value) : [];
|
|
524
|
-
$ &&
|
|
524
|
+
$ && q.test($) && (I.push($), y.value = v(I));
|
|
525
525
|
} else
|
|
526
526
|
y.value = $;
|
|
527
|
-
o("success",
|
|
527
|
+
o("success", U, $);
|
|
528
528
|
} catch ($) {
|
|
529
529
|
const I = $ instanceof Error ? $ : new Error(String($));
|
|
530
|
-
ge.error(I.message), o("error",
|
|
530
|
+
ge.error(I.message), o("error", U, I);
|
|
531
531
|
}
|
|
532
|
-
}, Z = (
|
|
533
|
-
|
|
534
|
-
},
|
|
535
|
-
if (!a.disabled && !(!
|
|
532
|
+
}, Z = (U, $ = 0) => {
|
|
533
|
+
U && (V.value = $, h.value = !0);
|
|
534
|
+
}, N = (U) => {
|
|
535
|
+
if (!a.disabled && !(!U || !y.value))
|
|
536
536
|
if (E.value) {
|
|
537
|
-
const $ = A(y.value), I = $.findIndex((J) => J ===
|
|
538
|
-
I !== -1 && ($.splice(I, 1), y.value = v($), o("delete",
|
|
537
|
+
const $ = A(y.value), I = $.findIndex((J) => J === U);
|
|
538
|
+
I !== -1 && ($.splice(I, 1), y.value = v($), o("delete", U));
|
|
539
539
|
} else
|
|
540
|
-
y.value = "", o("delete",
|
|
541
|
-
},
|
|
540
|
+
y.value = "", o("delete", U);
|
|
541
|
+
}, L = G();
|
|
542
542
|
return s({
|
|
543
543
|
clearFiles: () => {
|
|
544
|
-
|
|
544
|
+
L.value?.clearFiles?.(), y.value = "";
|
|
545
545
|
},
|
|
546
546
|
submit: () => {
|
|
547
|
-
|
|
547
|
+
L.value?.submit?.();
|
|
548
548
|
},
|
|
549
|
-
getUploadRef: () =>
|
|
550
|
-
getUrlList: () =>
|
|
551
|
-
}), (
|
|
552
|
-
E.value ? (r(), C("div",
|
|
553
|
-
(r(!0), C(X, null,
|
|
549
|
+
getUploadRef: () => L.value,
|
|
550
|
+
getUrlList: () => m.value
|
|
551
|
+
}), (U, $) => (r(), C("div", ba, [
|
|
552
|
+
E.value ? (r(), C("div", Ea, [
|
|
553
|
+
(r(!0), C(X, null, re(m.value, (I, J) => (r(), C("div", {
|
|
554
554
|
key: J,
|
|
555
555
|
class: "ez-image-upload__item",
|
|
556
|
-
style:
|
|
556
|
+
style: $e(a.style)
|
|
557
557
|
}, [
|
|
558
|
-
W(l(
|
|
558
|
+
W(l(Ge), {
|
|
559
559
|
src: I,
|
|
560
560
|
fit: a.fit
|
|
561
561
|
}, null, 8, ["src", "fit"]),
|
|
562
|
-
|
|
562
|
+
Q("div", {
|
|
563
563
|
class: "ez-image-upload__handler",
|
|
564
|
-
onClick: $[3] || ($[3] =
|
|
564
|
+
onClick: $[3] || ($[3] = Ne(() => {
|
|
565
565
|
}, ["stop"]))
|
|
566
566
|
}, [
|
|
567
|
-
W(l(
|
|
567
|
+
W(l(ve), {
|
|
568
568
|
size: 18,
|
|
569
569
|
onClick: (ae) => Z(I, J)
|
|
570
570
|
}, {
|
|
571
571
|
default: k(() => [
|
|
572
|
-
W(l(
|
|
572
|
+
W(l(Ze))
|
|
573
573
|
]),
|
|
574
574
|
_: 1
|
|
575
575
|
}, 8, ["onClick"]),
|
|
576
|
-
a.disabled ? O("", !0) : (r(), g(l(
|
|
576
|
+
a.disabled ? O("", !0) : (r(), g(l(ve), {
|
|
577
577
|
key: 0,
|
|
578
578
|
size: 18,
|
|
579
|
-
onClick: (ae) =>
|
|
579
|
+
onClick: (ae) => N(I)
|
|
580
580
|
}, {
|
|
581
581
|
default: k(() => [
|
|
582
|
-
W(l(
|
|
582
|
+
W(l(Ye))
|
|
583
583
|
]),
|
|
584
584
|
_: 1
|
|
585
585
|
}, 8, ["onClick"]))
|
|
586
586
|
])
|
|
587
587
|
], 4))), 128)),
|
|
588
|
-
(
|
|
588
|
+
(m.value.length < a.limit || m.value.length === 0) && !a.disabled ? (r(), g(l(He), S({ key: 0 }, l(i), {
|
|
589
589
|
ref_key: "uploadRef",
|
|
590
|
-
ref:
|
|
590
|
+
ref: L,
|
|
591
591
|
action: "",
|
|
592
592
|
accept: D.value,
|
|
593
593
|
multiple: a.multiple,
|
|
594
594
|
"show-file-list": !1,
|
|
595
595
|
"before-upload": d,
|
|
596
|
-
"http-request":
|
|
596
|
+
"http-request": p,
|
|
597
597
|
style: a.style,
|
|
598
598
|
disabled: a.disabled,
|
|
599
599
|
class: [{ "is-disabled": a.disabled }, "ez-image-upload__item ez-image-upload__button"]
|
|
600
600
|
}), {
|
|
601
601
|
default: k(() => [
|
|
602
|
-
|
|
603
|
-
W(l(
|
|
602
|
+
Q("div", Va, [
|
|
603
|
+
W(l(ve), null, {
|
|
604
604
|
default: k(() => [
|
|
605
|
-
W(l(
|
|
605
|
+
W(l(Xe))
|
|
606
606
|
]),
|
|
607
607
|
_: 1
|
|
608
608
|
})
|
|
@@ -610,70 +610,70 @@ const Qt = { key: 1 }, Xt = {
|
|
|
610
610
|
]),
|
|
611
611
|
_: 1
|
|
612
612
|
}, 16, ["accept", "multiple", "style", "disabled", "class"])) : O("", !0)
|
|
613
|
-
])) : (r(), g(l(
|
|
613
|
+
])) : (r(), g(l(He), S({ key: 0 }, l(i), {
|
|
614
614
|
ref_key: "uploadRef",
|
|
615
|
-
ref:
|
|
615
|
+
ref: L,
|
|
616
616
|
action: "",
|
|
617
617
|
accept: D.value,
|
|
618
618
|
multiple: a.multiple,
|
|
619
619
|
"show-file-list": !1,
|
|
620
620
|
"before-upload": d,
|
|
621
|
-
"http-request":
|
|
621
|
+
"http-request": p,
|
|
622
622
|
style: a.style,
|
|
623
623
|
disabled: a.disabled,
|
|
624
624
|
class: ["ez-image-upload__wrapper", { "is-disabled": a.disabled }]
|
|
625
625
|
}), {
|
|
626
626
|
default: k(() => [
|
|
627
|
-
y.value ? (r(), C("div",
|
|
628
|
-
W(l(
|
|
627
|
+
y.value ? (r(), C("div", ha, [
|
|
628
|
+
W(l(Ge), {
|
|
629
629
|
src: y.value,
|
|
630
630
|
fit: a.fit
|
|
631
631
|
}, null, 8, ["src", "fit"]),
|
|
632
|
-
|
|
632
|
+
Q("div", {
|
|
633
633
|
class: "ez-image-upload__handler",
|
|
634
|
-
onClick: $[2] || ($[2] =
|
|
634
|
+
onClick: $[2] || ($[2] = Ne(() => {
|
|
635
635
|
}, ["stop"]))
|
|
636
636
|
}, [
|
|
637
|
-
W(l(
|
|
637
|
+
W(l(ve), {
|
|
638
638
|
size: 18,
|
|
639
639
|
onClick: $[0] || ($[0] = (I) => Z(y.value, 0))
|
|
640
640
|
}, {
|
|
641
641
|
default: k(() => [
|
|
642
|
-
W(l(
|
|
642
|
+
W(l(Ze))
|
|
643
643
|
]),
|
|
644
644
|
_: 1
|
|
645
645
|
}),
|
|
646
|
-
a.disabled ? O("", !0) : (r(), g(l(
|
|
646
|
+
a.disabled ? O("", !0) : (r(), g(l(ve), {
|
|
647
647
|
key: 0,
|
|
648
648
|
size: 18,
|
|
649
|
-
onClick: $[1] || ($[1] = (I) =>
|
|
649
|
+
onClick: $[1] || ($[1] = (I) => N(y.value))
|
|
650
650
|
}, {
|
|
651
651
|
default: k(() => [
|
|
652
|
-
W(l(
|
|
652
|
+
W(l(Ye))
|
|
653
653
|
]),
|
|
654
654
|
_: 1
|
|
655
655
|
}))
|
|
656
656
|
])
|
|
657
|
-
])) : (r(), g(l(
|
|
657
|
+
])) : (r(), g(l(ve), { key: 1 }, {
|
|
658
658
|
default: k(() => [
|
|
659
|
-
W(l(
|
|
659
|
+
W(l(Xe))
|
|
660
660
|
]),
|
|
661
661
|
_: 1
|
|
662
662
|
}))
|
|
663
663
|
]),
|
|
664
664
|
_: 1
|
|
665
665
|
}, 16, ["accept", "multiple", "style", "disabled", "class"])),
|
|
666
|
-
h.value ? (r(), g(l(
|
|
666
|
+
h.value ? (r(), g(l(St), {
|
|
667
667
|
key: 2,
|
|
668
|
-
"url-list": E.value ?
|
|
668
|
+
"url-list": E.value ? m.value : [y.value],
|
|
669
669
|
"initial-index": V.value,
|
|
670
670
|
onClose: $[4] || ($[4] = (I) => h.value = !1)
|
|
671
671
|
}, null, 8, ["url-list", "initial-index"])) : O("", !0)
|
|
672
672
|
]));
|
|
673
673
|
}
|
|
674
|
-
}),
|
|
675
|
-
var
|
|
676
|
-
const
|
|
674
|
+
}), rt = te($a);
|
|
675
|
+
var F = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.TEXTAREA = "textarea", e.NUMBER = "number", e.PASSWORD = "password", e.SELECT = "select", e.RADIO = "radio", e.CHECKBOX = "checkbox", e.DATE = "date", e.DATETIME = "datetime", e.DATERANGE = "daterange", e.DATETIMERANGE = "datetimerange", e.TIME = "time", e.TIMERANGE = "timerange", e.UPLOAD_IMAGES = "upload-images", e.SWITCH = "switch", e.TREE_SELECT = "tree-select", e.CASCADER = "cascader", e.SLIDER = "slider", e.RATE = "rate", e))(F || {});
|
|
676
|
+
const Sa = /* @__PURE__ */ new Set([
|
|
677
677
|
"select",
|
|
678
678
|
"radio",
|
|
679
679
|
"checkbox",
|
|
@@ -687,7 +687,7 @@ const $a = /* @__PURE__ */ new Set([
|
|
|
687
687
|
"cascader",
|
|
688
688
|
"tree-select"
|
|
689
689
|
/* TREE_SELECT */
|
|
690
|
-
]),
|
|
690
|
+
]), ka = /* @__PURE__ */ new Set([
|
|
691
691
|
"select",
|
|
692
692
|
"radio",
|
|
693
693
|
"checkbox",
|
|
@@ -704,14 +704,14 @@ const $a = /* @__PURE__ */ new Set([
|
|
|
704
704
|
"rate"
|
|
705
705
|
/* RATE */
|
|
706
706
|
]);
|
|
707
|
-
function
|
|
708
|
-
return e &&
|
|
707
|
+
function za(e) {
|
|
708
|
+
return e && Sa.has(e) ? "选择" : "输入";
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
return e &&
|
|
710
|
+
function Ca(e) {
|
|
711
|
+
return e && ka.has(e) ? "change" : "blur";
|
|
712
712
|
}
|
|
713
|
-
const
|
|
714
|
-
...
|
|
713
|
+
const Aa = x({ name: "EzFormItem" }), st = /* @__PURE__ */ x({
|
|
714
|
+
...Aa,
|
|
715
715
|
props: /* @__PURE__ */ _({
|
|
716
716
|
config: {},
|
|
717
717
|
formData: { default: () => ({}) }
|
|
@@ -721,35 +721,35 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
721
721
|
}),
|
|
722
722
|
emits: ["update:modelValue"],
|
|
723
723
|
setup(e) {
|
|
724
|
-
const s = e, t = ee(e, "modelValue"), a =
|
|
724
|
+
const s = e, t = ee(e, "modelValue"), a = P(() => s.config?.itemAttrs && typeof s.config.itemAttrs == "object" ? s.config.itemAttrs : {}), i = P(() => s.config?.attrs && typeof s.config.attrs == "object" ? s.config.attrs : {}), o = P(() => {
|
|
725
725
|
const v = i.value, {
|
|
726
726
|
disabled: d,
|
|
727
|
-
modelValue:
|
|
727
|
+
modelValue: p,
|
|
728
728
|
"onUpdate:modelValue": Z,
|
|
729
|
-
...
|
|
729
|
+
...N
|
|
730
730
|
} = v;
|
|
731
|
-
return
|
|
732
|
-
}), c =
|
|
731
|
+
return N;
|
|
732
|
+
}), c = P(() => {
|
|
733
733
|
const v = i.value, {
|
|
734
734
|
api: d,
|
|
735
|
-
disabled:
|
|
735
|
+
disabled: p,
|
|
736
736
|
modelValue: Z,
|
|
737
|
-
"onUpdate:modelValue":
|
|
738
|
-
...
|
|
737
|
+
"onUpdate:modelValue": N,
|
|
738
|
+
...L
|
|
739
739
|
} = v;
|
|
740
|
-
return
|
|
741
|
-
}), h =
|
|
742
|
-
if (s.config?.type ===
|
|
740
|
+
return L;
|
|
741
|
+
}), h = P(() => {
|
|
742
|
+
if (s.config?.type === F.UPLOAD_IMAGES)
|
|
743
743
|
return typeof i.value.api == "function" ? i.value.api : (() => {
|
|
744
744
|
throw new Error('[EzFormItem] "upload-images" requires attrs.api to be a function: (file: File) => Promise<{ url: string }>.');
|
|
745
745
|
})();
|
|
746
|
-
}), V =
|
|
746
|
+
}), V = P(() => s.config?.options && Array.isArray(s.config.options) ? s.config.options : []), y = () => V.value, E = () => V.value, D = () => V.value, q = () => V.value, m = () => V.value, A = () => {
|
|
747
747
|
const { config: v } = s;
|
|
748
748
|
if (!v || typeof v != "object") return;
|
|
749
749
|
let d;
|
|
750
|
-
return v.rules ? d = v.rules : v.required && (d = [{ required: !0, message: v.requiredMessage || `请${
|
|
750
|
+
return v.rules ? d = v.rules : v.required && (d = [{ required: !0, message: v.requiredMessage || `请${za(v.type)}${v.label || ""}`, trigger: Ca(v.type) }]), d;
|
|
751
751
|
};
|
|
752
|
-
return (v, d) => e.config && e.config.prop ? (r(), g(l(
|
|
752
|
+
return (v, d) => e.config && e.config.prop ? (r(), g(l(kt), S({
|
|
753
753
|
key: 0,
|
|
754
754
|
prop: e.config.prop,
|
|
755
755
|
label: e.config.label,
|
|
@@ -761,141 +761,141 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
761
761
|
config: e.config,
|
|
762
762
|
value: t.value,
|
|
763
763
|
formData: e.formData
|
|
764
|
-
}) : e.config.component ? (r(), g(
|
|
764
|
+
}) : e.config.component ? (r(), g(xe(e.config.component), S({
|
|
765
765
|
key: 1,
|
|
766
766
|
modelValue: t.value,
|
|
767
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
767
|
+
"onUpdate:modelValue": d[0] || (d[0] = (p) => t.value = p),
|
|
768
768
|
disabled: e.config.disabled
|
|
769
769
|
}, o.value), null, 16, ["modelValue", "disabled"])) : (r(), C(X, { key: 2 }, [
|
|
770
|
-
e.config.type === l(
|
|
770
|
+
e.config.type === l(F).INPUT || !e.config.type ? (r(), g(l(Te), S({
|
|
771
771
|
key: 0,
|
|
772
772
|
modelValue: t.value,
|
|
773
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
773
|
+
"onUpdate:modelValue": d[1] || (d[1] = (p) => t.value = p),
|
|
774
774
|
placeholder: e.config.placeholder || `请输入${e.config.label || ""}`,
|
|
775
775
|
disabled: e.config.disabled,
|
|
776
776
|
clearable: ""
|
|
777
|
-
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(
|
|
777
|
+
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(F).TEXTAREA ? (r(), g(l(Te), S({
|
|
778
778
|
key: 1,
|
|
779
779
|
modelValue: t.value,
|
|
780
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
780
|
+
"onUpdate:modelValue": d[2] || (d[2] = (p) => t.value = p),
|
|
781
781
|
type: "textarea",
|
|
782
782
|
placeholder: e.config.placeholder || `请输入${e.config.label || ""}`,
|
|
783
783
|
disabled: e.config.disabled
|
|
784
|
-
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(
|
|
784
|
+
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(F).NUMBER ? (r(), g(l(zt), S({
|
|
785
785
|
key: 2,
|
|
786
786
|
modelValue: t.value,
|
|
787
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
787
|
+
"onUpdate:modelValue": d[3] || (d[3] = (p) => t.value = p),
|
|
788
788
|
placeholder: e.config.placeholder,
|
|
789
789
|
disabled: e.config.disabled
|
|
790
|
-
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(
|
|
790
|
+
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(F).PASSWORD ? (r(), g(l(Te), S({
|
|
791
791
|
key: 3,
|
|
792
792
|
modelValue: t.value,
|
|
793
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
793
|
+
"onUpdate:modelValue": d[4] || (d[4] = (p) => t.value = p),
|
|
794
794
|
type: "password",
|
|
795
795
|
placeholder: e.config.placeholder || `请输入${e.config.label || ""}`,
|
|
796
796
|
disabled: e.config.disabled,
|
|
797
797
|
"show-password": "",
|
|
798
798
|
clearable: ""
|
|
799
|
-
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(
|
|
799
|
+
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(F).SELECT ? (r(), g(l(ot), S({
|
|
800
800
|
key: 4,
|
|
801
801
|
modelValue: t.value,
|
|
802
|
-
"onUpdate:modelValue": d[5] || (d[5] = (
|
|
802
|
+
"onUpdate:modelValue": d[5] || (d[5] = (p) => t.value = p),
|
|
803
803
|
options: y(),
|
|
804
804
|
placeholder: e.config.placeholder || `请选择${e.config.label || ""}`,
|
|
805
805
|
disabled: e.config.disabled
|
|
806
|
-
}, o.value), null, 16, ["modelValue", "options", "placeholder", "disabled"])) : e.config.type === l(
|
|
806
|
+
}, o.value), null, 16, ["modelValue", "options", "placeholder", "disabled"])) : e.config.type === l(F).RADIO ? (r(), g(l(nt), S({
|
|
807
807
|
key: 5,
|
|
808
808
|
modelValue: t.value,
|
|
809
|
-
"onUpdate:modelValue": d[6] || (d[6] = (
|
|
809
|
+
"onUpdate:modelValue": d[6] || (d[6] = (p) => t.value = p),
|
|
810
810
|
options: E(),
|
|
811
811
|
disabled: e.config.disabled
|
|
812
|
-
}, o.value), null, 16, ["modelValue", "options", "disabled"])) : e.config.type === l(
|
|
812
|
+
}, o.value), null, 16, ["modelValue", "options", "disabled"])) : e.config.type === l(F).CHECKBOX ? (r(), g(l(lt), S({
|
|
813
813
|
key: 6,
|
|
814
814
|
modelValue: t.value,
|
|
815
|
-
"onUpdate:modelValue": d[7] || (d[7] = (
|
|
815
|
+
"onUpdate:modelValue": d[7] || (d[7] = (p) => t.value = p),
|
|
816
816
|
options: D(),
|
|
817
817
|
disabled: e.config.disabled
|
|
818
|
-
}, o.value), null, 16, ["modelValue", "options", "disabled"])) : e.config.type === l(
|
|
818
|
+
}, o.value), null, 16, ["modelValue", "options", "disabled"])) : e.config.type === l(F).DATE ? (r(), g(l(Ae), S({
|
|
819
819
|
key: 7,
|
|
820
820
|
modelValue: t.value,
|
|
821
|
-
"onUpdate:modelValue": d[8] || (d[8] = (
|
|
821
|
+
"onUpdate:modelValue": d[8] || (d[8] = (p) => t.value = p),
|
|
822
822
|
type: "date",
|
|
823
823
|
placeholder: e.config.placeholder || `请选择${e.config.label || ""}`,
|
|
824
824
|
disabled: e.config.disabled
|
|
825
|
-
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(
|
|
825
|
+
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(F).DATETIME ? (r(), g(l(Ae), S({
|
|
826
826
|
key: 8,
|
|
827
827
|
modelValue: t.value,
|
|
828
|
-
"onUpdate:modelValue": d[9] || (d[9] = (
|
|
828
|
+
"onUpdate:modelValue": d[9] || (d[9] = (p) => t.value = p),
|
|
829
829
|
type: "datetime",
|
|
830
830
|
placeholder: e.config.placeholder || `请选择${e.config.label || ""}`,
|
|
831
831
|
disabled: e.config.disabled
|
|
832
|
-
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(
|
|
832
|
+
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(F).DATERANGE ? (r(), g(l(Ae), S({
|
|
833
833
|
key: 9,
|
|
834
834
|
modelValue: t.value,
|
|
835
|
-
"onUpdate:modelValue": d[10] || (d[10] = (
|
|
835
|
+
"onUpdate:modelValue": d[10] || (d[10] = (p) => t.value = p),
|
|
836
836
|
type: "daterange",
|
|
837
837
|
"range-separator": "至",
|
|
838
838
|
"start-placeholder": "开始日期",
|
|
839
839
|
"end-placeholder": "结束日期",
|
|
840
840
|
disabled: e.config.disabled
|
|
841
|
-
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(
|
|
841
|
+
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(F).DATETIMERANGE ? (r(), g(l(Ae), S({
|
|
842
842
|
key: 10,
|
|
843
843
|
modelValue: t.value,
|
|
844
|
-
"onUpdate:modelValue": d[11] || (d[11] = (
|
|
844
|
+
"onUpdate:modelValue": d[11] || (d[11] = (p) => t.value = p),
|
|
845
845
|
type: "datetimerange",
|
|
846
846
|
"range-separator": "至",
|
|
847
847
|
"start-placeholder": "开始时间",
|
|
848
848
|
"end-placeholder": "结束时间",
|
|
849
849
|
disabled: e.config.disabled
|
|
850
|
-
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(
|
|
850
|
+
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(F).TIME ? (r(), g(l(Ke), S({
|
|
851
851
|
key: 11,
|
|
852
852
|
modelValue: t.value,
|
|
853
|
-
"onUpdate:modelValue": d[12] || (d[12] = (
|
|
853
|
+
"onUpdate:modelValue": d[12] || (d[12] = (p) => t.value = p),
|
|
854
854
|
placeholder: e.config.placeholder || `请选择${e.config.label || ""}`,
|
|
855
855
|
disabled: e.config.disabled
|
|
856
|
-
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(
|
|
856
|
+
}, o.value), null, 16, ["modelValue", "placeholder", "disabled"])) : e.config.type === l(F).TIMERANGE ? (r(), g(l(Ke), S({
|
|
857
857
|
key: 12,
|
|
858
858
|
modelValue: t.value,
|
|
859
|
-
"onUpdate:modelValue": d[13] || (d[13] = (
|
|
859
|
+
"onUpdate:modelValue": d[13] || (d[13] = (p) => t.value = p),
|
|
860
860
|
"is-range": "",
|
|
861
861
|
"range-separator": "至",
|
|
862
862
|
"start-placeholder": "开始时间",
|
|
863
863
|
"end-placeholder": "结束时间",
|
|
864
864
|
disabled: e.config.disabled
|
|
865
|
-
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(
|
|
865
|
+
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(F).SWITCH ? (r(), g(l(Ct), S({
|
|
866
866
|
key: 13,
|
|
867
867
|
modelValue: t.value,
|
|
868
|
-
"onUpdate:modelValue": d[14] || (d[14] = (
|
|
868
|
+
"onUpdate:modelValue": d[14] || (d[14] = (p) => t.value = p),
|
|
869
869
|
disabled: e.config.disabled
|
|
870
|
-
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(
|
|
870
|
+
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(F).TREE_SELECT ? (r(), g(l(At), S({
|
|
871
871
|
key: 14,
|
|
872
872
|
modelValue: t.value,
|
|
873
|
-
"onUpdate:modelValue": d[15] || (d[15] = (
|
|
874
|
-
data:
|
|
873
|
+
"onUpdate:modelValue": d[15] || (d[15] = (p) => t.value = p),
|
|
874
|
+
data: q(),
|
|
875
875
|
placeholder: e.config.placeholder || `请选择${e.config.label || ""}`,
|
|
876
876
|
disabled: e.config.disabled
|
|
877
|
-
}, o.value), null, 16, ["modelValue", "data", "placeholder", "disabled"])) : e.config.type === l(
|
|
877
|
+
}, o.value), null, 16, ["modelValue", "data", "placeholder", "disabled"])) : e.config.type === l(F).CASCADER ? (r(), g(l(Dt), S({
|
|
878
878
|
key: 15,
|
|
879
879
|
modelValue: t.value,
|
|
880
|
-
"onUpdate:modelValue": d[16] || (d[16] = (
|
|
881
|
-
options:
|
|
880
|
+
"onUpdate:modelValue": d[16] || (d[16] = (p) => t.value = p),
|
|
881
|
+
options: m(),
|
|
882
882
|
placeholder: e.config.placeholder || `请选择${e.config.label || ""}`,
|
|
883
883
|
disabled: e.config.disabled,
|
|
884
884
|
clearable: ""
|
|
885
|
-
}, o.value), null, 16, ["modelValue", "options", "placeholder", "disabled"])) : e.config.type === l(
|
|
885
|
+
}, o.value), null, 16, ["modelValue", "options", "placeholder", "disabled"])) : e.config.type === l(F).SLIDER ? (r(), g(l(xt), S({
|
|
886
886
|
key: 16,
|
|
887
887
|
modelValue: t.value,
|
|
888
|
-
"onUpdate:modelValue": d[17] || (d[17] = (
|
|
888
|
+
"onUpdate:modelValue": d[17] || (d[17] = (p) => t.value = p),
|
|
889
889
|
disabled: e.config.disabled
|
|
890
|
-
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(
|
|
890
|
+
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(F).RATE ? (r(), g(l(Pt), S({
|
|
891
891
|
key: 17,
|
|
892
892
|
modelValue: t.value,
|
|
893
|
-
"onUpdate:modelValue": d[18] || (d[18] = (
|
|
893
|
+
"onUpdate:modelValue": d[18] || (d[18] = (p) => t.value = p),
|
|
894
894
|
disabled: e.config.disabled
|
|
895
|
-
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(
|
|
895
|
+
}, o.value), null, 16, ["modelValue", "disabled"])) : e.config.type === l(F).UPLOAD_IMAGES ? (r(), g(l(rt), S({
|
|
896
896
|
key: 18,
|
|
897
897
|
modelValue: t.value,
|
|
898
|
-
"onUpdate:modelValue": d[19] || (d[19] = (
|
|
898
|
+
"onUpdate:modelValue": d[19] || (d[19] = (p) => t.value = p),
|
|
899
899
|
api: h.value,
|
|
900
900
|
disabled: e.config.disabled
|
|
901
901
|
}, c.value), null, 16, ["modelValue", "api", "disabled"])) : O("", !0)
|
|
@@ -912,14 +912,14 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
912
912
|
} : void 0
|
|
913
913
|
]), 1040, ["prop", "label", "rules"])) : O("", !0);
|
|
914
914
|
}
|
|
915
|
-
}),
|
|
915
|
+
}), Da = {
|
|
916
916
|
key: 0,
|
|
917
917
|
class: "ez-dynamic-form-group__title"
|
|
918
|
-
},
|
|
918
|
+
}, xa = {
|
|
919
919
|
key: 1,
|
|
920
920
|
class: "ez-dynamic-form-group__description"
|
|
921
|
-
},
|
|
922
|
-
...
|
|
921
|
+
}, Pa = x({ name: "EzDynamicForm", inheritAttrs: !1 }), Ua = /* @__PURE__ */ x({
|
|
922
|
+
...Pa,
|
|
923
923
|
props: /* @__PURE__ */ _({
|
|
924
924
|
items: { default: () => [] },
|
|
925
925
|
groups: { default: () => [] },
|
|
@@ -945,7 +945,7 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
945
945
|
}),
|
|
946
946
|
emits: ["update:modelValue"],
|
|
947
947
|
setup(e, { expose: s }) {
|
|
948
|
-
const t = e, a =
|
|
948
|
+
const t = e, a = mt(), i = ee(e, "modelValue"), o = Me(), c = Me({}), h = (u) => Object.prototype.toString.call(u) === "[object Object]", V = (u) => {
|
|
949
949
|
const b = /* @__PURE__ */ new WeakMap(), n = (w) => {
|
|
950
950
|
if (w instanceof Date)
|
|
951
951
|
return new Date(w.getTime());
|
|
@@ -953,19 +953,19 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
953
953
|
const T = w;
|
|
954
954
|
if (b.has(T))
|
|
955
955
|
return b.get(T);
|
|
956
|
-
const
|
|
957
|
-
return b.set(T,
|
|
958
|
-
|
|
959
|
-
}),
|
|
956
|
+
const Y = [];
|
|
957
|
+
return b.set(T, Y), T.forEach((me, pe) => {
|
|
958
|
+
Y[pe] = n(me);
|
|
959
|
+
}), Y;
|
|
960
960
|
}
|
|
961
961
|
if (h(w)) {
|
|
962
962
|
const T = w;
|
|
963
963
|
if (b.has(T))
|
|
964
964
|
return b.get(T);
|
|
965
|
-
const
|
|
966
|
-
return b.set(T,
|
|
967
|
-
|
|
968
|
-
}),
|
|
965
|
+
const Y = {};
|
|
966
|
+
return b.set(T, Y), Object.entries(T).forEach(([me, pe]) => {
|
|
967
|
+
Y[me] = n(pe);
|
|
968
|
+
}), Y;
|
|
969
969
|
}
|
|
970
970
|
return w;
|
|
971
971
|
};
|
|
@@ -976,41 +976,41 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
976
976
|
E(), i.value && A.value.forEach((u) => {
|
|
977
977
|
u.prop in i.value || (i.value[u.prop] = u.defaultValue !== void 0 ? u.defaultValue : void 0);
|
|
978
978
|
});
|
|
979
|
-
},
|
|
980
|
-
const { items: u, groups: b, cols: n, gutter: w, modelValue: T, ...
|
|
981
|
-
return
|
|
982
|
-
}),
|
|
979
|
+
}, q = P(() => {
|
|
980
|
+
const { items: u, groups: b, cols: n, gutter: w, modelValue: T, ...Y } = t;
|
|
981
|
+
return Y;
|
|
982
|
+
}), m = P(() => Math.floor(24 / t.cols)), A = P(() => t.groups?.length ? t.groups.flatMap((u) => u.items || []) : t.items || []), v = P(() => Array.isArray(t.groups) && t.groups.length > 0), d = () => {
|
|
983
983
|
const u = (t.items?.length || 0) > 0, b = (t.groups?.length || 0) > 0;
|
|
984
984
|
if (u && b)
|
|
985
985
|
throw new Error('[EzDynamicForm] "items" and "groups" cannot be used at the same time. Choose exactly one configuration mode.');
|
|
986
|
-
},
|
|
986
|
+
}, p = (u) => {
|
|
987
987
|
const b = {};
|
|
988
988
|
return A.value.forEach((n) => {
|
|
989
989
|
Object.prototype.hasOwnProperty.call(u, n.prop) && (b[n.prop] = V(u[n.prop]));
|
|
990
990
|
}), b;
|
|
991
991
|
}, Z = (u, b, n) => {
|
|
992
992
|
console.error(`[EzDynamicForm] ${u} error for field "${b.prop}":`, n);
|
|
993
|
-
},
|
|
993
|
+
}, N = (u, b) => ({
|
|
994
994
|
item: V(u),
|
|
995
995
|
formData: V(b)
|
|
996
|
-
}),
|
|
996
|
+
}), L = (u) => {
|
|
997
997
|
const b = V(u);
|
|
998
998
|
return A.value.forEach((n) => {
|
|
999
999
|
if (n.deserialize)
|
|
1000
1000
|
try {
|
|
1001
|
-
const w =
|
|
1001
|
+
const w = N(n, b);
|
|
1002
1002
|
b[n.prop] = n.deserialize(b[n.prop], w.formData, w.item);
|
|
1003
1003
|
} catch (w) {
|
|
1004
1004
|
Z("deserialize", n, w);
|
|
1005
1005
|
}
|
|
1006
1006
|
}), b;
|
|
1007
|
-
},
|
|
1007
|
+
}, B = (u) => {
|
|
1008
1008
|
const b = V(u);
|
|
1009
1009
|
return A.value.forEach((n) => {
|
|
1010
1010
|
if (!n.serialize) return;
|
|
1011
1011
|
let w;
|
|
1012
1012
|
try {
|
|
1013
|
-
const T =
|
|
1013
|
+
const T = N(n, b);
|
|
1014
1014
|
w = n.serialize(b[n.prop], T.formData, T.item);
|
|
1015
1015
|
} catch (T) {
|
|
1016
1016
|
Z("serialize", n, T);
|
|
@@ -1025,39 +1025,39 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1025
1025
|
}
|
|
1026
1026
|
}), b;
|
|
1027
1027
|
};
|
|
1028
|
-
ye(() => [t.items, t.groups], d, { deep: !0, immediate: !0 }), ye(() => [t.items, t.groups], D, { deep: !0, immediate: !0 }), ye(i, D, { immediate: !0 }),
|
|
1029
|
-
D(),
|
|
1028
|
+
ye(() => [t.items, t.groups], d, { deep: !0, immediate: !0 }), ye(() => [t.items, t.groups], D, { deep: !0, immediate: !0 }), ye(i, D, { immediate: !0 }), Oe(() => {
|
|
1029
|
+
D(), ce();
|
|
1030
1030
|
});
|
|
1031
|
-
const
|
|
1031
|
+
const le = (u, b, n) => {
|
|
1032
1032
|
if (!u) return !0;
|
|
1033
1033
|
try {
|
|
1034
1034
|
return u(i.value);
|
|
1035
1035
|
} catch (w) {
|
|
1036
1036
|
return console.error(`[EzDynamicForm] ${b} visibility error for "${n}":`, w), !1;
|
|
1037
1037
|
}
|
|
1038
|
-
},
|
|
1038
|
+
}, U = P(() => {
|
|
1039
1039
|
const u = v.value ? t.groups : [{ items: t.items || [], cols: t.cols, gutter: t.gutter }], b = [];
|
|
1040
1040
|
return u.forEach((n, w) => {
|
|
1041
1041
|
if (!n || n.hidden) return;
|
|
1042
1042
|
const T = n.name || `group-${w}`;
|
|
1043
|
-
if (!
|
|
1044
|
-
const
|
|
1043
|
+
if (!le(n.show, "group", T)) return;
|
|
1044
|
+
const Y = (n.items || []).filter((f) => f.hidden ? !1 : le(f.show, "item", f.prop)), me = Math.max(1, n.cols || t.cols), pe = n.gutter ?? t.gutter, Pe = n.headerSlot || (n.name ? `group-header-${n.name}` : void 0), Ue = n.slot || (n.name ? `group-${n.name}` : void 0);
|
|
1045
1045
|
b.push({
|
|
1046
1046
|
key: `${T}-${w}`,
|
|
1047
1047
|
index: w,
|
|
1048
1048
|
group: n,
|
|
1049
|
-
items:
|
|
1050
|
-
cols:
|
|
1051
|
-
gutter:
|
|
1052
|
-
headerSlotName:
|
|
1053
|
-
bodySlotName:
|
|
1049
|
+
items: Y,
|
|
1050
|
+
cols: me,
|
|
1051
|
+
gutter: pe,
|
|
1052
|
+
headerSlotName: Pe,
|
|
1053
|
+
bodySlotName: Ue
|
|
1054
1054
|
});
|
|
1055
1055
|
}), b;
|
|
1056
1056
|
}), $ = (u, b) => {
|
|
1057
1057
|
if (u.span !== void 0)
|
|
1058
1058
|
return Math.max(1, Math.min(24, u.span));
|
|
1059
1059
|
const n = Math.max(1, b);
|
|
1060
|
-
return Math.max(1, Math.floor(24 / n)) ||
|
|
1060
|
+
return Math.max(1, Math.floor(24 / n)) || m.value;
|
|
1061
1061
|
}, I = (u) => v.value ? u.group.title || u.group.description || u.headerSlotName && a[u.headerSlotName] ? !0 : !!a["group-header"] : !1, J = (u) => {
|
|
1062
1062
|
let b = u.disabled || t.disabled;
|
|
1063
1063
|
if (!b && u.disabledWhen)
|
|
@@ -1075,7 +1075,7 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1075
1075
|
} catch {
|
|
1076
1076
|
return !1;
|
|
1077
1077
|
}
|
|
1078
|
-
},
|
|
1078
|
+
}, se = async (u) => {
|
|
1079
1079
|
if (!o.value)
|
|
1080
1080
|
return console.warn("[EzDynamicForm] Form ref is not available"), !1;
|
|
1081
1081
|
try {
|
|
@@ -1089,50 +1089,50 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1089
1089
|
return;
|
|
1090
1090
|
}
|
|
1091
1091
|
o.value.clearValidate(u);
|
|
1092
|
-
}, ne = () => V(i.value),
|
|
1092
|
+
}, ne = () => V(i.value), de = () => B(ne()), ce = () => {
|
|
1093
1093
|
c.value = ne();
|
|
1094
|
-
},
|
|
1094
|
+
}, fe = (u, b = !0) => {
|
|
1095
1095
|
if (!u) return;
|
|
1096
1096
|
E();
|
|
1097
1097
|
const n = V(u);
|
|
1098
|
-
b ? Object.assign(i.value, n) : i.value = n, D(),
|
|
1098
|
+
b ? Object.assign(i.value, n) : i.value = n, D(), Re(() => {
|
|
1099
1099
|
o.value?.clearValidate();
|
|
1100
1100
|
});
|
|
1101
1101
|
};
|
|
1102
1102
|
return s({
|
|
1103
1103
|
validate: ae,
|
|
1104
|
-
validateField:
|
|
1104
|
+
validateField: se,
|
|
1105
1105
|
clearValidate: oe,
|
|
1106
1106
|
getFormData: ne,
|
|
1107
|
-
getSubmitData:
|
|
1108
|
-
setFormData:
|
|
1107
|
+
getSubmitData: de,
|
|
1108
|
+
setFormData: fe,
|
|
1109
1109
|
setSubmitData: (u, b = !0) => {
|
|
1110
|
-
u &&
|
|
1110
|
+
u && fe(p(L(u)), b);
|
|
1111
1111
|
},
|
|
1112
1112
|
resetForm: () => {
|
|
1113
|
-
i.value = V(c.value), D(),
|
|
1113
|
+
i.value = V(c.value), D(), Re(() => {
|
|
1114
1114
|
o.value?.clearValidate();
|
|
1115
1115
|
});
|
|
1116
1116
|
},
|
|
1117
|
-
captureInitialData:
|
|
1117
|
+
captureInitialData: ce,
|
|
1118
1118
|
formRef: o
|
|
1119
|
-
}), (u, b) => (r(), g(l(
|
|
1119
|
+
}), (u, b) => (r(), g(l(Ut), S({
|
|
1120
1120
|
ref_key: "formRef",
|
|
1121
1121
|
ref: o,
|
|
1122
1122
|
class: "ez-dynamic-form",
|
|
1123
1123
|
"label-width": t.labelWidth ?? "auto"
|
|
1124
|
-
},
|
|
1124
|
+
}, q.value, { model: i.value }), {
|
|
1125
1125
|
default: k(() => [
|
|
1126
|
-
(r(!0), C(X, null,
|
|
1126
|
+
(r(!0), C(X, null, re(U.value, (n) => (r(), g(xe(v.value ? "section" : "div"), {
|
|
1127
1127
|
key: n.key,
|
|
1128
|
-
class:
|
|
1129
|
-
style:
|
|
1128
|
+
class: De(v.value ? ["ez-dynamic-form-group", n.group.className] : void 0),
|
|
1129
|
+
style: $e(v.value ? n.group.style : void 0)
|
|
1130
1130
|
}, {
|
|
1131
1131
|
default: k(() => [
|
|
1132
1132
|
I(n) ? (r(), C("div", {
|
|
1133
1133
|
key: 0,
|
|
1134
|
-
class:
|
|
1135
|
-
style:
|
|
1134
|
+
class: De(["ez-dynamic-form-group__header", n.group.headerClassName]),
|
|
1135
|
+
style: $e(n.group.headerStyle)
|
|
1136
1136
|
}, [
|
|
1137
1137
|
n.headerSlotName && u.$slots[n.headerSlotName] ? R(u.$slots, n.headerSlotName, {
|
|
1138
1138
|
key: 0,
|
|
@@ -1147,8 +1147,8 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1147
1147
|
items: n.items,
|
|
1148
1148
|
formData: i.value
|
|
1149
1149
|
}) : (r(), C(X, { key: 2 }, [
|
|
1150
|
-
n.group.title ? (r(), C("div",
|
|
1151
|
-
n.group.description ? (r(), C("div",
|
|
1150
|
+
n.group.title ? (r(), C("div", Da, ue(n.group.title), 1)) : O("", !0),
|
|
1151
|
+
n.group.description ? (r(), C("div", xa, ue(n.group.description), 1)) : O("", !0)
|
|
1152
1152
|
], 64))
|
|
1153
1153
|
], 6)) : O("", !0),
|
|
1154
1154
|
v.value && n.bodySlotName && u.$slots[n.bodySlotName] ? R(u.$slots, n.bodySlotName, {
|
|
@@ -1163,19 +1163,19 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1163
1163
|
index: n.index,
|
|
1164
1164
|
items: n.items,
|
|
1165
1165
|
formData: i.value
|
|
1166
|
-
}) : (r(), g(l(
|
|
1166
|
+
}) : (r(), g(l(Tt), {
|
|
1167
1167
|
key: 3,
|
|
1168
1168
|
gutter: n.gutter,
|
|
1169
|
-
class:
|
|
1170
|
-
style:
|
|
1169
|
+
class: De(v.value ? ["ez-dynamic-form-group__body", n.group.bodyClassName] : void 0),
|
|
1170
|
+
style: $e(v.value ? n.group.bodyStyle : void 0)
|
|
1171
1171
|
}, {
|
|
1172
1172
|
default: k(() => [
|
|
1173
|
-
(r(!0), C(X, null,
|
|
1173
|
+
(r(!0), C(X, null, re(n.items, (w) => (r(), g(l(Mt), {
|
|
1174
1174
|
key: `${n.key}-${w.prop}`,
|
|
1175
1175
|
span: $(w, n.cols)
|
|
1176
1176
|
}, {
|
|
1177
1177
|
default: k(() => [
|
|
1178
|
-
W(
|
|
1178
|
+
W(st, {
|
|
1179
1179
|
modelValue: i.value[w.prop],
|
|
1180
1180
|
"onUpdate:modelValue": (T) => i.value[w.prop] = T,
|
|
1181
1181
|
config: J(w),
|
|
@@ -1190,10 +1190,10 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1190
1190
|
} : void 0,
|
|
1191
1191
|
u.$slots[w.prop] ? {
|
|
1192
1192
|
name: "default",
|
|
1193
|
-
fn: k(({ config: T, value:
|
|
1193
|
+
fn: k(({ config: T, value: Y }) => [
|
|
1194
1194
|
R(u.$slots, w.prop, {
|
|
1195
1195
|
item: T,
|
|
1196
|
-
value:
|
|
1196
|
+
value: Y,
|
|
1197
1197
|
formData: i.value
|
|
1198
1198
|
})
|
|
1199
1199
|
]),
|
|
@@ -1213,8 +1213,8 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1213
1213
|
_: 3
|
|
1214
1214
|
}, 16, ["label-width", "model"]));
|
|
1215
1215
|
}
|
|
1216
|
-
}),
|
|
1217
|
-
...
|
|
1216
|
+
}), Ta = te(Ua), Ma = te(st), Ra = x({ name: "EzTable", inheritAttrs: !1 }), it = /* @__PURE__ */ x({
|
|
1217
|
+
...Ra,
|
|
1218
1218
|
props: {
|
|
1219
1219
|
data: { default: () => [] },
|
|
1220
1220
|
columns: { default: () => [] },
|
|
@@ -1222,71 +1222,71 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1222
1222
|
rowKey: { type: [String, Function], default: "id" }
|
|
1223
1223
|
},
|
|
1224
1224
|
setup(e, { expose: s }) {
|
|
1225
|
-
const t = e, a = G(), i = /* @__PURE__ */ new Set(["hidden", "emptyValue", "sortMode", "sortField"]), o = (
|
|
1226
|
-
const
|
|
1225
|
+
const t = e, a = G(), i = /* @__PURE__ */ new Set(["hidden", "emptyValue", "sortMode", "sortField"]), o = (m) => m === !0, c = (m) => m == null || m === "", h = () => t.columns.filter((m) => ["selection", "index", "expand"].includes(m.type || "") ? !1 : !o(m.hidden)), V = P(() => {
|
|
1226
|
+
const m = h(), A = m[m.length - 1];
|
|
1227
1227
|
return A?.columnKey || A?.prop || null;
|
|
1228
|
-
}), y = (
|
|
1229
|
-
const A =
|
|
1228
|
+
}), y = (m) => m.type ? !1 : (m.columnKey || m.prop) !== V.value, E = (m) => {
|
|
1229
|
+
const A = m.formatter, v = m.emptyValue !== void 0;
|
|
1230
1230
|
if (!(!A && !v))
|
|
1231
|
-
return (d,
|
|
1232
|
-
const
|
|
1233
|
-
return v && c(
|
|
1231
|
+
return (d, p, Z, N) => {
|
|
1232
|
+
const L = A ? A(d, p, Z, N) : Z;
|
|
1233
|
+
return v && c(L) ? m.emptyValue : L;
|
|
1234
1234
|
};
|
|
1235
|
-
}, D = (
|
|
1235
|
+
}, D = (m) => {
|
|
1236
1236
|
const v = {
|
|
1237
1237
|
...{
|
|
1238
1238
|
align: "center",
|
|
1239
1239
|
resizable: !0,
|
|
1240
|
-
reserveSelection:
|
|
1241
|
-
showOverflowTooltip: y(
|
|
1240
|
+
reserveSelection: m.type === "selection",
|
|
1241
|
+
showOverflowTooltip: y(m)
|
|
1242
1242
|
},
|
|
1243
|
-
...
|
|
1244
|
-
formatter: E(
|
|
1243
|
+
...m,
|
|
1244
|
+
formatter: E(m)
|
|
1245
1245
|
}, d = Object.fromEntries(
|
|
1246
|
-
Object.entries(v).filter(([
|
|
1246
|
+
Object.entries(v).filter(([p]) => !i.has(p))
|
|
1247
1247
|
);
|
|
1248
|
-
return
|
|
1248
|
+
return m.sortMode === "remote" && (d.sortable = "custom"), d;
|
|
1249
1249
|
};
|
|
1250
1250
|
return s({
|
|
1251
1251
|
getTableRef: () => a.value,
|
|
1252
1252
|
clearSelection: () => a.value?.clearSelection(),
|
|
1253
|
-
toggleRowSelection: (
|
|
1253
|
+
toggleRowSelection: (m, A) => a.value?.toggleRowSelection(m, A),
|
|
1254
1254
|
toggleAllSelection: () => a.value?.toggleAllSelection(),
|
|
1255
|
-
toggleRowExpansion: (
|
|
1256
|
-
setCurrentRow: (
|
|
1255
|
+
toggleRowExpansion: (m, A) => a.value?.toggleRowExpansion(m, A),
|
|
1256
|
+
setCurrentRow: (m) => a.value?.setCurrentRow(m),
|
|
1257
1257
|
clearSort: () => a.value?.clearSort(),
|
|
1258
|
-
clearFilter: (
|
|
1258
|
+
clearFilter: (m) => a.value?.clearFilter(m),
|
|
1259
1259
|
doLayout: () => a.value?.doLayout(),
|
|
1260
|
-
sort: (
|
|
1261
|
-
}), (
|
|
1260
|
+
sort: (m, A) => a.value?.sort(m, A)
|
|
1261
|
+
}), (m, A) => (r(), g(l(Rt), S({
|
|
1262
1262
|
ref_key: "tableRef",
|
|
1263
1263
|
ref: a,
|
|
1264
1264
|
data: t.data,
|
|
1265
1265
|
border: t.border,
|
|
1266
1266
|
"row-key": t.rowKey
|
|
1267
|
-
},
|
|
1267
|
+
}, m.$attrs), Se({
|
|
1268
1268
|
default: k(() => [
|
|
1269
|
-
(r(!0), C(X, null,
|
|
1269
|
+
(r(!0), C(X, null, re(t.columns, (v, d) => (r(), C(X, {
|
|
1270
1270
|
key: v.columnKey || v.prop || `${v.type || "column"}-${d}`
|
|
1271
1271
|
}, [
|
|
1272
|
-
["selection", "index"].includes(v.type) ? (r(), g(l(
|
|
1272
|
+
["selection", "index"].includes(v.type) ? (r(), g(l(je), S({
|
|
1273
1273
|
key: 0,
|
|
1274
1274
|
ref_for: !0
|
|
1275
|
-
}, D(v)), null, 16)) : o(v.hidden) ? O("", !0) : (r(), g(l(
|
|
1275
|
+
}, D(v)), null, 16)) : o(v.hidden) ? O("", !0) : (r(), g(l(je), S({
|
|
1276
1276
|
key: 1,
|
|
1277
1277
|
ref_for: !0
|
|
1278
1278
|
}, D(v)), Se({ _: 2 }, [
|
|
1279
|
-
|
|
1279
|
+
m.$slots[v.prop] ? {
|
|
1280
1280
|
name: "default",
|
|
1281
|
-
fn: k((
|
|
1282
|
-
R(
|
|
1281
|
+
fn: k((p) => [
|
|
1282
|
+
R(m.$slots, v.prop, S({ ref_for: !0 }, p))
|
|
1283
1283
|
]),
|
|
1284
1284
|
key: "0"
|
|
1285
1285
|
} : void 0,
|
|
1286
|
-
|
|
1286
|
+
m.$slots[`header-${v.prop}`] ? {
|
|
1287
1287
|
name: "header",
|
|
1288
|
-
fn: k((
|
|
1289
|
-
R(
|
|
1288
|
+
fn: k((p) => [
|
|
1289
|
+
R(m.$slots, `header-${v.prop}`, S({ ref_for: !0 }, p))
|
|
1290
1290
|
]),
|
|
1291
1291
|
key: "1"
|
|
1292
1292
|
} : void 0
|
|
@@ -1295,24 +1295,24 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1295
1295
|
]),
|
|
1296
1296
|
_: 2
|
|
1297
1297
|
}, [
|
|
1298
|
-
|
|
1298
|
+
m.$slots?.append ? {
|
|
1299
1299
|
name: "append",
|
|
1300
1300
|
fn: k(() => [
|
|
1301
|
-
R(
|
|
1301
|
+
R(m.$slots, "append")
|
|
1302
1302
|
]),
|
|
1303
1303
|
key: "0"
|
|
1304
1304
|
} : void 0,
|
|
1305
|
-
|
|
1305
|
+
m.$slots?.empty ? {
|
|
1306
1306
|
name: "empty",
|
|
1307
1307
|
fn: k(() => [
|
|
1308
|
-
R(
|
|
1308
|
+
R(m.$slots, "empty")
|
|
1309
1309
|
]),
|
|
1310
1310
|
key: "1"
|
|
1311
1311
|
} : void 0
|
|
1312
1312
|
]), 1040, ["data", "border", "row-key"]));
|
|
1313
1313
|
}
|
|
1314
|
-
}),
|
|
1315
|
-
...
|
|
1314
|
+
}), Ia = { class: "ez-query-panel" }, Oa = { class: "ez-query-panel__operate" }, Ba = x({ name: "EzQueryPanel", inheritAttrs: !1 }), Fa = /* @__PURE__ */ x({
|
|
1315
|
+
...Ba,
|
|
1316
1316
|
props: /* @__PURE__ */ _({
|
|
1317
1317
|
expanded: { type: Boolean },
|
|
1318
1318
|
collapsedHeight: { default: 50 }
|
|
@@ -1322,34 +1322,34 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1322
1322
|
}),
|
|
1323
1323
|
emits: ["update:expanded"],
|
|
1324
1324
|
setup(e, { expose: s }) {
|
|
1325
|
-
const t = e, { t: a } = ke(), i = G(), o = G(), c = G(0), h = ee(e, "expanded"), V =
|
|
1325
|
+
const t = e, { t: a } = ke(), i = G(), o = G(), c = G(0), h = ee(e, "expanded"), V = P(() => c.value > t.collapsedHeight), y = P(() => h.value ? fa : da), E = P(() => h.value ? a("s.button.collapse") : a("s.button.expand"));
|
|
1326
1326
|
let D = null;
|
|
1327
|
-
const
|
|
1327
|
+
const q = Qt(() => {
|
|
1328
1328
|
i.value && (c.value = i.value.scrollHeight);
|
|
1329
|
-
}, 100),
|
|
1329
|
+
}, 100), m = () => {
|
|
1330
1330
|
h.value = !h.value;
|
|
1331
1331
|
};
|
|
1332
|
-
return
|
|
1332
|
+
return Oe(() => {
|
|
1333
1333
|
setTimeout(() => {
|
|
1334
|
-
i.value && (
|
|
1334
|
+
i.value && (q(), D = new ResizeObserver(q), D.observe(i.value));
|
|
1335
1335
|
}, 50);
|
|
1336
|
-
}),
|
|
1336
|
+
}), pt(() => {
|
|
1337
1337
|
D && (D.disconnect(), D = null);
|
|
1338
1338
|
}), s({
|
|
1339
|
-
countViewHeight:
|
|
1340
|
-
}), (A, v) => (r(), C("div",
|
|
1341
|
-
|
|
1339
|
+
countViewHeight: q
|
|
1340
|
+
}), (A, v) => (r(), C("div", Ia, [
|
|
1341
|
+
Q("div", {
|
|
1342
1342
|
class: "ez-query-panel__wrapper",
|
|
1343
|
-
style:
|
|
1343
|
+
style: $e({
|
|
1344
1344
|
height: c.value ? h.value ? `${c.value}px` : `${t.collapsedHeight}px` : "auto"
|
|
1345
1345
|
})
|
|
1346
1346
|
}, [
|
|
1347
|
-
|
|
1347
|
+
Q("div", {
|
|
1348
1348
|
ref_key: "layoutRef",
|
|
1349
1349
|
ref: i,
|
|
1350
1350
|
class: "ez-query-panel__layout"
|
|
1351
1351
|
}, [
|
|
1352
|
-
|
|
1352
|
+
Q("div", Oa, [
|
|
1353
1353
|
R(A.$slots, "operate"),
|
|
1354
1354
|
V.value ? (r(), g(l(be), {
|
|
1355
1355
|
key: 0,
|
|
@@ -1357,10 +1357,10 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1357
1357
|
size: "small",
|
|
1358
1358
|
title: E.value,
|
|
1359
1359
|
circle: "",
|
|
1360
|
-
onClick: v[0] || (v[0] = (d) =>
|
|
1360
|
+
onClick: v[0] || (v[0] = (d) => m())
|
|
1361
1361
|
}, null, 8, ["icon", "title"])) : O("", !0)
|
|
1362
1362
|
]),
|
|
1363
|
-
|
|
1363
|
+
Q("div", {
|
|
1364
1364
|
ref_key: "wrapRef",
|
|
1365
1365
|
ref: o,
|
|
1366
1366
|
class: "ez-query-panel__content"
|
|
@@ -1371,8 +1371,8 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1371
1371
|
], 4)
|
|
1372
1372
|
]));
|
|
1373
1373
|
}
|
|
1374
|
-
}),
|
|
1375
|
-
...
|
|
1374
|
+
}), ut = te(Fa), Na = x({ name: "EzPagination", inheritAttrs: !1 }), La = /* @__PURE__ */ x({
|
|
1375
|
+
...Na,
|
|
1376
1376
|
props: /* @__PURE__ */ _({
|
|
1377
1377
|
currentPage: {},
|
|
1378
1378
|
pageSize: {},
|
|
@@ -1402,7 +1402,7 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1402
1402
|
"background",
|
|
1403
1403
|
"disabled"
|
|
1404
1404
|
]);
|
|
1405
|
-
return (y, E) => (r(), g(l(
|
|
1405
|
+
return (y, E) => (r(), g(l(It), S({
|
|
1406
1406
|
"current-page": a.value,
|
|
1407
1407
|
"onUpdate:currentPage": E[0] || (E[0] = (D) => a.value = D),
|
|
1408
1408
|
"page-size": i.value,
|
|
@@ -1416,10 +1416,10 @@ const za = x({ name: "EzFormItem" }), nt = /* @__PURE__ */ x({
|
|
|
1416
1416
|
onSizeChange: h
|
|
1417
1417
|
}, l(V)), null, 16, ["current-page", "page-size", "total", "page-sizes", "layout", "background", "disabled"]));
|
|
1418
1418
|
}
|
|
1419
|
-
}),
|
|
1420
|
-
var
|
|
1421
|
-
const
|
|
1422
|
-
const s =
|
|
1419
|
+
}), dt = te(La);
|
|
1420
|
+
var Ie = /* @__PURE__ */ ((e) => (e.ASC = "ascending", e.DESC = "descending", e[e.EMPTY = null] = "EMPTY", e))(Ie || {});
|
|
1421
|
+
const qa = (e, s) => typeof s == "function" ? s(e) : e[s], Ha = (e) => {
|
|
1422
|
+
const s = Me([]), t = P(() => s.value), a = P(() => s.value.map((c) => qa(c, e)));
|
|
1423
1423
|
return {
|
|
1424
1424
|
selectionChange: (c) => {
|
|
1425
1425
|
s.value = c;
|
|
@@ -1428,10 +1428,10 @@ const Na = (e, s) => typeof s == "function" ? s(e) : e[s], La = (e) => {
|
|
|
1428
1428
|
getSelectedIds: a,
|
|
1429
1429
|
getSortParams: ({ prop: c, order: h }, V) => {
|
|
1430
1430
|
const y = V || c, E = { asc: null, desc: null };
|
|
1431
|
-
return h ===
|
|
1431
|
+
return h === Ie.ASC ? (E.asc = y, E.desc = null) : h === Ie.DESC && (E.asc = null, E.desc = y), E;
|
|
1432
1432
|
}
|
|
1433
1433
|
};
|
|
1434
|
-
},
|
|
1434
|
+
}, Ga = /* @__PURE__ */ x({
|
|
1435
1435
|
__name: "column-config",
|
|
1436
1436
|
props: {
|
|
1437
1437
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1442,7 +1442,7 @@ const Na = (e, s) => typeof s == "function" ? s(e) : e[s], La = (e) => {
|
|
|
1442
1442
|
emits: /* @__PURE__ */ _(["change"], ["update:modelValue", "update:columns"]),
|
|
1443
1443
|
setup(e, { emit: s }) {
|
|
1444
1444
|
const { t } = ke(), a = ["selection", "index", "expand"], i = s, o = ee(e, "modelValue"), c = ee(e, "columns"), h = (V) => c.value.filter((E) => !E.hidden).length < 2 && !V.hidden;
|
|
1445
|
-
return (V, y) => (r(), g(l(
|
|
1445
|
+
return (V, y) => (r(), g(l(Ot), {
|
|
1446
1446
|
modelValue: o.value,
|
|
1447
1447
|
"onUpdate:modelValue": y[1] || (y[1] = (E) => o.value = E),
|
|
1448
1448
|
class: "ez-column-wrapper",
|
|
@@ -1450,35 +1450,35 @@ const Na = (e, s) => typeof s == "function" ? s(e) : e[s], La = (e) => {
|
|
|
1450
1450
|
size: "15%"
|
|
1451
1451
|
}, {
|
|
1452
1452
|
default: k(() => [
|
|
1453
|
-
(r(!0), C(X, null,
|
|
1453
|
+
(r(!0), C(X, null, re(c.value, (E, D) => (r(), C(X, {
|
|
1454
1454
|
key: E.columnKey || E.prop || `${E.type || "column"}-${D}`
|
|
1455
1455
|
}, [
|
|
1456
|
-
a.includes(E.type) ? O("", !0) : (r(), g(l(
|
|
1456
|
+
a.includes(E.type) ? O("", !0) : (r(), g(l(at), {
|
|
1457
1457
|
key: 0,
|
|
1458
1458
|
"model-value": !E.hidden,
|
|
1459
1459
|
class: "flex",
|
|
1460
1460
|
label: E.label,
|
|
1461
|
-
"onUpdate:modelValue": (
|
|
1461
|
+
"onUpdate:modelValue": (q) => E.hidden = !q,
|
|
1462
1462
|
disabled: h(E),
|
|
1463
|
-
onChange: y[0] || (y[0] = (
|
|
1463
|
+
onChange: y[0] || (y[0] = (q) => i("change"))
|
|
1464
1464
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue", "disabled"]))
|
|
1465
1465
|
], 64))), 128))
|
|
1466
1466
|
]),
|
|
1467
1467
|
_: 1
|
|
1468
1468
|
}, 8, ["modelValue", "title"]));
|
|
1469
1469
|
}
|
|
1470
|
-
}),
|
|
1470
|
+
}), Ka = { class: "ez-fast-table" }, ja = { class: "ez-fast-table_wrapper" }, Wa = {
|
|
1471
1471
|
key: 0,
|
|
1472
1472
|
class: "ez-fast-table_wrapper_header_operation"
|
|
1473
|
-
},
|
|
1473
|
+
}, Qa = {
|
|
1474
1474
|
key: 1,
|
|
1475
1475
|
class: "ez-fast-table_error"
|
|
1476
|
-
},
|
|
1476
|
+
}, Ya = { class: "ez-fast-table_pagination" }, Xa = x({
|
|
1477
1477
|
name: "EzFastTable",
|
|
1478
|
-
directives: { loading:
|
|
1478
|
+
directives: { loading: Be.directive },
|
|
1479
1479
|
inheritAttrs: !1
|
|
1480
|
-
}),
|
|
1481
|
-
...
|
|
1480
|
+
}), Za = /* @__PURE__ */ x({
|
|
1481
|
+
...Xa,
|
|
1482
1482
|
props: {
|
|
1483
1483
|
params: {},
|
|
1484
1484
|
loading: { type: Boolean },
|
|
@@ -1509,300 +1509,305 @@ const Na = (e, s) => typeof s == "function" ? s(e) : e[s], La = (e) => {
|
|
|
1509
1509
|
},
|
|
1510
1510
|
emits: ["update:params", "update:loading", "changePage", "reset", "query", "update:columns"],
|
|
1511
1511
|
setup(e, { expose: s, emit: t }) {
|
|
1512
|
-
const { t: a } = ke(), i = () => ({ current: 1, size: 10 }), o = e, c =
|
|
1513
|
-
const { api:
|
|
1512
|
+
const { t: a } = ke(), i = () => ({ current: 1, size: 10 }), o = e, c = _e(), h = P(() => {
|
|
1513
|
+
const { api: f, beforeSearch: z, transformParams: j, responseAdapter: M, onError: K, columnTool: ie, expanded: Fe, columns: ll, border: ol, ...ft } = o;
|
|
1514
1514
|
return {
|
|
1515
1515
|
...c,
|
|
1516
|
-
...
|
|
1516
|
+
...ft
|
|
1517
1517
|
};
|
|
1518
|
-
}), V = G(o.expanded), { selectionChange: y, getSelectedList: E, getSortParams: D, getSelectedIds:
|
|
1519
|
-
get: () =>
|
|
1520
|
-
set: (
|
|
1521
|
-
|
|
1518
|
+
}), V = G(o.expanded), { selectionChange: y, getSelectedList: E, getSortParams: D, getSelectedIds: q } = Ha(o.rowKey), m = G(null), A = G(!1), v = G(null), d = G(0), p = G([]), Z = G(0), N = G(null), L = t, B = G(H(o.params ?? i())), le = G(H(o.columns ?? [])), U = G(o.loading ?? !1), $ = P({
|
|
1519
|
+
get: () => U.value,
|
|
1520
|
+
set: (f) => {
|
|
1521
|
+
U.value = f, L("update:loading", f);
|
|
1522
1522
|
}
|
|
1523
|
-
}), I =
|
|
1524
|
-
params:
|
|
1523
|
+
}), I = P(() => ({
|
|
1524
|
+
params: B.value,
|
|
1525
1525
|
loading: $.value,
|
|
1526
1526
|
expanded: V.value,
|
|
1527
|
-
search:
|
|
1528
|
-
query:
|
|
1529
|
-
reset:
|
|
1530
|
-
captureInitialParams:
|
|
1531
|
-
patchParams:
|
|
1532
|
-
replaceParams:
|
|
1527
|
+
search: fe,
|
|
1528
|
+
query: ce,
|
|
1529
|
+
reset: n,
|
|
1530
|
+
captureInitialParams: oe,
|
|
1531
|
+
patchParams: Ve,
|
|
1532
|
+
replaceParams: ze
|
|
1533
1533
|
}));
|
|
1534
1534
|
ye(
|
|
1535
1535
|
() => o.params,
|
|
1536
|
-
(
|
|
1537
|
-
|
|
1536
|
+
(f) => {
|
|
1537
|
+
B.value = H(f ?? i());
|
|
1538
1538
|
},
|
|
1539
1539
|
{ deep: !0 }
|
|
1540
1540
|
), ye(
|
|
1541
1541
|
() => o.columns,
|
|
1542
|
-
(
|
|
1543
|
-
|
|
1542
|
+
(f) => {
|
|
1543
|
+
le.value = H(f ?? []);
|
|
1544
1544
|
},
|
|
1545
1545
|
{ deep: !0 }
|
|
1546
1546
|
), ye(
|
|
1547
1547
|
() => o.loading,
|
|
1548
|
-
(
|
|
1549
|
-
|
|
1548
|
+
(f) => {
|
|
1549
|
+
U.value = f ?? !1;
|
|
1550
1550
|
}
|
|
1551
1551
|
);
|
|
1552
|
-
const J = (
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1555
|
-
},
|
|
1556
|
-
|
|
1552
|
+
const J = (f) => f, ae = () => {
|
|
1553
|
+
const f = H(B.value);
|
|
1554
|
+
B.value = f, L("update:params", f);
|
|
1555
|
+
}, se = async () => (await Re(), H(B.value)), oe = (f) => {
|
|
1556
|
+
v.value = H(f ?? B.value);
|
|
1557
|
+
}, ne = async (f, z, j) => {
|
|
1558
|
+
f === d.value && (console.error(`[EzFastTable] Query pipeline failed at stage "${j.stage}".`, z), N.value = {
|
|
1557
1559
|
error: z,
|
|
1558
|
-
stage:
|
|
1559
|
-
params: j
|
|
1560
|
-
}, await o.onError?.(z,
|
|
1561
|
-
},
|
|
1562
|
-
const
|
|
1563
|
-
d.value =
|
|
1560
|
+
stage: j.stage,
|
|
1561
|
+
params: H(j.params)
|
|
1562
|
+
}, await o.onError?.(z, j));
|
|
1563
|
+
}, de = async (f) => {
|
|
1564
|
+
const z = d.value + 1;
|
|
1565
|
+
d.value = z, N.value = null;
|
|
1564
1566
|
try {
|
|
1565
1567
|
$.value = !0;
|
|
1566
|
-
const z = j(N.value);
|
|
1567
1568
|
try {
|
|
1568
|
-
await o.beforeSearch(
|
|
1569
|
-
} catch (
|
|
1570
|
-
await
|
|
1569
|
+
await o.beforeSearch(f);
|
|
1570
|
+
} catch (ie) {
|
|
1571
|
+
await ne(z, ie, { stage: "beforeSearch", params: f });
|
|
1571
1572
|
return;
|
|
1572
1573
|
}
|
|
1573
|
-
let
|
|
1574
|
+
let j;
|
|
1574
1575
|
try {
|
|
1575
|
-
|
|
1576
|
-
} catch (
|
|
1577
|
-
await
|
|
1576
|
+
j = await o.transformParams(f);
|
|
1577
|
+
} catch (ie) {
|
|
1578
|
+
await ne(z, ie, { stage: "transformParams", params: f });
|
|
1578
1579
|
return;
|
|
1579
1580
|
}
|
|
1580
1581
|
let M;
|
|
1581
1582
|
try {
|
|
1582
|
-
M = await o.api(
|
|
1583
|
-
} catch (
|
|
1584
|
-
await
|
|
1583
|
+
M = await o.api(j);
|
|
1584
|
+
} catch (ie) {
|
|
1585
|
+
await ne(z, ie, { stage: "api", params: f });
|
|
1585
1586
|
return;
|
|
1586
1587
|
}
|
|
1587
1588
|
let K;
|
|
1588
1589
|
try {
|
|
1589
1590
|
K = await o.responseAdapter(M);
|
|
1590
|
-
} catch (
|
|
1591
|
-
await
|
|
1591
|
+
} catch (ie) {
|
|
1592
|
+
await ne(z, ie, { stage: "responseAdapter", params: f });
|
|
1592
1593
|
return;
|
|
1593
1594
|
}
|
|
1594
|
-
if (
|
|
1595
|
+
if (z !== d.value)
|
|
1595
1596
|
return;
|
|
1596
|
-
|
|
1597
|
+
p.value = K.records || [], Z.value = K.total || 0, L("query");
|
|
1597
1598
|
} finally {
|
|
1598
|
-
|
|
1599
|
+
z === d.value && ($.value = !1);
|
|
1599
1600
|
}
|
|
1600
|
-
},
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
}, Ve = (
|
|
1609
|
-
const {
|
|
1601
|
+
}, ce = async () => {
|
|
1602
|
+
const f = await se();
|
|
1603
|
+
await de(f);
|
|
1604
|
+
}, fe = () => {
|
|
1605
|
+
(async () => {
|
|
1606
|
+
const f = await se();
|
|
1607
|
+
f.current = 1, B.value = f, ae(), await de(H(B.value));
|
|
1608
|
+
})();
|
|
1609
|
+
}, Ve = (f, z = {}) => {
|
|
1610
|
+
const { resetPage: j = !1, captureInitial: M = !1 } = z, K = { ...B.value, ...H(f) };
|
|
1611
|
+
j && (K.current = 1), B.value = K, ae(), M && oe();
|
|
1612
|
+
}, ze = (f, z = {}) => {
|
|
1613
|
+
const { resetPage: j = !1, captureInitial: M = !1 } = z, K = H(f);
|
|
1614
|
+
j && (K.current = 1), B.value = K, ae(), M && oe();
|
|
1615
|
+
}, u = () => m.value?.getTableRef(), b = (f) => {
|
|
1616
|
+
const { column: z, prop: j } = f;
|
|
1610
1617
|
if ((z?.sortMode || "local") === "remote") {
|
|
1611
|
-
const K = D(
|
|
1612
|
-
|
|
1618
|
+
const K = D(f, z?.sortField || j);
|
|
1619
|
+
Ve(K), fe();
|
|
1613
1620
|
return;
|
|
1614
1621
|
}
|
|
1615
|
-
(
|
|
1616
|
-
},
|
|
1617
|
-
v.value
|
|
1618
|
-
},
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
if (q("changePage", p), p.size) {
|
|
1622
|
-
ne();
|
|
1622
|
+
(B.value.asc || B.value.desc) && Ve({ asc: null, desc: null });
|
|
1623
|
+
}, n = () => {
|
|
1624
|
+
ze(H(v.value ?? { current: 1, size: 10 })), L("reset"), ce();
|
|
1625
|
+
}, w = (f) => {
|
|
1626
|
+
if (L("changePage", f), f.size) {
|
|
1627
|
+
fe();
|
|
1623
1628
|
return;
|
|
1624
1629
|
}
|
|
1625
|
-
ae(),
|
|
1626
|
-
}, n = () => {
|
|
1627
|
-
Ve()?.doLayout();
|
|
1628
|
-
}, w = () => {
|
|
1629
|
-
const p = j(re.value);
|
|
1630
|
-
re.value = p, q("update:columns", p), n();
|
|
1630
|
+
ae(), ce();
|
|
1631
1631
|
}, T = () => {
|
|
1632
|
-
|
|
1633
|
-
},
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1632
|
+
u()?.doLayout();
|
|
1633
|
+
}, Y = () => {
|
|
1634
|
+
const f = H(le.value);
|
|
1635
|
+
le.value = f, L("update:columns", f), T();
|
|
1636
|
+
}, me = () => {
|
|
1637
|
+
N.value = null;
|
|
1638
|
+
}, pe = () => N.value, Pe = () => {
|
|
1639
|
+
me(), ce();
|
|
1640
|
+
}, Ue = P(() => ({
|
|
1641
|
+
error: N.value?.error,
|
|
1642
|
+
stage: N.value?.stage || "api",
|
|
1643
|
+
params: N.value?.params ?? B.value,
|
|
1644
|
+
retry: Pe
|
|
1640
1645
|
}));
|
|
1641
|
-
return
|
|
1642
|
-
|
|
1646
|
+
return Oe(() => {
|
|
1647
|
+
oe();
|
|
1643
1648
|
}), s({
|
|
1644
|
-
search:
|
|
1645
|
-
query:
|
|
1646
|
-
patchParams:
|
|
1647
|
-
replaceParams:
|
|
1648
|
-
reset:
|
|
1649
|
-
captureInitialParams:
|
|
1650
|
-
getTableRef:
|
|
1651
|
-
doLayout:
|
|
1652
|
-
clearError:
|
|
1653
|
-
getErrorState:
|
|
1654
|
-
}), (
|
|
1655
|
-
const
|
|
1656
|
-
return r(), C("div",
|
|
1657
|
-
|
|
1649
|
+
search: fe,
|
|
1650
|
+
query: ce,
|
|
1651
|
+
patchParams: Ve,
|
|
1652
|
+
replaceParams: ze,
|
|
1653
|
+
reset: n,
|
|
1654
|
+
captureInitialParams: oe,
|
|
1655
|
+
getTableRef: u,
|
|
1656
|
+
doLayout: T,
|
|
1657
|
+
clearError: me,
|
|
1658
|
+
getErrorState: pe
|
|
1659
|
+
}), (f, z) => {
|
|
1660
|
+
const j = et("loading");
|
|
1661
|
+
return r(), C("div", Ka, [
|
|
1662
|
+
f.$slots.form ? (r(), g(l(ut), {
|
|
1658
1663
|
key: 0,
|
|
1659
1664
|
expanded: V.value,
|
|
1660
1665
|
"onUpdate:expanded": z[0] || (z[0] = (M) => V.value = M)
|
|
1661
1666
|
}, {
|
|
1662
1667
|
default: k(() => [
|
|
1663
|
-
R(
|
|
1668
|
+
R(f.$slots, "form", Ce(Le(I.value)))
|
|
1664
1669
|
]),
|
|
1665
1670
|
operate: k(() => [
|
|
1666
1671
|
W(l(be), {
|
|
1667
1672
|
type: "primary",
|
|
1668
1673
|
loading: $.value,
|
|
1669
|
-
onClick:
|
|
1674
|
+
onClick: fe
|
|
1670
1675
|
}, {
|
|
1671
1676
|
default: k(() => [
|
|
1672
|
-
he(
|
|
1677
|
+
he(ue(l(a)("s.button.query")), 1)
|
|
1673
1678
|
]),
|
|
1674
1679
|
_: 1
|
|
1675
1680
|
}, 8, ["loading"]),
|
|
1676
|
-
W(l(be), { onClick:
|
|
1681
|
+
W(l(be), { onClick: n }, {
|
|
1677
1682
|
default: k(() => [
|
|
1678
|
-
he(
|
|
1683
|
+
he(ue(l(a)("s.button.reset")), 1)
|
|
1679
1684
|
]),
|
|
1680
1685
|
_: 1
|
|
1681
1686
|
})
|
|
1682
1687
|
]),
|
|
1683
1688
|
_: 3
|
|
1684
1689
|
}, 8, ["expanded"])) : O("", !0),
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1690
|
+
f.$slots.freeArea ? R(f.$slots, "freeArea", Ce(S({ key: 1 }, I.value))) : O("", !0),
|
|
1691
|
+
Q("div", ja, [
|
|
1692
|
+
f.$slots.header || o.columnTool ? (r(), C("div", {
|
|
1688
1693
|
key: 0,
|
|
1689
|
-
class:
|
|
1694
|
+
class: De(["ez-fast-table_wrapper_header", f.$slots.header ? "justify-between" : "justify-end"])
|
|
1690
1695
|
}, [
|
|
1691
|
-
|
|
1692
|
-
R(
|
|
1696
|
+
f.$slots.header ? (r(), C("div", Wa, [
|
|
1697
|
+
R(f.$slots, "header", {
|
|
1693
1698
|
selectList: l(E),
|
|
1694
|
-
selectIds: l(
|
|
1699
|
+
selectIds: l(q)
|
|
1695
1700
|
})
|
|
1696
1701
|
])) : O("", !0),
|
|
1697
1702
|
o.columnTool ? (r(), g(l(be), {
|
|
1698
1703
|
key: 1,
|
|
1699
|
-
icon: l(
|
|
1704
|
+
icon: l(ga),
|
|
1700
1705
|
circle: "",
|
|
1701
1706
|
onClick: z[1] || (z[1] = (M) => A.value = !0)
|
|
1702
1707
|
}, null, 8, ["icon"])) : O("", !0)
|
|
1703
1708
|
], 2)) : O("", !0),
|
|
1704
|
-
|
|
1709
|
+
tt((r(), g(it, S(h.value, {
|
|
1705
1710
|
ref_key: "fastTableRef",
|
|
1706
|
-
ref:
|
|
1711
|
+
ref: m,
|
|
1707
1712
|
border: o.border,
|
|
1708
|
-
columns:
|
|
1709
|
-
data:
|
|
1713
|
+
columns: le.value,
|
|
1714
|
+
data: p.value,
|
|
1710
1715
|
onSelectionChange: l(y),
|
|
1711
|
-
onSortChange:
|
|
1716
|
+
onSortChange: b
|
|
1712
1717
|
}), Se({ _: 2 }, [
|
|
1713
|
-
|
|
1718
|
+
re(f.$slots, (M, K, ie) => ({
|
|
1714
1719
|
name: K,
|
|
1715
|
-
fn: k((
|
|
1716
|
-
!["form", "empty", "error", "header"].includes(String(K)) && !String(K).startsWith("header-") ? R(
|
|
1720
|
+
fn: k((Fe) => [
|
|
1721
|
+
!["form", "empty", "error", "header"].includes(String(K)) && !String(K).startsWith("header-") ? R(f.$slots, K, Ce(S({ key: 0 }, J(Fe)))) : O("", !0)
|
|
1717
1722
|
])
|
|
1718
1723
|
})),
|
|
1719
|
-
|
|
1724
|
+
f.$slots.empty && !N.value ? {
|
|
1720
1725
|
name: "empty",
|
|
1721
1726
|
fn: k(() => [
|
|
1722
|
-
R(
|
|
1727
|
+
R(f.$slots, "empty")
|
|
1723
1728
|
]),
|
|
1724
1729
|
key: "0"
|
|
1725
1730
|
} : void 0
|
|
1726
1731
|
]), 1040, ["border", "columns", "data", "onSelectionChange"])), [
|
|
1727
|
-
[
|
|
1732
|
+
[j, $.value]
|
|
1728
1733
|
]),
|
|
1729
|
-
|
|
1730
|
-
R(
|
|
1734
|
+
N.value && f.$slots.error ? (r(), C("div", Qa, [
|
|
1735
|
+
R(f.$slots, "error", Ce(Le(Ue.value)))
|
|
1731
1736
|
])) : O("", !0),
|
|
1732
|
-
|
|
1733
|
-
W(l(
|
|
1734
|
-
"current-page":
|
|
1737
|
+
Q("div", Ya, [
|
|
1738
|
+
W(l(dt), {
|
|
1739
|
+
"current-page": B.value.current,
|
|
1735
1740
|
"onUpdate:currentPage": [
|
|
1736
|
-
z[2] || (z[2] = (M) =>
|
|
1737
|
-
z[4] || (z[4] = (M) =>
|
|
1741
|
+
z[2] || (z[2] = (M) => B.value.current = M),
|
|
1742
|
+
z[4] || (z[4] = (M) => w({ current: M }))
|
|
1738
1743
|
],
|
|
1739
|
-
"page-size":
|
|
1744
|
+
"page-size": B.value.size,
|
|
1740
1745
|
"onUpdate:pageSize": [
|
|
1741
|
-
z[3] || (z[3] = (M) =>
|
|
1742
|
-
z[5] || (z[5] = (M) =>
|
|
1746
|
+
z[3] || (z[3] = (M) => B.value.size = M),
|
|
1747
|
+
z[5] || (z[5] = (M) => w({ size: M }))
|
|
1743
1748
|
],
|
|
1744
1749
|
total: Z.value
|
|
1745
1750
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
1746
1751
|
])
|
|
1747
1752
|
]),
|
|
1748
|
-
W(
|
|
1753
|
+
W(Ga, {
|
|
1749
1754
|
modelValue: A.value,
|
|
1750
1755
|
"onUpdate:modelValue": z[6] || (z[6] = (M) => A.value = M),
|
|
1751
|
-
columns:
|
|
1752
|
-
"onUpdate:columns": z[7] || (z[7] = (M) =>
|
|
1753
|
-
onChange:
|
|
1756
|
+
columns: le.value,
|
|
1757
|
+
"onUpdate:columns": z[7] || (z[7] = (M) => le.value = M),
|
|
1758
|
+
onChange: Y
|
|
1754
1759
|
}, null, 8, ["modelValue", "columns"])
|
|
1755
1760
|
]);
|
|
1756
1761
|
};
|
|
1757
1762
|
}
|
|
1758
|
-
}),
|
|
1759
|
-
function
|
|
1763
|
+
}), ct = te(Za), sl = () => ct, Ja = te(it), Je = /* @__PURE__ */ Symbol("INSTALLED_KEY");
|
|
1764
|
+
function _a(e = []) {
|
|
1760
1765
|
return {
|
|
1761
1766
|
install: (t) => {
|
|
1762
|
-
t[
|
|
1767
|
+
t[Je] || (t[Je] = !0, e.forEach((a) => t.use(a)));
|
|
1763
1768
|
}
|
|
1764
1769
|
};
|
|
1765
1770
|
}
|
|
1766
|
-
const
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
+
const el = [
|
|
1772
|
+
lt,
|
|
1773
|
+
aa,
|
|
1774
|
+
Ta,
|
|
1775
|
+
Ma,
|
|
1776
|
+
ct,
|
|
1777
|
+
ve,
|
|
1778
|
+
rt,
|
|
1779
|
+
dt,
|
|
1771
1780
|
ut,
|
|
1772
|
-
|
|
1781
|
+
nt,
|
|
1773
1782
|
ot,
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
lt,
|
|
1777
|
-
at,
|
|
1778
|
-
Xa
|
|
1779
|
-
], _a = [
|
|
1780
|
-
It,
|
|
1781
|
-
Re,
|
|
1782
|
-
ge,
|
|
1783
|
-
Ot,
|
|
1783
|
+
Ja
|
|
1784
|
+
], tl = [
|
|
1784
1785
|
Bt,
|
|
1785
|
-
|
|
1786
|
-
|
|
1786
|
+
Be,
|
|
1787
|
+
ge,
|
|
1788
|
+
Ft,
|
|
1789
|
+
Nt,
|
|
1790
|
+
Lt
|
|
1791
|
+
], al = _a([...el, ...tl]), il = al.install;
|
|
1787
1792
|
export {
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1793
|
+
ka as CHANGE_TRIGGER_TYPES,
|
|
1794
|
+
lt as EzCheckbox,
|
|
1795
|
+
aa as EzDialog,
|
|
1796
|
+
Ta as EzDynamicForm,
|
|
1797
|
+
ct as EzFastTable,
|
|
1798
|
+
Ma as EzFormItem,
|
|
1799
|
+
ve as EzIcon,
|
|
1800
|
+
rt as EzImageUpload,
|
|
1801
|
+
dt as EzPagination,
|
|
1802
|
+
ut as EzQueryPanel,
|
|
1803
|
+
nt as EzRadio,
|
|
1804
|
+
ot as EzSelect,
|
|
1805
|
+
Ja as EzTable,
|
|
1806
|
+
F as FormItemType,
|
|
1807
|
+
Sa as SELECT_FORM_TYPES,
|
|
1808
|
+
sl as createTypedFastTable,
|
|
1809
|
+
al as default,
|
|
1810
|
+
za as getInputVerb,
|
|
1811
|
+
Ca as getTrigger,
|
|
1812
|
+
il as install
|
|
1808
1813
|
};
|