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