@pungfe/element 0.0.1-alpha.5 → 0.0.1-alpha.7

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.d.ts CHANGED
@@ -1,21 +1,40 @@
1
1
  export { default as XButton } from './basic/XButton.vue';
2
+ export * from './basic/XButton.vue';
2
3
  export { default as XCascader } from './basic/XCascader.vue';
4
+ export * from './basic/XCheckbox.vue';
3
5
  export { default as XCheckbox } from './basic/XCheckbox.vue';
4
6
  export { default as XColorPicker } from './basic/XColorPicker.vue';
7
+ export * from './basic/XColorPicker.vue';
5
8
  export { default as XDialog } from './basic/XDialog.vue';
9
+ export * from './basic/XDialog.vue';
6
10
  export { default as XDivider } from './basic/XDivider.vue';
7
- export { default as XForm, XFormItem } from './basic/XForm.vue';
11
+ export * from './basic/XDivider.vue';
12
+ export { default as XForm } from './basic/XForm.vue';
13
+ export * from './basic/XForm.vue';
8
14
  export { default as XImage } from './basic/XImage.vue';
15
+ export * from './basic/XImage.vue';
9
16
  export { default as XInput } from './basic/XInput.vue';
17
+ export * from './basic/XInput.vue';
10
18
  export { default as XInputNumber } from './basic/XInputNumber.vue';
19
+ export * from './basic/XInputNumber.vue';
11
20
  export { default as XPagination } from './basic/XPagination.vue';
21
+ export * from './basic/XPagination.vue';
12
22
  export { default as XRate } from './basic/XRate.vue';
23
+ export * from './basic/XRate.vue';
13
24
  export { default as XReconfirm } from './basic/XReconfirm.vue';
25
+ export * from './basic/XReconfirm.vue';
14
26
  export { default as XScrollbar } from './basic/XScrollbar.vue';
27
+ export * from './basic/XScrollbar.vue';
15
28
  export { default as XSelect } from './basic/XSelect.vue';
29
+ export * from './basic/XSelect.vue';
16
30
  export { default as XSpace } from './basic/XSpace.vue';
31
+ export * from './basic/XSpace.vue';
17
32
  export { default as XTable } from './basic/XTable.vue';
33
+ export * from './basic/XTable.vue';
18
34
  export { default as XTabs } from './basic/XTabs.vue';
35
+ export * from './basic/XTabs.vue';
19
36
  export { default as XText } from './basic/XText.vue';
37
+ export * from './basic/XText.vue';
20
38
  export { default as XUpload } from './basic/XUpload.vue';
39
+ export * from './basic/XUpload.vue';
21
40
  export * from './constants';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as y, openBlock as m, createBlock as b, unref as h, mergeProps as C, withCtx as g, renderSlot as E, useModel as x, inject as p, mergeModels as B, computed as V, toValue as P, onMounted as K, nextTick as ne, getCurrentScope as ie, onScopeDispose as re, getCurrentInstance as G, shallowRef as N, watch as W, createElementBlock as j, Fragment as Y, renderList as J, useSlots as de, createSlots as ue, normalizeProps as $, guardReactiveProps as O, ref as F, provide as L, createVNode as k, resolveComponent as U, createTextVNode as q, useTemplateRef as Z, toDisplayString as se, normalizeClass as ce } from "vue";
2
- import { ElButton as fe, ElCascader as me, ElCheckboxGroup as pe, ElCheckbox as be, ElColorPicker as ye, ElDialog as ve, ElDivider as ge, ElForm as he, ElFormItem as Be, ElMessage as ee, ElImage as we, ElInput as Ve, ElPagination as Ce, ElRate as Ee, ElPopconfirm as xe, ElScrollbar as Te, ElSpace as Se, ElTable as Xe, ElTableColumn as ze, ElTabs as ke, ElText as Ie, ElUpload as Ae } from "element-plus";
3
- const We = /* @__PURE__ */ y({
1
+ import { defineComponent as b, openBlock as m, createBlock as y, unref as h, mergeProps as C, withCtx as g, renderSlot as E, useModel as x, inject as p, mergeModels as B, computed as V, toValue as L, onMounted as K, nextTick as re, getCurrentScope as de, 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 xe, ElRate as Te, ElPopconfirm as Xe, ElScrollbar as Se, ElSpace as ze, ElTable as ke, ElTableColumn as Ie, ElTabs as Ae, ElTabPane as $e, ElText as Oe, ElUpload as Me } from "element-plus";
3
+ const je = /* @__PURE__ */ b({
4
4
  __name: "XButton",
5
5
  props: {
6
6
  size: {},
@@ -25,7 +25,7 @@ const We = /* @__PURE__ */ y({
25
25
  emits: ["click"],
26
26
  setup(e, { emit: t }) {
27
27
  const o = e, n = t;
28
- return (l, i) => (m(), b(h(fe), C(o, {
28
+ return (l, i) => (m(), y(h(pe), C(o, {
29
29
  onClick: i[0] || (i[0] = (r) => n("click", r))
30
30
  }), {
31
31
  default: g(() => [
@@ -34,15 +34,15 @@ const We = /* @__PURE__ */ y({
34
34
  _: 3
35
35
  }, 16));
36
36
  }
37
- }), M = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), te = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), z = /* @__PURE__ */ Symbol(
37
+ }), P = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), te = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), k = /* @__PURE__ */ Symbol(
38
38
  "X_FORM_ITEM_VALIDATION"
39
- ), $e = /* @__PURE__ */ Symbol(
39
+ ), Pe = /* @__PURE__ */ Symbol(
40
40
  "X_FORM_TAB_UPDATE_HOOK"
41
- ), Oe = /* @__PURE__ */ Symbol("X_TAB_PANES"), Me = /* @__PURE__ */ Symbol("X_TAB_PANE"), D = /* @__PURE__ */ Symbol(
41
+ ), ae = /* @__PURE__ */ Symbol("X_TAB_PANES"), le = /* @__PURE__ */ Symbol("X_TAB_PANE"), D = /* @__PURE__ */ Symbol(
42
42
  "X_TABLE_QUERY_UPDATE_HOOK"
43
43
  ), H = /* @__PURE__ */ Symbol(
44
44
  "X_TABLE_QUERY_EXECUTE_HOOK"
45
- ), je = /* @__PURE__ */ y({
45
+ ), Ke = /* @__PURE__ */ b({
46
46
  __name: "XCascader",
47
47
  props: /* @__PURE__ */ B({
48
48
  clearable: {
@@ -64,7 +64,7 @@ const We = /* @__PURE__ */ y({
64
64
  setup(e, {
65
65
  emit: t
66
66
  }) {
67
- const o = e, n = t, l = x(e, "modelValue"), i = p(z, void 0);
67
+ const o = e, n = t, l = x(e, "modelValue"), i = p(k, void 0);
68
68
  if (i?.required) {
69
69
  const {
70
70
  validator: c,
@@ -72,12 +72,12 @@ const We = /* @__PURE__ */ y({
72
72
  } = i;
73
73
  i.validator = () => l.value ? c?.() : `请输入${d}`;
74
74
  }
75
- const r = p(M, void 0), a = p(D, void 0), u = p(H, void 0);
75
+ const r = p(P, void 0), a = p(D, void 0), u = p(H, void 0);
76
76
  a?.on(([c, d]) => r === c && d === void 0 && (l.value = void 0)), u?.on(() => r && a?.trigger([r, l.value]));
77
77
  const s = () => {
78
78
  i?.validate(), n("blur");
79
79
  };
80
- return (c, d) => (m(), b(h(me), C(o, {
80
+ return (c, d) => (m(), y(h(be), C(o, {
81
81
  modelValue: l.value,
82
82
  "onUpdate:modelValue": d[0] || (d[0] = (w) => l.value = w),
83
83
  onBlur: s
@@ -85,48 +85,48 @@ const We = /* @__PURE__ */ y({
85
85
  }
86
86
  });
87
87
  function Re(e, t) {
88
- return ie() ? (re(e, t), !0) : !1;
88
+ return de() ? (ue(e, t), !0) : !1;
89
89
  }
90
- const Pe = typeof window < "u" && typeof document < "u";
90
+ const Le = typeof window < "u" && typeof document < "u";
91
91
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
92
- function Le(e) {
92
+ function Ue(e) {
93
93
  return Array.isArray(e) ? e : [e];
94
94
  }
95
- function Ue(e) {
95
+ function Fe(e) {
96
96
  return G();
97
97
  }
98
- function Fe(e, t = !0, o) {
99
- Ue() ? K(e, o) : t ? e() : ne(e);
98
+ function De(e, t = !0, o) {
99
+ Fe() ? K(e, o) : t ? e() : re(e);
100
100
  }
101
101
  // @__NO_SIDE_EFFECTS__
102
102
  function Q(e, t) {
103
- return V(() => P(e).map((o) => P(o)).map(t));
103
+ return V(() => L(e).map((o) => L(o)).map(t));
104
104
  }
105
- const ae = Pe ? window : void 0;
105
+ const oe = Le ? window : void 0;
106
106
  function I(e) {
107
107
  var t;
108
- const o = P(e);
108
+ const o = L(e);
109
109
  return (t = o?.$el) !== null && t !== void 0 ? t : o;
110
110
  }
111
111
  // @__NO_SIDE_EFFECTS__
112
- function De() {
112
+ function He() {
113
113
  const e = N(!1), t = G();
114
114
  return t && K(() => {
115
115
  e.value = !0;
116
116
  }, t), e;
117
117
  }
118
118
  // @__NO_SIDE_EFFECTS__
119
- function He(e) {
120
- const t = /* @__PURE__ */ De();
119
+ function _e(e) {
120
+ const t = /* @__PURE__ */ He();
121
121
  return V(() => (t.value, !!e()));
122
122
  }
123
- function _e(e, t, o = {}) {
124
- const { window: n = ae, ...l } = o;
123
+ function Ne(e, t, o = {}) {
124
+ const { window: n = oe, ...l } = o;
125
125
  let i;
126
- const r = /* @__PURE__ */ He(() => n && "ResizeObserver" in n), a = () => {
126
+ const r = /* @__PURE__ */ _e(() => n && "ResizeObserver" in n), a = () => {
127
127
  i && (i.disconnect(), i = void 0);
128
128
  }, u = W(V(() => {
129
- const c = P(e);
129
+ const c = L(e);
130
130
  return Array.isArray(c) ? c.map((d) => I(d)) : [I(c)];
131
131
  }), (c) => {
132
132
  if (a(), r.value && n) {
@@ -144,28 +144,28 @@ function _e(e, t, o = {}) {
144
144
  stop: s
145
145
  };
146
146
  }
147
- function Ne(e, t = {
147
+ function qe(e, t = {
148
148
  width: 0,
149
149
  height: 0
150
150
  }, o = {}) {
151
- const { window: n = ae, box: l = "content-box" } = o, i = V(() => {
151
+ const { window: n = oe, box: l = "content-box" } = o, i = V(() => {
152
152
  var d;
153
153
  return (d = I(e)) === null || d === void 0 || (d = d.namespaceURI) === null || d === void 0 ? void 0 : d.includes("svg");
154
- }), r = N(t.width), a = N(t.height), { stop: u } = _e(e, ([d]) => {
154
+ }), r = N(t.width), a = N(t.height), { stop: u } = Ne(e, ([d]) => {
155
155
  const w = l === "border-box" ? d.borderBoxSize : l === "content-box" ? d.contentBoxSize : d.devicePixelContentBoxSize;
156
156
  if (n && i.value) {
157
157
  const T = I(e);
158
158
  if (T) {
159
- const S = T.getBoundingClientRect();
160
- r.value = S.width, a.value = S.height;
159
+ const X = T.getBoundingClientRect();
160
+ r.value = X.width, a.value = X.height;
161
161
  }
162
162
  } else if (w) {
163
- const T = Le(w);
164
- r.value = T.reduce((S, { inlineSize: A }) => S + A, 0), a.value = T.reduce((S, { blockSize: A }) => S + A, 0);
163
+ const T = Ue(w);
164
+ r.value = T.reduce((X, { inlineSize: A }) => X + A, 0), a.value = T.reduce((X, { blockSize: A }) => X + A, 0);
165
165
  } else
166
166
  r.value = d.contentRect.width, a.value = d.contentRect.height;
167
167
  }, o);
168
- Fe(() => {
168
+ De(() => {
169
169
  const d = I(e);
170
170
  d && (r.value = "offsetWidth" in d ? d.offsetWidth : t.width, a.value = "offsetHeight" in d ? d.offsetHeight : t.height);
171
171
  });
@@ -181,7 +181,7 @@ function Ne(e, t = {
181
181
  stop: c
182
182
  };
183
183
  }
184
- const Ke = /* @__PURE__ */ y({
184
+ const Ge = /* @__PURE__ */ b({
185
185
  __name: "XCheckbox",
186
186
  props: /* @__PURE__ */ B({
187
187
  data: {},
@@ -241,7 +241,7 @@ const Ke = /* @__PURE__ */ y({
241
241
  })), a = V({
242
242
  get: () => t.value && t.value.map(l),
243
243
  set: (s) => t.value = Array.isArray(s) ? s.map((c) => i(c)) : []
244
- }), u = p(z, void 0);
244
+ }), u = p(k, void 0);
245
245
  if (u?.required) {
246
246
  const {
247
247
  validator: s,
@@ -249,14 +249,14 @@ const Ke = /* @__PURE__ */ y({
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(), b(h(pe), C({
252
+ return (s, c) => (m(), y(h(ye), C({
253
253
  modelValue: a.value,
254
254
  "onUpdate:modelValue": c[0] || (c[0] = (d) => a.value = d)
255
255
  }, {
256
256
  disabled: e.disabled,
257
257
  size: e.size
258
258
  }), {
259
- default: g(() => [(m(!0), j(Y, null, J(r.value, (d) => (m(), b(h(be), {
259
+ default: g(() => [(m(!0), j(Y, null, J(r.value, (d) => (m(), y(h(ve), {
260
260
  key: d.key,
261
261
  disabled: d.disabled,
262
262
  label: d.label,
@@ -265,7 +265,7 @@ const Ke = /* @__PURE__ */ y({
265
265
  _: 1
266
266
  }, 16, ["modelValue"]));
267
267
  }
268
- }), Ge = /* @__PURE__ */ y({
268
+ }), Ye = /* @__PURE__ */ b({
269
269
  __name: "XColorPicker",
270
270
  props: /* @__PURE__ */ B({
271
271
  clearable: {
@@ -281,7 +281,7 @@ const Ke = /* @__PURE__ */ y({
281
281
  }),
282
282
  emits: ["update:modelValue"],
283
283
  setup(e) {
284
- const t = e, o = x(e, "modelValue"), n = p(z, void 0);
284
+ const t = e, o = x(e, "modelValue"), n = p(k, void 0);
285
285
  if (n?.required) {
286
286
  const {
287
287
  validator: a,
@@ -289,13 +289,13 @@ const Ke = /* @__PURE__ */ y({
289
289
  } = n;
290
290
  n.validator = () => o.value ? a?.() : `请输入${u}`;
291
291
  }
292
- const l = p(M, void 0), i = p(D, void 0), r = p(H, void 0);
293
- return i?.on(([a, u]) => l === a && u === void 0 && (o.value = void 0)), r?.on(() => l && i?.trigger([l, o.value])), (a, u) => (m(), b(h(ye), C(t, {
292
+ const l = p(P, void 0), i = p(D, void 0), r = p(H, void 0);
293
+ return i?.on(([a, u]) => l === a && u === void 0 && (o.value = void 0)), r?.on(() => l && i?.trigger([l, o.value])), (a, u) => (m(), y(h(ge), C(t, {
294
294
  modelValue: o.value,
295
295
  "onUpdate:modelValue": u[0] || (u[0] = (s) => o.value = s)
296
296
  }), null, 16, ["modelValue"]));
297
297
  }
298
- }), Ye = /* @__PURE__ */ y({
298
+ }), Je = /* @__PURE__ */ b({
299
299
  __name: "XDialog",
300
300
  props: /* @__PURE__ */ B({
301
301
  title: {},
@@ -311,13 +311,13 @@ const Ke = /* @__PURE__ */ y({
311
311
  const {
312
312
  header: t,
313
313
  footer: o
314
- } = de(), n = x(e, "modelValue");
315
- return (l, i) => (m(), b(h(ve), {
314
+ } = se(), n = x(e, "modelValue");
315
+ return (l, i) => (m(), y(h(he), {
316
316
  modelValue: n.value,
317
317
  "onUpdate:modelValue": i[0] || (i[0] = (r) => n.value = r),
318
318
  title: e.title,
319
319
  "body-class": `flex flex-col ${e.bodyClass}`
320
- }, ue({
320
+ }, ce({
321
321
  default: g(() => [E(l.$slots, "default")]),
322
322
  _: 2
323
323
  }, [t ? {
@@ -330,7 +330,7 @@ const Ke = /* @__PURE__ */ y({
330
330
  key: "1"
331
331
  } : void 0]), 1032, ["modelValue", "title", "body-class"]));
332
332
  }
333
- }), Je = /* @__PURE__ */ y({
333
+ }), Ze = /* @__PURE__ */ b({
334
334
  __name: "XDivider",
335
335
  props: {
336
336
  direction: {},
@@ -339,17 +339,17 @@ const Ke = /* @__PURE__ */ y({
339
339
  },
340
340
  setup(e) {
341
341
  const t = e;
342
- return (o, n) => (m(), b(h(ge), $(O(t)), {
342
+ return (o, n) => (m(), y(h(Be), O(M(t)), {
343
343
  default: g(() => [
344
344
  E(o.$slots, "default")
345
345
  ]),
346
346
  _: 3
347
347
  }, 16));
348
348
  }
349
- }), Ze = /* @__PURE__ */ y((e, {
349
+ }), et = /* @__PURE__ */ b((e, {
350
350
  expose: t
351
351
  }) => {
352
- const o = p(Me, void 0), n = p($e, void 0), l = F(), i = {
352
+ const o = p(le, void 0), n = p(Pe, void 0), l = F(), i = {
353
353
  label: e.label,
354
354
  required: e.required,
355
355
  clearValidate() {
@@ -363,9 +363,9 @@ const Ke = /* @__PURE__ */ y({
363
363
  }), n?.trigger(o.name)), !l.value;
364
364
  }
365
365
  };
366
- return p(te, void 0)?.push(i), L(z, i), t({
366
+ return p(te, void 0)?.push(i), $(k, i), t({
367
367
  ...i
368
- }), L(M, e.label), () => k(Be, C({
368
+ }), $(P, e.label), () => z(Ve, C({
369
369
  label: e.label,
370
370
  labelPosition: e.labelPosition,
371
371
  labelWidth: e.labelWidth,
@@ -378,7 +378,7 @@ const Ke = /* @__PURE__ */ y({
378
378
  });
379
379
  }, {
380
380
  props: ["label", "required", "content", "tooltip"]
381
- }), et = /* @__PURE__ */ y({
381
+ }), tt = /* @__PURE__ */ b({
382
382
  __name: "XForm",
383
383
  props: {
384
384
  content: {
@@ -405,7 +405,7 @@ const Ke = /* @__PURE__ */ y({
405
405
  expose: t
406
406
  }) {
407
407
  const o = F(), n = [];
408
- L(te, n);
408
+ $(te, n);
409
409
  const l = () => n.every((a) => a.validate()), i = () => {
410
410
  o.value?.resetFields(), n.forEach((a) => a.clearValidate());
411
411
  };
@@ -417,7 +417,7 @@ const Ke = /* @__PURE__ */ y({
417
417
  const r = () => e.content?.({
418
418
  data: e.data
419
419
  });
420
- return (a, u) => (m(), b(h(he), C({
420
+ return (a, u) => (m(), y(h(we), C({
421
421
  ref_key: "form",
422
422
  ref: o
423
423
  }, {
@@ -428,11 +428,11 @@ const Ke = /* @__PURE__ */ y({
428
428
  labelPosition: e.labelPosition,
429
429
  statusIcon: e.statusIcon
430
430
  }), {
431
- default: g(() => [k(r)]),
431
+ default: g(() => [z(r)]),
432
432
  _: 1
433
433
  }, 16));
434
434
  }
435
- }), tt = /* @__PURE__ */ y({
435
+ }), at = /* @__PURE__ */ b({
436
436
  __name: "XImage",
437
437
  props: {
438
438
  hideOnClickModal: { type: Boolean },
@@ -456,9 +456,9 @@ const Ke = /* @__PURE__ */ y({
456
456
  },
457
457
  setup(e) {
458
458
  const t = e;
459
- return (o, n) => (m(), b(h(we), $(O(t)), null, 16));
459
+ return (o, n) => (m(), y(h(Ce), O(M(t)), null, 16));
460
460
  }
461
- }), at = /* @__PURE__ */ y({
461
+ }), lt = /* @__PURE__ */ b({
462
462
  __name: "XInput",
463
463
  props: /* @__PURE__ */ B({
464
464
  clearable: {
@@ -485,7 +485,7 @@ const Ke = /* @__PURE__ */ y({
485
485
  setup(e, {
486
486
  emit: t
487
487
  }) {
488
- const o = e, n = t, l = x(e, "modelValue"), i = p(z, void 0);
488
+ const o = e, n = t, l = x(e, "modelValue"), i = p(k, void 0);
489
489
  if (i?.required) {
490
490
  const {
491
491
  validator: d,
@@ -493,19 +493,19 @@ const Ke = /* @__PURE__ */ y({
493
493
  } = i;
494
494
  i.validator = () => l.value ? d?.() : `请输入${w}`;
495
495
  }
496
- const r = p(M, void 0), a = p(D, void 0), u = p(H, void 0);
496
+ const r = p(P, void 0), a = p(D, void 0), u = p(H, void 0);
497
497
  a?.on(([d, w]) => r === d && w === void 0 && (l.value = void 0)), u?.on(() => r && a?.trigger([r, l.value]));
498
498
  const s = (d) => n("change", d), c = () => {
499
499
  i?.validate(), n("blur");
500
500
  };
501
- return (d, w) => (m(), b(h(Ve), C(o, {
501
+ return (d, w) => (m(), y(h(Ee), C(o, {
502
502
  modelValue: l.value,
503
503
  "onUpdate:modelValue": w[0] || (w[0] = (T) => l.value = T),
504
504
  onBlur: c,
505
505
  onChange: s
506
506
  }), null, 16, ["modelValue"]));
507
507
  }
508
- }), lt = /* @__PURE__ */ y({
508
+ }), ot = /* @__PURE__ */ b({
509
509
  __name: "XInputNumber",
510
510
  props: /* @__PURE__ */ B({
511
511
  placeholder: {
@@ -537,7 +537,7 @@ const Ke = /* @__PURE__ */ y({
537
537
  setup(e, {
538
538
  emit: t
539
539
  }) {
540
- const o = e, n = t, l = x(e, "modelValue"), i = p(z, void 0);
540
+ const o = e, n = t, l = x(e, "modelValue"), i = p(k, void 0);
541
541
  if (i?.required) {
542
542
  const {
543
543
  validator: a,
@@ -550,14 +550,14 @@ const Ke = /* @__PURE__ */ y({
550
550
  };
551
551
  return (a, u) => {
552
552
  const s = U("ElInputNumber");
553
- return m(), b(s, C(o, {
553
+ return m(), y(s, C(o, {
554
554
  modelValue: l.value,
555
555
  "onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
556
556
  onBlur: r
557
557
  }), null, 16, ["modelValue"]);
558
558
  };
559
559
  }
560
- }), ot = /* @__PURE__ */ y({
560
+ }), nt = /* @__PURE__ */ b({
561
561
  __name: "XPagination",
562
562
  props: /* @__PURE__ */ B({
563
563
  sizes: { default: () => [20, 50, 100] },
@@ -591,7 +591,7 @@ const Ke = /* @__PURE__ */ y({
591
591
  emits: /* @__PURE__ */ B(["sizeChange", "currentChange"], ["update:size", "update:current"]),
592
592
  setup(e, { emit: t }) {
593
593
  const o = t, n = x(e, "size"), l = x(e, "current");
594
- return (i, r) => (m(), b(h(Ce), C({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
594
+ return (i, r) => (m(), y(h(xe), C({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
595
595
  "current-page": l.value,
596
596
  "onUpdate:currentPage": r[0] || (r[0] = (a) => l.value = a),
597
597
  "page-size": n.value,
@@ -600,7 +600,7 @@ const Ke = /* @__PURE__ */ y({
600
600
  onCurrentChange: r[3] || (r[3] = (a) => o("currentChange", a))
601
601
  }), null, 16, ["current-page", "page-size"]));
602
602
  }
603
- }), nt = /* @__PURE__ */ y({
603
+ }), it = /* @__PURE__ */ b({
604
604
  __name: "XRate",
605
605
  props: /* @__PURE__ */ B({
606
606
  ariaLabel: {},
@@ -641,12 +641,12 @@ const Ke = /* @__PURE__ */ y({
641
641
  emits: ["update:modelValue"],
642
642
  setup(e) {
643
643
  const t = e, o = x(e, "modelValue");
644
- return (n, l) => (m(), b(h(Ee), C(t, {
644
+ return (n, l) => (m(), y(h(Te), C(t, {
645
645
  modelValue: o.value,
646
646
  "onUpdate:modelValue": l[0] || (l[0] = (i) => o.value = i)
647
647
  }), null, 16, ["modelValue"]));
648
648
  }
649
- }), it = /* @__PURE__ */ y({
649
+ }), rt = /* @__PURE__ */ b({
650
650
  __name: "XReconfirm",
651
651
  props: {
652
652
  title: { default: "是否执行?" }
@@ -656,7 +656,7 @@ const Ke = /* @__PURE__ */ y({
656
656
  const o = t;
657
657
  return (n, l) => {
658
658
  const i = U("XButton");
659
- return m(), b(h(xe), {
659
+ return m(), y(h(Xe), {
660
660
  title: e.title,
661
661
  onCancel: l[0] || (l[0] = () => o("cancel")),
662
662
  onConfirm: l[1] || (l[1] = () => o("confirm"))
@@ -665,7 +665,7 @@ const Ke = /* @__PURE__ */ y({
665
665
  E(n.$slots, "default")
666
666
  ]),
667
667
  actions: g(({ confirm: r, cancel: a }) => [
668
- k(i, {
668
+ z(i, {
669
669
  size: "small",
670
670
  onClick: a
671
671
  }, {
@@ -674,7 +674,7 @@ const Ke = /* @__PURE__ */ y({
674
674
  ])]),
675
675
  _: 1
676
676
  }, 8, ["onClick"]),
677
- k(i, {
677
+ z(i, {
678
678
  type: "danger",
679
679
  size: "small",
680
680
  onClick: r
@@ -689,7 +689,7 @@ const Ke = /* @__PURE__ */ y({
689
689
  }, 8, ["title"]);
690
690
  };
691
691
  }
692
- }), rt = /* @__PURE__ */ y({
692
+ }), dt = /* @__PURE__ */ b({
693
693
  __name: "XScrollbar",
694
694
  props: {
695
695
  ariaLabel: {},
@@ -723,14 +723,14 @@ const Ke = /* @__PURE__ */ y({
723
723
  return t({
724
724
  wrapRef: l,
725
725
  viewRef: i
726
- }), (r, a) => (m(), b(h(Te), C({
726
+ }), (r, a) => (m(), y(h(Se), C({
727
727
  ref: "scrollbar"
728
728
  }, o), {
729
729
  default: g(() => [E(r.$slots, "default")]),
730
730
  _: 3
731
731
  }, 16));
732
732
  }
733
- }), dt = /* @__PURE__ */ y({
733
+ }), ut = /* @__PURE__ */ b({
734
734
  __name: "XSelect",
735
735
  props: /* @__PURE__ */ B({
736
736
  data: {},
@@ -852,7 +852,7 @@ const Ke = /* @__PURE__ */ y({
852
852
  let s = 0;
853
853
  W([n, i], async () => {
854
854
  if (s++, n.value) {
855
- const f = [].concat(n.value).filter((_) => !i.value.map((X) => a(X.value)).includes(a(_))), v = s, R = await e.supplement?.(f);
855
+ const f = [].concat(n.value).filter((_) => !i.value.map((S) => a(S.value)).includes(a(_))), v = s, R = await e.supplement?.(f);
856
856
  v === s && R && (l.value = R);
857
857
  } else
858
858
  l.value = [];
@@ -871,7 +871,7 @@ const Ke = /* @__PURE__ */ y({
871
871
  set: (f) => {
872
872
  Array.isArray(f) ? n.value = f.map((v) => u(v)) : n.value = f === void 0 ? void 0 : u(f) || (e.allowCreate ? f : void 0);
873
873
  }
874
- }), w = p(z, void 0);
874
+ }), w = p(k, void 0);
875
875
  if (w?.required) {
876
876
  const {
877
877
  validator: f,
@@ -879,14 +879,14 @@ const Ke = /* @__PURE__ */ y({
879
879
  } = w;
880
880
  w.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${v}` : f?.();
881
881
  }
882
- const T = p(M, void 0), S = p(D, void 0), A = p(H, void 0);
883
- S?.on(([f, v]) => T === f && v === void 0 && (d.value = void 0)), A?.on(() => T && S?.trigger([T, d.value === void 0 ? void 0 : [].concat(d.value).map((f) => c.value.find((v) => v.value === f).label).join(",")]));
884
- const le = (f) => o("change", f), oe = () => {
882
+ const T = p(P, void 0), X = p(D, void 0), A = p(H, void 0);
883
+ X?.on(([f, v]) => T === f && v === void 0 && (d.value = void 0)), A?.on(() => T && X?.trigger([T, d.value === void 0 ? void 0 : [].concat(d.value).map((f) => c.value.find((v) => v.value === f).label).join(",")]));
884
+ const ne = (f) => o("change", f), ie = () => {
885
885
  w?.validate(), o("blur");
886
886
  };
887
887
  return (f, v) => {
888
888
  const R = U("ElOption"), _ = U("ElSelect");
889
- return m(), b(_, C({
889
+ return m(), y(_, C({
890
890
  allowCreate: e.allowCreate,
891
891
  clearable: e.clearable,
892
892
  filterable: e.filterable,
@@ -901,23 +901,23 @@ const Ke = /* @__PURE__ */ y({
901
901
  collapseTagsTooltip: e.collapseTags
902
902
  }, {
903
903
  modelValue: d.value,
904
- "onUpdate:modelValue": v[0] || (v[0] = (X) => d.value = X),
905
- onBlur: oe,
906
- onChange: le
904
+ "onUpdate:modelValue": v[0] || (v[0] = (S) => d.value = S),
905
+ onBlur: ie,
906
+ onChange: ne
907
907
  }), {
908
- default: g(() => [(m(!0), j(Y, null, J(c.value, (X) => (m(), b(R, {
909
- key: X.key,
910
- label: X.label,
911
- value: X.value
908
+ default: g(() => [(m(!0), j(Y, null, J(c.value, (S) => (m(), y(R, {
909
+ key: S.key,
910
+ label: S.label,
911
+ value: S.value
912
912
  }, {
913
- default: g(() => [q(se(X.label), 1)]),
913
+ default: g(() => [q(fe(S.label), 1)]),
914
914
  _: 2
915
915
  }, 1032, ["label", "value"]))), 128))]),
916
916
  _: 1
917
917
  }, 16, ["modelValue"]);
918
918
  };
919
919
  }
920
- }), ut = /* @__PURE__ */ y({
920
+ }), st = /* @__PURE__ */ b({
921
921
  __name: "XSpace",
922
922
  props: {
923
923
  direction: {},
@@ -937,12 +937,12 @@ const Ke = /* @__PURE__ */ y({
937
937
  },
938
938
  setup(e) {
939
939
  const t = e;
940
- return (o, n) => (m(), b(h(Se), $(O(t)), {
940
+ return (o, n) => (m(), y(h(ze), O(M(t)), {
941
941
  default: g(() => [E(o.$slots, "default")]),
942
942
  _: 3
943
943
  }, 16));
944
944
  }
945
- }), st = /* @__PURE__ */ y({
945
+ }), ct = /* @__PURE__ */ b({
946
946
  __name: "XTable",
947
947
  props: {
948
948
  data: {},
@@ -965,7 +965,7 @@ const Ke = /* @__PURE__ */ y({
965
965
  setup(e, {
966
966
  emit: t
967
967
  }) {
968
- const o = t, n = Z("container"), l = F(), i = Ne(n), r = V(() => e.height ?? i.height.value), a = () => k(Xe, C({
968
+ const o = t, n = Z("container"), l = F(), i = qe(n), r = V(() => e.height ?? i.height.value), a = () => z(ke, C({
969
969
  ref: l
970
970
  }, {
971
971
  data: e.data,
@@ -979,7 +979,7 @@ const Ke = /* @__PURE__ */ y({
979
979
  "onSelection-change": (u) => o("selectionChange", u),
980
980
  "onHeader-dragend": (u, s, c) => o("headerDragend", u, s, c)
981
981
  }), {
982
- default: () => e.columns.map((u) => k(ze, u, {
982
+ default: () => e.columns.map((u) => z(Ie, u, {
983
983
  default: ({
984
984
  $index: s,
985
985
  row: c
@@ -995,10 +995,21 @@ const Ke = /* @__PURE__ */ y({
995
995
  return (u, s) => (m(), j("div", {
996
996
  ref_key: "container",
997
997
  ref: n,
998
- class: ce([e.height === void 0 && "h-full"])
999
- }, [k(a)], 2));
998
+ class: me([e.height === void 0 && "h-full"])
999
+ }, [z(a)], 2));
1000
1000
  }
1001
- }), ct = /* @__PURE__ */ y({
1001
+ }), ft = /* @__PURE__ */ b((e, {
1002
+ slots: t
1003
+ }) => {
1004
+ const o = {
1005
+ ...e
1006
+ };
1007
+ return p(ae, void 0)?.push(o), $(le, o), () => z($e, e, {
1008
+ ...t
1009
+ });
1010
+ }, {
1011
+ props: ["label", "name", "closable", "lazy", "disabled"]
1012
+ }), mt = /* @__PURE__ */ b({
1002
1013
  __name: "XTabs",
1003
1014
  props: /* @__PURE__ */ B({
1004
1015
  type: {},
@@ -1023,7 +1034,7 @@ const Ke = /* @__PURE__ */ y({
1023
1034
  emit: t
1024
1035
  }) {
1025
1036
  const o = t, n = x(e, "modelValue");
1026
- return L(Oe, []), (i, r) => (m(), b(h(ke), C({
1037
+ return $(ae, []), (i, r) => (m(), y(h(Ae), C({
1027
1038
  addable: e.addable,
1028
1039
  editable: e.editable,
1029
1040
  type: e.type,
@@ -1039,7 +1050,7 @@ const Ke = /* @__PURE__ */ y({
1039
1050
  _: 3
1040
1051
  }, 16, ["modelValue"]));
1041
1052
  }
1042
- }), ft = /* @__PURE__ */ y({
1053
+ }), pt = /* @__PURE__ */ b({
1043
1054
  __name: "XText",
1044
1055
  props: {
1045
1056
  type: {},
@@ -1048,14 +1059,14 @@ const Ke = /* @__PURE__ */ y({
1048
1059
  } }
1049
1060
  },
1050
1061
  setup(e) {
1051
- return (t, o) => (m(), b(h(Ie), $(O({ type: e.type, size: e.size, truncated: e.truncated })), {
1062
+ return (t, o) => (m(), y(h(Oe), O(M({ type: e.type, size: e.size, truncated: e.truncated })), {
1052
1063
  default: g(() => [
1053
1064
  E(t.$slots, "default")
1054
1065
  ]),
1055
1066
  _: 3
1056
1067
  }, 16));
1057
1068
  }
1058
- }), mt = /* @__PURE__ */ y({
1069
+ }), bt = /* @__PURE__ */ b({
1059
1070
  __name: "XUpload",
1060
1071
  props: /* @__PURE__ */ B({
1061
1072
  action: {},
@@ -1093,7 +1104,7 @@ const Ke = /* @__PURE__ */ y({
1093
1104
  name: a.split("/").findLast(() => !0),
1094
1105
  url: a,
1095
1106
  uid: Number(a.slice(0, a.lastIndexOf("/")).split("/").findLast(() => !0))
1096
- }))), n = p(z, void 0);
1107
+ }))), n = p(k, void 0);
1097
1108
  if (n?.required) {
1098
1109
  const {
1099
1110
  validator: a,
@@ -1104,7 +1115,7 @@ const Ke = /* @__PURE__ */ y({
1104
1115
  const l = (a) => (a.size > e.maxSize && ee.warning("文件过大,请重新选择"), a.size < e.maxSize), i = (a) => window.open(a.url), r = (a, u) => {
1105
1116
  t.value = Array.isArray(t.value) ? u.map((s) => s.url) : void 0;
1106
1117
  };
1107
- return (a, u) => (m(), b(h(Ae), $(O({
1118
+ return (a, u) => (m(), y(h(Me), O(M({
1108
1119
  limit: e.limit,
1109
1120
  disabled: e.disabled,
1110
1121
  data: e.data,
@@ -1126,33 +1137,34 @@ const Ke = /* @__PURE__ */ y({
1126
1137
  }
1127
1138
  });
1128
1139
  export {
1129
- We as XButton,
1130
- je as XCascader,
1131
- Ke as XCheckbox,
1132
- Ge as XColorPicker,
1133
- Ye as XDialog,
1134
- Je as XDivider,
1135
- et as XForm,
1136
- Ze as XFormItem,
1137
- tt as XImage,
1138
- at as XInput,
1139
- lt as XInputNumber,
1140
- ot as XPagination,
1141
- nt as XRate,
1142
- it as XReconfirm,
1143
- rt as XScrollbar,
1144
- dt as XSelect,
1145
- ut as XSpace,
1146
- st as XTable,
1147
- ct as XTabs,
1148
- ft as XText,
1149
- mt as XUpload,
1150
- M as X_FORM_ITEM_LABEL,
1151
- z as X_FORM_ITEM_VALIDATION,
1152
- $e as X_FORM_TAB_UPDATE_HOOK,
1140
+ je as XButton,
1141
+ Ke as XCascader,
1142
+ Ge as XCheckbox,
1143
+ Ye as XColorPicker,
1144
+ Je as XDialog,
1145
+ Ze as XDivider,
1146
+ tt as XForm,
1147
+ et as XFormItem,
1148
+ at as XImage,
1149
+ lt as XInput,
1150
+ ot as XInputNumber,
1151
+ nt as XPagination,
1152
+ it as XRate,
1153
+ rt as XReconfirm,
1154
+ dt as XScrollbar,
1155
+ ut as XSelect,
1156
+ st as XSpace,
1157
+ ft as XTabPane,
1158
+ ct as XTable,
1159
+ mt as XTabs,
1160
+ pt as XText,
1161
+ bt as XUpload,
1162
+ P as X_FORM_ITEM_LABEL,
1163
+ k as X_FORM_ITEM_VALIDATION,
1164
+ Pe as X_FORM_TAB_UPDATE_HOOK,
1153
1165
  te as X_FORM_VALIDATIONS,
1154
1166
  H as X_TABLE_QUERY_EXECUTE_HOOK,
1155
1167
  D as X_TABLE_QUERY_UPDATE_HOOK,
1156
- Me as X_TAB_PANE,
1157
- Oe as X_TAB_PANES
1168
+ le as X_TAB_PANE,
1169
+ ae as X_TAB_PANES
1158
1170
  };
@@ -1,2 +1,3 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
- export declare const resolver: () => ComponentResolver;
2
+ declare const _default: () => ComponentResolver;
3
+ export default _default;
package/dist/resolver.js CHANGED
@@ -30,5 +30,5 @@ const X = [
30
30
  }
31
31
  });
32
32
  export {
33
- r as resolver
33
+ r as default
34
34
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pungfe/element",
3
3
  "type": "module",
4
- "version": "0.0.1-alpha.5",
4
+ "version": "0.0.1-alpha.7",
5
5
  "description": "Element Plus Components",
6
6
  "author": "pungfen <fp94214@gmail.com> (https://github.com/pungfen/)",
7
7
  "license": "MIT",