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