view-ui-plus-derive 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,26 +1,25 @@
1
- import { defineComponent as Y, shallowRef as ye, computed as N, onMounted as ce, watch as z, resolveComponent as x, createElementBlock as P, openBlock as V, withDirectives as ue, createVNode as $, withCtx as B, createTextVNode as j, toDisplayString as I, unref as F, vShow as re, Fragment as W, renderList as ee, createBlock as E, renderSlot as R, ref as H, mergeProps as U, useSlots as Fe, createCommentVNode as J, createElementVNode as te, normalizeClass as ie, nextTick as G, shallowReactive as De, useTemplateRef as be, normalizeProps as ke, guardReactiveProps as Ce, createSlots as Ve, getCurrentInstance as pe, onBeforeUnmount as $e, mergeModels as Be, useAttrs as ze, useModel as je, reactive as Pe } from "vue";
2
- import { getPathValue as ge, setPathValue as Ne, deepMerge as He, makeObjectByPath as Le } from "utils-where";
3
- import Ee from "./locale/zh-CN.js";
1
+ import { defineComponent as U, shallowRef as ye, computed as N, onMounted as ce, watch as F, resolveComponent as x, createElementBlock as P, openBlock as V, withDirectives as ue, createVNode as $, withCtx as C, createTextVNode as j, toDisplayString as z, unref as M, vShow as re, Fragment as X, renderList as ee, createBlock as E, renderSlot as I, ref as H, mergeProps as _, useSlots as Fe, createCommentVNode as G, createElementVNode as te, normalizeClass as ie, nextTick as Q, shallowReactive as De, useTemplateRef as be, normalizeProps as ke, guardReactiveProps as Ce, createSlots as Ve, getCurrentInstance as pe, onBeforeUnmount as $e, mergeModels as Se, useAttrs as ze, useModel as je, reactive as Pe } from "vue";
2
+ import { getPathValue as ge, setPathValue as Ne, deepMerge as He, makeObjectByPath as Le, omitOwnKeys as Ee } from "utils-where";
3
+ import Ke from "./locale/zh-CN.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  import { i as Oe } from "./directives/v-iview-select.js";
7
7
  /* empty css */
8
- import Ke from "dayjs/plugin/isBetween";
9
8
  /* empty css */
10
- import { Checkbox as Se } from "view-ui-plus";
9
+ import { Checkbox as Be } from "view-ui-plus";
11
10
  /* empty css */
12
11
  /* empty css */
13
12
  const A = {
14
13
  i18n: null,
15
14
  prefix: "d",
16
- msg: Ee,
17
- t(e, ...y) {
18
- return A.i18n?.global.t(A.prefix + "." + e, ...y) ?? ge(A.msg, A.prefix + "." + e) ?? e;
15
+ msg: Ke,
16
+ t(e, ...S) {
17
+ return A.i18n?.global.t(A.prefix + "." + e, ...S) ?? ge(A.msg, A.prefix + "." + e) ?? e;
19
18
  }
20
- }, Ue = {
19
+ }, _e = {
21
20
  name: "AllCheckbox"
22
- }, Ye = /* @__PURE__ */ Y({
23
- ...Ue,
21
+ }, Ue = /* @__PURE__ */ U({
22
+ ..._e,
24
23
  props: {
25
24
  modelValue: Array,
26
25
  /**
@@ -70,13 +69,13 @@ const A = {
70
69
  all: Boolean
71
70
  },
72
71
  emits: ["update:modelValue", "update:all", "change"],
73
- setup(e, { emit: y }) {
74
- const t = e, l = y, a = ye(t.modelValue || []), n = N({
72
+ setup(e, { emit: S }) {
73
+ const t = e, l = S, a = ye(t.modelValue || []), n = N({
75
74
  get() {
76
75
  return a.value.length === t.list.length;
77
76
  },
78
- set(u) {
79
- a.value = u ? t.list.map((v) => v[t.keyMap.value]) : [];
77
+ set(d) {
78
+ a.value = d ? t.list.map((v) => v[t.keyMap.value]) : [];
80
79
  }
81
80
  }), i = N(
82
81
  () => a.value.length > 0 && a.value.length < t.list.length
@@ -86,22 +85,22 @@ const A = {
86
85
  }
87
86
  return ce(() => {
88
87
  l("update:all", n.value);
89
- }), z(
88
+ }), F(
90
89
  () => t.modelValue,
91
- (u) => {
92
- a.value !== u && (a.value = u || [], l("update:all", n.value));
90
+ (d) => {
91
+ a.value !== d && (a.value = d || [], l("update:all", n.value));
93
92
  }
94
- ), (u, v) => {
95
- const r = x("Checkbox"), f = x("CheckboxGroup");
93
+ ), (d, v) => {
94
+ const c = x("Checkbox"), f = x("CheckboxGroup");
96
95
  return V(), P("div", null, [
97
- ue($(r, {
96
+ ue($(c, {
98
97
  modelValue: n.value,
99
98
  "onUpdate:modelValue": v[0] || (v[0] = (b) => n.value = b),
100
99
  indeterminate: i.value,
101
100
  onOnChange: m
102
101
  }, {
103
- default: B(() => [
104
- j(I(e.title ?? F(A).t("allCheckbox.title")), 1)
102
+ default: C(() => [
103
+ j(z(e.title ?? M(A).t("allCheckbox.title")), 1)
105
104
  ]),
106
105
  _: 1
107
106
  }, 8, ["modelValue", "indeterminate"]), [
@@ -113,14 +112,14 @@ const A = {
113
112
  class: "ivu-inline-block",
114
113
  onOnChange: m
115
114
  }, {
116
- default: B(() => [
117
- (V(!0), P(W, null, ee(e.list, (b) => (V(), E(r, {
115
+ default: C(() => [
116
+ (V(!0), P(X, null, ee(e.list, (b) => (V(), E(c, {
118
117
  key: b[e.keyMap.value],
119
118
  label: b[e.keyMap.value]
120
119
  }, {
121
- default: B(() => [
122
- R(u.$slots, "default", { item: b }, () => [
123
- j(I(b[e.keyMap.label]), 1)
120
+ default: C(() => [
121
+ I(d.$slots, "default", { item: b }, () => [
122
+ j(z(b[e.keyMap.label]), 1)
124
123
  ])
125
124
  ]),
126
125
  _: 2
@@ -131,10 +130,10 @@ const A = {
131
130
  ]);
132
131
  };
133
132
  }
134
- }), _e = {
133
+ }), Ye = {
135
134
  name: "BaseSwitch"
136
- }, Ge = /* @__PURE__ */ Y({
137
- ..._e,
135
+ }, Ge = /* @__PURE__ */ U({
136
+ ...Ye,
138
137
  props: {
139
138
  modelValue: [String, Number, Boolean],
140
139
  /**
@@ -161,18 +160,18 @@ const A = {
161
160
  falseLabel: String
162
161
  },
163
162
  emits: ["update:modelValue", "change"],
164
- setup(e, { emit: y }) {
165
- const t = e, l = y, a = H(t.modelValue), n = (i) => {
163
+ setup(e, { emit: S }) {
164
+ const t = e, l = S, a = H(t.modelValue), n = (i) => {
166
165
  l("update:modelValue", i), l("change", i);
167
166
  };
168
- return z(
167
+ return F(
169
168
  () => t.modelValue,
170
169
  (i) => {
171
170
  a.value !== i && (a.value = i);
172
171
  }
173
172
  ), (i, m) => {
174
- const u = x("Switch");
175
- return V(), E(u, U({
173
+ const d = x("Switch");
174
+ return V(), E(d, _({
176
175
  modelValue: a.value,
177
176
  "onUpdate:modelValue": m[0] || (m[0] = (v) => a.value = v),
178
177
  onOnChange: n
@@ -180,14 +179,14 @@ const A = {
180
179
  trueValue: e.trueValue,
181
180
  falseValue: e.falseValue
182
181
  }), {
183
- open: B(() => [
184
- R(i.$slots, "open", {}, () => [
185
- j(I(e.trueLabel), 1)
182
+ open: C(() => [
183
+ I(i.$slots, "open", {}, () => [
184
+ j(z(e.trueLabel), 1)
186
185
  ])
187
186
  ]),
188
- close: B(() => [
189
- R(i.$slots, "close", {}, () => [
190
- j(I(e.falseLabel), 1)
187
+ close: C(() => [
188
+ I(i.$slots, "close", {}, () => [
189
+ j(z(e.falseLabel), 1)
191
190
  ])
192
191
  ]),
193
192
  _: 3
@@ -202,7 +201,7 @@ const A = {
202
201
  class: "ivu-input-group-append"
203
202
  }, Qe = {
204
203
  name: "Combi"
205
- }, Xe = /* @__PURE__ */ Y({
204
+ }, Xe = /* @__PURE__ */ U({
206
205
  ...Qe,
207
206
  props: {
208
207
  /**
@@ -215,28 +214,28 @@ const A = {
215
214
  append: String
216
215
  },
217
216
  setup(e) {
218
- const y = Fe(), t = e, l = N(() => !!t.prepend || !!y.prepend?.().length), a = N(() => !!t.append || !!y.append?.().length);
217
+ const S = Fe(), t = e, l = N(() => !!t.prepend || !!S.prepend?.().length), a = N(() => !!t.append || !!S.append?.().length);
219
218
  return (n, i) => (V(), P("div", Je, [
220
219
  l.value ? (V(), P("div", We, [
221
- R(n.$slots, "prepend", {}, () => [
222
- j(I(e.prepend), 1)
220
+ I(n.$slots, "prepend", {}, () => [
221
+ j(z(e.prepend), 1)
223
222
  ])
224
- ])) : J("", !0),
223
+ ])) : G("", !0),
225
224
  te("div", {
226
225
  class: ie(["combi-cell", { "with-append": a.value, "with-prepend": l.value }])
227
226
  }, [
228
- R(n.$slots, "default")
227
+ I(n.$slots, "default")
229
228
  ], 2),
230
229
  a.value ? (V(), P("div", qe, [
231
- R(n.$slots, "append", {}, () => [
232
- j(I(e.append), 1)
230
+ I(n.$slots, "append", {}, () => [
231
+ j(z(e.append), 1)
233
232
  ])
234
- ])) : J("", !0)
233
+ ])) : G("", !0)
235
234
  ]));
236
235
  }
237
236
  }), Ze = { class: "count-range" }, et = {
238
237
  name: "CountRange"
239
- }, tt = /* @__PURE__ */ Y({
238
+ }, tt = /* @__PURE__ */ U({
240
239
  ...et,
241
240
  props: {
242
241
  /**
@@ -327,8 +326,8 @@ const A = {
327
326
  hideJoiner: Boolean
328
327
  },
329
328
  emits: ["update:begin", "update:end", "change-min", "change-max", "change"],
330
- setup(e, { emit: y }) {
331
- const t = e, l = y, a = H(t.begin), n = H(t.end), i = N(() => ({
329
+ setup(e, { emit: S }) {
330
+ const t = e, l = S, a = H(t.begin), n = H(t.end), i = N(() => ({
332
331
  min: t.min,
333
332
  max: t.max,
334
333
  placeholder: t.minHolder ?? A.t("countRange.minHolder"),
@@ -358,40 +357,40 @@ const A = {
358
357
  parser: t.parser,
359
358
  activeChange: a.value ? !1 : t.activeChange,
360
359
  ...t.maxAttr
361
- })), u = () => {
360
+ })), d = () => {
362
361
  l("update:begin", a.value), l("update:end", n.value);
363
- }, v = (s) => {
364
- n.value != null && s > n.value && (n.value = s + 1 > m.value.max ? m.value.max : s + 1), u(), l("change-min", s), l("change", s, n.value, !1);
365
- }, r = (s) => {
366
- u(), l("change-max", s), l("change", a.value, s, !0);
367
- }, f = (s) => {
368
- a.value !== s && (a.value = s !== void 0 ? s : null);
369
- }, b = (s) => {
370
- n.value !== s && (n.value = s !== void 0 ? s : null);
362
+ }, v = (u) => {
363
+ n.value != null && u > n.value && (n.value = u + 1 > m.value.max ? m.value.max : u + 1), d(), l("change-min", u), l("change", u, n.value, !1);
364
+ }, c = (u) => {
365
+ d(), l("change-max", u), l("change", a.value, u, !0);
366
+ }, f = (u) => {
367
+ a.value !== u && (a.value = u !== void 0 ? u : null);
368
+ }, b = (u) => {
369
+ n.value !== u && (n.value = u !== void 0 ? u : null);
371
370
  };
372
- return z(() => t.begin, f), z(() => t.end, b), (s, M) => {
373
- const k = x("InputNumber");
371
+ return F(() => t.begin, f), F(() => t.end, b), (u, R) => {
372
+ const y = x("InputNumber");
374
373
  return V(), P("div", Ze, [
375
- $(k, U({
374
+ $(y, _({
376
375
  modelValue: a.value,
377
- "onUpdate:modelValue": M[0] || (M[0] = (O) => a.value = O)
376
+ "onUpdate:modelValue": R[0] || (R[0] = (O) => a.value = O)
378
377
  }, i.value, { onOnChange: v }), null, 16, ["modelValue"]),
379
378
  ue(te("span", {
380
379
  class: ie(["count-range-joiner", e.joinerClass])
381
380
  }, null, 2), [
382
381
  [re, !e.hideJoiner]
383
382
  ]),
384
- $(k, U({
383
+ $(y, _({
385
384
  modelValue: n.value,
386
- "onUpdate:modelValue": M[1] || (M[1] = (O) => n.value = O)
387
- }, m.value, { onOnChange: r }), null, 16, ["modelValue"])
385
+ "onUpdate:modelValue": R[1] || (R[1] = (O) => n.value = O)
386
+ }, m.value, { onOnChange: c }), null, 16, ["modelValue"])
388
387
  ]);
389
388
  };
390
389
  }
391
390
  }), at = { key: 1 }, lt = {
392
391
  name: "RemoteSelect",
393
392
  inheritAttrs: !1
394
- }, xe = /* @__PURE__ */ Y({
393
+ }, xe = /* @__PURE__ */ U({
395
394
  ...lt,
396
395
  props: {
397
396
  modelValue: [String, Array, Number],
@@ -442,8 +441,7 @@ const A = {
442
441
  * 点开再请求时,该函数返回true表示可发送请求
443
442
  */
444
443
  check: {
445
- type: Function,
446
- default: () => !0
444
+ type: Function
447
445
  },
448
446
  textMode: Boolean,
449
447
  textFormat: Function,
@@ -461,11 +459,11 @@ const A = {
461
459
  type: Function,
462
460
  default({
463
461
  multiple: e,
464
- keyMap: y,
462
+ keyMap: S,
465
463
  list: t,
466
464
  value: l
467
465
  }) {
468
- return e ? t.filter((a) => l.includes(a[y.value])) : t.find((a) => a[y.value] === l) || {};
466
+ return e ? t.filter((a) => l.includes(a[S.value])) : t.find((a) => a[S.value] === l) || {};
469
467
  }
470
468
  },
471
469
  /**
@@ -483,115 +481,109 @@ const A = {
483
481
  }
484
482
  },
485
483
  emits: ["update:modelValue", "update:chosen", "update:list", "update:refresh", "load"],
486
- setup(e, { expose: y, emit: t }) {
487
- const l = e, a = t, n = H(l.modelValue || ""), i = H([]), m = H(!1), u = H({}), v = N(
488
- () => u.value && Object.keys(u.value).length > 0 ? typeof l.textFormat != "function" ? l.multiple ? u.value.map(
489
- (c) => `${c[l.keyMap.label]}${c[l.keyMap.value] ? "(" + c[l.keyMap.value] + ")" : ""}`
490
- ).join(",") : `${u.value[l.keyMap.label]}${u.value[l.keyMap.value] ? "(" + u.value[l.keyMap.value] + ")" : ""}` : l.textFormat(u.value) : ""
491
- ), r = H(!1);
492
- let f, b, s, M;
493
- async function k() {
494
- let c;
484
+ setup(e, { expose: S, emit: t }) {
485
+ const l = e, a = t, n = H(l.modelValue ?? ""), i = H([]), m = H(!1), d = H({}), v = N(
486
+ () => d.value && Object.keys(d.value).length > 0 ? typeof l.textFormat != "function" ? l.multiple ? d.value.map((r) => r[l.keyMap.label]).join(",") : d.value[l.keyMap.label] : l.textFormat(d.value) : ""
487
+ ), c = H(!1);
488
+ let f, b, u, R;
489
+ async function y() {
490
+ let r;
495
491
  if (typeof l.loader != "function") {
496
492
  if (typeof l.method != "function") {
497
493
  console.warn("typeof method isn't function");
498
494
  return;
499
495
  }
500
- if (m.value = !0, c = await l.method(typeof l.param != "function" ? l.param : l.param()), m.value = !1, c && typeof l.process == "function") {
501
- const S = l.process(c);
502
- S != null && (c = S);
496
+ if (m.value = !0, r = await l.method(typeof l.param != "function" ? l.param : l.param()), m.value = !1, r && typeof l.process == "function") {
497
+ const B = l.process(r);
498
+ B != null && (r = B);
503
499
  }
504
500
  } else
505
- m.value = !0, c = await l.loader(), m.value = !1;
506
- c && (r.value = !0, i.value = c, a("update:list", c), C() && O(n.value), f = !0, G(() => {
501
+ m.value = !0, r = await l.loader(), m.value = !1;
502
+ r && (c.value = !0, i.value = r, a("update:list", r), k() && O(n.value), f = !0, Q(() => {
507
503
  f = null;
508
- }), a("load", c));
504
+ }), a("load", r));
509
505
  }
510
- function O(c) {
511
- b = !0, G(() => {
506
+ function O(r) {
507
+ b = !0, Q(() => {
512
508
  b = null;
513
- }), s && (l.multiple ? !c.toString().length : c === void 0) && (n.value = c = s), u.value = l.getSelected({
509
+ }), u && (l.multiple ? !r.toString().length : r === void 0) && (n.value = r = u), d.value = l.getSelected({
514
510
  multiple: l.multiple,
515
511
  keyMap: l.keyMap,
516
512
  list: i.value,
517
513
  value: n.value
518
- }), a("update:modelValue", c || ""), a("update:chosen", u.value);
514
+ }), a("update:modelValue", r ?? ""), a("update:chosen", d.value);
519
515
  }
520
- function d(c) {
521
- c && !l.autoGet && !m.value && !r.value && l.check() && (!l.strict || l.parentCode) && k();
516
+ function s(r) {
517
+ r && !l.autoGet && !m.value && !c.value && (!l.check || l.check()) && (!l.strict || l.parentCode) && y();
522
518
  }
523
- function C() {
519
+ function k() {
524
520
  return n.value != null && n.value.toString().length > 0;
525
521
  }
526
- return a("update:refresh", k), ce(() => {
527
- l.autoGet ? k() : C() && !i.value.length && d(!0);
528
- }), y({
522
+ return a("update:refresh", y), ce(() => {
523
+ l.autoGet ? y() : k() && !i.value.length && s(!0);
524
+ }), S({
529
525
  code: n,
530
526
  changeCode: O,
531
- loaded: r,
527
+ loaded: c,
532
528
  codes: i,
533
- search: k
534
- }), z(
529
+ search: y
530
+ }), F(
535
531
  () => l.list,
536
- (c) => {
537
- f || (c && c.length ? (i.value = c, r.value = !!l.cache) : (i.value = [], r.value = !1));
532
+ (r) => {
533
+ f || (r && r.length ? (i.value = r, c.value = !!l.cache) : (i.value = [], c.value = !1));
538
534
  },
539
535
  { immediate: !0 }
540
- ), z(
536
+ ), F(
541
537
  () => l.modelValue,
542
- (c) => {
543
- if (!b && (M = !0, G(() => {
544
- M = null;
545
- }), n.value = c || "", C())) {
546
- if (O(n.value), l.refresh === k) return;
547
- for (const S in u.value)
538
+ (r) => {
539
+ if (!b && (R = !0, Q(() => {
540
+ R = null;
541
+ }), n.value = r ?? "", O(n.value), l.refresh !== y)) {
542
+ for (const B in d.value)
548
543
  return;
549
- d(!0);
544
+ s(k());
550
545
  }
551
546
  }
552
- ), z(
547
+ ), F(
553
548
  () => l.parentCode,
554
- (c) => {
555
- M ? (s = l.modelValue, setTimeout(() => {
556
- s = null;
557
- })) : n.value = l.multiple ? [] : "", i.value = [], r.value = !1, a("update:list", i.value), C() && c && /* !this.opening && */
558
- d(!0);
549
+ (r) => {
550
+ R ? (u = l.modelValue, setTimeout(() => {
551
+ u = null;
552
+ })) : n.value = l.multiple ? [] : "", i.value = [], c.value = !1, a("update:list", i.value), k() && r && /* !this.opening && */
553
+ s(!0);
559
554
  }
560
- ), (c, S) => {
555
+ ), (r, B) => {
561
556
  const p = x("Option"), o = x("Select");
562
557
  return e.textMode ? (V(), P("span", at, [
563
- R(c.$slots, "text", { text: v.value }, () => [
564
- j(I(v.value), 1)
558
+ I(r.$slots, "text", { text: v.value }, () => [
559
+ j(z(v.value), 1)
565
560
  ])
566
- ])) : ue((V(), E(o, U({
561
+ ])) : ue((V(), E(o, _({
567
562
  key: 0,
568
563
  modelValue: n.value,
569
- "onUpdate:modelValue": S[0] || (S[0] = (D) => n.value = D),
570
- onOnOpenChange: d,
564
+ "onUpdate:modelValue": B[0] || (B[0] = (D) => n.value = D),
565
+ onOnOpenChange: s,
571
566
  onOnChange: O
572
- }, c.$attrs, {
567
+ }, r.$attrs, {
573
568
  multiple: e.multiple,
574
569
  loading: m.value,
575
570
  "not-found-text": m.value ? null : void 0
576
571
  }), {
577
- default: B(() => [
578
- R(c.$slots, "dropdown", { list: i.value }, () => [
579
- (V(!0), P(W, null, ee(i.value, (D, L) => (V(), E(p, {
572
+ default: C(() => [
573
+ I(r.$slots, "dropdown", { list: i.value }, () => [
574
+ (V(!0), P(X, null, ee(i.value, (D, L) => (V(), E(p, {
580
575
  key: l.valueAsKey ? D[e.keyMap.value] : L,
581
576
  value: D[e.keyMap.value],
582
577
  label: e.formatLabel && e.formatLabel(D, L),
583
578
  disabled: e.optionDisabled && e.optionDisabled(D, L),
584
579
  tag: e.optionTag && e.optionTag(D, L)
585
580
  }, {
586
- default: B(() => [
587
- R(c.$slots, "default", {
581
+ default: C(() => [
582
+ I(r.$slots, "default", {
588
583
  item: D,
589
584
  index: L
590
585
  }, () => [
591
- j(I(D[e.keyMap.label]), 1),
592
- D[e.keyMap.value] ? (V(), P(W, { key: 0 }, [
593
- j("(" + I(D[e.keyMap.value]) + ")", 1)
594
- ], 64)) : J("", !0)
586
+ j(z(D[e.keyMap.label]), 1)
595
587
  ])
596
588
  ]),
597
589
  _: 2
@@ -600,7 +592,7 @@ const A = {
600
592
  ]),
601
593
  _: 3
602
594
  }, 16, ["modelValue", "multiple", "loading", "not-found-text"])), [
603
- [F(Oe), e.all, "all"]
595
+ [M(Oe), e.all, "all"]
604
596
  ]);
605
597
  };
606
598
  }
@@ -613,7 +605,7 @@ const A = {
613
605
  }, ve = {}, nt = {
614
606
  name: "CacheSelect",
615
607
  inheritAttrs: !1
616
- }, ot = /* @__PURE__ */ Y({
608
+ }, ot = /* @__PURE__ */ U({
617
609
  ...nt,
618
610
  props: {
619
611
  modelValue: [String, Array, Number],
@@ -626,25 +618,25 @@ const A = {
626
618
  }
627
619
  },
628
620
  emits: ["update:modelValue", "update:chosen", "update:list", "load", "change"],
629
- setup(e, { emit: y }) {
630
- const t = e, l = y, a = H(""), n = be("sel"), i = (v) => {
621
+ setup(e, { emit: S }) {
622
+ const t = e, l = S, a = H(""), n = be("sel"), i = (v) => {
631
623
  l("update:modelValue", v), l("change", v);
632
624
  }, m = (v) => {
633
- G(() => {
634
- ne[t.cacheId] && (ne[t.cacheId].forEach((r) => {
635
- r.changeCode(r.code);
636
- }), ne[t.cacheId] = []), oe[t.cacheId] && (oe[t.cacheId].forEach((r) => {
637
- r !== n.value && r.$emit("update:list", r.codes);
625
+ Q(() => {
626
+ ne[t.cacheId] && (ne[t.cacheId].forEach((c) => {
627
+ c.changeCode(c.code);
628
+ }), ne[t.cacheId] = []), oe[t.cacheId] && (oe[t.cacheId].forEach((c) => {
629
+ c !== n.value && c.$emit("update:list", c.codes);
638
630
  }), oe[t.cacheId] = []);
639
631
  }), l("load", v);
640
- }, u = () => a.value != null && a.value.toString().length > 0;
641
- return z(
632
+ }, d = () => a.value != null && a.value.toString().length > 0;
633
+ return F(
642
634
  () => t.modelValue,
643
635
  (v) => {
644
- a.value !== v && (a.value = v || "");
636
+ a.value !== v && (a.value = v ?? "");
645
637
  }
646
638
  ), le[t.cacheId] || (le[t.cacheId] = [], he[t.cacheId] = null), ce(() => {
647
- le[t.cacheId].length && (n.value.loaded = !0), t.modelValue && (a.value = t.modelValue), he[t.cacheId] ? (u() && (ne[t.cacheId] || (ne[t.cacheId] = []), ne[t.cacheId].push(n.value)), n.value.loaded = ve[t.cacheId]) : he[t.cacheId] = !0, oe[t.cacheId] || (oe[t.cacheId] = []), oe[t.cacheId].push(n.value), ve[t.cacheId] || (ve[t.cacheId] = u()), z(
639
+ le[t.cacheId].length && (n.value.loaded = !0), t.modelValue && (a.value = t.modelValue), he[t.cacheId] ? (d() && (ne[t.cacheId] || (ne[t.cacheId] = []), ne[t.cacheId].push(n.value)), n.value.loaded = ve[t.cacheId]) : he[t.cacheId] = !0, oe[t.cacheId] || (oe[t.cacheId] = []), oe[t.cacheId].push(n.value), ve[t.cacheId] || (ve[t.cacheId] = d()), F(
648
640
  () => le[t.cacheId],
649
641
  (v) => {
650
642
  v.length && (n.value.loaded = !0);
@@ -653,37 +645,37 @@ const A = {
653
645
  immediate: !0
654
646
  }
655
647
  );
656
- }), (v, r) => (V(), E(xe, U({
648
+ }), (v, c) => (V(), E(xe, _({
657
649
  ref: "sel",
658
650
  modelValue: a.value,
659
- "onUpdate:modelValue": r[0] || (r[0] = (f) => a.value = f),
660
- list: F(le)[e.cacheId],
651
+ "onUpdate:modelValue": c[0] || (c[0] = (f) => a.value = f),
652
+ list: M(le)[e.cacheId],
661
653
  "onUpdate:list": [
662
- r[1] || (r[1] = (f) => F(le)[e.cacheId] = f),
663
- r[3] || (r[3] = (f) => v.$emit("update:list", f))
654
+ c[1] || (c[1] = (f) => M(le)[e.cacheId] = f),
655
+ c[3] || (c[3] = (f) => v.$emit("update:list", f))
664
656
  ],
665
657
  onLoad: m,
666
658
  onOnChange: i,
667
- "onUpdate:chosen": r[2] || (r[2] = (f) => v.$emit("update:chosen", f))
659
+ "onUpdate:chosen": c[2] || (c[2] = (f) => v.$emit("update:chosen", f))
668
660
  }, v.$attrs, { cache: "" }), {
669
- default: B(({ item: f, index: b }) => [
670
- R(v.$slots, "default", {
661
+ default: C(({ item: f, index: b }) => [
662
+ I(v.$slots, "default", {
671
663
  item: f,
672
664
  index: b
673
665
  })
674
666
  ]),
675
- dropdown: B(({ list: f }) => [
676
- R(v.$slots, "dropdown", { list: f })
667
+ dropdown: C(({ list: f }) => [
668
+ I(v.$slots, "dropdown", { list: f })
677
669
  ]),
678
- text: B((f) => [
679
- R(v.$slots, "text", ke(Ce(f)))
670
+ text: C((f) => [
671
+ I(v.$slots, "text", ke(Ce(f)))
680
672
  ]),
681
673
  _: 3
682
674
  }, 16, ["modelValue", "list"]));
683
675
  }
684
676
  }), it = {
685
677
  name: "CurdTable"
686
- }, ut = /* @__PURE__ */ Y({
678
+ }, ut = /* @__PURE__ */ U({
687
679
  ...it,
688
680
  props: {
689
681
  modelValue: {
@@ -813,8 +805,8 @@ const A = {
813
805
  }
814
806
  },
815
807
  emits: ["update:modelValue", "add", "remove", "change"],
816
- setup(e, { emit: y }) {
817
- const t = e, l = y, a = H(t.modelValue), n = N(
808
+ setup(e, { emit: S }) {
809
+ const t = e, l = S, a = H(t.modelValue), n = N(
818
810
  () => t.disabled ? t.columns : t.columns.concat(
819
811
  Object.assign(
820
812
  {
@@ -824,75 +816,75 @@ const A = {
824
816
  )
825
817
  )
826
818
  ), i = N(() => {
827
- const f = [], b = (s) => {
828
- s.slot && f.push(s), s.children && s.children.forEach((M) => {
829
- b(M);
819
+ const f = [], b = (u) => {
820
+ u.slot && f.push(u), u.children && u.children.forEach((R) => {
821
+ b(R);
830
822
  });
831
823
  };
832
- return t.columns.forEach((s) => {
833
- b(s);
824
+ return t.columns.forEach((u) => {
825
+ b(u);
834
826
  }), f;
835
827
  });
836
828
  function m() {
837
- typeof t.beforeAdd != "function" ? u() : t.beforeAdd().then(u).catch();
829
+ typeof t.beforeAdd != "function" ? d() : t.beforeAdd().then(d).catch();
838
830
  }
839
- function u(f) {
831
+ function d(f) {
840
832
  a.value.push(...t.addRow(f)), l("update:modelValue", a.value), l("add", a.value[a.value.length - 1]), l("change", !0);
841
833
  }
842
834
  function v(f) {
843
- typeof t.beforeRemove != "function" ? r(f) : t.beforeRemove(a.value[f], f).then(() => {
844
- r(f);
835
+ typeof t.beforeRemove != "function" ? c(f) : t.beforeRemove(a.value[f], f).then(() => {
836
+ c(f);
845
837
  });
846
838
  }
847
- function r(f) {
839
+ function c(f) {
848
840
  const [b] = a.value.splice(f, 1);
849
841
  l("update:modelValue", a.value), l("remove", b), l("change", !1);
850
842
  }
851
- return z(
843
+ return F(
852
844
  () => t.modelValue,
853
845
  (f) => {
854
846
  a.value = f;
855
847
  }
856
848
  ), (f, b) => {
857
- const s = x("Button"), M = x("Table");
849
+ const u = x("Button"), R = x("Table");
858
850
  return V(), P("div", null, [
859
- $(M, {
851
+ $(R, {
860
852
  border: e.border,
861
853
  columns: n.value,
862
854
  data: a.value,
863
855
  size: e.size,
864
856
  style: { "z-index": "0" }
865
857
  }, Ve({
866
- action: B(({ row: k, index: O }) => [
867
- R(f.$slots, "moreAction", {
868
- row: k,
858
+ action: C(({ row: y, index: O }) => [
859
+ I(f.$slots, "moreAction", {
860
+ row: y,
869
861
  index: O
870
862
  }),
871
- !e.hideDelBtn || !e.hideDelBtn(k, O) ? (V(), E(s, U({
863
+ !e.hideDelBtn || !e.hideDelBtn(y, O) ? (V(), E(u, _({
872
864
  key: 0,
873
865
  type: e.delBtnType,
874
866
  size: e.delBtnSize,
875
867
  ghost: e.delBtnGhost
876
868
  }, e.delBtn, {
877
- disabled: e.delBtnDisabled(k, O),
878
- onClick: (d) => v(O)
869
+ disabled: e.delBtnDisabled(y, O),
870
+ onClick: (s) => v(O)
879
871
  }), {
880
- default: B(() => [
881
- j(I(F(A).t("curdTable.del")), 1)
872
+ default: C(() => [
873
+ j(z(M(A).t("curdTable.del")), 1)
882
874
  ]),
883
875
  _: 1
884
- }, 16, ["type", "size", "ghost", "disabled", "onClick"])) : J("", !0)
876
+ }, 16, ["type", "size", "ghost", "disabled", "onClick"])) : G("", !0)
885
877
  ]),
886
878
  _: 2
887
879
  }, [
888
- ee(i.value, (k) => ({
889
- name: k.slot,
890
- fn: B((O) => [
891
- R(f.$slots, k.slot, ke(Ce(O)))
880
+ ee(i.value, (y) => ({
881
+ name: y.slot,
882
+ fn: C((O) => [
883
+ I(f.$slots, y.slot, ke(Ce(O)))
892
884
  ])
893
885
  }))
894
886
  ]), 1032, ["border", "columns", "data", "size"]),
895
- e.disabled ? J("", !0) : ue((V(), E(s, U({
887
+ e.disabled ? G("", !0) : ue((V(), E(u, _({
896
888
  key: 0,
897
889
  type: e.addBtnType,
898
890
  size: e.addBtnSize,
@@ -904,8 +896,8 @@ const A = {
904
896
  style: { display: "block", position: "relative", "margin-top": "-1px" },
905
897
  onClick: m
906
898
  }), {
907
- default: B(() => [
908
- j(I(e.addText ?? F(A).t("curdTable.addText")), 1)
899
+ default: C(() => [
900
+ j(z(e.addText ?? M(A).t("curdTable.addText")), 1)
909
901
  ]),
910
902
  _: 1
911
903
  }, 16, ["type", "size", "ghost", "disabled"])), [
@@ -916,7 +908,7 @@ const A = {
916
908
  }
917
909
  }), st = { class: "date-range" }, dt = {
918
910
  name: "DateRange"
919
- }, ct = /* @__PURE__ */ Y({
911
+ }, ct = /* @__PURE__ */ U({
920
912
  ...dt,
921
913
  props: {
922
914
  /**
@@ -1001,15 +993,15 @@ const A = {
1001
993
  format: String
1002
994
  },
1003
995
  emits: ["update:begin", "update:end", "change-begin", "change-end", "change"],
1004
- setup(e, { emit: y }) {
996
+ setup(e, { emit: S }) {
1005
997
  const t = pe().appContext.config.globalProperties.$Date, l = {
1006
998
  date: "day",
1007
999
  month: "month",
1008
1000
  year: "year",
1009
1001
  datetime: "day"
1010
- }, a = e, n = y, i = H(a.begin), m = H(a.end), u = N(() => ({
1002
+ }, a = e, n = S, i = H(a.begin), m = H(a.end), d = N(() => ({
1011
1003
  options: a.limitBegin ? {
1012
- disabledDate: (k) => k && t(k).isBefore(Date.now(), l[a.type])
1004
+ disabledDate: (y) => y && t(y).isBefore(Date.now(), l[a.type])
1013
1005
  // date.valueOf() < Date.now() - (props.disableToday ? 0 : 86400000)
1014
1006
  } : void 0,
1015
1007
  disabled: a.disabled || a.beginDisabled,
@@ -1021,7 +1013,7 @@ const A = {
1021
1013
  ...a.beginAttr
1022
1014
  })), v = N(() => ({
1023
1015
  options: {
1024
- disabledDate: (k) => i.value && k && t(k).isBefore(i.value, l[a.type])
1016
+ disabledDate: (y) => i.value && y && t(y).isBefore(i.value, l[a.type])
1025
1017
  },
1026
1018
  disabled: a.disabled || a.endDisabled,
1027
1019
  placeholder: a.endHolder ?? A.t("dateRange.endHolder"),
@@ -1030,33 +1022,33 @@ const A = {
1030
1022
  transfer: a.transfer,
1031
1023
  format: a.format,
1032
1024
  ...a.endAttr
1033
- })), r = () => {
1025
+ })), c = () => {
1034
1026
  n("update:begin", i.value), n("update:end", m.value);
1035
- }, f = (k) => {
1036
- i.value > m.value && (m.value = a.autoNext ? t(i.value).add(1, l[a.type]).toDate() : ""), r(), n("change-begin", k), n("change", i.value, m.value, !1);
1037
- }, b = (k) => {
1038
- a.type === "datetime" && k && t(k).isBefore(i.value) && (m.value = t(i.value).add(1, "hour").toDate(), k = t(m.value).format("YYYY-MM-DD HH:mm:ss")), r(), n("change-end", k), n("change", i.value, m.value, !0);
1039
- }, s = (k) => {
1040
- i.value !== k && (i.value = k || "");
1041
- }, M = (k) => {
1042
- m.value !== k && (m.value = k || "");
1027
+ }, f = (y) => {
1028
+ i.value > m.value && (m.value = a.autoNext ? t(i.value).add(1, l[a.type]).toDate() : ""), c(), n("change-begin", y), n("change", i.value, m.value, !1);
1029
+ }, b = (y) => {
1030
+ a.type === "datetime" && y && t(y).isBefore(i.value) && (m.value = t(i.value).add(1, "hour").toDate(), y = t(m.value).format("YYYY-MM-DD HH:mm:ss")), c(), n("change-end", y), n("change", i.value, m.value, !0);
1031
+ }, u = (y) => {
1032
+ i.value !== y && (i.value = y || "");
1033
+ }, R = (y) => {
1034
+ m.value !== y && (m.value = y || "");
1043
1035
  };
1044
- return z(() => a.begin, s), z(() => a.end, M), (k, O) => {
1045
- const d = x("DatePicker");
1036
+ return F(() => a.begin, u), F(() => a.end, R), (y, O) => {
1037
+ const s = x("DatePicker");
1046
1038
  return V(), P("div", st, [
1047
- $(d, U({
1039
+ $(s, _({
1048
1040
  modelValue: i.value,
1049
- "onUpdate:modelValue": O[0] || (O[0] = (C) => i.value = C),
1041
+ "onUpdate:modelValue": O[0] || (O[0] = (k) => i.value = k),
1050
1042
  onOnChange: f
1051
- }, u.value, { type: e.type }), null, 16, ["modelValue", "type"]),
1043
+ }, d.value, { type: e.type }), null, 16, ["modelValue", "type"]),
1052
1044
  ue(te("span", {
1053
1045
  class: ie(["date-range-joiner", e.joinerClass])
1054
1046
  }, null, 2), [
1055
1047
  [re, !e.hideJoiner]
1056
1048
  ]),
1057
- $(d, U({
1049
+ $(s, _({
1058
1050
  modelValue: m.value,
1059
- "onUpdate:modelValue": O[1] || (O[1] = (C) => m.value = C),
1051
+ "onUpdate:modelValue": O[1] || (O[1] = (k) => m.value = k),
1060
1052
  onOnChange: b
1061
1053
  }, v.value, { type: e.type }), null, 16, ["modelValue", "type"])
1062
1054
  ]);
@@ -1064,7 +1056,7 @@ const A = {
1064
1056
  }
1065
1057
  }), rt = {
1066
1058
  name: "DateRangePicker"
1067
- }, ft = /* @__PURE__ */ Y({
1059
+ }, ft = /* @__PURE__ */ U({
1068
1060
  ...rt,
1069
1061
  props: {
1070
1062
  /**
@@ -1121,26 +1113,26 @@ const A = {
1121
1113
  }
1122
1114
  },
1123
1115
  emits: ["update:begin", "update:end", "change"],
1124
- setup(e, { emit: y }) {
1125
- const t = pe().appContext.config.globalProperties.$Date, l = e, a = y, n = N(
1116
+ setup(e, { emit: S }) {
1117
+ const t = pe().appContext.config.globalProperties.$Date, l = e, a = S, n = N(
1126
1118
  () => l.options || (l.limitBegin ? {
1127
- disabledDate: (u) => u && u.valueOf() < Date.now() - (l.disableToday ? 0 : 864e5)
1119
+ disabledDate: (d) => d && d.valueOf() < Date.now() - (l.disableToday ? 0 : 864e5)
1128
1120
  } : null)
1129
1121
  ), i = N({
1130
1122
  get() {
1131
- const u = l.begin, v = l.end;
1132
- return u && v ? [t(u).toDate(), t(v).toDate()] : [];
1123
+ const d = l.begin, v = l.end;
1124
+ return d && v ? [t(d).toDate(), t(v).toDate()] : [];
1133
1125
  },
1134
- set(u) {
1135
- let v, r;
1136
- u[0] && u[1] ? (v = t(u[0]).format(l.valueFormat), r = t(u[1]).format(l.valueFormat)) : v = r = "", a("update:begin", v), a("update:end", r);
1126
+ set(d) {
1127
+ let v, c;
1128
+ d[0] && d[1] ? (v = t(d[0]).format(l.valueFormat), c = t(d[1]).format(l.valueFormat)) : v = c = "", a("update:begin", v), a("update:end", c);
1137
1129
  }
1138
- }), m = (u, v) => {
1139
- a("change", u, v);
1130
+ }), m = (d, v) => {
1131
+ a("change", d, v);
1140
1132
  };
1141
- return (u, v) => {
1142
- const r = x("DatePicker");
1143
- return V(), E(r, {
1133
+ return (d, v) => {
1134
+ const c = x("DatePicker");
1135
+ return V(), E(c, {
1144
1136
  modelValue: i.value,
1145
1137
  "onUpdate:modelValue": v[0] || (v[0] = (f) => i.value = f),
1146
1138
  type: e.type,
@@ -1157,7 +1149,7 @@ const A = {
1157
1149
  }
1158
1150
  }), mt = { class: "mcalendar" }, gt = {
1159
1151
  name: "MCalendar"
1160
- }, pt = /* @__PURE__ */ Y({
1152
+ }, pt = /* @__PURE__ */ U({
1161
1153
  ...gt,
1162
1154
  props: {
1163
1155
  /**
@@ -1264,41 +1256,40 @@ const A = {
1264
1256
  }
1265
1257
  },
1266
1258
  emits: ["update:range", "select-range", "click-day", "dblclick-day"],
1267
- setup(e, { emit: y }) {
1268
- const t = pe().appContext.config.globalProperties.$Date;
1269
- t.prototype.isBetween || t.extend(Ke);
1270
- const l = e, a = y, n = H(), i = H(null), m = H(null), u = N(() => {
1271
- let d = Math.floor(l.startDay);
1272
- return (isNaN(d) || d < 0 || d > 6) && (d = 0), d;
1259
+ setup(e, { emit: S }) {
1260
+ const t = pe().appContext.config.globalProperties.$Date, l = e, a = S, n = H(), i = H(null), m = H(null), d = N(() => {
1261
+ let s = Math.floor(l.startDay);
1262
+ return (isNaN(s) || s < 0 || s > 6) && (s = 0), s;
1273
1263
  }), v = N(() => {
1274
- let d;
1275
- const C = [], c = u.value + 7;
1276
- for (let S = u.value; S < c; S++)
1277
- d = S % 7, C.push({
1278
- title: l.weekMap?.[d] || A.t(`mCalendar.${l.weekType}.${d}`),
1279
- order: d
1264
+ let s;
1265
+ const k = [], r = d.value + 7;
1266
+ for (let B = d.value; B < r; B++)
1267
+ s = B % 7, k.push({
1268
+ title: l.weekMap?.[s] || A.t(`mCalendar.${l.weekType}.${s}`),
1269
+ order: s
1280
1270
  });
1281
- return C;
1282
- }), r = (d) => {
1283
- let C = t(
1271
+ return k;
1272
+ }), c = (s) => {
1273
+ let k = t(
1284
1274
  l.date || l.dates && l.dates[0] && l.dates[0][l.dateKey]
1285
- ), c, S, p;
1286
- return l.isOnFirstLine ? c = C : (c = C.startOf("month"), S = C.endOf("month")), p = c.day(), u.value !== 0 && p === 0 && (p = 7), C = c.subtract(p - u.value, "day"), l.isOnFirstLine && (S = C.add(41, "day")), {
1287
- beginDate: C.format("YYYY-MM-DD"),
1288
- endDate: S?.format("YYYY-MM-DD"),
1289
- extra: [C, l.isOnFirstLine ? C : c, S]
1275
+ ), r, B, p;
1276
+ return l.isOnFirstLine ? r = k : (r = k.startOf("month"), B = k.endOf("month")), p = r.day(), d.value !== 0 && p === 0 && (p = 7), k = r.subtract(p - d.value, "day"), l.isOnFirstLine && (B = k.add(41, "day")), {
1277
+ beginDate: k.format("YYYY-MM-DD"),
1278
+ endDate: B?.format("YYYY-MM-DD"),
1279
+ extra: [k, l.isOnFirstLine ? k : r, B]
1290
1280
  };
1291
1281
  }, f = () => {
1292
1282
  l.hasRange && (i.value = m.value = null);
1293
1283
  const {
1294
- extra: [d, C, c]
1295
- } = r(), S = l.dates?.[0] ? l.dates.slice() : [], p = /* @__PURE__ */ new Date();
1284
+ extra: [s, k, r]
1285
+ } = c(), B = l.dates?.[0] ? l.dates.slice() : [], p = /* @__PURE__ */ new Date();
1296
1286
  let o, D, L;
1297
1287
  for (n.value = [], o = 0; o < 42; o++)
1298
- D = d.add(o, "day"), L = S.find((q) => D.isSame(q[l.dateKey], "day")), n.value.push({
1288
+ D = s.add(o, "day"), L = B.find((J) => D.isSame(J[l.dateKey], "day")), n.value.push({
1299
1289
  _date: D.toDate(),
1300
1290
  _text: D.format(l.textFormat),
1301
- _isOuter: !D.isBetween(C, c, "day", "[]"),
1291
+ _isOuter: D.isBefore(k, "day") || D.isAfter(r, "day"),
1292
+ //!eachDay.isBetween(start, end, 'day', '[]'),
1302
1293
  _isToday: D.isSame(p, "day"),
1303
1294
  // _rangeStart: undefined,
1304
1295
  // _rangeEnd: undefined,
@@ -1307,23 +1298,23 @@ const A = {
1307
1298
  });
1308
1299
  };
1309
1300
  let b;
1310
- const s = (d, C) => {
1311
- const c = l.hasRange && (!d._isOuter || l.outerInRange);
1312
- if (c)
1301
+ const u = (s, k) => {
1302
+ const r = l.hasRange && (!s._isOuter || l.outerInRange);
1303
+ if (r)
1313
1304
  if (!i.value)
1314
- i.value = d, d._inRange = !0;
1305
+ i.value = s, s._inRange = !0;
1315
1306
  else if (m.value)
1316
- i.value = m.value = null, n.value.forEach((S) => {
1317
- S._inRange = !1;
1318
- }), l.clearable || (i.value = d);
1307
+ i.value = m.value = null, n.value.forEach((B) => {
1308
+ B._inRange = !1;
1309
+ }), l.clearable || (i.value = s);
1319
1310
  else {
1320
- if (d._date < i.value._date) {
1321
- const S = i.value;
1322
- i.value = d, d = S;
1311
+ if (s._date < i.value._date) {
1312
+ const B = i.value;
1313
+ i.value = s, s = B;
1323
1314
  }
1324
- m.value = d, d._inRange = !0;
1315
+ m.value = s, s._inRange = !0;
1325
1316
  }
1326
- a("click-day", d, C), c && (b = !0, G(() => {
1317
+ a("click-day", s, k), r && (b = !0, Q(() => {
1327
1318
  b = null;
1328
1319
  }), a("update:range", [i.value, m.value]), a(
1329
1320
  "select-range",
@@ -1333,64 +1324,64 @@ const A = {
1333
1324
  n.value.indexOf(m.value) + 1
1334
1325
  )
1335
1326
  ));
1336
- }, M = (d, C) => {
1337
- a("dblclick-day", d, C);
1338
- }, k = (d, C) => {
1339
- if (!l.hasRange || !i.value || m.value || d._isOuter && !l.outerInRange)
1327
+ }, R = (s, k) => {
1328
+ a("dblclick-day", s, k);
1329
+ }, y = (s, k) => {
1330
+ if (!l.hasRange || !i.value || m.value || s._isOuter && !l.outerInRange)
1340
1331
  return;
1341
- let c = n.value.indexOf(i.value);
1342
- if (C < c) {
1343
- const S = c;
1344
- c = C, C = S;
1332
+ let r = n.value.indexOf(i.value);
1333
+ if (k < r) {
1334
+ const B = r;
1335
+ r = k, k = B;
1345
1336
  }
1346
- n.value.forEach((S, p) => {
1347
- S._inRange = p >= c && p <= C;
1337
+ n.value.forEach((B, p) => {
1338
+ B._inRange = p >= r && p <= k;
1348
1339
  });
1349
- }, O = (d) => {
1340
+ }, O = (s) => {
1350
1341
  if (!l.hasRange || b) return;
1351
- if (!d || !d.length) {
1342
+ if (!s || !s.length) {
1352
1343
  i.value = m.value = null, n.value.forEach((o) => {
1353
1344
  o._inRange = !1;
1354
1345
  });
1355
1346
  return;
1356
1347
  }
1357
- if (!d[0] || !d[1]) return;
1358
- if (t(d[0]._date).isAfter(d[1]._date)) {
1359
- const o = d[1];
1360
- d[1] = d[0], d[0] = o;
1348
+ if (!s[0] || !s[1]) return;
1349
+ if (t(s[0]._date).isAfter(s[1]._date)) {
1350
+ const o = s[1];
1351
+ s[1] = s[0], s[0] = o;
1361
1352
  }
1362
- const C = n.value.length;
1363
- let c, S = -1, p = C;
1364
- for (let o = 0; o < C; o++)
1365
- if (c = t(n.value[o]._date), S < 0 && c.isSame(d[0]._date, "day") && (i.value = n.value[o], S = o), c.isSame(d[1]._date, "day")) {
1353
+ const k = n.value.length;
1354
+ let r, B = -1, p = k;
1355
+ for (let o = 0; o < k; o++)
1356
+ if (r = t(n.value[o]._date), B < 0 && r.isSame(s[0]._date, "day") && (i.value = n.value[o], B = o), r.isSame(s[1]._date, "day")) {
1366
1357
  m.value = n.value[o], p = o;
1367
1358
  break;
1368
1359
  }
1369
1360
  n.value.forEach((o, D) => {
1370
- o._inRange = D >= S && D <= p;
1361
+ o._inRange = D >= B && D <= p;
1371
1362
  });
1372
1363
  };
1373
- return f(), l.range && (i.value = l.range[0], m.value = l.range[1], O(l.range)), z(
1364
+ return f(), l.range && (i.value = l.range[0], m.value = l.range[1], O(l.range)), F(
1374
1365
  () => l.date,
1375
- (d) => {
1376
- !l.dates && d instanceof Date && f();
1366
+ (s) => {
1367
+ !l.dates && s instanceof Date && f();
1377
1368
  }
1378
- ), z(
1369
+ ), F(
1379
1370
  () => l.dates,
1380
- (d) => {
1381
- d && f();
1371
+ (s) => {
1372
+ s && f();
1382
1373
  }
1383
- ), z(
1374
+ ), F(
1384
1375
  () => l.startDay,
1385
1376
  () => {
1386
1377
  f();
1387
1378
  }
1388
- ), z(() => l.range, O), (d, C) => {
1389
- const c = x("Col"), S = x("Row"), p = x("Spin");
1379
+ ), F(() => l.range, O), (s, k) => {
1380
+ const r = x("Col"), B = x("Row"), p = x("Spin");
1390
1381
  return V(), P("div", mt, [
1391
- $(S, null, {
1392
- default: B(() => [
1393
- (V(!0), P(W, null, ee(v.value, (o, D) => (V(), E(c, {
1382
+ $(B, null, {
1383
+ default: C(() => [
1384
+ (V(!0), P(X, null, ee(v.value, (o, D) => (V(), E(r, {
1394
1385
  key: D,
1395
1386
  span: "4",
1396
1387
  class: ie([
@@ -1399,17 +1390,17 @@ const A = {
1399
1390
  e.titleClass && e.titleClass(o, D)
1400
1391
  ])
1401
1392
  }, {
1402
- default: B(() => [
1403
- j(I(o.title), 1)
1393
+ default: C(() => [
1394
+ j(z(o.title), 1)
1404
1395
  ]),
1405
1396
  _: 2
1406
1397
  }, 1032, ["class"]))), 128))
1407
1398
  ]),
1408
1399
  _: 1
1409
1400
  }),
1410
- $(S, null, {
1411
- default: B(() => [
1412
- (V(!0), P(W, null, ee(n.value, (o, D) => (V(), E(c, {
1401
+ $(B, null, {
1402
+ default: C(() => [
1403
+ (V(!0), P(X, null, ee(n.value, (o, D) => (V(), E(r, {
1413
1404
  key: D,
1414
1405
  span: "4",
1415
1406
  class: ie([
@@ -1422,16 +1413,16 @@ const A = {
1422
1413
  e.dateClass && e.dateClass(o, D),
1423
1414
  o.className
1424
1415
  ]),
1425
- onClick: (L) => s(o, D),
1426
- onDblclick: (L) => M(o, D),
1427
- onMouseenter: (L) => k(o, D)
1416
+ onClick: (L) => u(o, D),
1417
+ onDblclick: (L) => R(o, D),
1418
+ onMouseenter: (L) => y(o, D)
1428
1419
  }, {
1429
- default: B(() => [
1430
- R(d.$slots, "cell", {
1420
+ default: C(() => [
1421
+ I(s.$slots, "cell", {
1431
1422
  day: o,
1432
1423
  index: D
1433
1424
  }, () => [
1434
- j(I(o._text), 1)
1425
+ j(z(o._text), 1)
1435
1426
  ])
1436
1427
  ]),
1437
1428
  _: 2
@@ -1448,7 +1439,7 @@ const A = {
1448
1439
  }), ht = {
1449
1440
  name: "ModalFooter",
1450
1441
  inheritAttrs: !1
1451
- }, vt = /* @__PURE__ */ Y({
1442
+ }, vt = /* @__PURE__ */ U({
1452
1443
  ...ht,
1453
1444
  props: {
1454
1445
  modelValue: Boolean,
@@ -1504,75 +1495,75 @@ const A = {
1504
1495
  }
1505
1496
  },
1506
1497
  emits: ["update:modelValue", "ok", "cancel"],
1507
- setup(e, { emit: y }) {
1508
- const t = y, l = pe(), a = () => {
1498
+ setup(e, { emit: S }) {
1499
+ const t = S, l = pe(), a = () => {
1509
1500
  l.vnode.props.onCancel ? t("cancel") : t("update:modelValue", !1);
1510
1501
  };
1511
1502
  return (n, i) => {
1512
- const m = x("Col"), u = x("Button"), v = x("Row");
1503
+ const m = x("Col"), d = x("Button"), v = x("Row");
1513
1504
  return V(), E(v, {
1514
1505
  justify: "space-between",
1515
1506
  align: "middle"
1516
1507
  }, {
1517
- default: B(() => [
1508
+ default: C(() => [
1518
1509
  $(m, null, {
1519
- default: B(() => [
1520
- R(n.$slots, "other")
1510
+ default: C(() => [
1511
+ I(n.$slots, "other")
1521
1512
  ]),
1522
1513
  _: 3
1523
1514
  }),
1524
1515
  $(m, { class: "flex" }, {
1525
- default: B(() => [
1526
- e.rightCancel ? (V(), P(W, { key: 1 }, [
1527
- e.hasOk ? (V(), E(u, U({
1516
+ default: C(() => [
1517
+ e.rightCancel ? (V(), P(X, { key: 1 }, [
1518
+ e.hasOk ? (V(), E(d, _({
1528
1519
  key: 0,
1529
1520
  disabled: e.okDisabled,
1530
1521
  loading: e.okLoading
1531
1522
  }, e.ok, {
1532
1523
  type: "primary",
1533
- onClick: i[1] || (i[1] = (r) => n.$emit("ok"))
1524
+ onClick: i[1] || (i[1] = (c) => n.$emit("ok"))
1534
1525
  }), {
1535
- default: B(() => [
1536
- j(I(e.okText ?? F(A).t("modalFooter.ok")), 1)
1526
+ default: C(() => [
1527
+ j(z(e.okText ?? M(A).t("modalFooter.ok")), 1)
1537
1528
  ]),
1538
1529
  _: 1
1539
- }, 16, ["disabled", "loading"])) : J("", !0),
1540
- $(u, U({
1530
+ }, 16, ["disabled", "loading"])) : G("", !0),
1531
+ $(d, _({
1541
1532
  disabled: e.cancelDisabled,
1542
1533
  loading: e.cancelLoading,
1543
1534
  type: e.cancelType
1544
1535
  }, e.cancel, { onClick: a }), {
1545
- default: B(() => [
1546
- j(I(e.cancelText ?? F(A).t("modalFooter.cancel")), 1)
1536
+ default: C(() => [
1537
+ j(z(e.cancelText ?? M(A).t("modalFooter.cancel")), 1)
1547
1538
  ]),
1548
1539
  _: 1
1549
1540
  }, 16, ["disabled", "loading", "type"])
1550
- ], 64)) : (V(), P(W, { key: 0 }, [
1551
- $(u, U({
1541
+ ], 64)) : (V(), P(X, { key: 0 }, [
1542
+ $(d, _({
1552
1543
  disabled: e.cancelDisabled,
1553
1544
  loading: e.cancelLoading,
1554
1545
  type: e.cancelType
1555
1546
  }, e.cancel, { onClick: a }), {
1556
- default: B(() => [
1557
- j(I(e.cancelText ?? F(A).t("modalFooter.cancel")), 1)
1547
+ default: C(() => [
1548
+ j(z(e.cancelText ?? M(A).t("modalFooter.cancel")), 1)
1558
1549
  ]),
1559
1550
  _: 1
1560
1551
  }, 16, ["disabled", "loading", "type"]),
1561
- e.hasOk ? (V(), E(u, U({
1552
+ e.hasOk ? (V(), E(d, _({
1562
1553
  key: 0,
1563
1554
  disabled: e.okDisabled,
1564
1555
  loading: e.okLoading
1565
1556
  }, e.ok, {
1566
1557
  type: "primary",
1567
- onClick: i[0] || (i[0] = (r) => n.$emit("ok"))
1558
+ onClick: i[0] || (i[0] = (c) => n.$emit("ok"))
1568
1559
  }), {
1569
- default: B(() => [
1570
- j(I(e.okText ?? F(A).t("modalFooter.ok")), 1)
1560
+ default: C(() => [
1561
+ j(z(e.okText ?? M(A).t("modalFooter.ok")), 1)
1571
1562
  ]),
1572
1563
  _: 1
1573
- }, 16, ["disabled", "loading"])) : J("", !0)
1564
+ }, 16, ["disabled", "loading"])) : G("", !0)
1574
1565
  ], 64)),
1575
- R(n.$slots, "action")
1566
+ I(n.$slots, "action")
1576
1567
  ]),
1577
1568
  _: 3
1578
1569
  })
@@ -1584,9 +1575,9 @@ const A = {
1584
1575
  }), bt = {
1585
1576
  key: 0,
1586
1577
  class: "ivu-dropdown-item"
1587
- }, _ = {}, yt = {
1578
+ }, Y = {}, yt = {
1588
1579
  name: "ToggleColumn"
1589
- }, we = /* @__PURE__ */ Y({
1580
+ }, Te = /* @__PURE__ */ U({
1590
1581
  ...yt,
1591
1582
  props: {
1592
1583
  modelValue: {
@@ -1619,35 +1610,35 @@ const A = {
1619
1610
  storeAt: String
1620
1611
  },
1621
1612
  emits: ["update:modelValue", "change"],
1622
- setup(e, { emit: y }) {
1623
- const t = e, l = y;
1613
+ setup(e, { emit: S }) {
1614
+ const t = e, l = S;
1624
1615
  let a, n, i;
1625
1616
  const m = (p) => {
1626
1617
  clearTimeout(a);
1627
1618
  let o = localStorage.getItem(n);
1628
- o = o ? JSON.parse(o) : {}, p ? He(o, Le(i, u)) : Ne(o, i, u), a = setTimeout(() => {
1619
+ o = o ? JSON.parse(o) : {}, p ? He(o, Le(i, d)) : Ne(o, i, d), a = setTimeout(() => {
1629
1620
  a = null, localStorage.setItem(n, JSON.stringify(o));
1630
1621
  });
1631
1622
  };
1632
- let u;
1633
- t.storeAt && (n = t.storeAt.split(".")[0], i = t.storeAt.slice(n.length + 1), u = localStorage.getItem(n) && ge(JSON.parse(localStorage[n]), i), u || (u = {}, m(!0)));
1634
- const v = H(!1), r = ye([]), f = H([]), b = N(() => {
1623
+ let d;
1624
+ t.storeAt && (n = t.storeAt.split(".")[0], i = t.storeAt.slice(n.length + 1), d = localStorage.getItem(n) && ge(JSON.parse(localStorage[n]), i), d || (d = {}, m(!0)));
1625
+ const v = H(!1), c = ye([]), f = H([]), b = N(() => {
1635
1626
  const p = f.value.filter((o) => o._switchable);
1636
1627
  return p.some((o) => o._visible) && p.some((o) => !o._visible);
1637
- }), s = N({
1628
+ }), u = N({
1638
1629
  get() {
1639
1630
  const p = f.value.filter((o) => o._switchable);
1640
1631
  return p.length > 0 && p.every((o) => o._visible);
1641
1632
  },
1642
1633
  set(p) {
1643
1634
  f.value.forEach((o, D) => {
1644
- o._switchable && (r.value[D]._visible = o._visible = p);
1635
+ o._switchable && (c.value[D]._visible = o._visible = p);
1645
1636
  }), t.storeAt && (f.value.forEach((o, D) => {
1646
- u[o.key] = o._visible;
1647
- }), m()), S(), l("change", r.value);
1637
+ d[o.key] = o._visible;
1638
+ }), m()), B(), l("change", c.value);
1648
1639
  }
1649
1640
  });
1650
- function M() {
1641
+ function R() {
1651
1642
  const p = f.value.filter((o) => o._visible);
1652
1643
  if (!t.all && p.length === 1) {
1653
1644
  p[0]._switchable = !1;
@@ -1657,48 +1648,48 @@ const A = {
1657
1648
  o.initSwitchable && !o._switchable && (o._switchable = !0);
1658
1649
  });
1659
1650
  }
1660
- function k(p, o) {
1661
- r.value[o]._visible = p._visible, t.storeAt && (u[p.key] = p._visible, m()), S(), M(), l("change", r.value[o]);
1651
+ function y(p, o) {
1652
+ c.value[o]._visible = p._visible, t.storeAt && (d[p.key] = p._visible, m()), B(), R(), l("change", c.value[o]);
1662
1653
  }
1663
1654
  let O;
1664
- function d(p) {
1655
+ function s(p) {
1665
1656
  clearTimeout(O), O = setTimeout(() => {
1666
1657
  v.value = p, O = null;
1667
1658
  }, 200);
1668
1659
  }
1669
- function C() {
1670
- (_[t.cacheId]?.cols || t.modelValue).forEach((p) => {
1671
- p.hasOwnProperty("_visible") || (t.storeAt ? p._visible = u[p.key] === void 0 || u[p.key] : p._visible = !0), p.hasOwnProperty("_switchable") || (p._switchable = !0), r.value.push(p), f.value.push({
1660
+ function k() {
1661
+ (Y[t.cacheId]?.cols || t.modelValue).forEach((p) => {
1662
+ p.hasOwnProperty("_visible") || (t.storeAt ? p._visible = d[p.key] === void 0 || d[p.key] : p._visible = !0), p.hasOwnProperty("_switchable") || (p._switchable = !0), c.value.push(p), f.value.push({
1672
1663
  title: p.title || "",
1673
1664
  key: p.key,
1674
1665
  initSwitchable: p._switchable,
1675
1666
  _switchable: p._switchable,
1676
1667
  _visible: p._visible
1677
1668
  });
1678
- }), M(), S();
1669
+ }), R(), B();
1679
1670
  }
1680
- let c;
1681
- function S() {
1682
- t.cacheId != null && (_[t.cacheId].flag = !0, G(() => {
1683
- _[t.cacheId].flag = null;
1684
- })), c = !0, G(() => {
1685
- c = null;
1671
+ let r;
1672
+ function B() {
1673
+ t.cacheId != null && (Y[t.cacheId].flag = !0, setTimeout(() => {
1674
+ Y[t.cacheId].flag = null;
1675
+ })), r = !0, setTimeout(() => {
1676
+ r = null;
1686
1677
  }), l(
1687
1678
  "update:modelValue",
1688
- r.value.filter((p) => p._visible)
1679
+ c.value.filter((p) => p._visible)
1689
1680
  );
1690
1681
  }
1691
1682
  return ce(() => {
1692
- t.cacheId != null && (_[t.cacheId] ? _[t.cacheId].all++ : _[t.cacheId] = { cols: t.modelValue, all: 1 }, $e(() => {
1693
- _[t.cacheId] && --_[t.cacheId].all < 1 && delete _[t.cacheId];
1694
- })), C();
1695
- }), z(
1683
+ t.cacheId != null && (Y[t.cacheId] ? Y[t.cacheId].all++ : Y[t.cacheId] = { cols: t.modelValue, all: 1 }, $e(() => {
1684
+ Y[t.cacheId] && --Y[t.cacheId].all < 1 && delete Y[t.cacheId];
1685
+ })), k();
1686
+ }), F(
1696
1687
  () => t.modelValue,
1697
1688
  (p) => {
1698
- c || (_[t.cacheId] && !_[t.cacheId].flag && (_[t.cacheId].cols = p), r.value = [], f.value = [], C());
1689
+ r || (Y[t.cacheId] && !Y[t.cacheId].flag && (Y[t.cacheId].cols = p), c.value = [], f.value = [], k());
1699
1690
  }
1700
1691
  ), (p, o) => {
1701
- const D = x("Icon"), L = x("Button"), q = x("Checkbox"), ae = x("DropdownItem"), fe = x("DropdownMenu"), se = x("Dropdown");
1692
+ const D = x("Icon"), L = x("Button"), J = x("Checkbox"), ae = x("DropdownItem"), fe = x("DropdownMenu"), se = x("Dropdown");
1702
1693
  return V(), E(se, {
1703
1694
  trigger: "custom",
1704
1695
  visible: v.value,
@@ -1707,38 +1698,38 @@ const A = {
1707
1698
  "transfer-class-name": "toggle-column-pop",
1708
1699
  class: "toggle-column"
1709
1700
  }, {
1710
- list: B(() => [
1701
+ list: C(() => [
1711
1702
  te("div", {
1712
- onMouseenter: o[3] || (o[3] = (K) => d(!0)),
1713
- onMouseleave: o[4] || (o[4] = (K) => d(!1))
1703
+ onMouseenter: o[3] || (o[3] = (K) => s(!0)),
1704
+ onMouseleave: o[4] || (o[4] = (K) => s(!1))
1714
1705
  }, [
1715
1706
  e.all ? (V(), P("div", bt, [
1716
- $(q, {
1717
- modelValue: s.value,
1718
- "onUpdate:modelValue": o[2] || (o[2] = (K) => s.value = K),
1707
+ $(J, {
1708
+ modelValue: u.value,
1709
+ "onUpdate:modelValue": o[2] || (o[2] = (K) => u.value = K),
1719
1710
  indeterminate: b.value
1720
1711
  }, {
1721
- default: B(() => [
1722
- j(I(F(A).t("toggleColumn.checkAll")), 1)
1712
+ default: C(() => [
1713
+ j(z(M(A).t("toggleColumn.checkAll")), 1)
1723
1714
  ]),
1724
1715
  _: 1
1725
1716
  }, 8, ["modelValue", "indeterminate"])
1726
- ])) : J("", !0),
1717
+ ])) : G("", !0),
1727
1718
  $(fe, { class: "toggle-column-list" }, {
1728
- default: B(() => [
1729
- (V(!0), P(W, null, ee(f.value, (K, me) => (V(), E(ae, {
1719
+ default: C(() => [
1720
+ (V(!0), P(X, null, ee(f.value, (K, me) => (V(), E(ae, {
1730
1721
  key: me,
1731
1722
  disabled: !K._switchable
1732
1723
  }, {
1733
- default: B(() => [
1734
- $(q, {
1724
+ default: C(() => [
1725
+ $(J, {
1735
1726
  modelValue: K._visible,
1736
1727
  "onUpdate:modelValue": (Z) => K._visible = Z,
1737
1728
  disabled: !K._switchable,
1738
- onOnChange: (Z) => k(K, me)
1729
+ onOnChange: (Z) => y(K, me)
1739
1730
  }, {
1740
- default: B(() => [
1741
- j(I(K.title), 1)
1731
+ default: C(() => [
1732
+ j(z(K.title), 1)
1742
1733
  ]),
1743
1734
  _: 2
1744
1735
  }, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "onOnChange"])
@@ -1750,20 +1741,20 @@ const A = {
1750
1741
  })
1751
1742
  ], 32)
1752
1743
  ]),
1753
- default: B(() => [
1744
+ default: C(() => [
1754
1745
  te("span", {
1755
- onMouseover: o[0] || (o[0] = (K) => d(!0)),
1756
- onMouseout: o[1] || (o[1] = (K) => d(!1)),
1746
+ onMouseover: o[0] || (o[0] = (K) => s(!0)),
1747
+ onMouseout: o[1] || (o[1] = (K) => s(!1)),
1757
1748
  class: "toggle-column-btn"
1758
1749
  }, [
1759
- R(p.$slots, "default", {}, () => [
1750
+ I(p.$slots, "default", {}, () => [
1760
1751
  $(L, {
1761
1752
  type: "default",
1762
1753
  icon: e.icon
1763
1754
  }, {
1764
- default: B(() => [
1765
- e.icon ? J("", !0) : (V(), P(W, { key: 0 }, [
1766
- j(I(e.title ?? F(A).t("toggleColumn.title")) + " ", 1),
1755
+ default: C(() => [
1756
+ e.icon ? G("", !0) : (V(), P(X, { key: 0 }, [
1757
+ j(z(e.title ?? M(A).t("toggleColumn.title")) + " ", 1),
1767
1758
  $(D, { type: "ios-arrow-down" })
1768
1759
  ], 64))
1769
1760
  ]),
@@ -1776,23 +1767,16 @@ const A = {
1776
1767
  }, 8, ["visible", "transfer"]);
1777
1768
  };
1778
1769
  }
1779
- });
1780
- function kt(e, y = ["id", "class", "style"]) {
1781
- const t = {};
1782
- return Object.entries(e).forEach((l) => {
1783
- y.includes(l[0]) || (t[l[0]] = l[1]);
1784
- }), t;
1785
- }
1786
- const Ct = {
1770
+ }), kt = {
1787
1771
  class: "page-table-header-title"
1788
- }, Bt = {
1772
+ }, Ct = {
1789
1773
  class: "page-table-list"
1790
1774
  }, St = {
1791
1775
  name: "PageTable"
1792
1776
  // inheritAttrs: false
1793
- }, Dt = /* @__PURE__ */ Y({
1777
+ }, Bt = /* @__PURE__ */ U({
1794
1778
  ...St,
1795
- props: /* @__PURE__ */ Be({
1779
+ props: /* @__PURE__ */ Se({
1796
1780
  columns: {
1797
1781
  type: Array,
1798
1782
  default: () => []
@@ -1945,63 +1929,63 @@ const Ct = {
1945
1929
  },
1946
1930
  loadingModifiers: {}
1947
1931
  }),
1948
- emits: /* @__PURE__ */ Be(["update:modelValue", "update:selection", "load", "select-all", "select-rows", "select", "reload", "change-col"], ["update:loading"]),
1932
+ emits: /* @__PURE__ */ Se(["update:modelValue", "update:selection", "load", "select-all", "selection-change", "select", "reload", "change-col"], ["update:loading"]),
1949
1933
  setup(e, {
1950
- expose: y,
1934
+ expose: S,
1951
1935
  emit: t
1952
1936
  }) {
1953
- const l = kt(ze()), a = e, n = t;
1937
+ const l = Ee(ze(), ["id", "class", "style"]), a = e, n = t;
1954
1938
  let i;
1955
- const m = je(e, "loading"), u = be("tableRef"), v = be("elRef"), r = H(!1), f = ye(), b = Pe({
1939
+ const m = je(e, "loading"), d = be("tableRef"), v = be("elRef"), c = H(!1), f = ye(), b = Pe({
1956
1940
  data: [],
1957
1941
  // rows: [] as Obj[],
1958
1942
  // selections: [],
1959
1943
  // loading: false,
1960
- maxHeight: null,
1944
+ maxHeight: a.maxHeight,
1961
1945
  selectType: {
1962
1946
  align: "center",
1963
1947
  className: "page-table-mr0",
1964
1948
  renderHeader: (g) => {
1965
- const h = b.data.filter((T) => T._checkable && !T._disabled), w = h.length;
1949
+ const h = b.data.filter((w) => w._checkable && !w._disabled), T = h.length;
1966
1950
  return (
1967
1951
  // table.rows.some((e) => e._checkable) && (
1968
- b.data.some((T) => T._checkable) && $(Se, {
1969
- "model-value": !!w && h.every((T) => T._checked),
1970
- disabled: !w,
1971
- "onUpdate:model-value": (T) => {
1972
- h.forEach((Q) => {
1973
- Q._checked = T;
1952
+ b.data.some((w) => w._checkable) && $(Be, {
1953
+ "model-value": !!T && h.every((w) => w._checked),
1954
+ disabled: !T,
1955
+ "onUpdate:model-value": (w) => {
1956
+ h.forEach((W) => {
1957
+ W._checked = w;
1974
1958
  });
1975
1959
  },
1976
- onOnChange: (T) => {
1977
- q(), n("select-all", a.pure ? h.map((Q) => Z(Q)) : h, T);
1960
+ onOnChange: (w) => {
1961
+ J(), n("select-all", a.pure ? h.map((W) => Z(W)) : h, w);
1978
1962
  }
1979
1963
  }, null)
1980
1964
  );
1981
1965
  },
1982
1966
  render: (g, {
1983
1967
  row: h,
1984
- index: w
1985
- }) => h._checkable && $(Se, {
1968
+ index: T
1969
+ }) => h._checkable && $(Be, {
1986
1970
  "model-value": h._checked,
1987
1971
  disabled: h._disabled,
1988
- "onUpdate:model-value": (T) => {
1989
- me(b.data[w], T);
1972
+ "onUpdate:model-value": (w) => {
1973
+ me(b.data[T], w);
1990
1974
  }
1991
1975
  }, null)
1992
1976
  }
1993
- }), s = De({
1977
+ }), u = De({
1994
1978
  curr: 1,
1995
1979
  size: 30,
1996
1980
  total: 0
1997
- }), M = N(() => r.value ? !1 : a.transfer), k = N(() => {
1998
- const g = [], h = (w) => {
1999
- w.slot && g.push(w), w.children && w.children.forEach((T) => {
2000
- h(T);
1981
+ }), R = N(() => c.value ? !1 : a.transfer), y = N(() => {
1982
+ const g = [], h = (T) => {
1983
+ T.slot && g.push(T), T.children && T.children.forEach((w) => {
1984
+ h(w);
2001
1985
  });
2002
1986
  };
2003
- return a.columns.forEach((w) => {
2004
- h(w);
1987
+ return a.columns.forEach((T) => {
1988
+ h(T);
2005
1989
  }), g;
2006
1990
  });
2007
1991
  function O() {
@@ -2019,73 +2003,73 @@ const Ct = {
2019
2003
  } else
2020
2004
  f.value = a.columns;
2021
2005
  }
2022
- let d;
2023
- async function C() {
2006
+ let s;
2007
+ async function k() {
2024
2008
  if (typeof a.method != "function") return console.warn("typeof method isn't function");
2025
2009
  m.value = !0, n("update:selection", []);
2026
2010
  const g = await a.method(Object.assign(fe(), typeof a.param != "function" ? a.param : a.param()));
2027
2011
  if (m.value = !1, !g) {
2028
- a.autoRemain || (s.total = 0, n("update:modelValue", []));
2012
+ a.autoRemain || (u.total = 0, n("update:modelValue", []));
2029
2013
  return;
2030
2014
  }
2031
2015
  let h = ge(g, a.dataKey) || [];
2032
- if (c(h), typeof a.process == "function") {
2033
- const w = a.process(h);
2034
- Array.isArray(w) && (h = w);
2016
+ if (r(h), typeof a.process == "function") {
2017
+ const T = a.process(h);
2018
+ Array.isArray(T) && (h = T);
2035
2019
  }
2036
- b.data = h, s.total = ge(g, a.totalKey), d = !0, n("update:modelValue", b.data), n("load", g), setTimeout(() => {
2037
- d = null;
2020
+ b.data = h, u.total = ge(g, a.totalKey), s = !0, n("update:modelValue", b.data), n("load", g), setTimeout(() => {
2021
+ s = null;
2038
2022
  });
2039
2023
  }
2040
- function c(g) {
2024
+ function r(g) {
2041
2025
  a.columns.some((h) => h.type === "selection") && g.forEach((h) => {
2042
2026
  h._checkable = !0, h._checked = h._disabled = !1;
2043
2027
  });
2044
2028
  }
2045
- function S(g) {
2046
- typeof a.check == "function" && !a.check() || (a.isLocal ? p(g) : C());
2029
+ function B(g) {
2030
+ typeof a.check == "function" && !a.check() || (a.isLocal ? p(g) : k());
2047
2031
  }
2048
2032
  function p(g) {
2049
- let h = g ? s.size * (s.curr - 1) : 0;
2050
- const w = [], T = h + s.size, Q = T > s.total ? s.total : T, de = a.modelValue;
2051
- for (; h < Q; h++)
2052
- de[h]._checked = de[h]._disabled = !1, w.push(de[h]);
2053
- b.data = w, n("update:selection", []);
2033
+ let h = g ? u.size * (u.curr - 1) : 0;
2034
+ const T = [], w = h + u.size, W = w > u.total ? u.total : w, de = a.modelValue;
2035
+ for (; h < W; h++)
2036
+ de[h]._checked = de[h]._disabled = !1, T.push(de[h]);
2037
+ b.data = T, n("update:selection", []);
2054
2038
  }
2055
2039
  function o() {
2056
- S(!0);
2040
+ B(!0);
2057
2041
  }
2058
2042
  function D(g) {
2059
- s.size = g, s.curr === 1 && S();
2043
+ u.size = g, u.curr === 1 && B();
2060
2044
  }
2061
2045
  function L(g) {
2062
- g !== !0 && (s.curr = 1), G(C);
2046
+ g !== !0 && (u.curr = 1), Q(k);
2063
2047
  }
2064
- function q(g, h) {
2048
+ function J(g, h) {
2065
2049
  g && (g._checked = h);
2066
- let w = b.data.filter((T) => T._checked);
2067
- a.pure && (w = w.map((T) => Z(T))), n("update:selection", w), n("select-rows", w);
2050
+ let T = b.data.filter((w) => w._checked);
2051
+ a.pure && (T = T.map((w) => Z(w))), n("update:selection", T), n("selection-change", T);
2068
2052
  }
2069
2053
  function ae() {
2070
- G(() => {
2071
- const g = window.innerHeight - +a.bottomDis - u.value.$el.getBoundingClientRect().top;
2054
+ Q(() => {
2055
+ const g = window.innerHeight - +a.bottomDis - d.value.$el.getBoundingClientRect().top;
2072
2056
  b.maxHeight = g > 0 ? g : 0;
2073
2057
  });
2074
2058
  }
2075
2059
  function fe() {
2076
2060
  return {
2077
- [a.pageMap.first]: a.usePageNum ? s.curr : s.size * (s.curr - 1),
2078
- [a.pageMap.pageSize]: s.size
2061
+ [a.pageMap.first]: a.usePageNum ? u.curr : u.size * (u.curr - 1),
2062
+ [a.pageMap.pageSize]: u.size
2079
2063
  };
2080
2064
  }
2081
2065
  let se;
2082
2066
  function K(g, h) {
2083
- !a.clickToCheck || !g._checkable || g._disabled || (se = !0, g = b.data[h], g._checked = !g._checked, q(g, g._checked), n("select", a.pure ? Z(g) : g, g._checked), setTimeout(() => {
2067
+ !a.clickToCheck || !g._checkable || g._disabled || (se = !0, g = b.data[h], g._checked = !g._checked, J(g, g._checked), n("select", a.pure ? Z(g) : g, g._checked), setTimeout(() => {
2084
2068
  se = null;
2085
2069
  }));
2086
2070
  }
2087
2071
  function me(g, h) {
2088
- se || (q(g, h), n("select", a.pure ? Z(g) : g, h));
2072
+ se || (J(g, h), n("select", a.pure ? Z(g) : g, h));
2089
2073
  }
2090
2074
  function Z(g) {
2091
2075
  const h = {
@@ -2093,56 +2077,54 @@ const Ct = {
2093
2077
  };
2094
2078
  return delete h._checkable, delete h._checked, delete h._disabled, h;
2095
2079
  }
2096
- function Te() {
2080
+ function we() {
2097
2081
  if (a.fullscreen) {
2098
- r.value ? document.exitFullscreen() : v.value.requestFullscreen();
2082
+ c.value ? document.exitFullscreen() : v.value.requestFullscreen();
2099
2083
  return;
2100
2084
  }
2101
- r.value = !r.value, r.value ? (setTimeout(ae), document.body.classList.add("clip")) : (b.maxHeight = a.maxHeight ?? i, document.body.classList.remove("clip"));
2085
+ c.value = !c.value, c.value ? (setTimeout(ae), document.body.classList.add("clip")) : (b.maxHeight = a.maxHeight ?? i, document.body.classList.remove("clip"));
2102
2086
  }
2103
2087
  function Ae() {
2104
2088
  m.value || (a.isLocal ? n("reload") : L());
2105
2089
  }
2106
- return y({
2090
+ return S({
2107
2091
  search: L,
2108
2092
  setMaxHeight: ae,
2109
2093
  table: b,
2110
2094
  getPage: () => ({
2111
2095
  ...fe(),
2112
- curr: s.curr,
2113
- total: s.total
2096
+ curr: u.curr,
2097
+ total: u.total
2114
2098
  })
2115
- }), O(), s.size = a.initSize || a.pageSizeOpts[0], ce(() => {
2116
- !a.maxHeight && a.autoMaxHeight && (ae(), G(() => {
2099
+ }), O(), u.size = a.initSize || a.pageSizeOpts[0], ce(() => {
2100
+ !a.maxHeight && a.autoMaxHeight && (ae(), Q(() => {
2117
2101
  i = b.maxHeight;
2118
2102
  })), a.fullscreen && (v.value.onfullscreenchange = () => {
2119
- r.value = !!document.fullscreenElement, r.value ? setTimeout(ae) : b.maxHeight = a.maxHeight ?? i;
2103
+ c.value = !!document.fullscreenElement, c.value ? setTimeout(ae) : b.maxHeight = a.maxHeight ?? i;
2120
2104
  });
2121
2105
  }), $e(() => {
2122
2106
  v.value.onfullscreenchange = null;
2123
- }), z(() => a.modelValue, (g) => {
2107
+ }), F(() => a.modelValue, (g) => {
2124
2108
  const h = Array.isArray(g) ? g : [];
2125
2109
  if (a.isLocal) {
2126
- s.curr = 1, s.total = h.length, c(h), p();
2110
+ u.curr = 1, u.total = h.length, r(h), p();
2127
2111
  return;
2128
2112
  }
2129
- d || (s.curr = 1, s.total = h.length, b.data = h);
2113
+ s || (u.curr = 1, u.total = h.length, b.data = h);
2130
2114
  }, {
2131
2115
  immediate: !0
2132
- }), z(() => a.maxHeight, (g) => {
2116
+ }), F(() => a.maxHeight, (g) => {
2133
2117
  b.maxHeight = g;
2134
- }, {
2135
- immediate: !0
2136
- }), z(() => a.columns, () => {
2118
+ }), F(() => a.columns, () => {
2137
2119
  O();
2138
2120
  }), (g, h) => {
2139
- const w = x("Col"), T = x("Icon"), Q = x("Tooltip"), de = x("Row"), Me = x("Table"), Re = x("Page");
2121
+ const T = x("Col"), w = x("Icon"), W = x("Tooltip"), de = x("Row"), Re = x("Table"), Ie = x("Page");
2140
2122
  return V(), P("div", {
2141
2123
  ref: "elRef",
2142
2124
  class: ie(["page-table-container", {
2143
2125
  "page-table-bordered": e.border && e.showHeader,
2144
- "page-table-maximized": r.value,
2145
- "page-table-fullscreen": r.value && e.fullscreen
2126
+ "page-table-maximized": c.value,
2127
+ "page-table-fullscreen": c.value && e.fullscreen
2146
2128
  }])
2147
2129
  }, [e.showHeader ? (V(), E(de, {
2148
2130
  key: 0,
@@ -2150,43 +2132,43 @@ const Ct = {
2150
2132
  align: "middle",
2151
2133
  class: "page-table-header"
2152
2134
  }, {
2153
- default: B(() => [$(w, null, {
2154
- default: B(() => [R(g.$slots, "title", {}, () => [te("h1", Ct, I(e.title ?? F(A).t("pageTable.title")), 1)])]),
2135
+ default: C(() => [$(T, null, {
2136
+ default: C(() => [I(g.$slots, "title", {}, () => [te("h1", kt, z(e.title ?? M(A).t("pageTable.title")), 1)])]),
2155
2137
  _: 3
2156
- }), $(w, null, {
2157
- default: B(() => [R(g.$slots, "headerAction"), $(Q, {
2138
+ }), $(T, null, {
2139
+ default: C(() => [I(g.$slots, "headerAction"), $(W, {
2158
2140
  placement: "top",
2159
- content: F(A).t("pageTable.reload"),
2160
- transfer: M.value,
2141
+ content: M(A).t("pageTable.reload"),
2142
+ transfer: R.value,
2161
2143
  class: "page-table-action"
2162
2144
  }, {
2163
- default: B(() => [$(T, {
2145
+ default: C(() => [$(w, {
2164
2146
  type: "md-refresh",
2165
2147
  size: "20",
2166
2148
  onClick: Ae
2167
2149
  })]),
2168
2150
  _: 1
2169
- }, 8, ["content", "transfer"]), $(Q, {
2151
+ }, 8, ["content", "transfer"]), $(W, {
2170
2152
  placement: "top",
2171
- content: F(A).t(`pageTable.${r.value ? "restore" : "maxmize"}`),
2172
- transfer: M.value,
2153
+ content: M(A).t(`pageTable.${c.value ? "restore" : "maxmize"}`),
2154
+ transfer: R.value,
2173
2155
  class: "page-table-action"
2174
2156
  }, {
2175
- default: B(() => [$(T, {
2176
- type: r.value ? "md-contract" : "md-expand",
2157
+ default: C(() => [$(w, {
2158
+ type: c.value ? "md-contract" : "md-expand",
2177
2159
  size: "20",
2178
- onClick: Te
2160
+ onClick: we
2179
2161
  }, null, 8, ["type"])]),
2180
2162
  _: 1
2181
- }, 8, ["content", "transfer"]), $(we, {
2163
+ }, 8, ["content", "transfer"]), $(Te, {
2182
2164
  modelValue: f.value,
2183
- "onUpdate:modelValue": h[0] || (h[0] = (X) => f.value = X),
2165
+ "onUpdate:modelValue": h[0] || (h[0] = (q) => f.value = q),
2184
2166
  size: "20",
2185
- transfer: M.value,
2167
+ transfer: R.value,
2186
2168
  "store-at": e.storeAt,
2187
- onChange: h[1] || (h[1] = (X) => g.$emit("change-col", X))
2169
+ onChange: h[1] || (h[1] = (q) => g.$emit("change-col", q))
2188
2170
  }, {
2189
- default: B(() => [$(T, {
2171
+ default: C(() => [$(w, {
2190
2172
  type: "md-settings",
2191
2173
  size: "20"
2192
2174
  })]),
@@ -2195,9 +2177,9 @@ const Ct = {
2195
2177
  _: 3
2196
2178
  })]),
2197
2179
  _: 3
2198
- })) : J("", !0), te("div", Bt, [$(Me, U({
2180
+ })) : G("", !0), te("div", Ct, [$(Re, _({
2199
2181
  ref: "tableRef"
2200
- }, F(l), {
2182
+ }, M(l), {
2201
2183
  border: e.border,
2202
2184
  columns: f.value,
2203
2185
  data: b.data,
@@ -2208,24 +2190,24 @@ const Ct = {
2208
2190
  _: 2
2209
2191
  }, [g.$slots.header ? {
2210
2192
  name: "header",
2211
- fn: B(() => [R(g.$slots, "header")]),
2193
+ fn: C(() => [I(g.$slots, "header")]),
2212
2194
  key: "0"
2213
- } : void 0, ee(k.value, (X) => ({
2214
- name: X.slot,
2215
- fn: B((Ie) => [R(g.$slots, X.slot, ke(Ce(Ie)))])
2195
+ } : void 0, ee(y.value, (q) => ({
2196
+ name: q.slot,
2197
+ fn: C((Me) => [I(g.$slots, q.slot, ke(Ce(Me)))])
2216
2198
  })), g.$slots.footer ? {
2217
2199
  name: "footer",
2218
- fn: B(() => [R(g.$slots, "footer")]),
2200
+ fn: C(() => [I(g.$slots, "footer")]),
2219
2201
  key: "1"
2220
- } : void 0]), 1040, ["border", "columns", "data", "loading", "max-height"]), $(Re, {
2221
- modelValue: F(s).curr,
2222
- "onUpdate:modelValue": h[2] || (h[2] = (X) => F(s).curr = X),
2223
- total: F(s).total,
2224
- "page-size": F(s).size,
2202
+ } : void 0]), 1040, ["border", "columns", "data", "loading", "max-height"]), $(Ie, {
2203
+ modelValue: M(u).curr,
2204
+ "onUpdate:modelValue": h[2] || (h[2] = (q) => M(u).curr = q),
2205
+ total: M(u).total,
2206
+ "page-size": M(u).size,
2225
2207
  "show-total": "",
2226
2208
  "show-sizer": "",
2227
2209
  "show-elevator": "",
2228
- transfer: M.value,
2210
+ transfer: R.value,
2229
2211
  "page-size-opts": e.pageSizeOpts,
2230
2212
  class: "page-table-page-right",
2231
2213
  onOnChange: o,
@@ -2233,8 +2215,8 @@ const Ct = {
2233
2215
  }, null, 8, ["modelValue", "total", "page-size", "transfer", "page-size-opts"])])], 2);
2234
2216
  };
2235
2217
  }
2236
- }), Vt = [
2237
- Ye,
2218
+ }), Dt = [
2219
+ Ue,
2238
2220
  Ge,
2239
2221
  Xe,
2240
2222
  tt,
@@ -2245,25 +2227,25 @@ const Ct = {
2245
2227
  ft,
2246
2228
  pt,
2247
2229
  vt,
2248
- Dt,
2249
- we
2250
- ], $t = { iviewSelect: Oe };
2251
- function Ot(e, y = {}) {
2252
- if (Vt.forEach((t) => {
2230
+ Bt,
2231
+ Te
2232
+ ], Vt = { iviewSelect: Oe };
2233
+ function $t(e, S = {}) {
2234
+ if (Dt.forEach((t) => {
2253
2235
  e.component(t.name, t);
2254
- }), Object.entries($t).forEach((t) => {
2236
+ }), Object.entries(Vt).forEach((t) => {
2255
2237
  e.directive(t[0], t[1]);
2256
- }), y.i18n) {
2257
- A.i18n = y.i18n, y.msgPrefix && y.msgPrefix !== "d" && (A.prefix = y.msgPrefix);
2238
+ }), S.i18n) {
2239
+ A.i18n = S.i18n, S.msgPrefix && S.msgPrefix !== "d" && (A.prefix = S.msgPrefix);
2258
2240
  return;
2259
2241
  }
2260
- y.msg && (A.msg = y.msg);
2242
+ S.msg && (A.msg = S.msg);
2261
2243
  }
2262
- const Ht = {
2263
- install: Ot
2244
+ const Pt = {
2245
+ install: $t
2264
2246
  };
2265
2247
  export {
2266
- Ye as AllCheckbox,
2248
+ Ue as AllCheckbox,
2267
2249
  Ge as BaseSwitch,
2268
2250
  ot as CacheSelect,
2269
2251
  Xe as Combi,
@@ -2273,10 +2255,10 @@ export {
2273
2255
  ft as DateRangePicker,
2274
2256
  pt as MCalendar,
2275
2257
  vt as ModalFooter,
2276
- Dt as PageTable,
2258
+ Bt as PageTable,
2277
2259
  xe as RemoteSelect,
2278
- we as ToggleColumn,
2279
- Ht as default,
2280
- Ot as install,
2260
+ Te as ToggleColumn,
2261
+ Pt as default,
2262
+ $t as install,
2281
2263
  Oe as iviewSelect
2282
2264
  };