@maxtan/ez-ui 0.12.1 → 0.14.0

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.
Files changed (36) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.js +1074 -693
  4. package/dist/types/components/checkbox/index.d.ts +24 -3
  5. package/dist/types/components/checkbox/src/checkbox.d.ts +4 -5
  6. package/dist/types/components/checkbox/src/checkbox.vue.d.ts +12 -1
  7. package/dist/types/components/dialog/index.d.ts +0 -15
  8. package/dist/types/components/dialog/src/dialog.d.ts +1 -5
  9. package/dist/types/components/dialog/src/dialog.vue.d.ts +0 -5
  10. package/dist/types/components/dynamic-form/index.d.ts +245 -0
  11. package/dist/types/components/dynamic-form/src/dynamic-form.d.ts +128 -0
  12. package/dist/types/components/dynamic-form/src/dynamic-form.vue.d.ts +398 -0
  13. package/dist/types/components/fast-table/index.d.ts +8 -9
  14. package/dist/types/components/fast-table/src/column-config.vue.d.ts +1 -1
  15. package/dist/types/components/fast-table/src/fast-table.vue.d.ts +4 -4
  16. package/dist/types/components/icon/src/icon.d.ts +0 -1
  17. package/dist/types/components/image-upload/index.d.ts +257 -352
  18. package/dist/types/components/image-upload/src/image-upload.vue.d.ts +253 -348
  19. package/dist/types/components/index.d.ts +1 -0
  20. package/dist/types/components/pagination/index.d.ts +37 -21
  21. package/dist/types/components/pagination/src/pagination.d.ts +0 -10
  22. package/dist/types/components/pagination/src/pagination.vue.d.ts +15 -8
  23. package/dist/types/components/radio/index.d.ts +24 -3
  24. package/dist/types/components/radio/src/radio.d.ts +2 -5
  25. package/dist/types/components/radio/src/radio.vue.d.ts +11 -1
  26. package/dist/types/components/search-form/index.d.ts +3 -3
  27. package/dist/types/components/search-form/src/search-form.d.ts +1 -1
  28. package/dist/types/components/search-form/src/search-form.vue.d.ts +1 -1
  29. package/dist/types/components/select/index.d.ts +19 -6
  30. package/dist/types/components/select/src/select.d.ts +0 -1
  31. package/dist/types/components/select/src/select.vue.d.ts +9 -2
  32. package/dist/types/components/table/index.d.ts +8 -9
  33. package/dist/types/components/table/src/table.d.ts +4 -5
  34. package/dist/types/components/table/src/table.vue.d.ts +4 -4
  35. package/dist/types/ez-ui/component.d.ts +1257 -583
  36. package/package.json +1 -7
package/dist/index.js CHANGED
@@ -1,10 +1,18 @@
1
- import { useLocale as Se, ElCheckbox as ge, ElCheckboxButton as Te, ElCheckboxGroup as Be, ElLoading as ae, ElDialog as Ve, ElButton as Y, ElScrollbar as Me, ElTable as Le, ElTableColumn as re, ElPagination as Pe, ElDrawer as Re, ElRadio as Ue, ElRadioButton as Ie, ElRadioGroup as Ae, ElSelect as De, ElOptionGroup as Fe, ElOption as ie, ElUpload as ue, ElImage as de, ElImageViewer as Oe, ElMessage as Z, ElInfiniteScroll as Ne, ElMessageBox as je, ElNotification as He, ElPopoverDirective as qe } from "element-plus";
2
- import { defineComponent as v, computed as P, createBlock as p, openBlock as a, unref as s, normalizeProps as X, guardReactiveProps as oe, withCtx as d, createElementBlock as m, Fragment as R, renderList as N, resolveDynamicComponent as ye, mergeProps as k, createTextVNode as q, toDisplayString as F, mergeModels as K, useModel as O, resolveDirective as _e, renderSlot as T, createCommentVNode as E, withDirectives as he, ref as V, createSlots as te, createElementVNode as B, onMounted as be, nextTick as $e, onUnmounted as Ke, normalizeStyle as we, createVNode as S, normalizeClass as Ge, withModifiers as ce } from "vue";
3
- const U = (l, n) => (l.install = (e) => {
4
- for (const t of [l, ...Object.values({})])
5
- e.component(t.name, t);
6
- }, l);
7
- var Ye = {
1
+ import { computed as M, defineComponent as $, mergeModels as I, useModel as P, useAttrs as J, createBlock as p, openBlock as r, unref as l, mergeProps as h, withCtx as b, createElementBlock as w, Fragment as O, renderList as W, resolveDynamicComponent as ce, createTextVNode as le, toDisplayString as Y, resolveDirective as Te, renderSlot as R, createCommentVNode as A, withDirectives as Se, createElementVNode as D, ref as x, createVNode as S, withModifiers as ge, normalizeStyle as Ae, shallowRef as Be, watch as he, nextTick as ue, onMounted as fe, createSlots as de, onUnmounted as Oe, normalizeProps as Ee, guardReactiveProps as He, normalizeClass as qe } from "vue";
2
+ import { useLocale as Fe, ElCheckbox as Ue, ElCheckboxButton as Ge, ElCheckboxGroup as je, ElLoading as ve, ElDialog as We, ElButton as te, ElScrollbar as Ke, ElSelect as Xe, ElOptionGroup as Ye, ElOption as be, ElRadio as Je, ElRadioButton as Ze, ElRadioGroup as Qe, ElUpload as ye, ElImage as _e, ElImageViewer as el, ElMessage as oe, ElForm as ll, ElRow as al, ElCol as tl, ElFormItem as ol, ElInput as ie, ElInputNumber as rl, ElDatePicker as ne, ElTimePicker as Ve, ElSwitch as sl, ElTreeSelect as nl, ElCascader as ul, ElTree as dl, ElSlider as il, ElRate as pl, ElTable as cl, ElTableColumn as we, ElPagination as fl, ElDrawer as vl, ElInfiniteScroll as ml, ElMessageBox as gl, ElNotification as hl, ElPopoverDirective as El } from "element-plus";
3
+ const F = (t, g) => (t.install = (o) => {
4
+ for (const s of [t, ...Object.values({})])
5
+ s.name ? o.component(s.name, s) : process.env.NODE_ENV !== "production" && console.warn("[withInstall] Component is missing name property:", s);
6
+ }, t);
7
+ function Z(t) {
8
+ return M(() => {
9
+ const g = {};
10
+ for (const o in t)
11
+ o === "class" || o === "style" || o.startsWith("on") || (g[o] = t[o]);
12
+ return g;
13
+ });
14
+ }
15
+ var bl = {
8
16
  s: {
9
17
  label: {
10
18
  name: "姓名",
@@ -84,390 +92,1039 @@ var Ye = {
84
92
  }
85
93
  }
86
94
  };
87
- const { s: Ze } = Ye;
88
- function Je(l, n) {
89
- return n.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, l);
95
+ const { s: yl } = bl;
96
+ function _l(t, g) {
97
+ return g.split(".").reduce((o, s) => o && typeof o == "object" ? o[s] : void 0, t);
98
+ }
99
+ function Vl(t, g = {}) {
100
+ return t.replace(/\{\s*(\w+)\s*\}/g, (o, s) => {
101
+ const f = g[s];
102
+ return f !== void 0 ? String(f) : `{${s}}`;
103
+ });
90
104
  }
91
- function Q() {
92
- const { t: l, lang: n } = Se();
105
+ function se() {
106
+ const { t, lang: g } = Fe();
93
107
  return {
94
- t: (t, ...r) => {
95
- const c = Je({ s: Ze }, t);
96
- return typeof c == "string" ? c : l(t, ...r);
108
+ t: (s, f = {}) => {
109
+ const v = t(s, f);
110
+ if (v !== s) return v;
111
+ const a = _l({ s: yl }, s);
112
+ return typeof a == "string" ? Vl(a, f) : s;
97
113
  },
98
- lang: n
114
+ lang: g
99
115
  };
100
116
  }
101
- const Qe = v({ name: "EzCheckbox" }), We = /* @__PURE__ */ v({
102
- ...Qe,
103
- props: {
117
+ const wl = $({ name: "EzCheckbox", inheritAttrs: !1 }), $l = /* @__PURE__ */ $({
118
+ ...wl,
119
+ props: /* @__PURE__ */ I({
104
120
  type: { default: "default" },
105
121
  options: { default: () => [] }
106
- },
107
- setup(l) {
108
- const n = l, e = P(
109
- () => ["default", "border"].includes(n.type) ? ge : Te
110
- );
111
- return (t, r) => (a(), p(s(Be), X(oe(t.$attrs)), {
112
- default: d(() => [
113
- (a(!0), m(R, null, N(t.options, (c) => (a(), p(ye(e.value), k({
114
- key: String(c.value),
122
+ }, {
123
+ modelValue: {},
124
+ modelModifiers: {}
125
+ }),
126
+ emits: /* @__PURE__ */ I(["change"], ["update:modelValue"]),
127
+ setup(t, { emit: g }) {
128
+ const o = t, s = g, f = P(t, "modelValue"), v = J(), a = Z(v), V = M(
129
+ () => ["default", "border"].includes(o.type) ? Ue : Ge
130
+ ), u = (_) => {
131
+ s("change", _);
132
+ };
133
+ return (_, d) => (r(), p(l(je), h({
134
+ modelValue: f.value,
135
+ "onUpdate:modelValue": d[0] || (d[0] = (E) => f.value = E)
136
+ }, l(a), { onChange: u }), {
137
+ default: b(() => [
138
+ (r(!0), w(O, null, W(t.options, (E) => (r(), p(ce(V.value), h({
139
+ key: String(E.value),
115
140
  ref_for: !0
116
- }, c, {
117
- value: c.value,
141
+ }, E, {
118
142
  border: t.type === "border"
119
143
  }), {
120
- default: d(() => [
121
- q(F(c.label), 1)
144
+ default: b(() => [
145
+ le(Y(E.label), 1)
122
146
  ]),
123
147
  _: 2
124
- }, 1040, ["value", "border"]))), 128))
148
+ }, 1040, ["border"]))), 128))
125
149
  ]),
126
150
  _: 1
127
- }, 16));
151
+ }, 16, ["modelValue"]));
128
152
  }
129
- }), Xe = U(We);
130
- var J = /* @__PURE__ */ ((l) => (l.CANCEL = "取消", l.CONFIRM = "确定", l))(J || {});
131
- const et = { key: 1 }, tt = {
153
+ }), Re = F($l);
154
+ var re = /* @__PURE__ */ ((t) => (t.CANCEL = "取消", t.CONFIRM = "确定", t))(re || {});
155
+ const Cl = { key: 1 }, kl = {
132
156
  key: 0,
133
157
  class: "ez-dialog__body"
134
- }, lt = { key: 1 }, at = v({ name: "EzDialog", directives: { loading: ae.directive } }), ot = /* @__PURE__ */ v({
135
- ...at,
136
- props: /* @__PURE__ */ K({
158
+ }, zl = { key: 1 }, Tl = $({ name: "EzDialog", inheritAttrs: !1, directives: { loading: ve.directive } }), Sl = /* @__PURE__ */ $({
159
+ ...Tl,
160
+ props: /* @__PURE__ */ I({
137
161
  title: { default: "" },
138
162
  loading: { type: Boolean, default: !1 },
139
- cancelText: { default: J.CANCEL },
140
- confirmText: { default: J.CONFIRM },
141
- width: { default: 800 },
142
- appendToBody: { type: Boolean, default: !1 },
143
- destroyOnClose: { type: Boolean, default: !0 },
144
- closeOnPressEscape: { type: Boolean, default: !1 },
145
- closeOnClickModal: { type: Boolean, default: !1 }
163
+ cancelText: { default: re.CANCEL },
164
+ confirmText: { default: re.CONFIRM }
146
165
  }, {
147
166
  modelValue: { type: Boolean },
148
167
  modelModifiers: {}
149
168
  }),
150
- emits: /* @__PURE__ */ K(["cancel", "confirm"], ["update:modelValue"]),
151
- setup(l, { emit: n }) {
152
- const { t: e } = Q(), t = l, r = n, c = O(l, "modelValue"), o = () => {
153
- c.value = !1, r("cancel");
154
- }, b = () => {
155
- r("confirm");
169
+ emits: /* @__PURE__ */ I(["cancel", "confirm"], ["update:modelValue"]),
170
+ setup(t, { emit: g }) {
171
+ const { t: o } = se(), s = t, f = g, v = P(t, "modelValue"), a = J(), V = Z(a), u = () => {
172
+ v.value = !1, f("cancel");
173
+ }, _ = () => {
174
+ f("confirm");
156
175
  };
157
- return (f, _) => {
158
- const u = _e("loading");
159
- return a(), p(s(Ve), k({
160
- modelValue: c.value,
161
- "onUpdate:modelValue": _[0] || (_[0] = (w) => c.value = w)
162
- }, f.$attrs, {
163
- width: t.width,
164
- "append-to-body": t.appendToBody,
165
- "close-on-click-modal": t.closeOnClickModal,
166
- "destroy-on-close": t.destroyOnClose,
167
- "close-on-press-escape": t.closeOnPressEscape,
168
- class: "ez-dialog"
169
- }), {
170
- header: d(() => [
171
- f.$slots.header ? T(f.$slots, "header", { key: 0 }) : (a(), m("p", et, F(t.title), 1))
176
+ return (d, E) => {
177
+ const L = Te("loading");
178
+ return r(), p(l(We), h({
179
+ modelValue: v.value,
180
+ "onUpdate:modelValue": E[0] || (E[0] = (N) => v.value = N),
181
+ class: "ez-dialog",
182
+ width: 800,
183
+ "append-to-body": !1,
184
+ "close-on-click-modal": !1,
185
+ "destroy-on-close": !0,
186
+ "close-on-press-escape": !1
187
+ }, l(V)), {
188
+ header: b(() => [
189
+ d.$slots.header ? R(d.$slots, "header", { key: 0 }) : (r(), w("p", Cl, Y(s.title), 1))
172
190
  ]),
173
- default: d(() => [
174
- he((a(), p(s(Me), null, {
175
- default: d(() => [
176
- f.$slots.default ? (a(), m("div", tt, [
177
- T(f.$slots, "default")
178
- ])) : E("", !0)
191
+ default: b(() => [
192
+ Se((r(), p(l(Ke), null, {
193
+ default: b(() => [
194
+ d.$slots.default ? (r(), w("div", kl, [
195
+ R(d.$slots, "default")
196
+ ])) : A("", !0)
179
197
  ]),
180
198
  _: 3
181
199
  })), [
182
- [u, t.loading]
200
+ [L, s.loading]
183
201
  ])
184
202
  ]),
185
- footer: d(() => [
186
- f.$slots.footer ? T(f.$slots, "footer", { key: 0 }) : (a(), m("div", lt, [
187
- t.cancelText ? (a(), p(s(Y), {
203
+ footer: b(() => [
204
+ d.$slots.footer ? R(d.$slots, "footer", { key: 0 }) : (r(), w("div", zl, [
205
+ s.cancelText ? (r(), p(l(te), {
188
206
  key: 0,
189
207
  type: "default",
190
- onClick: o
208
+ onClick: u
191
209
  }, {
192
- default: d(() => [
193
- q(F(t.cancelText === s(J).CANCEL ? s(e)("s.button.cancel") : t.cancelText), 1)
210
+ default: b(() => [
211
+ le(Y(s.cancelText === l(re).CANCEL ? l(o)("s.button.cancel") : s.cancelText), 1)
194
212
  ]),
195
213
  _: 1
196
- })) : E("", !0),
197
- t.confirmText ? (a(), p(s(Y), {
214
+ })) : A("", !0),
215
+ s.confirmText ? (r(), p(l(te), {
198
216
  key: 1,
199
217
  type: "primary",
200
- loading: t.loading,
201
- onClick: b
218
+ loading: s.loading,
219
+ onClick: _
202
220
  }, {
203
- default: d(() => [
204
- q(F(t.confirmText === s(J).CONFIRM ? s(e)("s.button.confirm") : t.confirmText), 1)
221
+ default: b(() => [
222
+ le(Y(s.confirmText === l(re).CONFIRM ? l(o)("s.button.confirm") : s.confirmText), 1)
205
223
  ]),
206
224
  _: 1
207
- }, 8, ["loading"])) : E("", !0)
225
+ }, 8, ["loading"])) : A("", !0)
208
226
  ]))
209
227
  ]),
210
228
  _: 3
211
- }, 16, ["modelValue", "width", "append-to-body", "close-on-click-modal", "destroy-on-close", "close-on-press-escape"]);
229
+ }, 16, ["modelValue"]);
212
230
  };
213
231
  }
214
- }), st = U(ot), nt = v({ name: "EzTable" }), rt = /* @__PURE__ */ v({
215
- ...nt,
216
- props: {
217
- data: { default: () => [] },
218
- columns: { default: () => [] },
219
- border: { type: Boolean, default: !0 },
220
- rowKey: { default: "id" }
221
- },
222
- setup(l, { expose: n }) {
223
- const e = l, t = V(), r = (o) => {
224
- const b = e.columns[e.columns.length - 1], f = () => o.type ? !1 : o.prop !== b.prop;
225
- return { ...{
226
- align: "center",
227
- hidden: 1,
228
- resizable: !0,
229
- reserveSelection: o.type === "selection",
230
- /** 默认最后一个 */
231
- showOverflowTooltip: f()
232
- }, ...o };
232
+ }), Al = F(Sl), Ul = $({ name: "EzSelect", inheritAttrs: !1 }), Rl = /* @__PURE__ */ $({
233
+ ...Ul,
234
+ props: /* @__PURE__ */ I({
235
+ options: { default: () => [] }
236
+ }, {
237
+ modelValue: {},
238
+ modelModifiers: {}
239
+ }),
240
+ emits: ["update:modelValue"],
241
+ setup(t) {
242
+ const g = t, o = P(t, "modelValue"), s = (a) => typeof a > "u", f = (a) => !s(a.options), v = (a, V) => a.value != null && typeof a.value != "object" ? String(a.value) : V;
243
+ return (a, V) => (r(), p(l(Xe), h({
244
+ modelValue: o.value,
245
+ "onUpdate:modelValue": V[0] || (V[0] = (u) => o.value = u),
246
+ clearable: ""
247
+ }, a.$attrs), {
248
+ default: b(() => [
249
+ (r(!0), w(O, null, W(g.options, (u, _) => (r(), w(O, {
250
+ key: v(u, _)
251
+ }, [
252
+ f(u) ? (r(), p(l(Ye), h({
253
+ key: 0,
254
+ ref_for: !0
255
+ }, u), {
256
+ default: b(() => [
257
+ (r(!0), w(O, null, W(u.options, (d) => (r(), p(l(be), h({
258
+ key: v(d, d.value)
259
+ }, { ref_for: !0 }, d), null, 16))), 128))
260
+ ]),
261
+ _: 2
262
+ }, 1040)) : (r(), p(l(be), h({
263
+ key: 1,
264
+ ref_for: !0
265
+ }, u), null, 16))
266
+ ], 64))), 128))
267
+ ]),
268
+ _: 1
269
+ }, 16, ["modelValue"]));
270
+ }
271
+ }), De = F(Rl), Dl = $({ name: "EzRadio", inheritAttrs: !1 }), xl = /* @__PURE__ */ $({
272
+ ...Dl,
273
+ props: /* @__PURE__ */ I({
274
+ type: { default: "default" },
275
+ options: { default: () => [] }
276
+ }, {
277
+ modelValue: { type: [String, Number, Boolean] },
278
+ modelModifiers: {}
279
+ }),
280
+ emits: /* @__PURE__ */ I(["change"], ["update:modelValue"]),
281
+ setup(t, { emit: g }) {
282
+ const o = t, s = g, f = P(t, "modelValue"), v = J(), a = Z(v), V = M(() => ["default", "border"].includes(o.type) ? Je : Ze), u = (_) => {
283
+ s("change", _);
233
284
  };
234
- return n({
235
- getTableRef: () => t.value
236
- }), (o, b) => {
237
- var f, _;
238
- return a(), p(s(Le), k(o.$attrs, {
239
- ref_key: "tableRef",
240
- ref: t,
241
- data: e.data,
242
- border: e.border,
243
- "row-key": e.rowKey
244
- }), te({
245
- default: d(() => [
246
- (a(!0), m(R, null, N(e.columns, (u) => (a(), m(R, {
247
- key: u.prop
248
- }, [
249
- ["selection", "index"].includes(u.type) ? (a(), p(s(re), k({
250
- key: 0,
251
- ref_for: !0
252
- }, r(u)), null, 16)) : u.hidden ? E("", !0) : (a(), p(s(re), k({
253
- key: 1,
254
- ref_for: !0
255
- }, r(u)), te({ _: 2 }, [
256
- o.$slots[u.prop] ? {
257
- name: "default",
258
- fn: d((w) => [
259
- T(o.$slots, u.prop, k({ ref_for: !0 }, w))
260
- ]),
261
- key: "0"
262
- } : u.transform ? {
263
- name: "default",
264
- fn: d((w) => [
265
- q(F(u.transform(w.row)), 1)
266
- ]),
267
- key: "1"
268
- } : void 0,
269
- o.$slots[`header-${u.prop}`] ? {
270
- name: "header",
271
- fn: d((w) => [
272
- T(o.$slots, `header-${u.prop}`, k({ ref_for: !0 }, w))
273
- ]),
274
- key: "2"
275
- } : void 0
276
- ]), 1040))
277
- ], 64))), 128))
278
- ]),
279
- _: 2
280
- }, [
281
- (f = o.$slots) != null && f.append ? {
282
- name: "append",
283
- fn: d(() => [
284
- T(o.$slots, "append")
285
- ]),
286
- key: "0"
287
- } : void 0,
288
- (_ = o.$slots) != null && _.empty ? {
289
- name: "empty",
290
- fn: d(() => [
291
- T(o.$slots, "empty")
285
+ return (_, d) => (r(), p(l(Qe), h({
286
+ modelValue: f.value,
287
+ "onUpdate:modelValue": d[0] || (d[0] = (E) => f.value = E)
288
+ }, l(a), { onChange: u }), {
289
+ default: b(() => [
290
+ (r(!0), w(O, null, W(t.options, (E) => (r(), p(ce(V.value), h({
291
+ key: String(E.value),
292
+ ref_for: !0
293
+ }, E, {
294
+ border: t.type === "border"
295
+ }), {
296
+ default: b(() => [
297
+ le(Y(E.label), 1)
292
298
  ]),
293
- key: "1"
294
- } : void 0
295
- ]), 1040, ["data", "border", "row-key"]);
296
- };
299
+ _: 2
300
+ }, 1040, ["border"]))), 128))
301
+ ]),
302
+ _: 1
303
+ }, 16, ["modelValue"]));
297
304
  }
298
- }), ke = U(rt), it = {
305
+ }), xe = F(xl), Ml = $({ name: "EzIcon", inheritAttrs: !1 }), Pl = /* @__PURE__ */ $({
306
+ ...Ml,
307
+ props: {
308
+ size: { default: 20 },
309
+ color: { default: "inherit" }
310
+ },
311
+ setup(t) {
312
+ const g = t, o = M(() => {
313
+ const { size: s, color: f } = g;
314
+ return !s && !f ? {} : {
315
+ fontSize: s ? `${s}px` : void 0,
316
+ color: f
317
+ };
318
+ });
319
+ return (s, f) => (r(), w("i", h({
320
+ class: "ez-icon",
321
+ style: o.value
322
+ }, s.$attrs), [
323
+ R(s.$slots, "default", { class: "w-[1em] h-[1em]" })
324
+ ], 16));
325
+ }
326
+ }), ee = F(Pl), Il = {
299
327
  xmlns: "http://www.w3.org/2000/svg",
328
+ width: "200",
329
+ height: "200",
300
330
  viewBox: "0 0 1024 1024"
301
- }, ut = /* @__PURE__ */ v({
302
- name: "ArrowDownBold",
303
- __name: "arrow-down-bold",
304
- setup(l) {
305
- return (n, e) => (a(), m("svg", it, e[0] || (e[0] = [
306
- B("path", {
331
+ }, Ll = /* @__PURE__ */ $({
332
+ name: "ArrowDown",
333
+ __name: "ArrowDown",
334
+ setup(t) {
335
+ return (g, o) => (r(), w("svg", Il, [...o[0] || (o[0] = [
336
+ D("path", {
307
337
  fill: "currentColor",
308
- d: "M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496z"
338
+ 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"
309
339
  }, null, -1)
310
- ])));
340
+ ])]));
311
341
  }
312
- }), dt = {
342
+ }), Nl = {
313
343
  xmlns: "http://www.w3.org/2000/svg",
344
+ width: "200",
345
+ height: "200",
314
346
  viewBox: "0 0 1024 1024"
315
- }, ct = /* @__PURE__ */ v({
316
- name: "ArrowUpBold",
317
- __name: "arrow-up-bold",
318
- setup(l) {
319
- return (n, e) => (a(), m("svg", dt, e[0] || (e[0] = [
320
- B("path", {
347
+ }, Bl = /* @__PURE__ */ $({
348
+ name: "ArrowUp",
349
+ __name: "ArrowUp",
350
+ setup(t) {
351
+ return (g, o) => (r(), w("svg", Nl, [...o[0] || (o[0] = [
352
+ D("path", {
321
353
  fill: "currentColor",
322
- d: "M104.704 685.248a64 64 0 0 0 90.496 0l316.8-316.8 316.8 316.8a64 64 0 0 0 90.496-90.496L557.248 232.704a64 64 0 0 0-90.496 0L104.704 594.752a64 64 0 0 0 0 90.496z"
354
+ 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"
323
355
  }, null, -1)
324
- ])));
356
+ ])]));
325
357
  }
326
- }), ft = {
358
+ }), Ol = {
327
359
  xmlns: "http://www.w3.org/2000/svg",
360
+ width: "200",
361
+ height: "200",
328
362
  viewBox: "0 0 1024 1024"
329
- }, fe = /* @__PURE__ */ v({
363
+ }, $e = /* @__PURE__ */ $({
330
364
  name: "Delete",
331
365
  __name: "delete",
332
- setup(l) {
333
- return (n, e) => (a(), m("svg", ft, e[0] || (e[0] = [
334
- B("path", {
366
+ setup(t) {
367
+ return (g, o) => (r(), w("svg", Ol, [...o[0] || (o[0] = [
368
+ D("path", {
335
369
  fill: "currentColor",
336
- d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
370
+ 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"
337
371
  }, null, -1)
338
- ])));
372
+ ])]));
339
373
  }
340
- }), pt = {
374
+ }), Hl = {
341
375
  xmlns: "http://www.w3.org/2000/svg",
376
+ width: "200",
377
+ height: "200",
342
378
  viewBox: "0 0 1024 1024"
343
- }, pe = /* @__PURE__ */ v({
379
+ }, Ce = /* @__PURE__ */ $({
344
380
  name: "Plus",
345
381
  __name: "plus",
346
- setup(l) {
347
- return (n, e) => (a(), m("svg", pt, e[0] || (e[0] = [
348
- B("path", {
382
+ setup(t) {
383
+ return (g, o) => (r(), w("svg", Hl, [...o[0] || (o[0] = [
384
+ D("path", {
349
385
  fill: "currentColor",
350
- d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
386
+ 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"
351
387
  }, null, -1)
352
- ])));
388
+ ])]));
353
389
  }
354
- }), mt = {
390
+ }), ql = {
355
391
  xmlns: "http://www.w3.org/2000/svg",
392
+ width: "200",
393
+ height: "200",
356
394
  viewBox: "0 0 1024 1024"
357
- }, vt = /* @__PURE__ */ v({
395
+ }, Fl = /* @__PURE__ */ $({
358
396
  name: "Setting",
359
397
  __name: "setting",
360
- setup(l) {
361
- return (n, e) => (a(), m("svg", mt, e[0] || (e[0] = [
362
- B("path", {
398
+ setup(t) {
399
+ return (g, o) => (r(), w("svg", ql, [...o[0] || (o[0] = [
400
+ D("path", {
363
401
  fill: "currentColor",
364
- d: "M577.173 138.667v38.986a92.8 92.8 0 0 0 52.16 83.04 276.107 276.107 0 0 1 37.92 22.294 91.733 91.733 0 0 0 99.04 4.266l32.694-19.04 65.706 114.774-33.493 19.52a92.693 92.693 0 0 0-45.387 87.413c.694 7.84 1.014 15.093 1.014 22.08s-.32 14.24-1.014 22.08a92.693 92.693 0 0 0 45.387 87.413l33.493 19.52-65.706 114.774-32.694-19.04a91.733 91.733 0 0 0-99.04 4.266 276.107 276.107 0 0 1-37.92 22.294 92.8 92.8 0 0 0-52.266 83.04v38.986h-130.24v-38.986a92.8 92.8 0 0 0-52.16-83.04 276.107 276.107 0 0 1-37.92-22.294 91.733 91.733 0 0 0-99.04-4.266l-32.694 19.04L159.2 641.013l33.493-19.52a92.693 92.693 0 0 0 45.387-87.413c-.693-7.84-1.013-15.093-1.013-22.08s.32-14.24 1.013-22.08a92.693 92.693 0 0 0-45.387-87.413l-33.493-19.52 65.707-114.774 32.693 19.04a91.733 91.733 0 0 0 99.04-4.266 276.107 276.107 0 0 1 38.027-22.294 92.8 92.8 0 0 0 52.266-83.04v-38.986H577.28M512 692.48a182.08 182.08 0 0 0 40.427-4.533 178.827 178.827 0 0 0 134.666-135.574 181.333 181.333 0 0 0-35.36-153.653A178.453 178.453 0 0 0 512 331.52a182.08 182.08 0 0 0-40.427 4.533 178.827 178.827 0 0 0-134.666 135.574 181.333 181.333 0 0 0 35.36 153.653A178.453 178.453 0 0 0 512 692.48M634.667 64H389.6a17.547 17.547 0 0 0-17.44 17.6v96a17.547 17.547 0 0 1-10.027 16 352.747 352.747 0 0 0-48.32 28.373 17.6 17.6 0 0 1-9.813 3.094 17.013 17.013 0 0 1-8.533-2.347l-82.667-48a17.12 17.12 0 0 0-8.693-2.4 17.387 17.387 0 0 0-15.36 9.013L66.08 395.2a17.707 17.707 0 0 0 6.4 24.053l82.347 48A17.493 17.493 0 0 1 163.36 484c-.747 9.333-1.227 18.72-1.227 28.267s.48 18.933 1.227 28.266a17.6 17.6 0 0 1-8.533 16.747l-82.347 48a17.707 17.707 0 0 0-6.4 24.053L188.747 843.2a17.333 17.333 0 0 0 15.093 8.8 17.067 17.067 0 0 0 8.693-2.347l82.667-48a16.48 16.48 0 0 1 8.533-2.346 17.6 17.6 0 0 1 10.08 3.253 352.747 352.747 0 0 0 48.32 28.373 17.547 17.547 0 0 1 10.027 16v96a17.547 17.547 0 0 0 17.44 17.6h245.067a17.547 17.547 0 0 0 17.44-17.6v-96a17.547 17.547 0 0 1 10.026-16 352.747 352.747 0 0 0 48.32-28.373 17.6 17.6 0 0 1 10.08-3.253 16.48 16.48 0 0 1 8.534 2.346l82.666 48a17.067 17.067 0 0 0 8.694 2.347 17.333 17.333 0 0 0 15.093-8.8l122.133-213.867a17.707 17.707 0 0 0-6.4-24.053l-82.346-48a17.6 17.6 0 0 1-8.534-16.747c.747-9.333 1.227-18.72 1.227-28.266s-.48-18.934-1.227-28.267a17.493 17.493 0 0 1 8.534-16.747l82.346-48a17.707 17.707 0 0 0 6.4-24.053l-122.4-213.867a17.387 17.387 0 0 0-15.093-8.853 17.12 17.12 0 0 0-8.693 2.4l-82.667 48a17.013 17.013 0 0 1-8.533 2.347 17.6 17.6 0 0 1-10.08-3.254 352.747 352.747 0 0 0-48.32-28.373 17.547 17.547 0 0 1-10.027-16v-96A17.547 17.547 0 0 0 634.667 64M512 617.813a105.973 105.973 0 0 1-24-208.96 109.973 109.973 0 0 1 24-2.666 105.973 105.973 0 0 1 24 208.96 109.973 109.973 0 0 1-24 2.666"
402
+ 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"
365
403
  }, null, -1)
366
- ])));
404
+ ])]));
367
405
  }
368
- }), gt = {
406
+ }), Gl = {
369
407
  xmlns: "http://www.w3.org/2000/svg",
408
+ width: "200",
409
+ height: "200",
370
410
  viewBox: "0 0 1024 1024"
371
- }, me = /* @__PURE__ */ v({
411
+ }, ke = /* @__PURE__ */ $({
372
412
  name: "ZoomIn",
373
- __name: "zoom-in",
374
- setup(l) {
375
- return (n, e) => (a(), m("svg", gt, e[0] || (e[0] = [
376
- B("path", {
413
+ __name: "ZoomIn",
414
+ setup(t) {
415
+ return (g, o) => (r(), w("svg", Gl, [...o[0] || (o[0] = [
416
+ D("path", {
417
+ fill: "currentColor",
418
+ 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"
419
+ }, null, -1),
420
+ D("path", {
377
421
  fill: "currentColor",
378
- d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
422
+ 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"
379
423
  }, null, -1)
380
- ])));
424
+ ])]));
425
+ }
426
+ }), jl = { class: "ez-image-upload" }, Wl = {
427
+ key: 0,
428
+ class: "ez-image-upload__image"
429
+ }, Kl = {
430
+ key: 1,
431
+ class: "ez-image-upload__list"
432
+ }, Xl = { class: "flex items-center justify-center h-full" }, Yl = $({ name: "EzImageUpload", inheritAttrs: !1 }), Jl = /* @__PURE__ */ $({
433
+ ...Yl,
434
+ props: /* @__PURE__ */ I({
435
+ api: { type: Function, default: () => Promise.resolve({ url: "" }) },
436
+ imageTypes: { default: () => ["image/webp", "image/png", "image/jpg", "image/gif", "image/bmp", "image/jpeg"] },
437
+ limitSize: { default: 10 },
438
+ style: { default: () => ({ width: "100px", height: "100px" }) },
439
+ fit: { default: "contain" },
440
+ multiple: { type: Boolean, default: !1 },
441
+ limit: { default: 9 },
442
+ disabled: { type: Boolean, default: !1 }
443
+ }, {
444
+ modelValue: {},
445
+ modelModifiers: {}
446
+ }),
447
+ emits: ["update:modelValue"],
448
+ setup(t, { expose: g }) {
449
+ const o = t, s = J(), f = Z(s), { t: v } = se(), a = x(!1), V = x(0), u = P(t, "modelValue"), _ = M(() => o.multiple), d = /^(https?:\/\/|data:|blob:)/i, E = M(() => u.value ? L(u.value) : []);
450
+ function L(C) {
451
+ if (!C) return [];
452
+ const i = /^(https?:\/\/|data:|blob:)/i;
453
+ let k = [], z = "", H = !1;
454
+ C = C.trim().replace(/,$/, "");
455
+ const ae = C.split(",");
456
+ for (let q = 0; q < ae.length; q++) {
457
+ const G = ae[q].trim();
458
+ G && (i.test(G) ? (H && z && k.push(z.trim()), z = G, H = !0) : H ? z += "," + G : i.test(G.trim()) && k.push(G.trim()));
459
+ }
460
+ return H && z && k.push(z.trim()), k.filter((q) => q && i.test(q));
461
+ }
462
+ function N(C) {
463
+ return !C || C.length === 0 ? "" : C.filter((i) => i.trim()).map((i) => i.trim()).join(",");
464
+ }
465
+ const B = (C) => o.disabled ? (oe.warning(v("s.message.disabled")), !1) : o.imageTypes.includes(C.type.toLocaleLowerCase()) ? C.size > o.limitSize * 1024 * 1024 ? (oe.error(v("s.validate.upload.limit", { max: o.limitSize })), !1) : !0 : (oe.error(v("s.validate.upload.image")), !1), j = async ({ file: C }) => {
466
+ if (!o.disabled)
467
+ try {
468
+ const { url: i } = await o.api(C);
469
+ if (!i) throw new Error(v("s.message.uploadFail"));
470
+ if (_.value) {
471
+ const k = u.value ? L(u.value) : [];
472
+ i && d.test(i) && (k.push(i), u.value = N(k));
473
+ } else
474
+ u.value = i;
475
+ } catch (i) {
476
+ oe.error(i.message);
477
+ }
478
+ }, K = (C, i = 0) => {
479
+ C && (V.value = i, a.value = !0);
480
+ }, X = (C) => {
481
+ if (!o.disabled && !(!C || !u.value))
482
+ if (_.value) {
483
+ const i = L(u.value), k = i.findIndex((z) => z === C);
484
+ k !== -1 && (i.splice(k, 1), u.value = i.join(","));
485
+ } else
486
+ u.value = null;
487
+ }, T = x();
488
+ return g({
489
+ getUploadRef: () => T.value,
490
+ getUrlList: () => E.value
491
+ }), (C, i) => (r(), w("div", jl, [
492
+ _.value ? (r(), w("div", Kl, [
493
+ (r(!0), w(O, null, W(E.value, (k, z) => (r(), w("div", {
494
+ key: z,
495
+ class: "ez-image-upload__item",
496
+ style: Ae(o.style)
497
+ }, [
498
+ S(l(_e), {
499
+ src: k,
500
+ fit: o.fit
501
+ }, null, 8, ["src", "fit"]),
502
+ D("div", {
503
+ class: "ez-image-upload__handler",
504
+ onClick: i[3] || (i[3] = ge(() => {
505
+ }, ["stop"]))
506
+ }, [
507
+ S(l(ee), {
508
+ size: 18,
509
+ onClick: (H) => K(k, z)
510
+ }, {
511
+ default: b(() => [
512
+ S(l(ke))
513
+ ]),
514
+ _: 1
515
+ }, 8, ["onClick"]),
516
+ o.disabled ? A("", !0) : (r(), p(l(ee), {
517
+ key: 0,
518
+ size: 18,
519
+ onClick: (H) => X(k)
520
+ }, {
521
+ default: b(() => [
522
+ S(l($e))
523
+ ]),
524
+ _: 1
525
+ }, 8, ["onClick"]))
526
+ ])
527
+ ], 4))), 128)),
528
+ E.value.length < o.limit && !o.disabled || E.value.length === 0 ? (r(), p(l(ye), h({ key: 0 }, l(f), {
529
+ ref_key: "uploadRef",
530
+ ref: T,
531
+ action: "",
532
+ accept: "image/*",
533
+ "show-file-list": !1,
534
+ "before-upload": B,
535
+ "http-request": j,
536
+ style: o.style,
537
+ disabled: o.disabled,
538
+ class: [{ "is-disabled": o.disabled }, "ez-image-upload__item ez-image-upload__button"]
539
+ }), {
540
+ default: b(() => [
541
+ D("div", Xl, [
542
+ S(l(ee), null, {
543
+ default: b(() => [
544
+ S(l(Ce))
545
+ ]),
546
+ _: 1
547
+ })
548
+ ])
549
+ ]),
550
+ _: 1
551
+ }, 16, ["style", "disabled", "class"])) : A("", !0)
552
+ ])) : (r(), p(l(ye), h({ key: 0 }, l(f), {
553
+ ref_key: "uploadRef",
554
+ ref: T,
555
+ action: "",
556
+ accept: "image/*",
557
+ "show-file-list": !1,
558
+ "before-upload": B,
559
+ "http-request": j,
560
+ style: o.style,
561
+ disabled: o.disabled,
562
+ class: ["ez-image-upload__wrapper", { "is-disabled": o.disabled }]
563
+ }), {
564
+ default: b(() => [
565
+ u.value ? (r(), w("div", Wl, [
566
+ S(l(_e), {
567
+ src: u.value,
568
+ fit: o.fit
569
+ }, null, 8, ["src", "fit"]),
570
+ D("div", {
571
+ class: "ez-image-upload__handler",
572
+ onClick: i[2] || (i[2] = ge(() => {
573
+ }, ["stop"]))
574
+ }, [
575
+ S(l(ee), {
576
+ size: 18,
577
+ onClick: i[0] || (i[0] = (k) => K(u.value, 0))
578
+ }, {
579
+ default: b(() => [
580
+ S(l(ke))
581
+ ]),
582
+ _: 1
583
+ }),
584
+ o.disabled ? A("", !0) : (r(), p(l(ee), {
585
+ key: 0,
586
+ size: 18,
587
+ onClick: i[1] || (i[1] = (k) => X(u.value))
588
+ }, {
589
+ default: b(() => [
590
+ S(l($e))
591
+ ]),
592
+ _: 1
593
+ }))
594
+ ])
595
+ ])) : (r(), p(l(ee), { key: 1 }, {
596
+ default: b(() => [
597
+ S(l(Ce))
598
+ ]),
599
+ _: 1
600
+ }))
601
+ ]),
602
+ _: 1
603
+ }, 16, ["style", "disabled", "class"])),
604
+ a.value ? (r(), p(l(el), {
605
+ key: 2,
606
+ "url-list": _.value ? E.value : [u.value],
607
+ "initial-index": V.value,
608
+ onClose: i[4] || (i[4] = (k) => a.value = !1)
609
+ }, null, 8, ["url-list", "initial-index"])) : A("", !0)
610
+ ]));
611
+ }
612
+ }), Me = F(Jl);
613
+ var c = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.TEXTAREA = "textarea", t.NUMBER = "number", t.PASSWORD = "password", t.SELECT = "select", t.RADIO = "radio", t.CHECKBOX = "checkbox", t.DATE = "date", t.DATETIME = "datetime", t.DATERANGE = "daterange", t.DATETIMERANGE = "datetimerange", t.TIME = "time", t.TIMERANGE = "timerange", t.UPLOAD_IMAGES = "upload-images", t.SWITCH = "switch", t.TREE_SELECT = "tree-select", t.CASCADER = "cascader", t.TREE = "tree", t.SLIDER = "slider", t.RATE = "rate", t))(c || {});
614
+ const Zl = $({ name: "EzDynamicForm", inheritAttrs: !1 }), Ql = /* @__PURE__ */ $({
615
+ ...Zl,
616
+ props: {
617
+ items: { default: () => [] },
618
+ modelValue: {},
619
+ cols: { default: 1 },
620
+ gutter: { default: 20 },
621
+ formProps: {}
622
+ },
623
+ emits: ["update:modelValue"],
624
+ setup(t, { expose: g, emit: o }) {
625
+ const s = t, f = o, v = Be(), a = x({});
626
+ let V = !1;
627
+ const u = J(), _ = M(() => ({
628
+ ...Z(u).value,
629
+ ...s.formProps || {}
630
+ })), d = () => {
631
+ const n = { ...s.modelValue || {} };
632
+ for (const y of s.items)
633
+ y.defaultValue !== void 0 && !(y.prop in n) && (n[y.prop] = y.defaultValue);
634
+ a.value = n;
635
+ }, E = M(() => !s.items || s.items.length === 0 ? [] : s.items.filter((n) => {
636
+ if (!n.hidden && !n.show) return !0;
637
+ if (n.hidden) return !1;
638
+ if (n.show)
639
+ try {
640
+ return n.show(a.value);
641
+ } catch (y) {
642
+ return console.error(`[EzDynamicForm] Error in show function for field "${n.prop}":`, y), !1;
643
+ }
644
+ return !0;
645
+ })), L = M(() => Math.floor(24 / s.cols)), N = (n) => n.span !== void 0 ? Math.max(1, Math.min(24, n.span)) : L.value, B = /* @__PURE__ */ new WeakMap(), j = (n) => {
646
+ if (n.rules) return n.rules;
647
+ if (n.required) {
648
+ if (B.has(n))
649
+ return B.get(n);
650
+ const e = [{ required: !0, message: n.requiredMessage || `请${X(n.type)}${n.label || ""}`, trigger: C(n.type) }];
651
+ return B.set(n, e), e;
652
+ }
653
+ }, K = /* @__PURE__ */ new Set([
654
+ c.SELECT,
655
+ c.RADIO,
656
+ c.CHECKBOX,
657
+ c.DATE,
658
+ c.DATETIME,
659
+ c.DATERANGE,
660
+ c.DATETIMERANGE,
661
+ c.TIME,
662
+ c.TIMERANGE,
663
+ c.SWITCH,
664
+ c.CASCADER,
665
+ c.TREE,
666
+ c.TREE_SELECT
667
+ ]), X = (n) => n && K.has(n) ? "选择" : "输入", T = /* @__PURE__ */ new Set([
668
+ c.SELECT,
669
+ c.RADIO,
670
+ c.CHECKBOX,
671
+ c.DATE,
672
+ c.DATETIME,
673
+ c.DATERANGE,
674
+ c.DATETIMERANGE,
675
+ c.TIME,
676
+ c.TIMERANGE,
677
+ c.SWITCH,
678
+ c.CASCADER,
679
+ c.TREE,
680
+ c.TREE_SELECT,
681
+ c.SLIDER,
682
+ c.RATE
683
+ ]), C = (n) => n && T.has(n) ? "change" : "blur", i = (n) => {
684
+ if (n.disabled) return !0;
685
+ if (n.disabledWhen)
686
+ try {
687
+ return n.disabledWhen(a.value);
688
+ } catch (y) {
689
+ return console.error(`[EzDynamicForm] Error in disabledWhen function for field "${n.prop}":`, y), !1;
690
+ }
691
+ return !1;
692
+ }, k = async () => {
693
+ if (!v.value)
694
+ return console.warn("[EzDynamicForm] Form ref is not available"), !1;
695
+ try {
696
+ return await v.value.validate(), !0;
697
+ } catch {
698
+ return !1;
699
+ }
700
+ }, z = async (n) => {
701
+ if (!v.value)
702
+ return console.warn("[EzDynamicForm] Form ref is not available"), !1;
703
+ try {
704
+ return await v.value.validateField(n), !0;
705
+ } catch {
706
+ return !1;
707
+ }
708
+ }, H = (n) => {
709
+ if (!v.value) {
710
+ console.warn("[EzDynamicForm] Form ref is not available");
711
+ return;
712
+ }
713
+ v.value.clearValidate(n);
714
+ }, ae = (n) => {
715
+ if (!v.value) {
716
+ console.warn("[EzDynamicForm] Form ref is not available");
717
+ return;
718
+ }
719
+ v.value.resetFields(n), ue(() => {
720
+ d();
721
+ });
722
+ }, q = () => ({ ...a.value }), G = (n, y = !0) => {
723
+ if (!n || typeof n != "object") {
724
+ console.warn("[EzDynamicForm] Invalid data provided to setFormData");
725
+ return;
726
+ }
727
+ V = !0, a.value = y ? { ...a.value, ...n } : { ...n }, ue(() => {
728
+ V = !1;
729
+ });
730
+ };
731
+ he(
732
+ () => s.modelValue,
733
+ (n) => {
734
+ n && !V && typeof n == "object" && (V = !0, a.value = { ...n }, ue(() => {
735
+ V = !1;
736
+ }));
737
+ },
738
+ { deep: !0, flush: "post" }
739
+ );
740
+ let Q = null;
741
+ return he(
742
+ a,
743
+ (n) => {
744
+ V || (Q && clearTimeout(Q), Q = setTimeout(() => {
745
+ f("update:modelValue", { ...n }), Q = null;
746
+ }, 0));
747
+ },
748
+ { deep: !0, flush: "post" }
749
+ ), fe(() => {
750
+ d();
751
+ }), g({
752
+ validate: k,
753
+ validateField: z,
754
+ clearValidate: H,
755
+ resetFields: ae,
756
+ getFormData: q,
757
+ setFormData: G,
758
+ formRef: v
759
+ }), (n, y) => (r(), p(l(ll), h({
760
+ ref_key: "formRef",
761
+ ref: v,
762
+ model: a.value
763
+ }, _.value, { class: "ez-dynamic-form" }), {
764
+ default: b(() => [
765
+ S(l(al), {
766
+ gutter: s.gutter
767
+ }, {
768
+ default: b(() => [
769
+ (r(!0), w(O, null, W(E.value, (e) => (r(), p(l(tl), {
770
+ key: e.prop,
771
+ span: N(e)
772
+ }, {
773
+ default: b(() => [
774
+ S(l(ol), h({
775
+ prop: e.prop,
776
+ label: e.label,
777
+ rules: j(e)
778
+ }, { ref_for: !0 }, e.itemAttrs), de({
779
+ default: b(() => [
780
+ n.$slots[e.prop] ? R(n.$slots, e.prop, {
781
+ key: 0,
782
+ item: e,
783
+ value: a.value[e.prop],
784
+ formData: a.value
785
+ }) : e.component ? (r(), p(ce(e.component), h({
786
+ key: 1,
787
+ modelValue: a.value[e.prop],
788
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
789
+ disabled: i(e)
790
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : (r(), w(O, { key: 2 }, [
791
+ e.type === l(c).INPUT || !e.type ? (r(), p(l(ie), h({
792
+ key: 0,
793
+ modelValue: a.value[e.prop],
794
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
795
+ placeholder: e.placeholder || `请输入${e.label || ""}`,
796
+ disabled: i(e),
797
+ clearable: ""
798
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.type === l(c).TEXTAREA ? (r(), p(l(ie), h({
799
+ key: 1,
800
+ modelValue: a.value[e.prop],
801
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
802
+ type: "textarea",
803
+ placeholder: e.placeholder || `请输入${e.label || ""}`,
804
+ disabled: i(e)
805
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.type === l(c).NUMBER ? (r(), p(l(rl), h({
806
+ key: 2,
807
+ modelValue: a.value[e.prop],
808
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
809
+ placeholder: e.placeholder,
810
+ disabled: i(e)
811
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.type === l(c).PASSWORD ? (r(), p(l(ie), h({
812
+ key: 3,
813
+ modelValue: a.value[e.prop],
814
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
815
+ type: "password",
816
+ placeholder: e.placeholder || `请输入${e.label || ""}`,
817
+ disabled: i(e),
818
+ "show-password": "",
819
+ clearable: ""
820
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.type === l(c).SELECT ? (r(), p(l(De), h({
821
+ key: 4,
822
+ modelValue: a.value[e.prop],
823
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
824
+ options: e.options || [],
825
+ placeholder: e.placeholder || `请选择${e.label || ""}`,
826
+ disabled: i(e)
827
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "options", "placeholder", "disabled"])) : e.type === l(c).RADIO ? (r(), p(l(xe), h({
828
+ key: 5,
829
+ modelValue: a.value[e.prop],
830
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
831
+ options: e.options || [],
832
+ disabled: i(e)
833
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "options", "disabled"])) : e.type === l(c).CHECKBOX ? (r(), p(l(Re), h({
834
+ key: 6,
835
+ modelValue: a.value[e.prop],
836
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
837
+ options: e.options || [],
838
+ disabled: i(e)
839
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "options", "disabled"])) : e.type === l(c).DATE ? (r(), p(l(ne), h({
840
+ key: 7,
841
+ modelValue: a.value[e.prop],
842
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
843
+ type: "date",
844
+ placeholder: e.placeholder || `请选择${e.label || ""}`,
845
+ disabled: i(e)
846
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.type === l(c).DATETIME ? (r(), p(l(ne), h({
847
+ key: 8,
848
+ modelValue: a.value[e.prop],
849
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
850
+ type: "datetime",
851
+ placeholder: e.placeholder || `请选择${e.label || ""}`,
852
+ disabled: i(e)
853
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.type === l(c).DATERANGE ? (r(), p(l(ne), h({
854
+ key: 9,
855
+ modelValue: a.value[e.prop],
856
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
857
+ type: "daterange",
858
+ "range-separator": "至",
859
+ "start-placeholder": "开始日期",
860
+ "end-placeholder": "结束日期",
861
+ disabled: i(e)
862
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === l(c).DATETIMERANGE ? (r(), p(l(ne), h({
863
+ key: 10,
864
+ modelValue: a.value[e.prop],
865
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
866
+ type: "datetimerange",
867
+ "range-separator": "至",
868
+ "start-placeholder": "开始时间",
869
+ "end-placeholder": "结束时间",
870
+ disabled: i(e)
871
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === l(c).TIME ? (r(), p(l(Ve), h({
872
+ key: 11,
873
+ modelValue: a.value[e.prop],
874
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
875
+ placeholder: e.placeholder || `请选择${e.label || ""}`,
876
+ disabled: i(e)
877
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.type === l(c).TIMERANGE ? (r(), p(l(Ve), h({
878
+ key: 12,
879
+ modelValue: a.value[e.prop],
880
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
881
+ "is-range": "",
882
+ "range-separator": "至",
883
+ "start-placeholder": "开始时间",
884
+ "end-placeholder": "结束时间",
885
+ disabled: i(e)
886
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === l(c).SWITCH ? (r(), p(l(sl), h({
887
+ key: 13,
888
+ modelValue: a.value[e.prop],
889
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
890
+ disabled: i(e)
891
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === l(c).TREE_SELECT ? (r(), p(l(nl), h({
892
+ key: 14,
893
+ modelValue: a.value[e.prop],
894
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
895
+ data: e.options,
896
+ placeholder: e.placeholder || `请选择${e.label || ""}`,
897
+ disabled: i(e)
898
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "data", "placeholder", "disabled"])) : e.type === l(c).CASCADER ? (r(), p(l(ul), h({
899
+ key: 15,
900
+ modelValue: a.value[e.prop],
901
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
902
+ options: e.options,
903
+ placeholder: e.placeholder || `请选择${e.label || ""}`,
904
+ disabled: i(e),
905
+ clearable: ""
906
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "options", "placeholder", "disabled"])) : e.type === l(c).TREE ? (r(), p(l(dl), h({
907
+ key: 16,
908
+ modelValue: a.value[e.prop],
909
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
910
+ data: e.options,
911
+ "show-checkbox": "",
912
+ "node-key": "id"
913
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "data"])) : e.type === l(c).SLIDER ? (r(), p(l(il), h({
914
+ key: 17,
915
+ modelValue: a.value[e.prop],
916
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
917
+ disabled: i(e)
918
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === l(c).RATE ? (r(), p(l(pl), h({
919
+ key: 18,
920
+ modelValue: a.value[e.prop],
921
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
922
+ disabled: i(e)
923
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "upload-images" && e.attrs?.api ? (r(), p(l(Me), h({
924
+ key: 19,
925
+ modelValue: a.value[e.prop],
926
+ "onUpdate:modelValue": (m) => a.value[e.prop] = m,
927
+ api: e.attrs?.api,
928
+ disabled: i(e)
929
+ }, { ref_for: !0 }, e.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "api", "disabled"])) : A("", !0)
930
+ ], 64))
931
+ ]),
932
+ _: 2
933
+ }, [
934
+ n.$slots[`label-${e.prop}`] ? {
935
+ name: "label",
936
+ fn: b(() => [
937
+ R(n.$slots, `label-${e.prop}`, { item: e })
938
+ ]),
939
+ key: "0"
940
+ } : void 0
941
+ ]), 1040, ["prop", "label", "rules"])
942
+ ]),
943
+ _: 2
944
+ }, 1032, ["span"]))), 128))
945
+ ]),
946
+ _: 3
947
+ }, 8, ["gutter"])
948
+ ]),
949
+ _: 3
950
+ }, 16, ["model"]));
381
951
  }
382
- }), yt = { class: "ez-search-from" }, _t = { class: "ez-search-from_operate" }, ht = v({ name: "EzSearchForm", inheritAttrs: !1 }), bt = /* @__PURE__ */ v({
383
- ...ht,
384
- props: /* @__PURE__ */ K({
385
- arrowHeight: { default: 50 },
952
+ }), $a = F(Ql), ea = $({ name: "EzTable", inheritAttrs: !1 }), la = /* @__PURE__ */ $({
953
+ ...ea,
954
+ props: {
955
+ data: { default: () => [] },
956
+ columns: { default: () => [] },
957
+ rowKey: {}
958
+ },
959
+ setup(t, { expose: g }) {
960
+ const o = t, s = x(), f = J(), v = Z(f), a = (u) => {
961
+ const _ = o.columns[o.columns.length - 1], d = () => u.type ? !1 : u.prop !== _.prop;
962
+ return { ...{
963
+ align: "center",
964
+ hidden: 1,
965
+ resizable: !0,
966
+ reserveSelection: u.type === "selection",
967
+ /** 默认最后一个 */
968
+ showOverflowTooltip: d()
969
+ }, ...u };
970
+ };
971
+ return g({
972
+ getTableRef: () => s.value
973
+ }), (u, _) => (r(), p(l(cl), h({
974
+ ref_key: "tableRef",
975
+ ref: s,
976
+ data: o.data,
977
+ border: "",
978
+ "row-key": "id"
979
+ }, l(v)), de({
980
+ default: b(() => [
981
+ (r(!0), w(O, null, W(o.columns, (d) => (r(), w(O, {
982
+ key: d.prop
983
+ }, [
984
+ ["selection", "index"].includes(d.type) ? (r(), p(l(we), h({
985
+ key: 0,
986
+ ref_for: !0
987
+ }, a(d)), null, 16)) : d.hidden ? A("", !0) : (r(), p(l(we), h({
988
+ key: 1,
989
+ ref_for: !0
990
+ }, a(d)), de({ _: 2 }, [
991
+ u.$slots[d.prop] ? {
992
+ name: "default",
993
+ fn: b((E) => [
994
+ R(u.$slots, d.prop, h({ ref_for: !0 }, E))
995
+ ]),
996
+ key: "0"
997
+ } : d.transform ? {
998
+ name: "default",
999
+ fn: b((E) => [
1000
+ le(Y(d.transform(E.row)), 1)
1001
+ ]),
1002
+ key: "1"
1003
+ } : void 0,
1004
+ u.$slots[`header-${d.prop}`] ? {
1005
+ name: "header",
1006
+ fn: b((E) => [
1007
+ R(u.$slots, `header-${d.prop}`, h({ ref_for: !0 }, E))
1008
+ ]),
1009
+ key: "2"
1010
+ } : void 0
1011
+ ]), 1040))
1012
+ ], 64))), 128))
1013
+ ]),
1014
+ _: 2
1015
+ }, [
1016
+ u.$slots?.append ? {
1017
+ name: "append",
1018
+ fn: b(() => [
1019
+ R(u.$slots, "append")
1020
+ ]),
1021
+ key: "0"
1022
+ } : void 0,
1023
+ u.$slots?.empty ? {
1024
+ name: "empty",
1025
+ fn: b(() => [
1026
+ R(u.$slots, "empty")
1027
+ ]),
1028
+ key: "1"
1029
+ } : void 0
1030
+ ]), 1040, ["data"]));
1031
+ }
1032
+ }), Pe = F(la), aa = { class: "ez-search-form" }, ta = { class: "ez-search-form__operate" }, oa = $({ name: "EzSearchForm", inheritAttrs: !1 }), ra = /* @__PURE__ */ $({
1033
+ ...oa,
1034
+ props: /* @__PURE__ */ I({
1035
+ collapsedHeight: { default: 50 },
386
1036
  reset: { type: Boolean }
387
1037
  }, {
388
1038
  expanded: { default: !1 },
389
1039
  expandedModifiers: {}
390
1040
  }),
391
1041
  emits: ["update:expanded"],
392
- setup(l, { expose: n }) {
393
- const e = l, { t } = Q(), r = V(), c = V(0), o = O(l, "expanded"), b = P(() => c.value > e.arrowHeight), f = P(() => o.value ? ct : ut), _ = P(() => o.value ? t("s.button.collapse") : t("s.button.expand")), u = () => {
394
- const L = setTimeout(() => {
395
- if (clearTimeout(L), r.value) {
396
- const { height: M } = r.value.getBoundingClientRect();
397
- c.value = M;
398
- }
399
- }, 50);
400
- }, w = () => {
401
- o.value = !o.value;
1042
+ setup(t, { expose: g }) {
1043
+ const o = t, { t: s } = se(), f = x(), v = x(0), a = P(t, "expanded"), V = M(() => v.value > o.collapsedHeight), u = M(() => a.value ? Bl : Ll), _ = M(() => a.value ? s("s.button.collapse") : s("s.button.expand"));
1044
+ let d = null;
1045
+ const E = () => {
1046
+ f.value && (v.value = f.value.scrollHeight, console.log(v.value, o.collapsedHeight, V.value));
1047
+ }, L = () => {
1048
+ a.value = !a.value;
402
1049
  };
403
- return be(() => {
404
- $e(u), window.addEventListener("resize", u);
405
- }), Ke(() => {
406
- window.removeEventListener("resize", u);
407
- }), n({
408
- countViewHeight: u
409
- }), (L, M) => (a(), m("div", yt, [
410
- B("div", {
411
- class: "overflow-hidden transition-[height] duration-300 ease-linear",
412
- style: we({
413
- height: o.value ? `${c.value}px` : `${e.arrowHeight}px`
1050
+ return fe(() => {
1051
+ setTimeout(() => {
1052
+ f.value && (E(), d = new ResizeObserver(E), d.observe(f.value));
1053
+ }, 50);
1054
+ }), Oe(() => {
1055
+ d && (d.disconnect(), d = null);
1056
+ }), g({
1057
+ countViewHeight: E
1058
+ }), (N, B) => (r(), w("div", aa, [
1059
+ D("div", {
1060
+ class: "ez-search-form__wrapper",
1061
+ style: Ae({
1062
+ height: v.value ? a.value ? `${v.value}px` : `${o.collapsedHeight}px` : "auto"
414
1063
  })
415
1064
  }, [
416
- B("div", _t, [
417
- T(L.$slots, "operate"),
418
- b.value ? (a(), p(s(Y), {
1065
+ D("div", ta, [
1066
+ R(N.$slots, "operate"),
1067
+ V.value ? (r(), p(l(te), {
419
1068
  key: 0,
420
- icon: f.value,
1069
+ icon: u.value,
421
1070
  size: "small",
422
1071
  title: _.value,
423
1072
  circle: "",
424
- onClick: M[0] || (M[0] = (j) => w())
425
- }, null, 8, ["icon", "title"])) : E("", !0)
1073
+ onClick: B[0] || (B[0] = (j) => L())
1074
+ }, null, 8, ["icon", "title"])) : A("", !0)
426
1075
  ]),
427
- B("div", {
1076
+ D("div", {
428
1077
  ref_key: "wrapRef",
429
- ref: r
1078
+ ref: f
430
1079
  }, [
431
- T(L.$slots, "default")
1080
+ R(N.$slots, "default")
432
1081
  ], 512)
433
1082
  ], 4)
434
1083
  ]));
435
1084
  }
436
- }), ze = U(bt), $t = v({ name: "EzPagination" }), wt = /* @__PURE__ */ v({
437
- ...$t,
1085
+ }), Ie = F(ra), sa = $({ name: "EzPagination", inheritAttrs: !1 }), na = /* @__PURE__ */ $({
1086
+ ...sa,
438
1087
  props: {
439
- background: { type: Boolean, default: !1 },
440
- size: { default: "default" },
441
- total: { default: 0 },
442
- pageSizes: { default: () => [10, 20, 50, 100] },
443
- layout: { default: "total, sizes, prev, pager, next, jumper" }
1088
+ currentPage: {},
1089
+ currentPageModifiers: {},
1090
+ pageSize: {},
1091
+ pageSizeModifiers: {}
444
1092
  },
445
- setup(l) {
446
- const n = l;
447
- return (e, t) => (a(), p(s(Pe), k({
448
- "page-sizes": n.pageSizes,
449
- background: n.background,
450
- size: n.size,
451
- layout: n.layout,
452
- total: n.total
453
- }, e.$attrs), null, 16, ["page-sizes", "background", "size", "layout", "total"]));
1093
+ emits: /* @__PURE__ */ I(["current-change", "size-change"], ["update:currentPage", "update:pageSize"]),
1094
+ setup(t, { emit: g }) {
1095
+ const o = g, s = P(t, "currentPage"), f = P(t, "pageSize"), v = J(), a = Z(v), V = (_) => {
1096
+ o("current-change", _);
1097
+ }, u = (_) => {
1098
+ o("size-change", _);
1099
+ };
1100
+ return (_, d) => (r(), p(l(fl), h({
1101
+ "current-page": s.value,
1102
+ "onUpdate:currentPage": d[0] || (d[0] = (E) => s.value = E),
1103
+ "page-size": f.value,
1104
+ "onUpdate:pageSize": d[1] || (d[1] = (E) => f.value = E),
1105
+ "page-sizes": [10, 20, 50, 100],
1106
+ layout: "total, sizes, prev, pager, next, jumper"
1107
+ }, l(a), {
1108
+ onCurrentChange: V,
1109
+ onSizeChange: u
1110
+ }), null, 16, ["current-page", "page-size"]));
454
1111
  }
455
- }), Ce = U(wt);
456
- var le = /* @__PURE__ */ ((l) => (l.ASC = "ascending", l.DESC = "descending", l[l.EMPTY = null] = "EMPTY", l))(le || {});
457
- const kt = (l) => {
458
- const n = V([]), e = P(() => n.value), t = P(() => n.value.map((o) => o[l]));
1112
+ }), Le = F(na);
1113
+ var pe = /* @__PURE__ */ ((t) => (t.ASC = "ascending", t.DESC = "descending", t[t.EMPTY = null] = "EMPTY", t))(pe || {});
1114
+ const ua = (t) => {
1115
+ const g = x([]), o = M(() => g.value), s = M(() => g.value.map((a) => a[t]));
459
1116
  return {
460
- selectionChange: (o) => {
461
- n.value = o;
1117
+ selectionChange: (a) => {
1118
+ g.value = a;
462
1119
  },
463
- getSelectedList: e,
464
- getSelectedIds: t,
465
- getSortParams: ({ prop: o, order: b }) => {
466
- const f = { asc: null, desc: null };
467
- return b === le.ASC ? (f.asc = o, f.desc = null) : b === le.DESC && (f.asc = null, f.desc = o), f;
1120
+ getSelectedList: o,
1121
+ getSelectedIds: s,
1122
+ getSortParams: ({ prop: a, order: V }) => {
1123
+ const u = { asc: null, desc: null };
1124
+ return V === pe.ASC ? (u.asc = a, u.desc = null) : V === pe.DESC && (u.asc = null, u.desc = a), u;
468
1125
  }
469
1126
  };
470
- }, zt = /* @__PURE__ */ v({
1127
+ }, da = /* @__PURE__ */ $({
471
1128
  __name: "column-config",
472
1129
  props: {
473
1130
  modelValue: { type: Boolean, default: !1 },
@@ -475,55 +1132,54 @@ const kt = (l) => {
475
1132
  columns: { default: () => [] },
476
1133
  columnsModifiers: {}
477
1134
  },
478
- emits: /* @__PURE__ */ K(["change"], ["update:modelValue", "update:columns"]),
479
- setup(l, { emit: n }) {
480
- const { t: e } = Q(), t = ["selection", "index", "expand"], r = n, c = O(l, "modelValue"), o = O(l, "columns"), b = (f) => o.value.filter((u) => u.hidden === 0).length < 2 && f.hidden === 0;
481
- return (f, _) => (a(), p(s(Re), {
482
- modelValue: c.value,
483
- "onUpdate:modelValue": _[1] || (_[1] = (u) => c.value = u),
1135
+ emits: /* @__PURE__ */ I(["change"], ["update:modelValue", "update:columns"]),
1136
+ setup(t, { emit: g }) {
1137
+ const { t: o } = se(), s = ["selection", "index", "expand"], f = g, v = P(t, "modelValue"), a = P(t, "columns"), V = (u) => a.value.filter((d) => d.hidden === 0).length < 2 && u.hidden === 0;
1138
+ return (u, _) => (r(), p(l(vl), {
1139
+ modelValue: v.value,
1140
+ "onUpdate:modelValue": _[1] || (_[1] = (d) => v.value = d),
484
1141
  class: "ez-column-wrapper",
485
- title: s(e)("s.label.column"),
1142
+ title: l(o)("s.label.column"),
486
1143
  size: "15%"
487
1144
  }, {
488
- default: d(() => [
489
- (a(!0), m(R, null, N(o.value, (u) => (a(), m(R, {
490
- key: u.prop
1145
+ default: b(() => [
1146
+ (r(!0), w(O, null, W(a.value, (d) => (r(), w(O, {
1147
+ key: d.prop
491
1148
  }, [
492
- t.includes(u.type) ? E("", !0) : (a(), p(s(ge), {
1149
+ s.includes(d.type) ? A("", !0) : (r(), p(l(Ue), {
493
1150
  key: 0,
494
- modelValue: u.hidden,
495
- "onUpdate:modelValue": (w) => u.hidden = w,
1151
+ modelValue: d.hidden,
1152
+ "onUpdate:modelValue": (E) => d.hidden = E,
496
1153
  class: "flex",
497
1154
  "true-value": 0,
498
1155
  "false-value": 1,
499
- label: u.label,
1156
+ label: d.label,
500
1157
  checked: "",
501
- disabled: b(u),
502
- onChange: _[0] || (_[0] = (w) => r("change"))
1158
+ disabled: V(d),
1159
+ onChange: _[0] || (_[0] = (E) => f("change"))
503
1160
  }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"]))
504
1161
  ], 64))), 128))
505
1162
  ]),
506
1163
  _: 1
507
1164
  }, 8, ["modelValue", "title"]));
508
1165
  }
509
- }), Ct = { class: "ez-fast-table" }, Et = { class: "ez-fast-table-wrapper" }, xt = {
1166
+ }), ia = { class: "ez-fast-table" }, pa = { class: "ez-fast-table_wrapper" }, ca = {
510
1167
  key: 0,
511
- class: "ez-fast-table-wrapper_header_operation"
512
- }, St = { class: "mt-[10px] flex justify-end" }, Tt = v({
1168
+ class: "ez-fast-table_wrapper_header_operation"
1169
+ }, fa = { class: "ez-fast-table_pagination" }, va = $({
513
1170
  name: "EzFastTable",
514
- directives: { loading: ae.directive },
1171
+ directives: { loading: ve.directive },
515
1172
  inheritAttrs: !1
516
- }), Bt = /* @__PURE__ */ v({
517
- ...Tt,
518
- props: /* @__PURE__ */ K({
1173
+ }), ma = /* @__PURE__ */ $({
1174
+ ...va,
1175
+ props: /* @__PURE__ */ I({
519
1176
  api: { type: Function, default: () => Promise.resolve() },
520
1177
  beforeSearch: { type: Function, default: () => Promise.resolve() },
521
1178
  columnTool: { type: Boolean, default: !0 },
522
1179
  expanded: { type: Boolean, default: !1 },
523
1180
  data: {},
524
1181
  columns: {},
525
- border: { type: Boolean },
526
- rowKey: { default: "id" }
1182
+ rowKey: {}
527
1183
  }, {
528
1184
  params: {},
529
1185
  paramsModifiers: {},
@@ -532,440 +1188,165 @@ const kt = (l) => {
532
1188
  loading: { type: Boolean },
533
1189
  loadingModifiers: {}
534
1190
  }),
535
- emits: /* @__PURE__ */ K(["changePage", "reset", "query"], ["update:params", "update:columns", "update:loading"]),
536
- setup(l, { expose: n, emit: e }) {
537
- const { t } = Q(), r = l, c = V(r.expanded), { selectionChange: o, getSelectedList: b, getSortParams: f, getSelectedIds: _ } = kt(r.rowKey), u = V(null), w = V(!1), L = V(null), M = V([]), j = V(0), G = e, x = O(l, "params"), g = O(l, "columns"), i = O(l, "loading"), h = async () => {
1191
+ emits: /* @__PURE__ */ I(["changePage", "reset", "query"], ["update:params", "update:columns", "update:loading"]),
1192
+ setup(t, { expose: g, emit: o }) {
1193
+ const { t: s } = se(), f = t, v = J(), a = Z(v), V = x(f.expanded), { selectionChange: u, getSelectedList: _, getSortParams: d, getSelectedIds: E } = ua(f.rowKey), L = x(null), N = x(!1), B = x(null), j = x([]), K = x(0), X = o, T = P(t, "params"), C = P(t, "columns"), i = P(t, "loading"), k = async () => {
538
1194
  try {
539
- i.value = !0, await r.beforeSearch(x.value);
540
- const { code: y, data: $ } = await r.api(x.value);
541
- y === 200 && $.records ? (M.value = $.records || [], j.value = $.total) : (M.value = [], j.value = 0), G("query");
1195
+ i.value = !0, await f.beforeSearch(T.value);
1196
+ const { code: y, data: e } = await f.api(T.value);
1197
+ y === 200 && e.records ? (j.value = e.records || [], K.value = e.total) : (j.value = [], K.value = 0), X("query");
542
1198
  } finally {
543
1199
  i.value = !1;
544
1200
  }
545
1201
  }, z = () => {
546
- x.value.current = 1, h();
547
- }, I = () => {
548
- var y;
549
- return (y = u.value) == null ? void 0 : y.getTableRef();
550
- }, W = (y) => {
551
- const $ = f(y);
552
- x.value = { ...x.value, ...$ };
553
- const { column: ee } = y;
554
- ee.sortable === "custom" && z();
555
- }, A = (y) => JSON.parse(JSON.stringify(y)), D = () => {
556
- x.value = A(L.value), G("reset"), $e(() => z());
557
- }, se = (y) => {
558
- G("changePage", y), y.size ? z() : h();
559
- }, Ee = () => {
560
- I().doLayout();
1202
+ T.value.current = 1, k();
1203
+ }, H = () => L.value?.getTableRef(), ae = (y) => {
1204
+ const e = d(y);
1205
+ T.value = { ...T.value, ...e };
1206
+ const { column: m } = y;
1207
+ m.sortable === "custom" && z();
1208
+ }, q = (y) => JSON.parse(JSON.stringify(y)), G = () => {
1209
+ T.value = q(B.value), X("reset"), ue(() => z());
1210
+ }, Q = (y) => {
1211
+ X("changePage", y), y.size ? z() : k();
1212
+ }, n = () => {
1213
+ H().doLayout();
561
1214
  };
562
- return be(() => {
563
- L.value = A(x.value);
564
- }), n({ search: z, query: h, getTableRef: I }), (y, $) => {
565
- const ee = _e("loading");
566
- return a(), m("div", Ct, [
567
- y.$slots.form ? (a(), p(s(ze), {
1215
+ return fe(() => {
1216
+ B.value = q(T.value);
1217
+ }), g({ search: z, query: k, getTableRef: H }), (y, e) => {
1218
+ const m = Te("loading");
1219
+ return r(), w("div", ia, [
1220
+ y.$slots.form ? (r(), p(l(Ie), {
568
1221
  key: 0,
569
1222
  loading: i.value,
570
- expanded: c.value
1223
+ expanded: V.value
571
1224
  }, {
572
- default: d((C) => [
573
- T(y.$slots, "form", X(oe(C)))
1225
+ default: b((U) => [
1226
+ R(y.$slots, "form", Ee(He(U)))
574
1227
  ]),
575
- operate: d(() => [
576
- S(s(Y), {
1228
+ operate: b(() => [
1229
+ S(l(te), {
577
1230
  type: "primary",
578
1231
  loading: i.value,
579
1232
  onClick: z
580
1233
  }, {
581
- default: d(() => [
582
- q(F(s(t)("s.button.query")), 1)
1234
+ default: b(() => [
1235
+ le(Y(l(s)("s.button.query")), 1)
583
1236
  ]),
584
1237
  _: 1
585
1238
  }, 8, ["loading"]),
586
- S(s(Y), { onClick: D }, {
587
- default: d(() => [
588
- q(F(s(t)("s.button.reset")), 1)
1239
+ S(l(te), { onClick: G }, {
1240
+ default: b(() => [
1241
+ le(Y(l(s)("s.button.reset")), 1)
589
1242
  ]),
590
1243
  _: 1
591
1244
  })
592
1245
  ]),
593
1246
  _: 3
594
- }, 8, ["loading", "expanded"])) : E("", !0),
595
- y.$slots.freeArea ? T(y.$slots, "freeArea", { key: 1 }) : E("", !0),
596
- B("div", Et, [
597
- y.$slots.header || r.columnTool ? (a(), m("div", {
1247
+ }, 8, ["loading", "expanded"])) : A("", !0),
1248
+ y.$slots.freeArea ? R(y.$slots, "freeArea", { key: 1 }) : A("", !0),
1249
+ D("div", pa, [
1250
+ y.$slots.header || f.columnTool ? (r(), w("div", {
598
1251
  key: 0,
599
- class: Ge(["ez-fast-table-wrapper_header flex", y.$slots.header ? "justify-between" : "justify-end"])
1252
+ class: qe(["ez-fast-table_wrapper_header", y.$slots.header ? "justify-between" : "justify-end"])
600
1253
  }, [
601
- y.$slots.header ? (a(), m("div", xt, [
602
- T(y.$slots, "header", {
603
- selectList: s(b),
604
- selectIds: s(_)
1254
+ y.$slots.header ? (r(), w("div", ca, [
1255
+ R(y.$slots, "header", {
1256
+ selectList: l(_),
1257
+ selectIds: l(E)
605
1258
  })
606
- ])) : E("", !0),
607
- r.columnTool ? (a(), p(s(Y), {
1259
+ ])) : A("", !0),
1260
+ f.columnTool ? (r(), p(l(te), {
608
1261
  key: 1,
609
- icon: s(vt),
1262
+ icon: l(Fl),
610
1263
  circle: "",
611
- onClick: $[0] || ($[0] = (C) => w.value = !0)
612
- }, null, 8, ["icon"])) : E("", !0)
613
- ], 2)) : E("", !0),
614
- he((a(), p(s(ke), k(y.$attrs, {
1264
+ onClick: e[0] || (e[0] = (U) => N.value = !0)
1265
+ }, null, 8, ["icon"])) : A("", !0)
1266
+ ], 2)) : A("", !0),
1267
+ Se((r(), p(l(Pe), h(l(a), {
615
1268
  ref_key: "fastTableRef",
616
- ref: u,
617
- columns: g.value,
618
- data: M.value,
619
- "row-key": r.rowKey,
620
- onSelectionChange: s(o),
621
- onSortChange: W
622
- }), te({ _: 2 }, [
623
- N(y.$slots, (C, ne, Qt) => ({
624
- name: ne,
625
- fn: d((xe) => [
626
- ["form"].includes(C.name) ? E("", !0) : T(y.$slots, ne, X(k({ key: 0 }, xe)))
1269
+ ref: L,
1270
+ columns: C.value,
1271
+ data: j.value,
1272
+ onSelectionChange: l(u),
1273
+ onSortChange: ae
1274
+ }), de({ _: 2 }, [
1275
+ W(y.$slots, (U, me, _a) => ({
1276
+ name: me,
1277
+ fn: b((Ne) => [
1278
+ ["form"].includes(U.name) ? A("", !0) : R(y.$slots, me, Ee(h({ key: 0 }, Ne)))
627
1279
  ])
628
1280
  }))
629
- ]), 1040, ["columns", "data", "row-key", "onSelectionChange"])), [
630
- [ee, i.value]
1281
+ ]), 1040, ["columns", "data", "onSelectionChange"])), [
1282
+ [m, i.value]
631
1283
  ]),
632
- B("div", St, [
633
- S(s(Ce), {
634
- "current-page": x.value.current,
1284
+ D("div", fa, [
1285
+ S(l(Le), {
1286
+ "current-page": T.value.current,
635
1287
  "onUpdate:currentPage": [
636
- $[1] || ($[1] = (C) => x.value.current = C),
637
- $[3] || ($[3] = (C) => se({ current: C }))
1288
+ e[1] || (e[1] = (U) => T.value.current = U),
1289
+ e[3] || (e[3] = (U) => Q({ current: U }))
638
1290
  ],
639
- "page-size": x.value.size,
1291
+ "page-size": T.value.size,
640
1292
  "onUpdate:pageSize": [
641
- $[2] || ($[2] = (C) => x.value.size = C),
642
- $[4] || ($[4] = (C) => se({ size: C }))
1293
+ e[2] || (e[2] = (U) => T.value.size = U),
1294
+ e[4] || (e[4] = (U) => Q({ size: U }))
643
1295
  ],
644
- total: j.value
1296
+ total: K.value
645
1297
  }, null, 8, ["current-page", "page-size", "total"])
646
1298
  ])
647
1299
  ]),
648
- S(zt, {
649
- modelValue: w.value,
650
- "onUpdate:modelValue": $[5] || ($[5] = (C) => w.value = C),
651
- columns: g.value,
652
- "onUpdate:columns": $[6] || ($[6] = (C) => g.value = C),
653
- onChange: Ee
1300
+ S(da, {
1301
+ modelValue: N.value,
1302
+ "onUpdate:modelValue": e[5] || (e[5] = (U) => N.value = U),
1303
+ columns: C.value,
1304
+ "onUpdate:columns": e[6] || (e[6] = (U) => C.value = U),
1305
+ onChange: n
654
1306
  }, null, 8, ["modelValue", "columns"])
655
1307
  ]);
656
1308
  };
657
1309
  }
658
- }), Vt = U(Bt), Mt = v({ name: "EzIcon", inheritAttrs: !1 }), Lt = /* @__PURE__ */ v({
659
- ...Mt,
660
- props: {
661
- size: { default: 20 },
662
- color: { default: "inherit" },
663
- class: {}
664
- },
665
- setup(l) {
666
- const n = l, e = P(() => {
667
- const { size: t, color: r } = n;
668
- return !t && !r ? {} : {
669
- fontSize: t ? `${t}px` : void 0,
670
- color: r
671
- };
672
- });
673
- return (t, r) => (a(), m("i", k(t.$attrs, {
674
- class: ["ez-icon", n.class],
675
- style: e.value
676
- }), [
677
- T(t.$slots, "default", { class: "w-[1em] h-[1em]" })
678
- ], 16));
679
- }
680
- }), H = U(Lt), Pt = v({ name: "EzRadio" }), Rt = /* @__PURE__ */ v({
681
- ...Pt,
682
- props: {
683
- type: { default: "default" },
684
- options: { default: () => [] }
685
- },
686
- setup(l) {
687
- const n = l, e = P(() => ["default", "border"].includes(n.type) ? Ue : Ie);
688
- return (t, r) => (a(), p(s(Ae), X(oe(t.$attrs)), {
689
- default: d(() => [
690
- (a(!0), m(R, null, N(t.options, (c) => (a(), p(ye(e.value), k({
691
- key: String(c.value),
692
- ref_for: !0
693
- }, c, {
694
- value: c.value,
695
- border: t.type === "border"
696
- }), {
697
- default: d(() => [
698
- q(F(c.label), 1)
699
- ]),
700
- _: 2
701
- }, 1040, ["value", "border"]))), 128))
702
- ]),
703
- _: 1
704
- }, 16));
705
- }
706
- }), Ut = U(Rt), It = v({ name: "EzSelect" }), At = /* @__PURE__ */ v({
707
- ...It,
708
- props: {
709
- options: { default: () => [] },
710
- clearable: { type: Boolean, default: !1 }
711
- },
712
- setup(l) {
713
- const n = l, e = (r) => typeof r > "u", t = (r) => !e(r.options);
714
- return (r, c) => (a(), p(s(De), k(r.$attrs, {
715
- clearable: n.clearable
716
- }), {
717
- default: d(() => [
718
- (a(!0), m(R, null, N(n.options, (o, b) => (a(), m(R, { key: b }, [
719
- t(o) ? (a(), p(s(Fe), k({
720
- key: 0,
721
- ref_for: !0
722
- }, o), {
723
- default: d(() => [
724
- (a(!0), m(R, null, N(o.options, (f) => (a(), p(s(ie), k({
725
- key: f.label
726
- }, { ref_for: !0 }, f), null, 16))), 128))
727
- ]),
728
- _: 2
729
- }, 1040)) : (a(), p(s(ie), k({
730
- key: 1,
731
- ref_for: !0
732
- }, o), null, 16))
733
- ], 64))), 128))
734
- ]),
735
- _: 1
736
- }, 16, ["clearable"]));
737
- }
738
- }), Dt = U(At), Ft = { class: "ez-upload-image" }, Ot = {
739
- key: 0,
740
- class: "flex items-center justify-center"
741
- }, Nt = {
742
- key: 1,
743
- class: "ez-upload-image-list"
744
- }, jt = { class: "flex items-center justify-center h-full" }, Ht = v({ name: "EzImageUpload" }), qt = /* @__PURE__ */ v({
745
- ...Ht,
746
- props: /* @__PURE__ */ K({
747
- api: { type: Function, default: () => Promise.resolve({ url: "" }) },
748
- imageTypes: { default: () => [
749
- "image/webp",
750
- "image/png",
751
- "image/jpg",
752
- "image/gif",
753
- "image/bmp",
754
- "image/jpeg"
755
- ] },
756
- limitSize: { default: 10 },
757
- style: { default: () => ({ width: "100px", height: "100px" }) },
758
- fit: { default: "contain" },
759
- multiple: { type: Boolean, default: !1 },
760
- limit: { default: 9 },
761
- disabled: { type: Boolean, default: !1 }
762
- }, {
763
- modelValue: {},
764
- modelModifiers: {}
765
- }),
766
- emits: ["update:modelValue"],
767
- setup(l, { expose: n }) {
768
- const e = l, { t } = Q(), r = V(!1), c = V(0), o = O(l, "modelValue"), b = P(() => e.multiple), f = /^(https?:\/\/|data:|blob:)/i, _ = P(() => o.value ? u(o.value) : []);
769
- function u(g) {
770
- if (!g) return [];
771
- const i = /^(https?:\/\/|data:|blob:)/i;
772
- let h = [], z = "", I = !1;
773
- g = g.trim().replace(/,$/, "");
774
- const W = g.split(",");
775
- for (let A = 0; A < W.length; A++) {
776
- const D = W[A].trim();
777
- D && (i.test(D) ? (I && z && h.push(z.trim()), z = D, I = !0) : I ? z += "," + D : i.test(D.trim()) && h.push(D.trim()));
778
- }
779
- return I && z && h.push(z.trim()), h.filter((A) => A && i.test(A));
780
- }
781
- function w(g) {
782
- return !g || g.length === 0 ? "" : g.filter((i) => i.trim()).map((i) => i.trim()).join(",");
783
- }
784
- const L = (g) => e.disabled ? (Z.warning(t("s.message.disabled")), !1) : e.imageTypes.includes(g.type.toLocaleLowerCase()) ? g.size > e.limitSize * 1024 * 1024 ? (Z.error(t("s.validate.upload.limit", { max: e.limitSize })), !1) : !0 : (Z.error(t("s.validate.upload.image")), !1), M = async ({ file: g }) => {
785
- if (!e.disabled)
786
- try {
787
- const { url: i } = await e.api(g);
788
- if (!i) throw new Error(t("s.message.uploadFail"));
789
- if (b.value) {
790
- const h = o.value ? u(o.value) : [];
791
- i && f.test(i) && (h.push(i), o.value = w(h));
792
- } else
793
- o.value = i;
794
- } catch (i) {
795
- Z.error(i.message);
796
- }
797
- }, j = (g, i = 0) => {
798
- g && (c.value = i, r.value = !0);
799
- }, G = (g) => {
800
- if (!e.disabled && !(!g || !o.value))
801
- if (b.value) {
802
- const i = u(o.value), h = i.findIndex((z) => z === g);
803
- h !== -1 && (i.splice(h, 1), o.value = i.join(","));
804
- } else
805
- o.value = null;
806
- }, x = V();
807
- return n({
808
- getUploadRef: () => x.value,
809
- getUrlList: () => _.value
810
- }), (g, i) => (a(), m("div", Ft, [
811
- b.value ? (a(), m("div", Nt, [
812
- (a(!0), m(R, null, N(_.value, (h, z) => (a(), m("div", {
813
- key: z,
814
- class: "ez-upload-image-item",
815
- style: we(e.style)
816
- }, [
817
- S(s(de), {
818
- src: h,
819
- fit: e.fit
820
- }, null, 8, ["src", "fit"]),
821
- B("div", {
822
- class: "ez-upload-image_handle",
823
- onClick: i[3] || (i[3] = ce(() => {
824
- }, ["stop"]))
825
- }, [
826
- S(s(H), {
827
- size: 18,
828
- onClick: (I) => j(h, z)
829
- }, {
830
- default: d(() => [
831
- S(s(me))
832
- ]),
833
- _: 2
834
- }, 1032, ["onClick"]),
835
- e.disabled ? E("", !0) : (a(), p(s(H), {
836
- key: 0,
837
- size: 18,
838
- onClick: (I) => G(h)
839
- }, {
840
- default: d(() => [
841
- S(s(fe))
842
- ]),
843
- _: 2
844
- }, 1032, ["onClick"]))
845
- ])
846
- ], 4))), 128)),
847
- _.value.length < e.limit && !e.disabled || _.value.length === 0 ? (a(), p(s(ue), k({ key: 0 }, g.$attrs, {
848
- ref_key: "uploadRef",
849
- ref: x,
850
- action: "",
851
- accept: "image/*",
852
- "show-file-list": !1,
853
- "before-upload": L,
854
- "http-request": M,
855
- style: e.style,
856
- disabled: e.disabled,
857
- class: [{ "is-disabled": e.disabled }, "ez-upload-image-item ez-upload-button"]
858
- }), {
859
- default: d(() => [
860
- B("div", jt, [
861
- S(s(H), null, {
862
- default: d(() => [
863
- S(s(pe))
864
- ]),
865
- _: 1
866
- })
867
- ])
868
- ]),
869
- _: 1
870
- }, 16, ["style", "disabled", "class"])) : E("", !0)
871
- ])) : (a(), p(s(ue), k({ key: 0 }, g.$attrs, {
872
- ref_key: "uploadRef",
873
- ref: x,
874
- action: "",
875
- accept: "image/*",
876
- "show-file-list": !1,
877
- "before-upload": L,
878
- "http-request": M,
879
- style: e.style,
880
- disabled: e.disabled,
881
- class: ["ez-upload-image-wrapper", { "is-disabled": e.disabled }]
882
- }), {
883
- default: d(() => [
884
- o.value ? (a(), m("div", Ot, [
885
- S(s(de), {
886
- src: o.value,
887
- fit: e.fit
888
- }, null, 8, ["src", "fit"]),
889
- B("div", {
890
- class: "ez-upload-image_handle",
891
- onClick: i[2] || (i[2] = ce(() => {
892
- }, ["stop"]))
893
- }, [
894
- S(s(H), {
895
- size: 18,
896
- onClick: i[0] || (i[0] = (h) => j(o.value, 0))
897
- }, {
898
- default: d(() => [
899
- S(s(me))
900
- ]),
901
- _: 1
902
- }),
903
- e.disabled ? E("", !0) : (a(), p(s(H), {
904
- key: 0,
905
- size: 18,
906
- onClick: i[1] || (i[1] = (h) => G(o.value))
907
- }, {
908
- default: d(() => [
909
- S(s(fe))
910
- ]),
911
- _: 1
912
- }))
913
- ])
914
- ])) : (a(), p(s(H), { key: 1 }, {
915
- default: d(() => [
916
- S(s(pe))
917
- ]),
918
- _: 1
919
- }))
920
- ]),
921
- _: 1
922
- }, 16, ["style", "disabled", "class"])),
923
- r.value ? (a(), p(s(Oe), {
924
- key: 2,
925
- "url-list": b.value ? _.value : [o.value],
926
- "initial-index": c.value,
927
- onClose: i[4] || (i[4] = (h) => r.value = !1)
928
- }, null, 8, ["url-list", "initial-index"])) : E("", !0)
929
- ]));
930
- }
931
- }), Kt = U(qt), ve = Symbol("INSTALLED_KEY");
932
- function Gt(l = []) {
1310
+ }), ga = F(ma), ze = /* @__PURE__ */ Symbol("INSTALLED_KEY");
1311
+ function ha(t = []) {
933
1312
  return {
934
- install: (e) => {
935
- e[ve] || (e[ve] = !0, l.forEach((t) => e.use(t)));
1313
+ install: (o) => {
1314
+ o[ze] || (o[ze] = !0, t.forEach((s) => o.use(s)));
936
1315
  }
937
1316
  };
938
1317
  }
939
- const Yt = [
940
- Xe,
941
- st,
942
- Vt,
943
- H,
944
- Kt,
945
- Ce,
946
- Ut,
947
- ze,
948
- Dt,
949
- ke
950
- ], Zt = [
951
- Ne,
952
- ae,
953
- Z,
954
- je,
955
- He,
956
- qe
957
- ], Jt = Gt([...Yt, ...Zt]), el = Jt.install;
1318
+ const Ea = [
1319
+ Re,
1320
+ Al,
1321
+ ga,
1322
+ ee,
1323
+ Me,
1324
+ Le,
1325
+ xe,
1326
+ Ie,
1327
+ De,
1328
+ Pe
1329
+ ], ba = [
1330
+ ml,
1331
+ ve,
1332
+ oe,
1333
+ gl,
1334
+ hl,
1335
+ El
1336
+ ], ya = ha([...Ea, ...ba]), Ca = ya.install;
958
1337
  export {
959
- Xe as EzCheckbox,
960
- st as EzDialog,
961
- Vt as EzFastTable,
962
- H as EzIcon,
963
- Kt as EzImageUpload,
964
- Ce as EzPagination,
965
- Ut as EzRadio,
966
- ze as EzSearchForm,
967
- Dt as EzSelect,
968
- ke as EzTable,
969
- Jt as default,
970
- el as install
1338
+ Re as EzCheckbox,
1339
+ Al as EzDialog,
1340
+ $a as EzDynamicForm,
1341
+ ga as EzFastTable,
1342
+ ee as EzIcon,
1343
+ Me as EzImageUpload,
1344
+ Le as EzPagination,
1345
+ xe as EzRadio,
1346
+ Ie as EzSearchForm,
1347
+ De as EzSelect,
1348
+ Pe as EzTable,
1349
+ c as FormItemType,
1350
+ ya as default,
1351
+ Ca as install
971
1352
  };