mwl-components 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,37 @@
1
- import { defineComponent as D, useSlots as V, ref as H, resolveComponent as m, createBlock as p, openBlock as r, normalizeClass as X, createSlots as L, withCtx as i, renderSlot as S, createElementVNode as I, createElementBlock as _, createCommentVNode as E, toDisplayString as Y, watch as Z, nextTick as ee, computed as F, unref as A, mergeProps as O, normalizeStyle as U, createTextVNode as j, createVNode as N, mergeModels as te, useModel as ne, getCurrentInstance as K, Fragment as M, renderList as P, resolveDynamicComponent as $, h as z, inject as oe, onMounted as ae, onUnmounted as le, withDirectives as G, vShow as J, normalizeProps as re, guardReactiveProps as se } from "vue";
2
- import { configProviderContextKey as ue } from "element-plus";
3
- const ce = { class: "card-header" }, ie = {
1
+ import { defineComponent as M, useAttrs as X, ref as Y, resolveComponent as d, createBlock as p, openBlock as r, mergeProps as P, withCtx as i, renderSlot as C, useSlots as V, normalizeClass as Z, createSlots as L, createElementVNode as I, createElementBlock as x, createCommentVNode as E, toDisplayString as $, watch as ee, nextTick as te, computed as O, unref as B, normalizeStyle as U, createTextVNode as j, createVNode as N, mergeModels as ne, useModel as oe, getCurrentInstance as K, Fragment as D, renderList as W, resolveDynamicComponent as H, h as z, inject as ae, onMounted as le, onUnmounted as re, withDirectives as G, vShow as J, normalizeProps as se, guardReactiveProps as ue } from "vue";
2
+ import { configProviderContextKey as ce } from "element-plus";
3
+ const ie = /* @__PURE__ */ M({
4
+ name: "EasyButton",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ setup(e) {
8
+ const { onClick: n, ...t } = X(), s = Y(!1), c = async () => {
9
+ console.log("Button clicked"), s.value = !0;
10
+ try {
11
+ await n?.();
12
+ } catch (u) {
13
+ console.error("Error in button onClick handler:", u);
14
+ } finally {
15
+ s.value = !1;
16
+ }
17
+ };
18
+ return (u, g) => {
19
+ const o = d("el-button");
20
+ return r(), p(o, P(t, {
21
+ loading: s.value,
22
+ onClick: c
23
+ }), {
24
+ default: i(() => [
25
+ C(u.$slots, "default")
26
+ ]),
27
+ _: 3
28
+ }, 16, ["loading"]);
29
+ };
30
+ }
31
+ }), de = { class: "card-header" }, me = {
4
32
  key: 0,
5
33
  class: "card-header__message"
6
- }, de = /* @__PURE__ */ D({
34
+ }, pe = /* @__PURE__ */ M({
7
35
  name: "ContentWarp",
8
36
  __name: "index",
9
37
  props: {
@@ -11,44 +39,44 @@ const ce = { class: "card-header" }, ie = {
11
39
  message: String
12
40
  },
13
41
  setup(e) {
14
- const a = V(), t = H("content-wrap");
15
- return (s, u) => {
16
- const c = m("ElCard");
17
- return r(), p(c, {
18
- class: X([t.value]),
42
+ const n = V(), t = Y("content-wrap");
43
+ return (s, c) => {
44
+ const u = d("ElCard");
45
+ return r(), p(u, {
46
+ class: Z([t.value]),
19
47
  shadow: "never"
20
48
  }, L({
21
49
  default: i(() => [
22
- S(s.$slots, "default", {}, void 0, !0)
50
+ C(s.$slots, "default", {}, void 0, !0)
23
51
  ]),
24
52
  _: 2
25
53
  }, [
26
54
  e.title ? {
27
55
  name: "header",
28
56
  fn: i(() => [
29
- I("div", ce, [
30
- I("span", null, Y(e.title), 1),
31
- e.message ? (r(), _("span", ie, Y(e.message), 1)) : E("", !0)
57
+ I("div", de, [
58
+ I("span", null, $(e.title), 1),
59
+ e.message ? (r(), x("span", me, $(e.message), 1)) : E("", !0)
32
60
  ])
33
61
  ]),
34
62
  key: "0"
35
63
  } : void 0,
36
- a.footer ? {
64
+ n.footer ? {
37
65
  name: "footer",
38
66
  fn: i(() => [
39
- S(s.$slots, "footer", {}, void 0, !0)
67
+ C(s.$slots, "footer", {}, void 0, !0)
40
68
  ]),
41
69
  key: "1"
42
70
  } : void 0
43
71
  ]), 1032, ["class"]);
44
72
  };
45
73
  }
46
- }), W = (e, a) => {
74
+ }), F = (e, n) => {
47
75
  const t = e.__vccOpts || e;
48
- for (const [s, u] of a)
49
- t[s] = u;
76
+ for (const [s, c] of n)
77
+ t[s] = c;
50
78
  return t;
51
- }, me = /* @__PURE__ */ W(de, [["__scopeId", "data-v-fdaaba5e"]]), pe = { class: "dialog-header" }, fe = /* @__PURE__ */ D({
79
+ }, fe = /* @__PURE__ */ F(pe, [["__scopeId", "data-v-fdaaba5e"]]), ge = { class: "dialog-header" }, he = /* @__PURE__ */ M({
52
80
  name: "Dialog",
53
81
  __name: "index",
54
82
  props: {
@@ -74,62 +102,62 @@ const ce = { class: "card-header" }, ie = {
74
102
  }
75
103
  },
76
104
  setup(e) {
77
- const a = V(), t = e, s = H(t.fullscreen), u = () => {
78
- s.value = !A(s);
79
- }, c = H(t.maxHeight);
80
- Z(
105
+ const n = V(), t = e, s = Y(t.fullscreen), c = () => {
106
+ s.value = !B(s);
107
+ }, u = Y(t.maxHeight);
108
+ ee(
81
109
  () => s.value,
82
- async (l) => {
83
- if (await ee(), l) {
84
- const n = document.documentElement.offsetHeight;
85
- c.value = `${n - 55 - 40 - (a.footer ? 63 : 0)}px`;
110
+ async (o) => {
111
+ if (await te(), o) {
112
+ const a = document.documentElement.offsetHeight;
113
+ u.value = `${a - 55 - 40 - (n.footer ? 63 : 0)}px`;
86
114
  } else
87
- c.value = t.maxHeight;
115
+ u.value = t.maxHeight;
88
116
  },
89
117
  {
90
118
  immediate: !0
91
119
  }
92
120
  );
93
- const g = F(() => {
121
+ const g = O(() => {
94
122
  if (t.maxHeight)
95
123
  return {
96
- height: A(c)
124
+ height: B(u)
97
125
  };
98
126
  });
99
- return (l, n) => {
100
- const f = m("FullScreen"), k = m("el-icon"), x = m("ElScrollbar"), h = m("ElDialog");
101
- return r(), p(h, O({
127
+ return (o, a) => {
128
+ const f = d("FullScreen"), k = d("el-icon"), _ = d("ElScrollbar"), h = d("ElDialog");
129
+ return r(), p(h, P({
102
130
  "close-on-click-modal": !1,
103
131
  "destroy-on-close": "",
104
132
  draggable: "",
105
133
  "lock-scroll": "",
106
134
  class: "custom-dialog",
107
135
  "append-to-body": ""
108
- }, l.$attrs, {
136
+ }, o.$attrs, {
109
137
  fullscreen: s.value,
110
138
  width: e.width
111
139
  }), L({
112
140
  default: i(() => [
113
- e.scroll ? (r(), p(x, {
141
+ e.scroll ? (r(), p(_, {
114
142
  key: 0,
115
143
  style: U(g.value)
116
144
  }, {
117
145
  default: i(() => [
118
- S(l.$slots, "default")
146
+ C(o.$slots, "default")
119
147
  ]),
120
148
  _: 3
121
- }, 8, ["style"])) : S(l.$slots, "default", { key: 1 })
149
+ }, 8, ["style"])) : C(o.$slots, "default", { key: 1 })
122
150
  ]),
123
151
  _: 2
124
152
  }, [
125
153
  e.title ? {
126
154
  name: "header",
127
155
  fn: i(() => [
128
- I("div", pe, [
129
- S(l.$slots, "title", {}, () => [
130
- j(Y(e.title), 1)
156
+ I("div", ge, [
157
+ C(o.$slots, "title", {}, () => [
158
+ j($(e.title), 1)
131
159
  ]),
132
- I("div", { onClick: u }, [
160
+ I("div", { onClick: c }, [
133
161
  N(k, { class: "fullScreen" }, {
134
162
  default: i(() => [
135
163
  N(f)
@@ -141,37 +169,37 @@ const ce = { class: "card-header" }, ie = {
141
169
  ]),
142
170
  key: "0"
143
171
  } : void 0,
144
- a.footer ? {
172
+ n.footer ? {
145
173
  name: "footer",
146
174
  fn: i(() => [
147
- S(l.$slots, "footer")
175
+ C(o.$slots, "footer")
148
176
  ]),
149
177
  key: "1"
150
178
  } : void 0
151
179
  ]), 1040, ["fullscreen", "width"]);
152
180
  };
153
181
  }
154
- }), ge = { key: 1 }, he = (e) => {
155
- let a = e.label;
156
- if (e.label && typeof e.label == "function" && (a = e.label()), e.type.indexOf("select") > -1 || e.type.indexOf("cascader") > -1 || e.type.indexOf("date") > -1)
157
- return `请选择${a}`;
182
+ }), ye = { key: 1 }, be = (e) => {
183
+ let n = e.label;
184
+ if (e.label && typeof e.label == "function" && (n = e.label()), e.type.indexOf("select") > -1 || e.type.indexOf("cascader") > -1 || e.type.indexOf("date") > -1)
185
+ return `请选择${n}`;
158
186
  if (e.type.indexOf("text") > -1 || e.type.indexOf("number") > -1)
159
- return `请输入${a}`;
160
- }, R = {
187
+ return `请输入${n}`;
188
+ }, T = {
161
189
  valueFormat: "YYYY-MM-DD HH:mm:ss",
162
190
  format: "YYYY-MM-DD HH:mm:ss"
163
- }, ye = (e) => {
164
- const { options: a } = e;
191
+ }, ve = (e) => {
192
+ const { options: n } = e;
165
193
  return {
166
- default: () => a?.map((t) => z(m("el-option"), {
194
+ default: () => n?.map((t) => z(d("el-option"), {
167
195
  label: t.label,
168
196
  value: t.value,
169
197
  key: t.value
170
198
  }))
171
199
  };
172
- }, T = {
200
+ }, A = {
173
201
  clearable: !0
174
- }, be = [
202
+ }, ke = [
175
203
  {
176
204
  type: "slider",
177
205
  component: "el-slider"
@@ -180,14 +208,14 @@ const ce = { class: "card-header" }, ie = {
180
208
  type: "text",
181
209
  component: "el-input",
182
210
  attrs: {
183
- ...T
211
+ ...A
184
212
  }
185
213
  },
186
214
  {
187
215
  type: "textarea",
188
216
  component: "el-input",
189
217
  attrs: {
190
- ...T
218
+ ...A
191
219
  }
192
220
  },
193
221
  {
@@ -205,10 +233,10 @@ const ce = { class: "card-header" }, ie = {
205
233
  type: "checkbox",
206
234
  component: "el-checkbox-group",
207
235
  slots: (e) => {
208
- const { options: a } = e;
236
+ const { options: n } = e;
209
237
  return {
210
- default: () => a?.map((t) => z(
211
- m("el-checkbox"),
238
+ default: () => n?.map((t) => z(
239
+ d("el-checkbox"),
212
240
  {
213
241
  value: t.value
214
242
  },
@@ -223,10 +251,10 @@ const ce = { class: "card-header" }, ie = {
223
251
  type: "radio",
224
252
  component: "el-radio-group",
225
253
  slots: (e) => {
226
- const { options: a } = e;
254
+ const { options: n } = e;
227
255
  return {
228
- default: () => a?.map((t) => z(
229
- m("el-radio"),
256
+ default: () => n?.map((t) => z(
257
+ d("el-radio"),
230
258
  {
231
259
  value: t.value
232
260
  },
@@ -240,7 +268,7 @@ const ce = { class: "card-header" }, ie = {
240
268
  {
241
269
  type: "select",
242
270
  component: "el-select",
243
- slots: ye
271
+ slots: ve
244
272
  },
245
273
  {
246
274
  type: "select-v2",
@@ -250,7 +278,7 @@ const ce = { class: "card-header" }, ie = {
250
278
  type: "tree-select",
251
279
  component: "el-tree-select",
252
280
  attrs: {
253
- ...T,
281
+ ...A,
254
282
  checkStrictly: !0,
255
283
  //是否严格的遵循父子不互相关联的做法,默认为 false
256
284
  renderAfterExpand: !0
@@ -271,7 +299,7 @@ const ce = { class: "card-header" }, ie = {
271
299
  component: "el-date-picker",
272
300
  attrs: {
273
301
  showConfirm: !1,
274
- ...R
302
+ ...T
275
303
  }
276
304
  },
277
305
  {
@@ -300,7 +328,7 @@ const ce = { class: "card-header" }, ie = {
300
328
  rangeSeparator: "至",
301
329
  startPlaceholder: "开始日期",
302
330
  endPlaceholder: "结束日期",
303
- ...R
331
+ ...T
304
332
  }
305
333
  },
306
334
  {
@@ -318,10 +346,10 @@ const ce = { class: "card-header" }, ie = {
318
346
  type: "custom",
319
347
  component: "el-form-item"
320
348
  }
321
- ], ve = /* @__PURE__ */ D({
349
+ ], _e = /* @__PURE__ */ M({
322
350
  name: "EasyForm",
323
351
  __name: "index",
324
- props: /* @__PURE__ */ te({
352
+ props: /* @__PURE__ */ ne({
325
353
  inline: {
326
354
  type: Boolean,
327
355
  default: !0
@@ -355,90 +383,90 @@ const ce = { class: "card-header" }, ie = {
355
383
  }),
356
384
  emits: ["update:modelValue"],
357
385
  setup(e) {
358
- const a = ne(e, "modelValue"), t = K(), s = (l) => {
359
- u(l, "formRef");
360
- }, u = (l, n) => {
361
- if (!l) {
362
- delete t?.exposeProxy?.[n], delete t?.exposed?.[n];
386
+ const n = oe(e, "modelValue"), t = K(), s = (o) => {
387
+ c(o, "formRef");
388
+ }, c = (o, a) => {
389
+ if (!o) {
390
+ delete t?.exposeProxy?.[a], delete t?.exposed?.[a];
363
391
  return;
364
392
  }
365
393
  t.exposeProxy = {
366
394
  ...t?.exposed,
367
- [n]: l
395
+ [a]: o
368
396
  }, t.exposed = {
369
397
  ...t?.exposed,
370
- [n]: l
398
+ [a]: o
371
399
  };
372
- }, c = V(), g = (l, n, f) => {
373
- const { value: k, component: x, ...h } = n, d = be.find(
374
- (b) => !!l && b.type.indexOf(l) > -1
375
- ), C = d?.component === "el-select" && n.props, y = n.options && !C ? d?.slots?.(n) : {};
376
- if (!d && !n.component)
377
- return new Error(`未找到type为${l}的组件且当前也未传递component`);
378
- const o = $(d?.component || x);
379
- if (o)
400
+ }, u = V(), g = (o, a, f) => {
401
+ const { value: k, component: _, ...h } = a, m = ke.find(
402
+ (b) => !!o && b.type.indexOf(o) > -1
403
+ ), w = m?.component === "el-select" && a.props, y = a.options && !w ? m?.slots?.(a) : {};
404
+ if (!m && !a.component)
405
+ return new Error(`未找到type为${o}的组件且当前也未传递component`);
406
+ const l = H(m?.component || _);
407
+ if (l)
380
408
  return z(
381
- o,
409
+ l,
382
410
  {
383
- ...d?.attrs,
411
+ ...m?.attrs,
384
412
  // 这里的ref还是从配置注入吧。不是每次都要用到ref
385
413
  // ref: (el: any) => {
386
414
  // setRefs(el, formItem.prop)
387
415
  // },
388
416
  ...h,
389
417
  //外部传入的 优先级最高
390
- placeholder: h.placeholder || he(n)
418
+ placeholder: h.placeholder || be(a)
391
419
  },
392
420
  { ...y, ...f }
393
421
  );
394
422
  };
395
- return (l, n) => {
396
- const f = m("el-form-item"), k = m("el-form");
397
- return r(), p(k, O({
398
- model: a.value,
423
+ return (o, a) => {
424
+ const f = d("el-form-item"), k = d("el-form");
425
+ return r(), p(k, P({
426
+ model: n.value,
399
427
  "label-width": e.labelWidth,
400
428
  inline: e.inline,
401
429
  "scroll-to-error": !0
402
- }, { ...l.$attrs }, {
430
+ }, { ...o.$attrs }, {
403
431
  ref: s,
404
432
  class: "easy-form"
405
433
  }), {
406
434
  default: i(() => [
407
- (r(!0), _(M, null, P(e.formItems, ({ id: x, type: h, rule: d, width: C, slots: y, ...o }, b) => (r(), _(M, null, [
408
- h != "custom" && !o.hidden ? (r(), p(f, {
409
- prop: o.prop,
435
+ (r(!0), x(D, null, W(e.formItems, ({ id: _, type: h, rule: m, width: w, slots: y, ...l }, b) => (r(), x(D, null, [
436
+ h != "custom" && !l.hidden ? (r(), p(f, {
437
+ prop: l.prop,
410
438
  key: b,
411
- "label-width": o.labelWidth,
412
- rules: d,
413
- required: o.required
439
+ "label-width": l.labelWidth,
440
+ rules: m,
441
+ required: l.required
414
442
  }, {
415
443
  label: i(() => [
416
- o.label && typeof o.label == "function" ? (r(), p($(o.label), { key: 0 })) : (r(), _("span", ge, Y(o.label), 1))
444
+ l.label && typeof l.label == "function" ? (r(), p(H(l.label), { key: 0 })) : (r(), x("span", ye, $(l.label), 1))
417
445
  ]),
418
446
  default: i(() => [
419
- c[o.prop] ? S(l.$slots, o.prop, {
447
+ u[l.prop] ? C(o.$slots, l.prop, {
420
448
  key: 0,
421
- item: o
422
- }, void 0, !0) : (r(), p($(g(h, { ...o, type: h }, y)), {
449
+ item: l
450
+ }, void 0, !0) : (r(), p(H(g(h, { ...l, type: h }, y)), {
423
451
  key: 1,
424
- modelValue: a.value[o.prop],
425
- "onUpdate:modelValue": (v) => a.value[o.prop] = v,
452
+ modelValue: n.value[l.prop],
453
+ "onUpdate:modelValue": (v) => n.value[l.prop] = v,
426
454
  modelModifiers: { trim: !0 },
427
- style: U({ width: C || e.itemWidth })
455
+ style: U({ width: w || e.itemWidth })
428
456
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style"]))
429
457
  ]),
430
458
  _: 2
431
459
  }, 1032, ["prop", "label-width", "rules", "required"])) : E("", !0),
432
- h == "custom" ? (r(), _(M, { key: 1 }, [
433
- y?.[o.prop] ? (r(), p($(y[o.prop]), { key: 0 })) : S(l.$slots, o.prop, {
460
+ h == "custom" ? (r(), x(D, { key: 1 }, [
461
+ y?.[l.prop] ? (r(), p(H(y[l.prop]), { key: 0 })) : C(o.$slots, l.prop, {
434
462
  key: 1,
435
- item: { width: C, rule: d, ...o }
463
+ item: { width: w, rule: m, ...l }
436
464
  }, void 0, !0)
437
465
  ], 64)) : E("", !0)
438
466
  ], 64))), 256)),
439
- c.append ? (r(), p(f, { key: 0 }, {
467
+ u.append ? (r(), p(f, { key: 0 }, {
440
468
  default: i(() => [
441
- S(l.$slots, "append", {}, void 0, !0)
469
+ C(o.$slots, "append", {}, void 0, !0)
442
470
  ]),
443
471
  _: 3
444
472
  })) : E("", !0)
@@ -447,7 +475,7 @@ const ce = { class: "card-header" }, ie = {
447
475
  }, 16, ["model", "label-width", "inline"]);
448
476
  };
449
477
  }
450
- }), ke = /* @__PURE__ */ W(ve, [["__scopeId", "data-v-ebcd5674"]]), xe = /* @__PURE__ */ D({
478
+ }), xe = /* @__PURE__ */ F(_e, [["__scopeId", "data-v-ebcd5674"]]), Ce = /* @__PURE__ */ M({
451
479
  name: "EasyTable",
452
480
  __name: "index",
453
481
  props: {
@@ -486,72 +514,72 @@ const ce = { class: "card-header" }, ie = {
486
514
  }
487
515
  },
488
516
  setup(e) {
489
- const a = oe(ue), t = e, s = F(() => t.buttonWidth.toString().indexOf("px") > -1 ? t.buttonWidth.toString().slice(0, -2) : t.buttonWidth), u = H(), c = H("auto");
517
+ const n = ae(ce), t = e, s = O(() => t.buttonWidth.toString().indexOf("px") > -1 ? t.buttonWidth.toString().slice(0, -2) : t.buttonWidth), c = Y(), u = Y("auto");
490
518
  let g = K();
491
- const l = () => {
492
- let d = "auto";
519
+ const o = () => {
520
+ let m = "auto";
493
521
  if (g?.parent?.attrs?.class?.indexOf("content-wrap") > -1) {
494
- let o = t.footerHeight;
495
- a?.value?.size === "small" ? o = o - 8 : a?.value?.size === "large" && (o = o + 8);
522
+ let l = t.footerHeight;
523
+ n?.value?.size === "small" ? l = l - 8 : n?.value?.size === "large" && (l = l + 8);
496
524
  try {
497
525
  const b = g?.refs.tableRef, { top: v } = b?.getBoundingClientRect();
498
- d = document.documentElement.clientHeight - v - o - 20;
526
+ m = document.documentElement.clientHeight - v - l - 20;
499
527
  } catch {
500
528
  }
501
- return d;
529
+ return m;
502
530
  }
503
- return d;
504
- }, n = H(), f = () => {
505
- n.value && clearTimeout(n.value), n.value = setTimeout(() => {
506
- c.value = l(), n.value = null;
531
+ return m;
532
+ }, a = Y(), f = () => {
533
+ a.value && clearTimeout(a.value), a.value = setTimeout(() => {
534
+ u.value = o(), a.value = null;
507
535
  }, 100);
508
536
  };
509
- ae(() => {
510
- c.value = l(), window.addEventListener("resize", f);
511
- }), le(() => {
537
+ le(() => {
538
+ u.value = o(), window.addEventListener("resize", f);
539
+ }), re(() => {
512
540
  window.removeEventListener("resize", f);
513
541
  });
514
- const k = m("el-table-column"), x = V(), h = (d) => {
515
- const { slots: C = {}, children: y = [], ...o } = d;
542
+ const k = d("el-table-column"), _ = V(), h = (m) => {
543
+ const { slots: w = {}, children: y = [], ...l } = m;
516
544
  if (y && y.length > 0) {
517
545
  const b = y.map((v) => h(v));
518
546
  return z(
519
547
  k,
520
548
  {
521
549
  align: t.align,
522
- ...o
550
+ ...l
523
551
  },
524
552
  // default 插槽默认使用 childrenNode 不能被slots 覆盖
525
- { ...C, default: () => b }
553
+ { ...w, default: () => b }
526
554
  );
527
555
  }
528
556
  return z(
529
557
  k,
530
558
  {
531
559
  align: t.align,
532
- ...o
560
+ ...l
533
561
  },
534
562
  // 最里层的表格列 default 插槽 slots传递的优先级最高 模版直接传递的可被 slots 覆盖
535
563
  {
536
- default: (b) => x[d.prop] && x[d.prop](b),
537
- ...C
564
+ default: (b) => _[m.prop] && _[m.prop](b),
565
+ ...w
538
566
  }
539
567
  );
540
568
  };
541
- return (d, C) => {
542
- const y = m("el-button"), o = m("el-table-column"), b = m("el-table");
543
- return r(), _("div", {
569
+ return (m, w) => {
570
+ const y = d("el-button"), l = d("el-table-column"), b = d("el-table");
571
+ return r(), x("div", {
544
572
  ref_key: "tableRef",
545
- ref: u
573
+ ref: c
546
574
  }, [
547
- N(b, O({ style: { width: "100%" } }, d.$attrs, {
575
+ N(b, P({ style: { width: "100%" } }, m.$attrs, {
548
576
  data: e.data,
549
577
  height: e.height,
550
- maxHeight: e.maxHeight ? e.maxHeight : c.value
578
+ maxHeight: e.maxHeight ? e.maxHeight : u.value
551
579
  }), {
552
580
  default: i(() => [
553
- (r(!0), _(M, null, P(e.tableColumns, (v, w) => (r(), p($(h(v)), { key: w }))), 128)),
554
- e.buttons && e.buttons.length ? (r(), p(o, {
581
+ (r(!0), x(D, null, W(e.tableColumns, (v, S) => (r(), p(H(h(v)), { key: S }))), 128)),
582
+ e.buttons && e.buttons.length ? (r(), p(l, {
555
583
  key: 0,
556
584
  align: "center",
557
585
  fixed: "right",
@@ -559,21 +587,21 @@ const ce = { class: "card-header" }, ie = {
559
587
  width: s.value
560
588
  }, {
561
589
  default: i((v) => [
562
- (r(!0), _(M, null, P(e.buttons, (w, Q) => G((r(), p(y, O({ ref_for: !0 }, { ...w }, {
590
+ (r(!0), x(D, null, W(e.buttons, (S, Q) => G((r(), p(y, P({ ref_for: !0 }, { ...S }, {
563
591
  key: Q,
564
- type: w.type.includes("del") ? "danger" : "primary",
592
+ type: S.type.includes("del") ? "danger" : "primary",
565
593
  onClick: () => {
566
- w.click?.(v.row);
594
+ S.click?.(v.row);
567
595
  },
568
- disabled: w.disabled?.(v.row) || !1,
569
- link: w.link?.(v.row) || !0
596
+ disabled: S.disabled?.(v.row) || !1,
597
+ link: S.link?.(v.row) || !0
570
598
  }), {
571
599
  default: i(() => [
572
- j(Y(w.label), 1)
600
+ j($(S.label), 1)
573
601
  ]),
574
602
  _: 2
575
603
  }, 1040, ["type", "onClick", "disabled", "link"])), [
576
- [J, w.show?.(v.row) || !0]
604
+ [J, S.show?.(v.row) || !0]
577
605
  ])), 128))
578
606
  ]),
579
607
  _: 1
@@ -584,7 +612,7 @@ const ce = { class: "card-header" }, ie = {
584
612
  ], 512);
585
613
  };
586
614
  }
587
- }), _e = /* @__PURE__ */ W(xe, [["__scopeId", "data-v-1c87357b"]]), Ce = {
615
+ }), we = /* @__PURE__ */ F(Ce, [["__scopeId", "data-v-1c87357b"]]), Se = {
588
616
  name: "",
589
617
  components: {},
590
618
  props: {
@@ -594,13 +622,13 @@ const ce = { class: "card-header" }, ie = {
594
622
  }
595
623
  }
596
624
  };
597
- function we(e, a, t, s, u, c) {
598
- return t.icon ? (r(), p($(t.icon), {
625
+ function Me(e, n, t, s, c, u) {
626
+ return t.icon ? (r(), p(H(t.icon), {
599
627
  key: 0,
600
628
  class: "menu_icon"
601
629
  })) : E("", !0);
602
630
  }
603
- const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"]]), Se = /* @__PURE__ */ D({
631
+ const R = /* @__PURE__ */ F(Se, [["render", Me], ["__scopeId", "data-v-261ce99a"]]), Ye = /* @__PURE__ */ M({
604
632
  name: "subMenu",
605
633
  __name: "subMenu",
606
634
  props: {
@@ -610,43 +638,43 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
610
638
  }
611
639
  },
612
640
  emits: ["handleMenuItemClick"],
613
- setup(e, { emit: a }) {
614
- const t = a;
615
- function s(u) {
616
- t("handleMenuItemClick", u);
641
+ setup(e, { emit: n }) {
642
+ const t = n;
643
+ function s(c) {
644
+ t("handleMenuItemClick", c);
617
645
  }
618
- return (u, c) => {
619
- const g = m("subMenu", !0), l = m("el-sub-menu"), n = m("el-menu-item");
620
- return e.routeData.children && e.routeData.children.length > 0 ? (r(), p(l, {
646
+ return (c, u) => {
647
+ const g = d("subMenu", !0), o = d("el-sub-menu"), a = d("el-menu-item");
648
+ return e.routeData.children && e.routeData.children.length > 0 ? (r(), p(o, {
621
649
  key: 0,
622
650
  index: e.routeData.path
623
651
  }, {
624
652
  title: i(() => [
625
- N(B, {
653
+ N(R, {
626
654
  icon: e.routeData.meta.icon
627
655
  }, null, 8, ["icon"]),
628
- I("span", null, Y(e.routeData.meta.title), 1)
656
+ I("span", null, $(e.routeData.meta.title), 1)
629
657
  ]),
630
658
  default: i(() => [
631
- (r(!0), _(M, null, P(e.routeData.children, (f, k) => (r(), p(g, {
659
+ (r(!0), x(D, null, W(e.routeData.children, (f, k) => (r(), p(g, {
632
660
  onHandleMenuItemClick: s,
633
661
  routeData: f,
634
662
  key: k
635
663
  }, null, 8, ["routeData"]))), 128))
636
664
  ]),
637
665
  _: 1
638
- }, 8, ["index"])) : (r(), _("div", {
666
+ }, 8, ["index"])) : (r(), x("div", {
639
667
  key: 1,
640
- onClick: c[0] || (c[0] = (f) => s(e.routeData))
668
+ onClick: u[0] || (u[0] = (f) => s(e.routeData))
641
669
  }, [
642
- N(n, {
670
+ N(a, {
643
671
  index: e.routeData.path
644
672
  }, {
645
673
  title: i(() => [
646
- I("span", null, Y(e.routeData.meta.title), 1)
674
+ I("span", null, $(e.routeData.meta.title), 1)
647
675
  ]),
648
676
  default: i(() => [
649
- N(B, {
677
+ N(R, {
650
678
  icon: e.routeData.meta.icon
651
679
  }, null, 8, ["icon"])
652
680
  ]),
@@ -655,7 +683,7 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
655
683
  ]));
656
684
  };
657
685
  }
658
- }), Me = /* @__PURE__ */ D({
686
+ }), De = /* @__PURE__ */ M({
659
687
  name: "MenuTree",
660
688
  __name: "index",
661
689
  props: {
@@ -665,16 +693,16 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
665
693
  }
666
694
  },
667
695
  emits: ["handleMenuItemClick"],
668
- setup(e, { emit: a }) {
669
- const t = a, s = (u) => {
670
- t("handleMenuItemClick", u);
696
+ setup(e, { emit: n }) {
697
+ const t = n, s = (c) => {
698
+ t("handleMenuItemClick", c);
671
699
  };
672
- return (u, c) => {
673
- const g = m("el-menu");
674
- return r(), p(g, re(se(u.$attrs)), {
700
+ return (c, u) => {
701
+ const g = d("el-menu");
702
+ return r(), p(g, se(ue(c.$attrs)), {
675
703
  default: i(() => [
676
- (r(!0), _(M, null, P(e.menuList, (l) => (r(), p(Se, {
677
- routeData: l,
704
+ (r(!0), x(D, null, W(e.menuList, (o) => (r(), p(Ye, {
705
+ routeData: o,
678
706
  onHandleMenuItemClick: s
679
707
  }, null, 8, ["routeData"]))), 256))
680
708
  ]),
@@ -682,7 +710,7 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
682
710
  }, 16);
683
711
  };
684
712
  }
685
- }), Ye = /* @__PURE__ */ D({
713
+ }), $e = /* @__PURE__ */ M({
686
714
  name: "Pagination",
687
715
  __name: "index",
688
716
  props: {
@@ -710,33 +738,33 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
710
738
  onPagination: { type: Function }
711
739
  },
712
740
  emits: ["update:page", "update:limit", "pagination"],
713
- setup(e, { emit: a }) {
714
- const t = e, s = a, u = F({
741
+ setup(e, { emit: n }) {
742
+ const t = e, s = n, c = O({
715
743
  get() {
716
744
  return t.page;
717
745
  },
718
- set(n) {
719
- s("update:page", n);
746
+ set(a) {
747
+ s("update:page", a);
720
748
  }
721
- }), c = F({
749
+ }), u = O({
722
750
  get() {
723
751
  return t.limit;
724
752
  },
725
- set(n) {
726
- s("update:limit", n);
753
+ set(a) {
754
+ s("update:limit", a);
727
755
  }
728
- }), g = (n) => {
729
- u.value * n > t.total && (u.value = 1), s("pagination", { page: u.value, limit: n });
730
- }, l = (n) => {
731
- s("pagination", { page: n, limit: c.value });
756
+ }), g = (a) => {
757
+ c.value * a > t.total && (c.value = 1), s("pagination", { page: c.value, limit: a });
758
+ }, o = (a) => {
759
+ s("pagination", { page: a, limit: u.value });
732
760
  };
733
- return (n, f) => {
734
- const k = m("el-pagination");
761
+ return (a, f) => {
762
+ const k = d("el-pagination");
735
763
  return G((r(), p(k, {
736
- "current-page": u.value,
737
- "onUpdate:currentPage": f[0] || (f[0] = (x) => u.value = x),
738
- "page-size": c.value,
739
- "onUpdate:pageSize": f[1] || (f[1] = (x) => c.value = x),
764
+ "current-page": c.value,
765
+ "onUpdate:currentPage": f[0] || (f[0] = (_) => c.value = _),
766
+ "page-size": u.value,
767
+ "onUpdate:pageSize": f[1] || (f[1] = (_) => u.value = _),
740
768
  background: !0,
741
769
  "page-sizes": [10, 20, 30, 50, 100],
742
770
  "pager-count": e.pagerCount,
@@ -744,34 +772,36 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
744
772
  class: "pagination",
745
773
  layout: "total, sizes, prev, pager, next, jumper",
746
774
  onSizeChange: g,
747
- onCurrentChange: l
775
+ onCurrentChange: o
748
776
  }, null, 8, ["current-page", "page-size", "pager-count", "total"])), [
749
777
  [J, e.total > 0]
750
778
  ]);
751
779
  };
752
780
  }
753
- }), De = /* @__PURE__ */ W(Ye, [["__scopeId", "data-v-1e34e383"]]), $e = [
754
- me,
781
+ }), He = /* @__PURE__ */ F($e, [["__scopeId", "data-v-1e34e383"]]), Ee = [
782
+ ie,
755
783
  fe,
756
- ke,
784
+ he,
785
+ xe,
757
786
  // EasyFormH,
758
- _e,
759
- Me,
760
- De
761
- ], q = [], He = (e, a) => {
762
- $e.forEach((t) => {
787
+ we,
788
+ De,
789
+ He
790
+ ], q = [], Ne = (e, n) => {
791
+ Ee.forEach((t) => {
763
792
  q.push(t.name), e.component(t.name, t);
764
793
  }), console.log("mwl-components", q);
765
- }, Ie = { install: He };
794
+ }, Pe = { install: Ne };
766
795
  export {
767
- me as ContentWarp,
768
- fe as Dialog,
769
- ke as EasyForm,
770
- _e as EasyTable,
771
- Me as MenuTree,
772
- De as Pagination,
773
- be as componentsMap,
774
- Ie as default,
775
- he as getPlaceholder,
776
- He as install
796
+ fe as ContentWarp,
797
+ he as Dialog,
798
+ ie as EasyButton,
799
+ xe as EasyForm,
800
+ we as EasyTable,
801
+ De as MenuTree,
802
+ He as Pagination,
803
+ ke as componentsMap,
804
+ Pe as default,
805
+ be as getPlaceholder,
806
+ Ne as install
777
807
  };