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

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 y, openBlock as p, createBlock as g, unref as B, mergeProps as C, withCtx as h, renderSlot as S, useModel as x, inject as f, mergeModels as V, computed as X, toValue as L, onMounted as Y, nextTick as re, getCurrentScope as de, onScopeDispose as ue, getCurrentInstance as _, shallowRef as Q, watch as K, createElementBlock as G, Fragment as J, renderList as Z, useSlots as se, createSlots as ce, normalizeProps as O, guardReactiveProps as M, ref as H, provide as A, createVNode as z, resolveComponent as U, createTextVNode as j, useTemplateRef as ee, toDisplayString as me, normalizeClass as fe } from "vue";
2
+ import { ElButton as pe, ElCascader as be, ElCheckboxGroup as ve, ElCheckbox as ye, ElColorPicker as ge, ElDatePicker as he, ElDialog as Be, ElDivider as we, ElForm as Ve, ElFormItem as Te, ElMessage as te, ElImage as Xe, ElInput as Ce, ElPagination as xe, ElRate as Ee, ElPopconfirm as Se, ElScrollbar as ke, ElSpace as Ie, ElTable as ze, ElTableColumn as Pe, ElTabs as $e, ElTabPane as Ae, ElTag as Oe, ElText as Me, ElUpload as Re } from "element-plus";
3
+ const De = /* @__PURE__ */ y({
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 (o, r) => (p(), g(B(pe), C(a, {
29
+ onClick: r[0] || (r[0] = (i) => n("click", i))
30
30
  }), {
31
- default: v(() => [
32
- E(o.$slots, "default")
31
+ default: h(() => [
32
+ S(o.$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
+ }), $ = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), ae = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), k = /* @__PURE__ */ Symbol(
38
38
  "X_FORM_ITEM_VALIDATION"
39
- ), Re = /* @__PURE__ */ Symbol(
39
+ ), Fe = /* @__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
+ ), le = /* @__PURE__ */ Symbol("X_TAB_PANES"), oe = /* @__PURE__ */ Symbol("X_TAB_PANE"), R = /* @__PURE__ */ Symbol(
42
42
  "X_TABLE_QUERY_UPDATE_HOOK"
43
- ), H = /* @__PURE__ */ Symbol(
43
+ ), D = /* @__PURE__ */ Symbol(
44
44
  "X_TABLE_QUERY_EXECUTE_HOOK"
45
- ), Ge = /* @__PURE__ */ b({
45
+ ), Le = /* @__PURE__ */ y({
46
46
  __name: "XCascader",
47
- props: /* @__PURE__ */ B({
47
+ props: /* @__PURE__ */ V({
48
48
  clearable: {
49
49
  type: Boolean
50
50
  },
@@ -60,130 +60,130 @@ const Ke = /* @__PURE__ */ b({
60
60
  modelValue: {},
61
61
  modelModifiers: {}
62
62
  }),
63
- emits: /* @__PURE__ */ B(["blur", "change"], ["update:modelValue"]),
63
+ emits: /* @__PURE__ */ V(["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, o = x(e, "modelValue"), r = f(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: d
72
+ } = r;
73
+ r.validator = () => o.value ? c?.() : `请输入${d}`;
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 = f($, void 0), l = f(R, void 0), u = f(D, void 0);
76
+ l?.on(([c, d]) => i === c && d === void 0 && (o.value = void 0)), u?.on(() => i && l?.trigger([i, o.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, {
80
+ return (c, d) => (p(), g(B(be), C(a, {
81
81
  modelValue: o.value,
82
- "onUpdate:modelValue": r[0] || (r[0] = (w) => o.value = w),
82
+ "onUpdate:modelValue": d[0] || (d[0] = (T) => o.value = T),
83
83
  onBlur: s
84
84
  }), null, 16, ["modelValue"]));
85
85
  }
86
86
  });
87
- function Le(e, t) {
88
- return re() ? (ue(e, t), !0) : !1;
87
+ function Ue(e, t) {
88
+ return de() ? (ue(e, t), !0) : !1;
89
89
  }
90
- const Ue = typeof window < "u" && typeof document < "u";
90
+ const He = typeof window < "u" && typeof document < "u";
91
91
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
92
- function Fe(e) {
92
+ function Ne(e) {
93
93
  return Array.isArray(e) ? e : [e];
94
94
  }
95
- function De(e) {
96
- return G();
95
+ function qe(e) {
96
+ return _();
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
+ qe() ? Y(e, a) : t ? e() : re(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(() => L(e).map((a) => L(a)).map(t));
104
104
  }
105
- const oe = Ue ? window : void 0;
106
- function I(e) {
105
+ const ne = He ? window : void 0;
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 = L(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 je() {
113
+ const e = Q(!1), t = _();
114
+ return t && Y(() => {
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 We(e) {
120
+ const t = /* @__PURE__ */ je();
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(() => {
123
+ function Ke(e, t, a = {}) {
124
+ const { window: n = ne, ...o } = a;
125
+ let r;
126
+ const i = /* @__PURE__ */ We(() => n && "ResizeObserver" in n), l = () => {
127
+ r && (r.disconnect(), r = void 0);
128
+ }, u = K(X(() => {
129
129
  const c = L(e);
130
- return Array.isArray(c) ? c.map((r) => I(r)) : [I(c)];
130
+ return Array.isArray(c) ? c.map((d) => P(d)) : [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 (l(), i.value && n) {
133
+ r = new ResizeObserver(t);
134
+ for (const d of c) d && r.observe(d, o);
135
135
  }
136
136
  }, {
137
137
  immediate: !0,
138
138
  flush: "post"
139
139
  }), s = () => {
140
- a(), u();
140
+ l(), u();
141
141
  };
142
- return Le(s), {
143
- isSupported: d,
142
+ return Ue(s), {
143
+ isSupported: i,
144
144
  stop: s
145
145
  };
146
146
  }
147
- function Qe(e, t = {
147
+ function Ge(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 = ne, box: o = "content-box" } = a, r = X(() => {
152
+ var d;
153
+ return (d = P(e)) === null || d === void 0 || (d = d.namespaceURI) === null || d === void 0 ? void 0 : d.includes("svg");
154
+ }), i = Q(t.width), l = Q(t.height), { stop: u } = Ke(e, ([d]) => {
155
+ const T = o === "border-box" ? d.borderBoxSize : o === "content-box" ? d.contentBoxSize : d.devicePixelContentBoxSize;
156
+ if (n && r.value) {
157
+ const E = P(e);
158
+ if (E) {
159
+ const m = E.getBoundingClientRect();
160
+ i.value = m.width, l.value = m.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 (T) {
163
+ const E = Ne(T);
164
+ i.value = E.reduce((m, { inlineSize: v }) => m + v, 0), l.value = E.reduce((m, { blockSize: v }) => m + v, 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 = d.contentRect.width, l.value = d.contentRect.height;
167
+ }, a);
168
+ Qe(() => {
169
+ const d = P(e);
170
+ d && (i.value = "offsetWidth" in d ? d.offsetWidth : t.width, l.value = "offsetHeight" in d ? d.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 = K(() => P(e), (d) => {
173
+ i.value = d ? t.width : 0, l.value = d ? t.height : 0;
174
174
  });
175
175
  function c() {
176
176
  u(), s();
177
177
  }
178
178
  return {
179
- width: d,
180
- height: a,
179
+ width: i,
180
+ height: l,
181
181
  stop: c
182
182
  };
183
183
  }
184
- const Ye = /* @__PURE__ */ b({
184
+ const Ye = /* @__PURE__ */ y({
185
185
  __name: "XCheckbox",
186
- props: /* @__PURE__ */ B({
186
+ props: /* @__PURE__ */ V({
187
187
  data: {},
188
188
  factory: {
189
189
  type: Function
@@ -224,24 +224,24 @@ 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 = x(e, "modelValue"), a = /* @__PURE__ */ W(() => e.data, e.factory), n = X(() => [...a.value]), o = (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) => {
234
+ }, r = (s) => n.value.map((c) => c.value).find((c) => o(c) === s), i = X(() => n.value.map((s) => {
235
235
  const c = o(s.value);
236
236
  return {
237
237
  ...s,
238
238
  key: c,
239
239
  value: c
240
240
  };
241
- })), a = C({
241
+ })), l = X({
242
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);
243
+ set: (s) => t.value = Array.isArray(s) ? s.map((c) => r(c)) : []
244
+ }), u = f(k, void 0);
245
245
  if (u?.required) {
246
246
  const {
247
247
  validator: s,
@@ -249,25 +249,25 @@ const Ye = /* @__PURE__ */ b({
249
249
  } = u;
250
250
  u.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) => (p(), g(B(ve), C({
253
+ modelValue: l.value,
254
+ "onUpdate:modelValue": c[0] || (c[0] = (d) => l.value = d)
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: h(() => [(p(!0), G(J, null, Z(i.value, (d) => (p(), g(B(ye), {
260
+ key: d.key,
261
+ disabled: d.disabled,
262
+ label: d.label,
263
+ value: d.value
264
264
  }, null, 8, ["disabled", "label", "value"]))), 128))]),
265
265
  _: 1
266
266
  }, 16, ["modelValue"]));
267
267
  }
268
- }), Je = /* @__PURE__ */ b({
268
+ }), _e = /* @__PURE__ */ y({
269
269
  __name: "XColorPicker",
270
- props: /* @__PURE__ */ B({
270
+ props: /* @__PURE__ */ V({
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 = x(e, "modelValue"), n = f(k, void 0);
285
285
  if (n?.required) {
286
286
  const {
287
- validator: a,
287
+ validator: l,
288
288
  label: u
289
289
  } = n;
290
- n.validator = () => l.value ? a?.() : `请输入${u}`;
290
+ n.validator = () => a.value ? l?.() : `请输入${u}`;
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 o = f($, void 0), r = f(R, void 0), i = f(D, void 0);
293
+ return r?.on(([l, u]) => o === l && u === void 0 && (a.value = void 0)), i?.on(() => o && r?.trigger([o, a.value])), (l, u) => (p(), g(B(ge), C(t, {
294
+ modelValue: a.value,
295
+ "onUpdate:modelValue": u[0] || (u[0] = (s) => a.value = s)
296
+ }), null, 16, ["modelValue"]));
297
+ }
298
+ }), Je = /* @__PURE__ */ y({
299
+ __name: "XDatePicker",
300
+ props: /* @__PURE__ */ V({
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__ */ V(["blur", "change"], ["update:modelValue", "update:start", "update:end"]),
389
+ setup(e, {
390
+ emit: t
391
+ }) {
392
+ const a = t, n = x(e, "modelValue"), o = x(e, "start"), r = x(e, "end"), i = X({
393
+ get: () => {
394
+ if (e.type.includes("range") && o.value && r.value)
395
+ return [o.value, r.value];
396
+ if (!e.type.includes("range"))
397
+ return n.value;
398
+ },
399
+ set: (m) => {
400
+ e.type.includes("range") ? (o.value = m?.[0], r.value = m?.[1]) : n.value = m;
401
+ }
402
+ }), l = X(() => e.type.includes("range") ? [{
403
+ text: "最近一周",
404
+ value: () => {
405
+ const m = /* @__PURE__ */ new Date(), v = /* @__PURE__ */ new Date();
406
+ return v.setTime(v.getTime() - 3600 * 1e3 * 24 * 7), [v, m];
407
+ }
408
+ }, {
409
+ text: "最近一月",
410
+ value: () => {
411
+ const m = /* @__PURE__ */ new Date(), v = /* @__PURE__ */ new Date();
412
+ return v.setTime(v.getTime() - 3600 * 1e3 * 24 * 30), [v, m];
413
+ }
414
+ }, {
415
+ text: "最近三月",
416
+ value: () => {
417
+ const m = /* @__PURE__ */ new Date(), v = /* @__PURE__ */ new Date();
418
+ return v.setTime(v.getTime() - 3600 * 1e3 * 24 * 90), [v, m];
419
+ }
420
+ }] : [{
421
+ text: "昨天",
422
+ value: /* @__PURE__ */ new Date()
423
+ }, {
424
+ text: "一周前",
425
+ value: () => {
426
+ const m = /* @__PURE__ */ new Date();
427
+ return m.setTime(m.getTime() - 3600 * 1e3 * 24 * 7), m;
428
+ }
429
+ }, {
430
+ text: "一月前",
431
+ value: () => {
432
+ const m = /* @__PURE__ */ new Date();
433
+ return m.setTime(m.getTime() - 3600 * 1e3 * 24 * 30), m;
434
+ }
435
+ }]), u = f(k, void 0);
436
+ if (u?.required) {
437
+ const {
438
+ validator: m,
439
+ label: v
440
+ } = u;
441
+ u.validator = () => !i.value || e.type.includes("range") && !i.value?.length ? `请选择${v}` : m?.();
442
+ }
443
+ const s = f($, void 0), c = f(R, void 0), d = f(D, void 0);
444
+ c?.on(([m, v]) => s === m && v === void 0 && (i.value = void 0)), d?.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 T = (m) => a("change", m), E = () => {
446
+ u?.validate?.(), a("blur");
447
+ };
448
+ return (m, v) => (p(), g(B(he), C({
449
+ type: e.type,
450
+ placeholder: e.placeholder,
451
+ startPlaceholder: e.startPlaceholder,
452
+ endPlaceholder: e.endPlaceholder,
453
+ shortcuts: l.value,
454
+ valueFormat: e.valueFormat
455
+ }, {
456
+ modelValue: i.value,
457
+ "onUpdate:modelValue": v[0] || (v[0] = (N) => i.value = N),
458
+ onBlur: E,
459
+ onChange: T
296
460
  }), null, 16, ["modelValue"]));
297
461
  }
298
- }), Ze = /* @__PURE__ */ b({
462
+ }), Ze = /* @__PURE__ */ y({
299
463
  __name: "XDialog",
300
- props: /* @__PURE__ */ B({
464
+ props: /* @__PURE__ */ V({
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
+ } = se(), n = x(e, "modelValue");
479
+ return (o, r) => (p(), g(B(Be), {
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
484
  }, ce({
321
- default: v(() => [E(o.$slots, "default")]),
485
+ default: h(() => [S(o.$slots, "default")]),
322
486
  _: 2
323
487
  }, [t ? {
324
488
  name: "header",
325
- fn: v(() => [E(o.$slots, "header")]),
489
+ fn: h(() => [S(o.$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: h(() => [S(o.$slots, "footer")]),
330
494
  key: "1"
331
495
  } : void 0]), 1032, ["modelValue", "title", "body-class"]));
332
496
  }
333
- }), et = /* @__PURE__ */ b({
497
+ }), et = /* @__PURE__ */ y({
334
498
  __name: "XDivider",
335
499
  props: {
336
500
  direction: {},
@@ -339,33 +503,33 @@ 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) => (p(), g(B(we), O(M(t)), {
507
+ default: h(() => [
508
+ S(a.$slots, "default")
345
509
  ]),
346
510
  _: 3
347
511
  }, 16));
348
512
  }
349
- }), tt = /* @__PURE__ */ b((e, {
513
+ }), tt = /* @__PURE__ */ y((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 = f(oe, void 0), n = f(Fe, void 0), o = H(), r = {
353
517
  label: e.label,
354
518
  required: e.required,
355
519
  clearValidate() {
356
520
  o.value = void 0;
357
521
  },
358
522
  validate() {
359
- return o.value = i.validator?.() ?? void 0, o.value && l?.name && (ee({
523
+ return o.value = r.validator?.() ?? void 0, o.value && a?.name && (te({
360
524
  plain: !0,
361
525
  type: "warning",
362
526
  message: o.value
363
- }), n?.trigger(l.name)), !o.value;
527
+ }), n?.trigger(a.name)), !o.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 f(ae, void 0)?.push(r), A(k, r), t({
531
+ ...r
532
+ }), A($, e.label), () => z(Te, C({
369
533
  label: e.label,
370
534
  labelPosition: e.labelPosition,
371
535
  labelWidth: e.labelWidth,
@@ -378,7 +542,7 @@ const Ye = /* @__PURE__ */ b({
378
542
  });
379
543
  }, {
380
544
  props: ["label", "required", "content", "tooltip"]
381
- }), at = /* @__PURE__ */ b({
545
+ }), at = /* @__PURE__ */ y({
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
+ A(ae, n);
573
+ const o = () => n.every((l) => l.validate()), r = () => {
574
+ a.value?.resetFields(), n.forEach((l) => l.clearValidate());
411
575
  };
412
576
  t({
413
577
  data: e.data,
414
578
  validate: o,
415
- resetFields: i
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 (l, u) => (p(), g(B(Ve), C({
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: h(() => [z(i)]),
432
596
  _: 1
433
597
  }, 16));
434
598
  }
435
- }), lt = /* @__PURE__ */ b({
599
+ }), lt = /* @__PURE__ */ y({
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) => (p(), g(B(Xe), O(M(t)), null, 16));
460
624
  }
461
- }), ot = /* @__PURE__ */ b({
625
+ }), ot = /* @__PURE__ */ y({
462
626
  __name: "XInput",
463
- props: /* @__PURE__ */ B({
627
+ props: /* @__PURE__ */ V({
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__ */ V(["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, o = x(e, "modelValue"), r = f(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: d,
656
+ label: T
657
+ } = r;
658
+ r.validator = () => o.value ? d?.() : `请输入${T}`;
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 = f($, void 0), l = f(R, void 0), u = f(D, void 0);
661
+ l?.on(([d, T]) => i === d && T === void 0 && (o.value = void 0)), u?.on(() => i && l?.trigger([i, o.value]));
662
+ const s = (d) => n("change", d), c = () => {
663
+ r?.validate(), n("blur");
500
664
  };
501
- return (r, w) => (m(), y(h(Ee), V(l, {
665
+ return (d, T) => (p(), g(B(Ce), C(a, {
502
666
  modelValue: o.value,
503
- "onUpdate:modelValue": w[0] || (w[0] = (x) => o.value = x),
667
+ "onUpdate:modelValue": T[0] || (T[0] = (E) => o.value = E),
504
668
  onBlur: c,
505
669
  onChange: s
506
670
  }), null, 16, ["modelValue"]));
507
671
  }
508
- }), nt = /* @__PURE__ */ b({
672
+ }), nt = /* @__PURE__ */ y({
509
673
  __name: "XInputNumber",
510
- props: /* @__PURE__ */ B({
674
+ props: /* @__PURE__ */ V({
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__ */ V(["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, o = x(e, "modelValue"), r = f(k, void 0);
705
+ if (r?.required) {
542
706
  const {
543
- validator: a,
707
+ validator: l,
544
708
  label: u
545
- } = i;
546
- i.validator = () => o.value === void 0 ? `请输入${u}` : a?.();
709
+ } = r;
710
+ r.validator = () => o.value === void 0 ? `请输入${u}` : l?.();
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 (l, u) => {
552
716
  const s = U("ElInputNumber");
553
- return m(), y(s, V(l, {
717
+ return p(), g(s, C(a, {
554
718
  modelValue: o.value,
555
719
  "onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
556
- onBlur: d
720
+ onBlur: i
557
721
  }), null, 16, ["modelValue"]);
558
722
  };
559
723
  }
560
- }), it = /* @__PURE__ */ b({
724
+ }), it = /* @__PURE__ */ y({
561
725
  __name: "XPagination",
562
- props: /* @__PURE__ */ B({
726
+ props: /* @__PURE__ */ V({
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__ */ V(["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 }, {
757
+ const a = t, n = x(e, "size"), o = x(e, "current");
758
+ return (r, i) => (p(), g(B(xe), C({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
595
759
  "current-page": o.value,
596
- "onUpdate:currentPage": d[0] || (d[0] = (a) => o.value = a),
760
+ "onUpdate:currentPage": i[0] || (i[0] = (l) => o.value = l),
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] = (l) => n.value = l),
763
+ onSizeChange: i[2] || (i[2] = (l) => a("sizeChange", l)),
764
+ onCurrentChange: i[3] || (i[3] = (l) => a("currentChange", l))
601
765
  }), null, 16, ["current-page", "page-size"]));
602
766
  }
603
- }), dt = /* @__PURE__ */ b({
767
+ }), rt = /* @__PURE__ */ y({
604
768
  __name: "XRate",
605
- props: /* @__PURE__ */ B({
769
+ props: /* @__PURE__ */ V({
606
770
  ariaLabel: {},
607
771
  id: {},
608
772
  lowThreshold: {},
@@ -640,47 +804,47 @@ 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 = x(e, "modelValue");
808
+ return (n, o) => (p(), g(B(Ee), C(t, {
809
+ modelValue: a.value,
810
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => a.value = r)
647
811
  }), null, 16, ["modelValue"]));
648
812
  }
649
- }), rt = /* @__PURE__ */ b({
813
+ }), dt = /* @__PURE__ */ y({
650
814
  __name: "XReconfirm",
651
815
  props: {
652
816
  title: { default: "是否执行?" }
653
817
  },
654
818
  emits: ["cancel", "confirm"],
655
819
  setup(e, { emit: t }) {
656
- const l = t;
820
+ const a = t;
657
821
  return (n, o) => {
658
- const i = U("XButton");
659
- return m(), y(h(Xe), {
822
+ const r = U("XButton");
823
+ return p(), g(B(Se), {
660
824
  title: e.title,
661
- onCancel: o[0] || (o[0] = () => l("cancel")),
662
- onConfirm: o[1] || (o[1] = () => l("confirm"))
825
+ onCancel: o[0] || (o[0] = () => a("cancel")),
826
+ onConfirm: o[1] || (o[1] = () => a("confirm"))
663
827
  }, {
664
- reference: v(() => [
665
- E(n.$slots, "default")
828
+ reference: h(() => [
829
+ S(n.$slots, "default")
666
830
  ]),
667
- actions: v(({ confirm: d, cancel: a }) => [
668
- z(i, {
831
+ actions: h(({ confirm: i, cancel: l }) => [
832
+ z(r, {
669
833
  size: "small",
670
- onClick: a
834
+ onClick: l
671
835
  }, {
672
- default: v(() => [...o[2] || (o[2] = [
673
- q(" 取消 ", -1)
836
+ default: h(() => [...o[2] || (o[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: h(() => [...o[3] || (o[3] = [
847
+ j(" 确定 ", -1)
684
848
  ])]),
685
849
  _: 1
686
850
  }, 8, ["onClick"])
@@ -689,7 +853,7 @@ const Ye = /* @__PURE__ */ b({
689
853
  }, 8, ["title"]);
690
854
  };
691
855
  }
692
- }), ut = /* @__PURE__ */ b({
856
+ }), ut = /* @__PURE__ */ y({
693
857
  __name: "XScrollbar",
694
858
  props: {
695
859
  ariaLabel: {},
@@ -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"), o = X(() => n.value?.wrapRef), r = X(() => o.value?.firstElementChild);
723
887
  return t({
724
888
  wrapRef: o,
725
- viewRef: i
726
- }), (d, a) => (m(), y(h(Se), V({
889
+ viewRef: r
890
+ }), (i, l) => (p(), g(B(ke), C({
727
891
  ref: "scrollbar"
728
- }, l), {
729
- default: v(() => [E(d.$slots, "default")]),
892
+ }, a), {
893
+ default: h(() => [S(i.$slots, "default")]),
730
894
  _: 3
731
895
  }, 16));
732
896
  }
733
- }), st = /* @__PURE__ */ b({
897
+ }), st = /* @__PURE__ */ y({
734
898
  __name: "XSelect",
735
- props: /* @__PURE__ */ B({
899
+ props: /* @__PURE__ */ V({
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__ */ V(["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 = x(e, "modelValue"), o = H([]), r = /* @__PURE__ */ W(() => e.data, e.factory), i = X(() => [...(/* @__PURE__ */ W(o, e.factory)).value, ...r.value]), l = (b) => {
1009
+ if (typeof b == "object") {
846
1010
  if (e.identify)
847
- return e.identify(f);
1011
+ return e.identify(b);
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 b;
1015
+ }, u = (b) => i.value.map((w) => w.value).find((w) => l(w) === b);
852
1016
  let s = 0;
853
- W([n, i], async () => {
1017
+ K([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 b = [].concat(n.value).filter((q) => !r.value.map((I) => l(I.value)).includes(l(q))), w = s, F = await e.supplement?.(b);
1020
+ w === s && F && (o.value = F);
857
1021
  } else
858
1022
  o.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((b) => {
1027
+ const w = l(b.value);
864
1028
  return {
865
- ...f,
866
- key: g,
867
- value: g
1029
+ ...b,
1030
+ key: w,
1031
+ value: w
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
+ })), d = X({
1034
+ get: () => n.value && (Array.isArray(n.value) ? n.value.map(l) : l(n.value)),
1035
+ set: (b) => {
1036
+ Array.isArray(b) ? n.value = b.map((w) => u(w)) : n.value = b === void 0 ? void 0 : u(b) || (e.allowCreate ? b : void 0);
873
1037
  }
874
- }), w = p(k, void 0);
875
- if (w?.required) {
1038
+ }), T = f(k, void 0);
1039
+ if (T?.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: b,
1042
+ label: w
1043
+ } = T;
1044
+ T.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${w}` : b?.();
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 = f($, void 0), m = f(R, void 0), v = f(D, void 0);
1047
+ m?.on(([b, w]) => E === b && w === void 0 && (d.value = void 0)), v?.on(() => E && m?.trigger([E, d.value === void 0 ? void 0 : [].concat(d.value).map((b) => c.value.find((w) => w.value === b).label).join(",")]));
1048
+ const N = (b) => a("change", b), ie = () => {
1049
+ T?.validate(), a("blur");
886
1050
  };
887
- return (f, g) => {
888
- const R = U("ElOption"), _ = U("ElSelect");
889
- return m(), y(_, V({
1051
+ return (b, w) => {
1052
+ const F = U("ElOption"), q = U("ElSelect");
1053
+ return p(), g(q, C({
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),
1067
+ modelValue: d.value,
1068
+ "onUpdate:modelValue": w[0] || (w[0] = (I) => d.value = I),
905
1069
  onBlur: ie,
906
- onChange: 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: h(() => [(p(!0), G(J, null, Z(c.value, (I) => (p(), g(F, {
1073
+ key: I.key,
1074
+ label: I.label,
1075
+ value: I.value
912
1076
  }, {
913
- default: v(() => [q(fe(S.label), 1)]),
1077
+ default: h(() => [j(me(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
+ }), ct = /* @__PURE__ */ y({
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) => (p(), g(B(Ie), O(M(t)), {
1105
+ default: h(() => [S(a.$slots, "default")]),
942
1106
  _: 3
943
1107
  }, 16));
944
1108
  }
945
- }), ft = /* @__PURE__ */ b({
1109
+ }), mt = /* @__PURE__ */ y({
946
1110
  __name: "XTable",
947
1111
  props: {
948
1112
  data: {},
@@ -965,21 +1129,21 @@ 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({
1132
+ const a = t, n = ee("container"), o = H(), r = Ge(n), i = X(() => e.height ?? r.height.value), l = () => z(ze, C({
969
1133
  ref: o
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": (u) => a("rowClick", u),
1143
+ "onSelection-change": (u) => a("selectionChange", u),
1144
+ "onHeader-dragend": (u, s, c) => a("headerDragend", u, s, c)
981
1145
  }), {
982
- default: () => e.columns.map((u) => z(Ie, u, {
1146
+ default: () => e.columns.map((u) => z(Pe, u, {
983
1147
  default: ({
984
1148
  $index: s,
985
1149
  row: c
@@ -992,26 +1156,26 @@ const Ye = /* @__PURE__ */ b({
992
1156
  }) ?? u.label
993
1157
  }))
994
1158
  });
995
- return (u, s) => (m(), j("div", {
1159
+ return (u, s) => (p(), G("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(l)], 2));
1000
1164
  }
1001
- }), mt = /* @__PURE__ */ b((e, {
1165
+ }), ft = /* @__PURE__ */ y((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 f(le, void 0)?.push(a), A(oe, a), () => z(Ae, e, {
1008
1172
  ...t
1009
1173
  });
1010
1174
  }, {
1011
1175
  props: ["label", "name", "closable", "lazy", "disabled"]
1012
- }), pt = /* @__PURE__ */ b({
1176
+ }), pt = /* @__PURE__ */ y({
1013
1177
  __name: "XTabs",
1014
- props: /* @__PURE__ */ B({
1178
+ props: /* @__PURE__ */ V({
1015
1179
  type: {},
1016
1180
  defaultValue: {},
1017
1181
  addable: {
@@ -1029,12 +1193,12 @@ const Ye = /* @__PURE__ */ b({
1029
1193
  modelValue: {},
1030
1194
  modelModifiers: {}
1031
1195
  }),
1032
- emits: /* @__PURE__ */ B(["tabChange", "tabRemove"], ["update:modelValue"]),
1196
+ emits: /* @__PURE__ */ V(["tabChange", "tabRemove"], ["update:modelValue"]),
1033
1197
  setup(e, {
1034
1198
  emit: t
1035
1199
  }) {
1036
- const l = t, n = T(e, "modelValue");
1037
- return $(ae, []), (i, d) => (m(), y(h(Ae), V({
1200
+ const a = t, n = x(e, "modelValue");
1201
+ return A(le, []), (r, i) => (p(), g(B($e), C({
1038
1202
  addable: e.addable,
1039
1203
  editable: e.editable,
1040
1204
  type: e.type,
@@ -1042,15 +1206,15 @@ const Ye = /* @__PURE__ */ b({
1042
1206
  tabPosition: e.tabPosition
1043
1207
  }, {
1044
1208
  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))
1209
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => n.value = l),
1210
+ onTabChange: i[1] || (i[1] = (l) => a("tabChange", l)),
1211
+ onTabRemove: i[2] || (i[2] = (l) => a("tabRemove", l))
1048
1212
  }), {
1049
- default: v(() => [E(i.$slots, "default")]),
1213
+ default: h(() => [S(r.$slots, "default")]),
1050
1214
  _: 3
1051
1215
  }, 16, ["modelValue"]));
1052
1216
  }
1053
- }), bt = /* @__PURE__ */ b({
1217
+ }), bt = /* @__PURE__ */ y({
1054
1218
  __name: "XTag",
1055
1219
  props: {
1056
1220
  type: {},
@@ -1062,16 +1226,16 @@ const Ye = /* @__PURE__ */ b({
1062
1226
  },
1063
1227
  emits: ["close"],
1064
1228
  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"))
1229
+ return (t, a) => (p(), g(B(Oe), C({ type: e.type, color: e.color, closable: e.closable, round: e.round }, {
1230
+ onClose: a[0] || (a[0] = (n) => t.$emit("close"))
1067
1231
  }), {
1068
- default: v(() => [
1069
- E(t.$slots, "default")
1232
+ default: h(() => [
1233
+ S(t.$slots, "default")
1070
1234
  ]),
1071
1235
  _: 3
1072
1236
  }, 16));
1073
1237
  }
1074
- }), yt = /* @__PURE__ */ b({
1238
+ }), vt = /* @__PURE__ */ y({
1075
1239
  __name: "XText",
1076
1240
  props: {
1077
1241
  type: {},
@@ -1080,16 +1244,16 @@ const Ye = /* @__PURE__ */ b({
1080
1244
  } }
1081
1245
  },
1082
1246
  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")
1247
+ return (t, a) => (p(), g(B(Me), O(M({ type: e.type, size: e.size, truncated: e.truncated })), {
1248
+ default: h(() => [
1249
+ S(t.$slots, "default")
1086
1250
  ]),
1087
1251
  _: 3
1088
1252
  }, 16));
1089
1253
  }
1090
- }), vt = /* @__PURE__ */ b({
1254
+ }), yt = /* @__PURE__ */ y({
1091
1255
  __name: "XUpload",
1092
- props: /* @__PURE__ */ B({
1256
+ props: /* @__PURE__ */ V({
1093
1257
  action: {},
1094
1258
  data: {
1095
1259
  type: Function
@@ -1121,47 +1285,78 @@ const Ye = /* @__PURE__ */ b({
1121
1285
  }),
1122
1286
  emits: ["update:modelValue"],
1123
1287
  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);
1288
+ const t = x(e, "modelValue"), a = X(() => [].concat(t.value ?? []).reverse().map((l) => ({
1289
+ name: l.split("/").findLast(() => !0),
1290
+ url: l,
1291
+ uid: Number(l.slice(0, l.lastIndexOf("/")).split("/").findLast(() => !0))
1292
+ }))), n = f(k, void 0);
1129
1293
  if (n?.required) {
1130
1294
  const {
1131
- validator: a,
1295
+ validator: l,
1132
1296
  label: u
1133
1297
  } = n;
1134
- n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${u}` : a?.();
1298
+ n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${u}` : l?.();
1135
1299
  }
1136
- const o = (a) => (a.size > e.maxSize && ee.warning("文件过大,请重新选择"), a.size < e.maxSize), i = (a) => window.open(a.url), d = (a, u) => {
1300
+ const o = (l) => (l.size > e.maxSize && te.warning("文件过大,请重新选择"), l.size < e.maxSize), r = (l) => window.open(l.url), i = (l, u) => {
1137
1301
  t.value = Array.isArray(t.value) ? u.map((s) => s.url) : void 0;
1138
1302
  };
1139
- return (a, u) => (m(), y(h(Pe), O(M({
1303
+ return (l, u) => (p(), g(B(Re), O(M({
1140
1304
  limit: e.limit,
1141
1305
  disabled: e.disabled,
1142
1306
  data: e.data,
1143
1307
  maxSize: e.maxSize,
1144
1308
  showFileList: e.showFileList,
1145
- fileList: l.value,
1309
+ fileList: a.value,
1146
1310
  beforeUpload: o,
1147
- onPreview: i,
1148
- onRemove: d
1311
+ onPreview: r,
1312
+ onRemove: i
1149
1313
  })), {
1150
- file: v(({
1314
+ file: h(({
1151
1315
  file: s
1152
- }) => [E(a.$slots, "file", {
1316
+ }) => [S(l.$slots, "file", {
1153
1317
  file: s
1154
1318
  })]),
1155
- default: v(() => [E(a.$slots, "default")]),
1319
+ default: h(() => [S(l.$slots, "default")]),
1156
1320
  _: 3
1157
1321
  }, 16));
1158
1322
  }
1159
- });
1323
+ }), gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1324
+ __proto__: null,
1325
+ XButton: De,
1326
+ XCascader: Le,
1327
+ XCheckbox: Ye,
1328
+ XColorPicker: _e,
1329
+ XDatePicker: Je,
1330
+ XDialog: Ze,
1331
+ XDivider: et,
1332
+ XForm: at,
1333
+ XFormItem: tt,
1334
+ XImage: lt,
1335
+ XInput: ot,
1336
+ XInputNumber: nt,
1337
+ XPagination: it,
1338
+ XRate: rt,
1339
+ XReconfirm: dt,
1340
+ XScrollbar: ut,
1341
+ XSelect: st,
1342
+ XSpace: ct,
1343
+ XTabPane: ft,
1344
+ XTable: mt,
1345
+ XTabs: pt,
1346
+ XTag: bt,
1347
+ XText: vt,
1348
+ XUpload: yt
1349
+ }, Symbol.toStringTag, { value: "Module" })), wt = {
1350
+ install(e) {
1351
+ Object.entries(gt).forEach(([t, a]) => e.component(t, a));
1352
+ }
1353
+ };
1160
1354
  export {
1161
- Ke as XButton,
1162
- Ge as XCascader,
1355
+ De as XButton,
1356
+ Le as XCascader,
1163
1357
  Ye as XCheckbox,
1164
- Je as XColorPicker,
1358
+ _e as XColorPicker,
1359
+ Je as XDatePicker,
1165
1360
  Ze as XDialog,
1166
1361
  et as XDivider,
1167
1362
  at as XForm,
@@ -1170,23 +1365,24 @@ export {
1170
1365
  ot as XInput,
1171
1366
  nt as XInputNumber,
1172
1367
  it as XPagination,
1173
- dt as XRate,
1174
- rt as XReconfirm,
1368
+ rt as XRate,
1369
+ dt as XReconfirm,
1175
1370
  ut as XScrollbar,
1176
1371
  st as XSelect,
1177
1372
  ct as XSpace,
1178
- mt as XTabPane,
1179
- ft as XTable,
1373
+ ft as XTabPane,
1374
+ mt as XTable,
1180
1375
  pt as XTabs,
1181
1376
  bt as XTag,
1182
- yt as XText,
1183
- vt as XUpload,
1184
- P as X_FORM_ITEM_LABEL,
1377
+ vt as XText,
1378
+ yt as XUpload,
1379
+ $ as X_FORM_ITEM_LABEL,
1185
1380
  k as X_FORM_ITEM_VALIDATION,
1186
- 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,
1190
- le as X_TAB_PANE,
1191
- ae as X_TAB_PANES
1381
+ Fe as X_FORM_TAB_UPDATE_HOOK,
1382
+ ae as X_FORM_VALIDATIONS,
1383
+ D as X_TABLE_QUERY_EXECUTE_HOOK,
1384
+ R as X_TABLE_QUERY_UPDATE_HOOK,
1385
+ oe as X_TAB_PANE,
1386
+ le as X_TAB_PANES,
1387
+ wt as default
1192
1388
  };