view-ui-plus-derive 0.1.0 → 0.1.1

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