@pungfe/element 0.0.1-alpha.11 → 0.0.1-alpha.12

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.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as b, openBlock as m, createBlock as y, unref as h, mergeProps as V, withCtx as v, renderSlot as E, useModel as T, inject as p, mergeModels as B, computed as C, toValue as L, onMounted as K, nextTick as de, getCurrentScope as re, onScopeDispose as ue, getCurrentInstance as G, shallowRef as N, watch as W, createElementBlock as j, Fragment as Y, renderList as J, useSlots as se, createSlots as ce, normalizeProps as O, guardReactiveProps as M, ref as F, provide as $, createVNode as z, resolveComponent as U, createTextVNode as q, useTemplateRef as Z, toDisplayString as fe, normalizeClass as me } from "vue";
2
- import { ElButton as pe, ElCascader as be, ElCheckboxGroup as ye, ElCheckbox as ve, ElColorPicker as ge, ElDialog as he, ElDivider as Be, ElForm as we, ElFormItem as Ve, ElMessage as ee, ElImage as Ce, ElInput as Ee, ElPagination as Te, ElRate as xe, ElPopconfirm as Xe, ElScrollbar as Se, ElSpace as ze, ElTable as ke, ElTableColumn as Ie, ElTabs as Ae, ElTabPane as $e, ElTag as Oe, ElText as Me, ElUpload as Pe } from "element-plus";
3
- const Ke = /* @__PURE__ */ b({
1
+ import { defineComponent as b, openBlock as v, createBlock as g, unref as w, mergeProps as V, withCtx as B, renderSlot as S, useModel as C, inject as m, mergeModels as T, computed as x, toValue as F, onMounted as G, nextTick as ie, getCurrentScope as re, onScopeDispose as ue, getCurrentInstance as Y, shallowRef as Q, watch as _, createElementBlock as K, Fragment as J, renderList as Z, useSlots as de, createSlots as se, normalizeProps as $, guardReactiveProps as O, ref as H, provide as L, createVNode as z, resolveComponent as U, createTextVNode as j, useTemplateRef as ee, toDisplayString as ce, normalizeClass as fe } from "vue";
2
+ import { ElButton as me, ElCascader as pe, ElCheckboxGroup as ve, ElCheckbox as ye, ElColorPicker as be, ElDatePicker as ge, ElDialog as he, ElDivider as Be, ElForm as we, ElFormItem as Xe, ElMessage as te, ElImage as Te, ElInput as xe, ElPagination as Ve, ElRate as Ce, ElPopconfirm as Ee, ElScrollbar as Se, ElSpace as ke, ElTable as Ie, ElTableColumn as ze, ElTabPane as Pe, ElTag as Ae, ElText as $e, ElUpload as Oe } from "element-plus";
3
+ const Me = /* @__PURE__ */ b({
4
4
  __name: "XButton",
5
5
  props: {
6
6
  size: {},
@@ -24,27 +24,27 @@ const Ke = /* @__PURE__ */ b({
24
24
  },
25
25
  emits: ["click"],
26
26
  setup(e, { emit: t }) {
27
- const l = e, n = t;
28
- return (o, i) => (m(), y(h(pe), V(l, {
29
- onClick: i[0] || (i[0] = (d) => n("click", d))
27
+ const a = e, n = t;
28
+ return (l, r) => (v(), g(w(me), V(a, {
29
+ onClick: r[0] || (r[0] = (i) => n("click", i))
30
30
  }), {
31
- default: v(() => [
32
- E(o.$slots, "default")
31
+ default: B(() => [
32
+ S(l.$slots, "default")
33
33
  ]),
34
34
  _: 3
35
35
  }, 16));
36
36
  }
37
- }), P = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), te = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), k = /* @__PURE__ */ Symbol(
37
+ }), A = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), ae = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), k = /* @__PURE__ */ Symbol(
38
38
  "X_FORM_ITEM_VALIDATION"
39
39
  ), Re = /* @__PURE__ */ Symbol(
40
40
  "X_FORM_TAB_UPDATE_HOOK"
41
- ), ae = /* @__PURE__ */ Symbol("X_TAB_PANES"), le = /* @__PURE__ */ Symbol("X_TAB_PANE"), D = /* @__PURE__ */ Symbol(
41
+ ), De = /* @__PURE__ */ Symbol("X_TAB_PANES"), le = /* @__PURE__ */ Symbol("X_TAB_PANE"), M = /* @__PURE__ */ Symbol(
42
42
  "X_TABLE_QUERY_UPDATE_HOOK"
43
- ), H = /* @__PURE__ */ Symbol(
43
+ ), R = /* @__PURE__ */ Symbol(
44
44
  "X_TABLE_QUERY_EXECUTE_HOOK"
45
- ), Ge = /* @__PURE__ */ b({
45
+ ), Fe = /* @__PURE__ */ b({
46
46
  __name: "XCascader",
47
- props: /* @__PURE__ */ B({
47
+ props: /* @__PURE__ */ T({
48
48
  clearable: {
49
49
  type: Boolean
50
50
  },
@@ -60,26 +60,26 @@ const Ke = /* @__PURE__ */ b({
60
60
  modelValue: {},
61
61
  modelModifiers: {}
62
62
  }),
63
- emits: /* @__PURE__ */ B(["blur", "change"], ["update:modelValue"]),
63
+ emits: /* @__PURE__ */ T(["blur", "change"], ["update:modelValue"]),
64
64
  setup(e, {
65
65
  emit: t
66
66
  }) {
67
- const l = e, n = t, o = T(e, "modelValue"), i = p(k, void 0);
68
- if (i?.required) {
67
+ const a = e, n = t, l = C(e, "modelValue"), r = m(k, void 0);
68
+ if (r?.required) {
69
69
  const {
70
70
  validator: c,
71
- label: r
72
- } = i;
73
- i.validator = () => o.value ? c?.() : `请输入${r}`;
71
+ label: u
72
+ } = r;
73
+ r.validator = () => l.value ? c?.() : `请输入${u}`;
74
74
  }
75
- const d = p(P, void 0), a = p(D, void 0), u = p(H, void 0);
76
- a?.on(([c, r]) => d === c && r === void 0 && (o.value = void 0)), u?.on(() => d && a?.trigger([d, o.value]));
75
+ const i = m(A, void 0), o = m(M, void 0), d = m(R, void 0);
76
+ o?.on(([c, u]) => i === c && u === void 0 && (l.value = void 0)), d?.on(() => i && o?.trigger([i, l.value]));
77
77
  const s = () => {
78
- i?.validate(), n("blur");
78
+ r?.validate(), n("blur");
79
79
  };
80
- return (c, r) => (m(), y(h(be), V(l, {
81
- modelValue: o.value,
82
- "onUpdate:modelValue": r[0] || (r[0] = (w) => o.value = w),
80
+ return (c, u) => (v(), g(w(pe), V(a, {
81
+ modelValue: l.value,
82
+ "onUpdate:modelValue": u[0] || (u[0] = (X) => l.value = X),
83
83
  onBlur: s
84
84
  }), null, 16, ["modelValue"]));
85
85
  }
@@ -89,101 +89,101 @@ function Le(e, t) {
89
89
  }
90
90
  const Ue = typeof window < "u" && typeof document < "u";
91
91
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
92
- function Fe(e) {
92
+ function He(e) {
93
93
  return Array.isArray(e) ? e : [e];
94
94
  }
95
- function De(e) {
96
- return G();
95
+ function Ne(e) {
96
+ return Y();
97
97
  }
98
- function He(e, t = !0, l) {
99
- De() ? K(e, l) : t ? e() : de(e);
98
+ function qe(e, t = !0, a) {
99
+ Ne() ? G(e, a) : t ? e() : ie(e);
100
100
  }
101
101
  // @__NO_SIDE_EFFECTS__
102
- function Q(e, t) {
103
- return C(() => L(e).map((l) => L(l)).map(t));
102
+ function W(e, t) {
103
+ return x(() => F(e).map((a) => F(a)).map(t));
104
104
  }
105
105
  const oe = Ue ? window : void 0;
106
- function I(e) {
106
+ function P(e) {
107
107
  var t;
108
- const l = L(e);
109
- return (t = l?.$el) !== null && t !== void 0 ? t : l;
108
+ const a = F(e);
109
+ return (t = a?.$el) !== null && t !== void 0 ? t : a;
110
110
  }
111
111
  // @__NO_SIDE_EFFECTS__
112
- function _e() {
113
- const e = N(!1), t = G();
114
- return t && K(() => {
112
+ function Qe() {
113
+ const e = Q(!1), t = Y();
114
+ return t && G(() => {
115
115
  e.value = !0;
116
116
  }, t), e;
117
117
  }
118
118
  // @__NO_SIDE_EFFECTS__
119
- function Ne(e) {
120
- const t = /* @__PURE__ */ _e();
121
- return C(() => (t.value, !!e()));
119
+ function je(e) {
120
+ const t = /* @__PURE__ */ Qe();
121
+ return x(() => (t.value, !!e()));
122
122
  }
123
- function qe(e, t, l = {}) {
124
- const { window: n = oe, ...o } = l;
125
- let i;
126
- const d = /* @__PURE__ */ Ne(() => n && "ResizeObserver" in n), a = () => {
127
- i && (i.disconnect(), i = void 0);
128
- }, u = W(C(() => {
129
- const c = L(e);
130
- return Array.isArray(c) ? c.map((r) => I(r)) : [I(c)];
123
+ function We(e, t, a = {}) {
124
+ const { window: n = oe, ...l } = a;
125
+ let r;
126
+ const i = /* @__PURE__ */ je(() => n && "ResizeObserver" in n), o = () => {
127
+ r && (r.disconnect(), r = void 0);
128
+ }, d = _(x(() => {
129
+ const c = F(e);
130
+ return Array.isArray(c) ? c.map((u) => P(u)) : [P(c)];
131
131
  }), (c) => {
132
- if (a(), d.value && n) {
133
- i = new ResizeObserver(t);
134
- for (const r of c) r && i.observe(r, o);
132
+ if (o(), i.value && n) {
133
+ r = new ResizeObserver(t);
134
+ for (const u of c) u && r.observe(u, l);
135
135
  }
136
136
  }, {
137
137
  immediate: !0,
138
138
  flush: "post"
139
139
  }), s = () => {
140
- a(), u();
140
+ o(), d();
141
141
  };
142
142
  return Le(s), {
143
- isSupported: d,
143
+ isSupported: i,
144
144
  stop: s
145
145
  };
146
146
  }
147
- function Qe(e, t = {
147
+ function _e(e, t = {
148
148
  width: 0,
149
149
  height: 0
150
- }, l = {}) {
151
- const { window: n = oe, box: o = "content-box" } = l, i = C(() => {
152
- var r;
153
- return (r = I(e)) === null || r === void 0 || (r = r.namespaceURI) === null || r === void 0 ? void 0 : r.includes("svg");
154
- }), d = N(t.width), a = N(t.height), { stop: u } = qe(e, ([r]) => {
155
- const w = o === "border-box" ? r.borderBoxSize : o === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
156
- if (n && i.value) {
157
- const x = I(e);
158
- if (x) {
159
- const X = x.getBoundingClientRect();
160
- d.value = X.width, a.value = X.height;
150
+ }, a = {}) {
151
+ const { window: n = oe, box: l = "content-box" } = a, r = x(() => {
152
+ var u;
153
+ return (u = P(e)) === null || u === void 0 || (u = u.namespaceURI) === null || u === void 0 ? void 0 : u.includes("svg");
154
+ }), i = Q(t.width), o = Q(t.height), { stop: d } = We(e, ([u]) => {
155
+ const X = l === "border-box" ? u.borderBoxSize : l === "content-box" ? u.contentBoxSize : u.devicePixelContentBoxSize;
156
+ if (n && r.value) {
157
+ const E = P(e);
158
+ if (E) {
159
+ const f = E.getBoundingClientRect();
160
+ i.value = f.width, o.value = f.height;
161
161
  }
162
- } else if (w) {
163
- const x = Fe(w);
164
- d.value = x.reduce((X, { inlineSize: A }) => X + A, 0), a.value = x.reduce((X, { blockSize: A }) => X + A, 0);
162
+ } else if (X) {
163
+ const E = He(X);
164
+ i.value = E.reduce((f, { inlineSize: y }) => f + y, 0), o.value = E.reduce((f, { blockSize: y }) => f + y, 0);
165
165
  } else
166
- d.value = r.contentRect.width, a.value = r.contentRect.height;
167
- }, l);
168
- He(() => {
169
- const r = I(e);
170
- r && (d.value = "offsetWidth" in r ? r.offsetWidth : t.width, a.value = "offsetHeight" in r ? r.offsetHeight : t.height);
166
+ i.value = u.contentRect.width, o.value = u.contentRect.height;
167
+ }, a);
168
+ qe(() => {
169
+ const u = P(e);
170
+ u && (i.value = "offsetWidth" in u ? u.offsetWidth : t.width, o.value = "offsetHeight" in u ? u.offsetHeight : t.height);
171
171
  });
172
- const s = W(() => I(e), (r) => {
173
- d.value = r ? t.width : 0, a.value = r ? t.height : 0;
172
+ const s = _(() => P(e), (u) => {
173
+ i.value = u ? t.width : 0, o.value = u ? t.height : 0;
174
174
  });
175
175
  function c() {
176
- u(), s();
176
+ d(), s();
177
177
  }
178
178
  return {
179
- width: d,
180
- height: a,
179
+ width: i,
180
+ height: o,
181
181
  stop: c
182
182
  };
183
183
  }
184
- const Ye = /* @__PURE__ */ b({
184
+ const Ke = /* @__PURE__ */ b({
185
185
  __name: "XCheckbox",
186
- props: /* @__PURE__ */ B({
186
+ props: /* @__PURE__ */ T({
187
187
  data: {},
188
188
  factory: {
189
189
  type: Function
@@ -224,50 +224,50 @@ const Ye = /* @__PURE__ */ b({
224
224
  }),
225
225
  emits: ["update:modelValue"],
226
226
  setup(e) {
227
- const t = T(e, "modelValue"), l = /* @__PURE__ */ Q(() => e.data, e.factory), n = C(() => [...l.value]), o = (s) => {
227
+ const t = C(e, "modelValue"), a = /* @__PURE__ */ W(() => e.data, e.factory), n = x(() => [...a.value]), l = (s) => {
228
228
  if (typeof s == "object") {
229
229
  if (e.identify)
230
230
  return e.identify(s);
231
231
  throw new Error("`identify` is required when value's type extends `object` or `object[]`");
232
232
  } else
233
233
  return s;
234
- }, i = (s) => n.value.map((c) => c.value).find((c) => o(c) === s), d = C(() => n.value.map((s) => {
235
- const c = o(s.value);
234
+ }, r = (s) => n.value.map((c) => c.value).find((c) => l(c) === s), i = x(() => n.value.map((s) => {
235
+ const c = l(s.value);
236
236
  return {
237
237
  ...s,
238
238
  key: c,
239
239
  value: c
240
240
  };
241
- })), a = C({
242
- get: () => t.value && t.value.map(o),
243
- set: (s) => t.value = Array.isArray(s) ? s.map((c) => i(c)) : []
244
- }), u = p(k, void 0);
245
- if (u?.required) {
241
+ })), o = x({
242
+ get: () => t.value && t.value.map(l),
243
+ set: (s) => t.value = Array.isArray(s) ? s.map((c) => r(c)) : []
244
+ }), d = m(k, void 0);
245
+ if (d?.required) {
246
246
  const {
247
247
  validator: s,
248
248
  label: c
249
- } = u;
250
- u.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请选择${c}` : s?.();
249
+ } = d;
250
+ d.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请选择${c}` : s?.();
251
251
  }
252
- return (s, c) => (m(), y(h(ye), V({
253
- modelValue: a.value,
254
- "onUpdate:modelValue": c[0] || (c[0] = (r) => a.value = r)
252
+ return (s, c) => (v(), g(w(ve), V({
253
+ modelValue: o.value,
254
+ "onUpdate:modelValue": c[0] || (c[0] = (u) => o.value = u)
255
255
  }, {
256
256
  disabled: e.disabled,
257
257
  size: e.size
258
258
  }), {
259
- default: v(() => [(m(!0), j(Y, null, J(d.value, (r) => (m(), y(h(ve), {
260
- key: r.key,
261
- disabled: r.disabled,
262
- label: r.label,
263
- value: r.value
259
+ default: B(() => [(v(!0), K(J, null, Z(i.value, (u) => (v(), g(w(ye), {
260
+ key: u.key,
261
+ disabled: u.disabled,
262
+ label: u.label,
263
+ value: u.value
264
264
  }, null, 8, ["disabled", "label", "value"]))), 128))]),
265
265
  _: 1
266
266
  }, 16, ["modelValue"]));
267
267
  }
268
- }), Je = /* @__PURE__ */ b({
268
+ }), Ge = /* @__PURE__ */ b({
269
269
  __name: "XColorPicker",
270
- props: /* @__PURE__ */ B({
270
+ props: /* @__PURE__ */ T({
271
271
  clearable: {
272
272
  type: Boolean
273
273
  },
@@ -281,23 +281,187 @@ const Ye = /* @__PURE__ */ b({
281
281
  }),
282
282
  emits: ["update:modelValue"],
283
283
  setup(e) {
284
- const t = e, l = T(e, "modelValue"), n = p(k, void 0);
284
+ const t = e, a = C(e, "modelValue"), n = m(k, void 0);
285
285
  if (n?.required) {
286
286
  const {
287
- validator: a,
288
- label: u
287
+ validator: o,
288
+ label: d
289
289
  } = n;
290
- n.validator = () => l.value ? a?.() : `请输入${u}`;
290
+ n.validator = () => a.value ? o?.() : `请输入${d}`;
291
291
  }
292
- const o = p(P, void 0), i = p(D, void 0), d = p(H, void 0);
293
- return i?.on(([a, u]) => o === a && u === void 0 && (l.value = void 0)), d?.on(() => o && i?.trigger([o, l.value])), (a, u) => (m(), y(h(ge), V(t, {
294
- modelValue: l.value,
295
- "onUpdate:modelValue": u[0] || (u[0] = (s) => l.value = s)
292
+ const l = m(A, void 0), r = m(M, void 0), i = m(R, void 0);
293
+ return r?.on(([o, d]) => l === o && d === void 0 && (a.value = void 0)), i?.on(() => l && r?.trigger([l, a.value])), (o, d) => (v(), g(w(be), V(t, {
294
+ modelValue: a.value,
295
+ "onUpdate:modelValue": d[0] || (d[0] = (s) => a.value = s)
296
296
  }), null, 16, ["modelValue"]));
297
297
  }
298
- }), Ze = /* @__PURE__ */ b({
298
+ }), Ye = /* @__PURE__ */ b({
299
+ __name: "XDatePicker",
300
+ props: /* @__PURE__ */ T({
301
+ type: {
302
+ default: "date"
303
+ },
304
+ showNow: {
305
+ type: Boolean
306
+ },
307
+ showConfirm: {
308
+ type: Boolean
309
+ },
310
+ showFooter: {
311
+ type: Boolean
312
+ },
313
+ showWeekNumber: {
314
+ type: Boolean
315
+ },
316
+ ariaLabel: {},
317
+ emptyValues: {},
318
+ valueOnClear: {},
319
+ disabledDate: {},
320
+ cellClassName: {},
321
+ shortcuts: {},
322
+ arrowControl: {
323
+ type: Boolean
324
+ },
325
+ tabindex: {},
326
+ validateEvent: {
327
+ type: Boolean
328
+ },
329
+ unlinkPanels: {
330
+ type: Boolean
331
+ },
332
+ placement: {},
333
+ fallbackPlacements: {},
334
+ disabledHours: {},
335
+ disabledMinutes: {},
336
+ disabledSeconds: {},
337
+ automaticDropdown: {
338
+ type: Boolean
339
+ },
340
+ id: {},
341
+ name: {},
342
+ popperClass: {},
343
+ popperStyle: {},
344
+ format: {},
345
+ valueFormat: {},
346
+ dateFormat: {},
347
+ timeFormat: {},
348
+ clearable: {
349
+ type: Boolean
350
+ },
351
+ clearIcon: {},
352
+ editable: {
353
+ type: Boolean
354
+ },
355
+ prefixIcon: {},
356
+ size: {},
357
+ readonly: {
358
+ type: Boolean
359
+ },
360
+ disabled: {
361
+ type: Boolean
362
+ },
363
+ placeholder: {
364
+ default: "请选择"
365
+ },
366
+ popperOptions: {},
367
+ modelValue: {},
368
+ rangeSeparator: {},
369
+ startPlaceholder: {
370
+ default: "开始日期"
371
+ },
372
+ endPlaceholder: {
373
+ default: "结束日期"
374
+ },
375
+ defaultValue: {},
376
+ defaultTime: {},
377
+ isRange: {
378
+ type: Boolean
379
+ }
380
+ }, {
381
+ modelValue: {},
382
+ modelModifiers: {},
383
+ start: {},
384
+ startModifiers: {},
385
+ end: {},
386
+ endModifiers: {}
387
+ }),
388
+ emits: /* @__PURE__ */ T(["blur", "change"], ["update:modelValue", "update:start", "update:end"]),
389
+ setup(e, {
390
+ emit: t
391
+ }) {
392
+ const a = t, n = C(e, "modelValue"), l = C(e, "start"), r = C(e, "end"), i = x({
393
+ get: () => {
394
+ if (e.type.includes("range") && l.value && r.value)
395
+ return [l.value, r.value];
396
+ if (!e.type.includes("range"))
397
+ return n.value;
398
+ },
399
+ set: (f) => {
400
+ e.type.includes("range") ? (l.value = f?.[0], r.value = f?.[1]) : n.value = f;
401
+ }
402
+ }), o = x(() => e.type.includes("range") ? [{
403
+ text: "最近一周",
404
+ value: () => {
405
+ const f = /* @__PURE__ */ new Date(), y = /* @__PURE__ */ new Date();
406
+ return y.setTime(y.getTime() - 3600 * 1e3 * 24 * 7), [y, f];
407
+ }
408
+ }, {
409
+ text: "最近一月",
410
+ value: () => {
411
+ const f = /* @__PURE__ */ new Date(), y = /* @__PURE__ */ new Date();
412
+ return y.setTime(y.getTime() - 3600 * 1e3 * 24 * 30), [y, f];
413
+ }
414
+ }, {
415
+ text: "最近三月",
416
+ value: () => {
417
+ const f = /* @__PURE__ */ new Date(), y = /* @__PURE__ */ new Date();
418
+ return y.setTime(y.getTime() - 3600 * 1e3 * 24 * 90), [y, f];
419
+ }
420
+ }] : [{
421
+ text: "昨天",
422
+ value: /* @__PURE__ */ new Date()
423
+ }, {
424
+ text: "一周前",
425
+ value: () => {
426
+ const f = /* @__PURE__ */ new Date();
427
+ return f.setTime(f.getTime() - 3600 * 1e3 * 24 * 7), f;
428
+ }
429
+ }, {
430
+ text: "一月前",
431
+ value: () => {
432
+ const f = /* @__PURE__ */ new Date();
433
+ return f.setTime(f.getTime() - 3600 * 1e3 * 24 * 30), f;
434
+ }
435
+ }]), d = m(k, void 0);
436
+ if (d?.required) {
437
+ const {
438
+ validator: f,
439
+ label: y
440
+ } = d;
441
+ d.validator = () => !i.value || e.type.includes("range") && !i.value?.length ? `请选择${y}` : f?.();
442
+ }
443
+ const s = m(A, void 0), c = m(M, void 0), u = m(R, void 0);
444
+ c?.on(([f, y]) => s === f && y === void 0 && (i.value = void 0)), u?.on(() => s && c?.trigger([s, i.value === void 0 ? void 0 : Array.isArray(i.value) ? `${i.value[0]} 至 ${i.value[1]}` : i.value]));
445
+ const X = (f) => a("change", f), E = () => {
446
+ d?.validate?.(), a("blur");
447
+ };
448
+ return (f, y) => (v(), g(w(ge), V({
449
+ type: e.type,
450
+ placeholder: e.placeholder,
451
+ startPlaceholder: e.startPlaceholder,
452
+ endPlaceholder: e.endPlaceholder,
453
+ shortcuts: o.value,
454
+ valueFormat: e.valueFormat
455
+ }, {
456
+ modelValue: i.value,
457
+ "onUpdate:modelValue": y[0] || (y[0] = (N) => i.value = N),
458
+ onBlur: E,
459
+ onChange: X
460
+ }), null, 16, ["modelValue"]));
461
+ }
462
+ }), Je = /* @__PURE__ */ b({
299
463
  __name: "XDialog",
300
- props: /* @__PURE__ */ B({
464
+ props: /* @__PURE__ */ T({
301
465
  title: {},
302
466
  bodyClass: {}
303
467
  }, {
@@ -310,27 +474,27 @@ const Ye = /* @__PURE__ */ b({
310
474
  setup(e) {
311
475
  const {
312
476
  header: t,
313
- footer: l
314
- } = se(), n = T(e, "modelValue");
315
- return (o, i) => (m(), y(h(he), {
477
+ footer: a
478
+ } = de(), n = C(e, "modelValue");
479
+ return (l, r) => (v(), g(w(he), {
316
480
  modelValue: n.value,
317
- "onUpdate:modelValue": i[0] || (i[0] = (d) => n.value = d),
481
+ "onUpdate:modelValue": r[0] || (r[0] = (i) => n.value = i),
318
482
  title: e.title,
319
483
  "body-class": `flex flex-col ${e.bodyClass}`
320
- }, ce({
321
- default: v(() => [E(o.$slots, "default")]),
484
+ }, se({
485
+ default: B(() => [S(l.$slots, "default")]),
322
486
  _: 2
323
487
  }, [t ? {
324
488
  name: "header",
325
- fn: v(() => [E(o.$slots, "header")]),
489
+ fn: B(() => [S(l.$slots, "header")]),
326
490
  key: "0"
327
- } : void 0, l ? {
491
+ } : void 0, a ? {
328
492
  name: "footer",
329
- fn: v(() => [E(o.$slots, "footer")]),
493
+ fn: B(() => [S(l.$slots, "footer")]),
330
494
  key: "1"
331
495
  } : void 0]), 1032, ["modelValue", "title", "body-class"]));
332
496
  }
333
- }), et = /* @__PURE__ */ b({
497
+ }), Ze = /* @__PURE__ */ b({
334
498
  __name: "XDivider",
335
499
  props: {
336
500
  direction: {},
@@ -339,46 +503,46 @@ const Ye = /* @__PURE__ */ b({
339
503
  },
340
504
  setup(e) {
341
505
  const t = e;
342
- return (l, n) => (m(), y(h(Be), O(M(t)), {
343
- default: v(() => [
344
- E(l.$slots, "default")
506
+ return (a, n) => (v(), g(w(Be), $(O(t)), {
507
+ default: B(() => [
508
+ S(a.$slots, "default")
345
509
  ]),
346
510
  _: 3
347
511
  }, 16));
348
512
  }
349
- }), tt = /* @__PURE__ */ b((e, {
513
+ }), et = /* @__PURE__ */ b((e, {
350
514
  expose: t
351
515
  }) => {
352
- const l = p(le, void 0), n = p(Re, void 0), o = F(), i = {
516
+ const a = m(le, void 0), n = m(Re, void 0), l = H(), r = {
353
517
  label: e.label,
354
518
  required: e.required,
355
519
  clearValidate() {
356
- o.value = void 0;
520
+ l.value = void 0;
357
521
  },
358
522
  validate() {
359
- return o.value = i.validator?.() ?? void 0, o.value && l?.name && (ee({
523
+ return l.value = r.validator?.() ?? void 0, l.value && a?.name && (te({
360
524
  plain: !0,
361
525
  type: "warning",
362
- message: o.value
363
- }), n?.trigger(l.name)), !o.value;
526
+ message: l.value
527
+ }), n?.trigger(a.name)), !l.value;
364
528
  }
365
529
  };
366
- return p(te, void 0)?.push(i), $(k, i), t({
367
- ...i
368
- }), $(P, e.label), () => z(Ve, V({
530
+ return m(ae, void 0)?.push(r), L(k, r), t({
531
+ ...r
532
+ }), L(A, e.label), () => z(Xe, V({
369
533
  label: e.label,
370
534
  labelPosition: e.labelPosition,
371
535
  labelWidth: e.labelWidth,
372
536
  required: e.required
373
537
  }, {
374
- error: o.value
538
+ error: l.value
375
539
  }), {
376
540
  label: () => e.label,
377
541
  default: () => e.content?.()
378
542
  });
379
543
  }, {
380
544
  props: ["label", "required", "content", "tooltip"]
381
- }), at = /* @__PURE__ */ b({
545
+ }), tt = /* @__PURE__ */ b({
382
546
  __name: "XForm",
383
547
  props: {
384
548
  content: {
@@ -404,22 +568,22 @@ const Ye = /* @__PURE__ */ b({
404
568
  setup(e, {
405
569
  expose: t
406
570
  }) {
407
- const l = F(), n = [];
408
- $(te, n);
409
- const o = () => n.every((a) => a.validate()), i = () => {
410
- l.value?.resetFields(), n.forEach((a) => a.clearValidate());
571
+ const a = H(), n = [];
572
+ L(ae, n);
573
+ const l = () => n.every((o) => o.validate()), r = () => {
574
+ a.value?.resetFields(), n.forEach((o) => o.clearValidate());
411
575
  };
412
576
  t({
413
577
  data: e.data,
414
- validate: o,
415
- resetFields: i
578
+ validate: l,
579
+ resetFields: r
416
580
  });
417
- const d = () => e.content?.({
581
+ const i = () => e.content?.({
418
582
  data: e.data
419
583
  });
420
- return (a, u) => (m(), y(h(we), V({
584
+ return (o, d) => (v(), g(w(we), V({
421
585
  ref_key: "form",
422
- ref: l
586
+ ref: a
423
587
  }, {
424
588
  inline: e.inline,
425
589
  disabled: e.disabled,
@@ -428,11 +592,11 @@ const Ye = /* @__PURE__ */ b({
428
592
  labelPosition: e.labelPosition,
429
593
  statusIcon: e.statusIcon
430
594
  }), {
431
- default: v(() => [z(d)]),
595
+ default: B(() => [z(i)]),
432
596
  _: 1
433
597
  }, 16));
434
598
  }
435
- }), lt = /* @__PURE__ */ b({
599
+ }), at = /* @__PURE__ */ b({
436
600
  __name: "XImage",
437
601
  props: {
438
602
  hideOnClickModal: { type: Boolean },
@@ -456,11 +620,11 @@ const Ye = /* @__PURE__ */ b({
456
620
  },
457
621
  setup(e) {
458
622
  const t = e;
459
- return (l, n) => (m(), y(h(Ce), O(M(t)), null, 16));
623
+ return (a, n) => (v(), g(w(Te), $(O(t)), null, 16));
460
624
  }
461
- }), ot = /* @__PURE__ */ b({
625
+ }), lt = /* @__PURE__ */ b({
462
626
  __name: "XInput",
463
- props: /* @__PURE__ */ B({
627
+ props: /* @__PURE__ */ T({
464
628
  clearable: {
465
629
  type: Boolean
466
630
  },
@@ -481,33 +645,33 @@ const Ye = /* @__PURE__ */ b({
481
645
  modelValue: {},
482
646
  modelModifiers: {}
483
647
  }),
484
- emits: /* @__PURE__ */ B(["blur", "change"], ["update:modelValue"]),
648
+ emits: /* @__PURE__ */ T(["blur", "change"], ["update:modelValue"]),
485
649
  setup(e, {
486
650
  emit: t
487
651
  }) {
488
- const l = e, n = t, o = T(e, "modelValue"), i = p(k, void 0);
489
- if (i?.required) {
652
+ const a = e, n = t, l = C(e, "modelValue"), r = m(k, void 0);
653
+ if (r?.required) {
490
654
  const {
491
- validator: r,
492
- label: w
493
- } = i;
494
- i.validator = () => o.value ? r?.() : `请输入${w}`;
655
+ validator: u,
656
+ label: X
657
+ } = r;
658
+ r.validator = () => l.value ? u?.() : `请输入${X}`;
495
659
  }
496
- const d = p(P, void 0), a = p(D, void 0), u = p(H, void 0);
497
- a?.on(([r, w]) => d === r && w === void 0 && (o.value = void 0)), u?.on(() => d && a?.trigger([d, o.value]));
498
- const s = (r) => n("change", r), c = () => {
499
- i?.validate(), n("blur");
660
+ const i = m(A, void 0), o = m(M, void 0), d = m(R, void 0);
661
+ o?.on(([u, X]) => i === u && X === void 0 && (l.value = void 0)), d?.on(() => i && o?.trigger([i, l.value]));
662
+ const s = (u) => n("change", u), c = () => {
663
+ r?.validate(), n("blur");
500
664
  };
501
- return (r, w) => (m(), y(h(Ee), V(l, {
502
- modelValue: o.value,
503
- "onUpdate:modelValue": w[0] || (w[0] = (x) => o.value = x),
665
+ return (u, X) => (v(), g(w(xe), V(a, {
666
+ modelValue: l.value,
667
+ "onUpdate:modelValue": X[0] || (X[0] = (E) => l.value = E),
504
668
  onBlur: c,
505
669
  onChange: s
506
670
  }), null, 16, ["modelValue"]));
507
671
  }
508
- }), nt = /* @__PURE__ */ b({
672
+ }), ot = /* @__PURE__ */ b({
509
673
  __name: "XInputNumber",
510
- props: /* @__PURE__ */ B({
674
+ props: /* @__PURE__ */ T({
511
675
  placeholder: {
512
676
  default: "请输入"
513
677
  },
@@ -533,33 +697,33 @@ const Ye = /* @__PURE__ */ b({
533
697
  modelValue: {},
534
698
  modelModifiers: {}
535
699
  }),
536
- emits: /* @__PURE__ */ B(["blur"], ["update:modelValue"]),
700
+ emits: /* @__PURE__ */ T(["blur"], ["update:modelValue"]),
537
701
  setup(e, {
538
702
  emit: t
539
703
  }) {
540
- const l = e, n = t, o = T(e, "modelValue"), i = p(k, void 0);
541
- if (i?.required) {
704
+ const a = e, n = t, l = C(e, "modelValue"), r = m(k, void 0);
705
+ if (r?.required) {
542
706
  const {
543
- validator: a,
544
- label: u
545
- } = i;
546
- i.validator = () => o.value === void 0 ? `请输入${u}` : a?.();
707
+ validator: o,
708
+ label: d
709
+ } = r;
710
+ r.validator = () => l.value === void 0 ? `请输入${d}` : o?.();
547
711
  }
548
- const d = () => {
549
- i?.validate(), n("blur");
712
+ const i = () => {
713
+ r?.validate(), n("blur");
550
714
  };
551
- return (a, u) => {
715
+ return (o, d) => {
552
716
  const s = U("ElInputNumber");
553
- return m(), y(s, V(l, {
554
- modelValue: o.value,
555
- "onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
556
- onBlur: d
717
+ return v(), g(s, V(a, {
718
+ modelValue: l.value,
719
+ "onUpdate:modelValue": d[0] || (d[0] = (c) => l.value = c),
720
+ onBlur: i
557
721
  }), null, 16, ["modelValue"]);
558
722
  };
559
723
  }
560
- }), it = /* @__PURE__ */ b({
724
+ }), nt = /* @__PURE__ */ b({
561
725
  __name: "XPagination",
562
- props: /* @__PURE__ */ B({
726
+ props: /* @__PURE__ */ T({
563
727
  sizes: { default: () => [20, 50, 100] },
564
728
  pageSize: {},
565
729
  defaultPageSize: {},
@@ -588,21 +752,21 @@ const Ye = /* @__PURE__ */ b({
588
752
  current: {},
589
753
  currentModifiers: {}
590
754
  }),
591
- emits: /* @__PURE__ */ B(["sizeChange", "currentChange"], ["update:size", "update:current"]),
755
+ emits: /* @__PURE__ */ T(["sizeChange", "currentChange"], ["update:size", "update:current"]),
592
756
  setup(e, { emit: t }) {
593
- const l = t, n = T(e, "size"), o = T(e, "current");
594
- return (i, d) => (m(), y(h(Te), V({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
595
- "current-page": o.value,
596
- "onUpdate:currentPage": d[0] || (d[0] = (a) => o.value = a),
757
+ const a = t, n = C(e, "size"), l = C(e, "current");
758
+ return (r, i) => (v(), g(w(Ve), V({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
759
+ "current-page": l.value,
760
+ "onUpdate:currentPage": i[0] || (i[0] = (o) => l.value = o),
597
761
  "page-size": n.value,
598
- "onUpdate:pageSize": d[1] || (d[1] = (a) => n.value = a),
599
- onSizeChange: d[2] || (d[2] = (a) => l("sizeChange", a)),
600
- onCurrentChange: d[3] || (d[3] = (a) => l("currentChange", a))
762
+ "onUpdate:pageSize": i[1] || (i[1] = (o) => n.value = o),
763
+ onSizeChange: i[2] || (i[2] = (o) => a("sizeChange", o)),
764
+ onCurrentChange: i[3] || (i[3] = (o) => a("currentChange", o))
601
765
  }), null, 16, ["current-page", "page-size"]));
602
766
  }
603
- }), dt = /* @__PURE__ */ b({
767
+ }), it = /* @__PURE__ */ b({
604
768
  __name: "XRate",
605
- props: /* @__PURE__ */ B({
769
+ props: /* @__PURE__ */ T({
606
770
  ariaLabel: {},
607
771
  id: {},
608
772
  lowThreshold: {},
@@ -640,10 +804,10 @@ const Ye = /* @__PURE__ */ b({
640
804
  }),
641
805
  emits: ["update:modelValue"],
642
806
  setup(e) {
643
- const t = e, l = T(e, "modelValue");
644
- return (n, o) => (m(), y(h(xe), V(t, {
645
- modelValue: l.value,
646
- "onUpdate:modelValue": o[0] || (o[0] = (i) => l.value = i)
807
+ const t = e, a = C(e, "modelValue");
808
+ return (n, l) => (v(), g(w(Ce), V(t, {
809
+ modelValue: a.value,
810
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => a.value = r)
647
811
  }), null, 16, ["modelValue"]));
648
812
  }
649
813
  }), rt = /* @__PURE__ */ b({
@@ -653,34 +817,34 @@ const Ye = /* @__PURE__ */ b({
653
817
  },
654
818
  emits: ["cancel", "confirm"],
655
819
  setup(e, { emit: t }) {
656
- const l = t;
657
- return (n, o) => {
658
- const i = U("XButton");
659
- return m(), y(h(Xe), {
820
+ const a = t;
821
+ return (n, l) => {
822
+ const r = U("XButton");
823
+ return v(), g(w(Ee), {
660
824
  title: e.title,
661
- onCancel: o[0] || (o[0] = () => l("cancel")),
662
- onConfirm: o[1] || (o[1] = () => l("confirm"))
825
+ onCancel: l[0] || (l[0] = () => a("cancel")),
826
+ onConfirm: l[1] || (l[1] = () => a("confirm"))
663
827
  }, {
664
- reference: v(() => [
665
- E(n.$slots, "default")
828
+ reference: B(() => [
829
+ S(n.$slots, "default")
666
830
  ]),
667
- actions: v(({ confirm: d, cancel: a }) => [
668
- z(i, {
831
+ actions: B(({ confirm: i, cancel: o }) => [
832
+ z(r, {
669
833
  size: "small",
670
- onClick: a
834
+ onClick: o
671
835
  }, {
672
- default: v(() => [...o[2] || (o[2] = [
673
- q(" 取消 ", -1)
836
+ default: B(() => [...l[2] || (l[2] = [
837
+ j(" 取消 ", -1)
674
838
  ])]),
675
839
  _: 1
676
840
  }, 8, ["onClick"]),
677
- z(i, {
841
+ z(r, {
678
842
  type: "danger",
679
843
  size: "small",
680
- onClick: d
844
+ onClick: i
681
845
  }, {
682
- default: v(() => [...o[3] || (o[3] = [
683
- q(" 确定 ", -1)
846
+ default: B(() => [...l[3] || (l[3] = [
847
+ j(" 确定 ", -1)
684
848
  ])]),
685
849
  _: 1
686
850
  }, 8, ["onClick"])
@@ -719,20 +883,20 @@ const Ye = /* @__PURE__ */ b({
719
883
  setup(e, {
720
884
  expose: t
721
885
  }) {
722
- const l = e, n = Z("scrollbar"), o = C(() => n.value?.wrapRef), i = C(() => o.value?.firstElementChild);
886
+ const a = e, n = ee("scrollbar"), l = x(() => n.value?.wrapRef), r = x(() => l.value?.firstElementChild);
723
887
  return t({
724
- wrapRef: o,
725
- viewRef: i
726
- }), (d, a) => (m(), y(h(Se), V({
888
+ wrapRef: l,
889
+ viewRef: r
890
+ }), (i, o) => (v(), g(w(Se), V({
727
891
  ref: "scrollbar"
728
- }, l), {
729
- default: v(() => [E(d.$slots, "default")]),
892
+ }, a), {
893
+ default: B(() => [S(i.$slots, "default")]),
730
894
  _: 3
731
895
  }, 16));
732
896
  }
733
- }), st = /* @__PURE__ */ b({
897
+ }), dt = /* @__PURE__ */ b({
734
898
  __name: "XSelect",
735
- props: /* @__PURE__ */ B({
899
+ props: /* @__PURE__ */ T({
736
900
  data: {},
737
901
  factory: {
738
902
  type: Function
@@ -837,56 +1001,56 @@ const Ye = /* @__PURE__ */ b({
837
1001
  modelValue: {},
838
1002
  modelModifiers: {}
839
1003
  }),
840
- emits: /* @__PURE__ */ B(["blur", "change"], ["update:modelValue"]),
1004
+ emits: /* @__PURE__ */ T(["blur", "change"], ["update:modelValue"]),
841
1005
  setup(e, {
842
1006
  emit: t
843
1007
  }) {
844
- const l = t, n = T(e, "modelValue"), o = F([]), i = /* @__PURE__ */ Q(() => e.data, e.factory), d = C(() => [...(/* @__PURE__ */ Q(o, e.factory)).value, ...i.value]), a = (f) => {
845
- if (typeof f == "object") {
1008
+ const a = t, n = C(e, "modelValue"), l = H([]), r = /* @__PURE__ */ W(() => e.data, e.factory), i = x(() => [...(/* @__PURE__ */ W(l, e.factory)).value, ...r.value]), o = (p) => {
1009
+ if (typeof p == "object") {
846
1010
  if (e.identify)
847
- return e.identify(f);
1011
+ return e.identify(p);
848
1012
  throw new Error("`identify` is required when value's type extends `object` or `object[]`");
849
1013
  } else
850
- return f;
851
- }, u = (f) => d.value.map((g) => g.value).find((g) => a(g) === f);
1014
+ return p;
1015
+ }, d = (p) => i.value.map((h) => h.value).find((h) => o(h) === p);
852
1016
  let s = 0;
853
- W([n, i], async () => {
1017
+ _([n, r], async () => {
854
1018
  if (s++, n.value) {
855
- const f = [].concat(n.value).filter((_) => !i.value.map((S) => a(S.value)).includes(a(_))), g = s, R = await e.supplement?.(f);
856
- g === s && R && (o.value = R);
1019
+ const p = [].concat(n.value).filter((q) => !r.value.map((I) => o(I.value)).includes(o(q))), h = s, D = await e.supplement?.(p);
1020
+ h === s && D && (l.value = D);
857
1021
  } else
858
- o.value = [];
1022
+ l.value = [];
859
1023
  }, {
860
1024
  immediate: !0
861
1025
  });
862
- const c = C(() => d.value.map((f) => {
863
- const g = a(f.value);
1026
+ const c = x(() => i.value.map((p) => {
1027
+ const h = o(p.value);
864
1028
  return {
865
- ...f,
866
- key: g,
867
- value: g
1029
+ ...p,
1030
+ key: h,
1031
+ value: h
868
1032
  };
869
- })), r = C({
870
- get: () => n.value && (Array.isArray(n.value) ? n.value.map(a) : a(n.value)),
871
- set: (f) => {
872
- Array.isArray(f) ? n.value = f.map((g) => u(g)) : n.value = f === void 0 ? void 0 : u(f) || (e.allowCreate ? f : void 0);
1033
+ })), u = x({
1034
+ get: () => n.value && (Array.isArray(n.value) ? n.value.map(o) : o(n.value)),
1035
+ set: (p) => {
1036
+ Array.isArray(p) ? n.value = p.map((h) => d(h)) : n.value = p === void 0 ? void 0 : d(p) || (e.allowCreate ? p : void 0);
873
1037
  }
874
- }), w = p(k, void 0);
875
- if (w?.required) {
1038
+ }), X = m(k, void 0);
1039
+ if (X?.required) {
876
1040
  const {
877
- validator: f,
878
- label: g
879
- } = w;
880
- w.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${g}` : f?.();
1041
+ validator: p,
1042
+ label: h
1043
+ } = X;
1044
+ X.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${h}` : p?.();
881
1045
  }
882
- const x = p(P, void 0), X = p(D, void 0), A = p(H, void 0);
883
- X?.on(([f, g]) => x === f && g === void 0 && (r.value = void 0)), A?.on(() => x && X?.trigger([x, r.value === void 0 ? void 0 : [].concat(r.value).map((f) => c.value.find((g) => g.value === f).label).join(",")]));
884
- const ne = (f) => l("change", f), ie = () => {
885
- w?.validate(), l("blur");
1046
+ const E = m(A, void 0), f = m(M, void 0), y = m(R, void 0);
1047
+ f?.on(([p, h]) => E === p && h === void 0 && (u.value = void 0)), y?.on(() => E && f?.trigger([E, u.value === void 0 ? void 0 : [].concat(u.value).map((p) => c.value.find((h) => h.value === p).label).join(",")]));
1048
+ const N = (p) => a("change", p), ne = () => {
1049
+ X?.validate(), a("blur");
886
1050
  };
887
- return (f, g) => {
888
- const R = U("ElOption"), _ = U("ElSelect");
889
- return m(), y(_, V({
1051
+ return (p, h) => {
1052
+ const D = U("ElOption"), q = U("ElSelect");
1053
+ return v(), g(q, V({
890
1054
  allowCreate: e.allowCreate,
891
1055
  clearable: e.clearable,
892
1056
  filterable: e.filterable,
@@ -900,24 +1064,24 @@ const Ye = /* @__PURE__ */ b({
900
1064
  collapseTags: e.collapseTags,
901
1065
  collapseTagsTooltip: e.collapseTags
902
1066
  }, {
903
- modelValue: r.value,
904
- "onUpdate:modelValue": g[0] || (g[0] = (S) => r.value = S),
905
- onBlur: ie,
906
- onChange: ne
1067
+ modelValue: u.value,
1068
+ "onUpdate:modelValue": h[0] || (h[0] = (I) => u.value = I),
1069
+ onBlur: ne,
1070
+ onChange: N
907
1071
  }), {
908
- default: v(() => [(m(!0), j(Y, null, J(c.value, (S) => (m(), y(R, {
909
- key: S.key,
910
- label: S.label,
911
- value: S.value
1072
+ default: B(() => [(v(!0), K(J, null, Z(c.value, (I) => (v(), g(D, {
1073
+ key: I.key,
1074
+ label: I.label,
1075
+ value: I.value
912
1076
  }, {
913
- default: v(() => [q(fe(S.label), 1)]),
1077
+ default: B(() => [j(ce(I.label), 1)]),
914
1078
  _: 2
915
1079
  }, 1032, ["label", "value"]))), 128))]),
916
1080
  _: 1
917
1081
  }, 16, ["modelValue"]);
918
1082
  };
919
1083
  }
920
- }), ct = /* @__PURE__ */ b({
1084
+ }), st = /* @__PURE__ */ b({
921
1085
  __name: "XSpace",
922
1086
  props: {
923
1087
  direction: {},
@@ -937,12 +1101,12 @@ const Ye = /* @__PURE__ */ b({
937
1101
  },
938
1102
  setup(e) {
939
1103
  const t = e;
940
- return (l, n) => (m(), y(h(ze), O(M(t)), {
941
- default: v(() => [E(l.$slots, "default")]),
1104
+ return (a, n) => (v(), g(w(ke), $(O(t)), {
1105
+ default: B(() => [S(a.$slots, "default")]),
942
1106
  _: 3
943
1107
  }, 16));
944
1108
  }
945
- }), ft = /* @__PURE__ */ b({
1109
+ }), ct = /* @__PURE__ */ b({
946
1110
  __name: "XTable",
947
1111
  props: {
948
1112
  data: {},
@@ -965,92 +1129,51 @@ const Ye = /* @__PURE__ */ b({
965
1129
  setup(e, {
966
1130
  emit: t
967
1131
  }) {
968
- const l = t, n = Z("container"), o = F(), i = Qe(n), d = C(() => e.height ?? i.height.value), a = () => z(ke, V({
969
- ref: o
1132
+ const a = t, n = ee("container"), l = H(), r = _e(n), i = x(() => e.height ?? r.height.value), o = () => z(Ie, V({
1133
+ ref: l
970
1134
  }, {
971
1135
  data: e.data,
972
- height: d.value,
1136
+ height: i.value,
973
1137
  showOverflowTooltip: e.showOverflowTooltip,
974
1138
  border: e.border,
975
1139
  highlightCurrentRow: e.highlightCurrentRow,
976
1140
  spanMethod: e.spanMethod
977
1141
  }, {
978
- "onRow-click": (u) => l("rowClick", u),
979
- "onSelection-change": (u) => l("selectionChange", u),
980
- "onHeader-dragend": (u, s, c) => l("headerDragend", u, s, c)
1142
+ "onRow-click": (d) => a("rowClick", d),
1143
+ "onSelection-change": (d) => a("selectionChange", d),
1144
+ "onHeader-dragend": (d, s, c) => a("headerDragend", d, s, c)
981
1145
  }), {
982
- default: () => e.columns.map((u) => z(Ie, u, {
1146
+ default: () => e.columns.map((d) => z(ze, d, {
983
1147
  default: ({
984
1148
  $index: s,
985
1149
  row: c
986
- }) => u.content?.({
1150
+ }) => d.content?.({
987
1151
  index: s,
988
1152
  row: c
989
1153
  }),
990
- header: () => u.header?.({
991
- column: u
992
- }) ?? u.label
1154
+ header: () => d.header?.({
1155
+ column: d
1156
+ }) ?? d.label
993
1157
  }))
994
1158
  });
995
- return (u, s) => (m(), j("div", {
1159
+ return (d, s) => (v(), K("div", {
996
1160
  ref_key: "container",
997
1161
  ref: n,
998
- class: me([e.height === void 0 && "h-full"])
999
- }, [z(a)], 2));
1162
+ class: fe([e.height === void 0 && "h-full"])
1163
+ }, [z(o)], 2));
1000
1164
  }
1001
- }), mt = /* @__PURE__ */ b((e, {
1165
+ }), ft = /* @__PURE__ */ b((e, {
1002
1166
  slots: t
1003
1167
  }) => {
1004
- const l = {
1168
+ const a = {
1005
1169
  ...e
1006
1170
  };
1007
- return p(ae, void 0)?.push(l), $(le, l), () => z($e, e, {
1171
+ return m(De, void 0)?.push(a), L(le, a), () => z(Pe, e, {
1008
1172
  ...t
1009
1173
  });
1010
1174
  }, {
1011
1175
  props: ["label", "name", "closable", "lazy", "disabled"]
1012
- }), pt = /* @__PURE__ */ b({
1013
- __name: "XTabs",
1014
- props: /* @__PURE__ */ B({
1015
- type: {},
1016
- defaultValue: {},
1017
- addable: {
1018
- type: Boolean,
1019
- default: () => {
1020
- }
1021
- },
1022
- editable: {
1023
- type: Boolean,
1024
- default: () => {
1025
- }
1026
- },
1027
- tabPosition: {}
1028
- }, {
1029
- modelValue: {},
1030
- modelModifiers: {}
1031
- }),
1032
- emits: /* @__PURE__ */ B(["tabChange", "tabRemove"], ["update:modelValue"]),
1033
- setup(e, {
1034
- emit: t
1035
- }) {
1036
- const l = t, n = T(e, "modelValue");
1037
- return $(ae, []), (i, d) => (m(), y(h(Ae), V({
1038
- addable: e.addable,
1039
- editable: e.editable,
1040
- type: e.type,
1041
- defaultValue: e.defaultValue,
1042
- tabPosition: e.tabPosition
1043
- }, {
1044
- modelValue: n.value,
1045
- "onUpdate:modelValue": d[0] || (d[0] = (a) => n.value = a),
1046
- onTabChange: d[1] || (d[1] = (a) => l("tabChange", a)),
1047
- onTabRemove: d[2] || (d[2] = (a) => l("tabRemove", a))
1048
- }), {
1049
- default: v(() => [E(i.$slots, "default")]),
1050
- _: 3
1051
- }, 16, ["modelValue"]));
1052
- }
1053
- }), bt = /* @__PURE__ */ b({
1176
+ }), mt = /* @__PURE__ */ b({
1054
1177
  __name: "XTag",
1055
1178
  props: {
1056
1179
  type: {},
@@ -1062,16 +1185,16 @@ const Ye = /* @__PURE__ */ b({
1062
1185
  },
1063
1186
  emits: ["close"],
1064
1187
  setup(e) {
1065
- return (t, l) => (m(), y(h(Oe), V({ type: e.type, color: e.color, closable: e.closable, round: e.round }, {
1066
- onClose: l[0] || (l[0] = (n) => t.$emit("close"))
1188
+ return (t, a) => (v(), g(w(Ae), V({ type: e.type, color: e.color, closable: e.closable, round: e.round }, {
1189
+ onClose: a[0] || (a[0] = (n) => t.$emit("close"))
1067
1190
  }), {
1068
- default: v(() => [
1069
- E(t.$slots, "default")
1191
+ default: B(() => [
1192
+ S(t.$slots, "default")
1070
1193
  ]),
1071
1194
  _: 3
1072
1195
  }, 16));
1073
1196
  }
1074
- }), yt = /* @__PURE__ */ b({
1197
+ }), pt = /* @__PURE__ */ b({
1075
1198
  __name: "XText",
1076
1199
  props: {
1077
1200
  type: {},
@@ -1080,16 +1203,16 @@ const Ye = /* @__PURE__ */ b({
1080
1203
  } }
1081
1204
  },
1082
1205
  setup(e) {
1083
- return (t, l) => (m(), y(h(Me), O(M({ type: e.type, size: e.size, truncated: e.truncated })), {
1084
- default: v(() => [
1085
- E(t.$slots, "default")
1206
+ return (t, a) => (v(), g(w($e), $(O({ type: e.type, size: e.size, truncated: e.truncated })), {
1207
+ default: B(() => [
1208
+ S(t.$slots, "default")
1086
1209
  ]),
1087
1210
  _: 3
1088
1211
  }, 16));
1089
1212
  }
1090
1213
  }), vt = /* @__PURE__ */ b({
1091
1214
  __name: "XUpload",
1092
- props: /* @__PURE__ */ B({
1215
+ props: /* @__PURE__ */ T({
1093
1216
  action: {},
1094
1217
  data: {
1095
1218
  type: Function
@@ -1121,72 +1244,102 @@ const Ye = /* @__PURE__ */ b({
1121
1244
  }),
1122
1245
  emits: ["update:modelValue"],
1123
1246
  setup(e) {
1124
- const t = T(e, "modelValue"), l = C(() => [].concat(t.value ?? []).reverse().map((a) => ({
1125
- name: a.split("/").findLast(() => !0),
1126
- url: a,
1127
- uid: Number(a.slice(0, a.lastIndexOf("/")).split("/").findLast(() => !0))
1128
- }))), n = p(k, void 0);
1247
+ const t = C(e, "modelValue"), a = x(() => [].concat(t.value ?? []).reverse().map((o) => ({
1248
+ name: o.split("/").findLast(() => !0),
1249
+ url: o,
1250
+ uid: Number(o.slice(0, o.lastIndexOf("/")).split("/").findLast(() => !0))
1251
+ }))), n = m(k, void 0);
1129
1252
  if (n?.required) {
1130
1253
  const {
1131
- validator: a,
1132
- label: u
1254
+ validator: o,
1255
+ label: d
1133
1256
  } = n;
1134
- n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${u}` : a?.();
1257
+ n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${d}` : o?.();
1135
1258
  }
1136
- const o = (a) => (a.size > e.maxSize && ee.warning("文件过大,请重新选择"), a.size < e.maxSize), i = (a) => window.open(a.url), d = (a, u) => {
1137
- t.value = Array.isArray(t.value) ? u.map((s) => s.url) : void 0;
1259
+ const l = (o) => (o.size > e.maxSize && te.warning("文件过大,请重新选择"), o.size < e.maxSize), r = (o) => window.open(o.url), i = (o, d) => {
1260
+ t.value = Array.isArray(t.value) ? d.map((s) => s.url) : void 0;
1138
1261
  };
1139
- return (a, u) => (m(), y(h(Pe), O(M({
1262
+ return (o, d) => (v(), g(w(Oe), $(O({
1140
1263
  limit: e.limit,
1141
1264
  disabled: e.disabled,
1142
1265
  data: e.data,
1143
1266
  maxSize: e.maxSize,
1144
1267
  showFileList: e.showFileList,
1145
- fileList: l.value,
1146
- beforeUpload: o,
1147
- onPreview: i,
1148
- onRemove: d
1268
+ fileList: a.value,
1269
+ beforeUpload: l,
1270
+ onPreview: r,
1271
+ onRemove: i
1149
1272
  })), {
1150
- file: v(({
1273
+ file: B(({
1151
1274
  file: s
1152
- }) => [E(a.$slots, "file", {
1275
+ }) => [S(o.$slots, "file", {
1153
1276
  file: s
1154
1277
  })]),
1155
- default: v(() => [E(a.$slots, "default")]),
1278
+ default: B(() => [S(o.$slots, "default")]),
1156
1279
  _: 3
1157
1280
  }, 16));
1158
1281
  }
1159
- });
1282
+ }), yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1283
+ __proto__: null,
1284
+ XButton: Me,
1285
+ XCascader: Fe,
1286
+ XCheckbox: Ke,
1287
+ XColorPicker: Ge,
1288
+ XDatePicker: Ye,
1289
+ XDialog: Je,
1290
+ XDivider: Ze,
1291
+ XForm: tt,
1292
+ XFormItem: et,
1293
+ XImage: at,
1294
+ XInput: lt,
1295
+ XInputNumber: ot,
1296
+ XPagination: nt,
1297
+ XRate: it,
1298
+ XReconfirm: rt,
1299
+ XScrollbar: ut,
1300
+ XSelect: dt,
1301
+ XSpace: st,
1302
+ XTabPane: ft,
1303
+ XTable: ct,
1304
+ XTag: mt,
1305
+ XText: pt,
1306
+ XUpload: vt
1307
+ }, Symbol.toStringTag, { value: "Module" })), ht = {
1308
+ install(e) {
1309
+ Object.entries(yt).forEach(([t, a]) => e.component(t, a));
1310
+ }
1311
+ };
1160
1312
  export {
1161
- Ke as XButton,
1162
- Ge as XCascader,
1163
- Ye as XCheckbox,
1164
- Je as XColorPicker,
1165
- Ze as XDialog,
1166
- et as XDivider,
1167
- at as XForm,
1168
- tt as XFormItem,
1169
- lt as XImage,
1170
- ot as XInput,
1171
- nt as XInputNumber,
1172
- it as XPagination,
1173
- dt as XRate,
1313
+ Me as XButton,
1314
+ Fe as XCascader,
1315
+ Ke as XCheckbox,
1316
+ Ge as XColorPicker,
1317
+ Ye as XDatePicker,
1318
+ Je as XDialog,
1319
+ Ze as XDivider,
1320
+ tt as XForm,
1321
+ et as XFormItem,
1322
+ at as XImage,
1323
+ lt as XInput,
1324
+ ot as XInputNumber,
1325
+ nt as XPagination,
1326
+ it as XRate,
1174
1327
  rt as XReconfirm,
1175
1328
  ut as XScrollbar,
1176
- st as XSelect,
1177
- ct as XSpace,
1178
- mt as XTabPane,
1179
- ft as XTable,
1180
- pt as XTabs,
1181
- bt as XTag,
1182
- yt as XText,
1329
+ dt as XSelect,
1330
+ st as XSpace,
1331
+ ft as XTabPane,
1332
+ ct as XTable,
1333
+ mt as XTag,
1334
+ pt as XText,
1183
1335
  vt as XUpload,
1184
- P as X_FORM_ITEM_LABEL,
1336
+ A as X_FORM_ITEM_LABEL,
1185
1337
  k as X_FORM_ITEM_VALIDATION,
1186
1338
  Re as X_FORM_TAB_UPDATE_HOOK,
1187
- te as X_FORM_VALIDATIONS,
1188
- H as X_TABLE_QUERY_EXECUTE_HOOK,
1189
- D as X_TABLE_QUERY_UPDATE_HOOK,
1339
+ ae as X_FORM_VALIDATIONS,
1340
+ R as X_TABLE_QUERY_EXECUTE_HOOK,
1341
+ M as X_TABLE_QUERY_UPDATE_HOOK,
1190
1342
  le as X_TAB_PANE,
1191
- ae as X_TAB_PANES
1343
+ De as X_TAB_PANES,
1344
+ ht as default
1192
1345
  };