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