@utogether/utils 3.0.0-beta.26 → 3.0.0-beta.27

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/utils.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var T = Object.defineProperty;
2
- var U = (a, l, h) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: h }) : a[l] = h;
3
- var k = (a, l, h) => U(a, typeof l != "symbol" ? l + "" : l, h);
2
+ var U = (a, l, o) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[l] = o;
3
+ var k = (a, l, o) => U(a, typeof l != "symbol" ? l + "" : l, o);
4
4
  import { createVNode, resolveComponent, mergeProps, isVNode, ref, shallowRef, unref, getCurrentInstance, onBeforeUnmount, reactive, watchEffect, isRef } from "vue";
5
5
  import dayjs from "dayjs";
6
6
  import XEUtils, { isArray, findTree, isEmpty, isObject, isPlainObject, isUndefined, isFunction, isString, clone, has } from "xe-utils";
@@ -20,8 +20,8 @@ class sessionStorageProxy {
20
20
  this.storage = l;
21
21
  }
22
22
  // 存
23
- setItem(l, h) {
24
- this.storage.setItem && this.storage.setItem(this.getKey(l), JSON.stringify(h || null));
23
+ setItem(l, o) {
24
+ this.storage.setItem && this.storage.setItem(this.getKey(l), JSON.stringify(o || null));
25
25
  }
26
26
  // 取
27
27
  getItem(l) {
@@ -53,8 +53,8 @@ class localforageProxy {
53
53
  }), this.storage = localforage;
54
54
  }
55
55
  // 存
56
- setItem(l, h) {
57
- this.storage.setItem(l, h);
56
+ setItem(l, o) {
57
+ this.storage.setItem(l, o);
58
58
  }
59
59
  // 取
60
60
  getItem(l) {
@@ -73,14 +73,14 @@ const storageSession = new sessionStorageProxy(sessionStorage), storageLocal = n
73
73
  /*! typescript-cookie v1.0.6 | MIT */
74
74
  const encodeName = (a) => encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), encodeValue = (a) => encodeURIComponent(a).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent), decodeName = decodeURIComponent, decodeValue = (a) => (a[0] === '"' && (a = a.slice(1, -1)), a.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent));
75
75
  function stringifyAttributes(a) {
76
- return a = Object.assign({}, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires != null && (a.expires = a.expires.toUTCString()), Object.entries(a).filter(([l, h]) => h != null && h !== !1).map(([l, h]) => h === !0 ? `; ${l}` : `; ${l}=${h.split(";")[0]}`).join("");
76
+ return a = Object.assign({}, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires != null && (a.expires = a.expires.toUTCString()), Object.entries(a).filter(([l, o]) => o != null && o !== !1).map(([l, o]) => o === !0 ? `; ${l}` : `; ${l}=${o.split(";")[0]}`).join("");
77
77
  }
78
- function get(a, l, h) {
79
- const o = /(?:^|; )([^=]*)=([^;]*)/g, r = {};
78
+ function get(a, l, o) {
79
+ const h = /(?:^|; )([^=]*)=([^;]*)/g, r = {};
80
80
  let c;
81
- for (; (c = o.exec(document.cookie)) != null; )
81
+ for (; (c = h.exec(document.cookie)) != null; )
82
82
  try {
83
- const i = h(c[1]);
83
+ const i = o(c[1]);
84
84
  if (r[i] = l(c[2], i), a === i)
85
85
  break;
86
86
  } catch {
@@ -95,11 +95,11 @@ const DEFAULT_CODEC = Object.freeze({
95
95
  }), DEFAULT_ATTRIBUTES = Object.freeze({
96
96
  path: "/"
97
97
  });
98
- function setCookie(a, l, h = DEFAULT_ATTRIBUTES, { encodeValue: o = encodeValue, encodeName: r = encodeName } = {}) {
99
- return document.cookie = `${r(a)}=${o(l, a)}${stringifyAttributes(h)}`;
98
+ function setCookie(a, l, o = DEFAULT_ATTRIBUTES, { encodeValue: h = encodeValue, encodeName: r = encodeName } = {}) {
99
+ return document.cookie = `${r(a)}=${h(l, a)}${stringifyAttributes(o)}`;
100
100
  }
101
- function getCookie(a, { decodeValue: l = decodeValue, decodeName: h = decodeName } = {}) {
102
- return get(a, l, h);
101
+ function getCookie(a, { decodeValue: l = decodeValue, decodeName: o = decodeName } = {}) {
102
+ return get(a, l, o);
103
103
  }
104
104
  function getCookies({ decodeValue: a = decodeValue, decodeName: l = decodeName } = {}) {
105
105
  return get(void 0, a, l);
@@ -110,7 +110,7 @@ function removeCookie(a, l = DEFAULT_ATTRIBUTES) {
110
110
  }));
111
111
  }
112
112
  function init(a, l) {
113
- const h = {
113
+ const o = {
114
114
  set: function(r, c, i) {
115
115
  return setCookie(r, c, Object.assign({}, this.attributes, i), {
116
116
  encodeValue: this.converter.write
@@ -131,11 +131,11 @@ function init(a, l) {
131
131
  withConverter: function(r) {
132
132
  return init(Object.assign({}, this.converter, r), this.attributes);
133
133
  }
134
- }, o = {
134
+ }, h = {
135
135
  attributes: { value: Object.freeze(l) },
136
136
  converter: { value: Object.freeze(a) }
137
137
  };
138
- return Object.create(h, o);
138
+ return Object.create(o, h);
139
139
  }
140
140
  init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
141
141
  class Cookies {
@@ -151,8 +151,8 @@ class Cookies {
151
151
  * @param value
152
152
  * @param cookieSetting
153
153
  */
154
- set(l = "default", h = "") {
155
- setCookie(`${this.getKey(l)}`, h);
154
+ set(l = "default", o = "") {
155
+ setCookie(`${this.getKey(l)}`, o);
156
156
  }
157
157
  /**
158
158
  * 拿到 cookie 值
@@ -191,9 +191,9 @@ const VxetableRender = (VXETable, {
191
191
  const dict = storageLocal.getItem("kLov");
192
192
  VXETable.renderer.add("#SuSelect", {
193
193
  renderTableEdit(a, l) {
194
- let h;
194
+ let o;
195
195
  const {
196
- row: o,
196
+ row: h,
197
197
  column: r
198
198
  } = l, {
199
199
  options: c,
@@ -208,12 +208,12 @@ const VxetableRender = (VXETable, {
208
208
  multiple: V,
209
209
  mapField: u
210
210
  } = i, H = useComponent(), p = V ? `_${r.field}` : r.field;
211
- H.setDefaultValue(i, o, r.field);
211
+ H.setDefaultValue(i, h, r.field);
212
212
  function n(f) {
213
213
  H.remote(f, r.field, a);
214
214
  }
215
215
  function y(f) {
216
- H.selectChange(f, o, r.field, a, {
216
+ H.selectChange(f, h, r.field, a, {
217
217
  column: r,
218
218
  datasource: "row"
219
219
  });
@@ -222,14 +222,14 @@ const VxetableRender = (VXETable, {
222
222
  e != null && e.input && e.input(l, f);
223
223
  }
224
224
  function A() {
225
- H.clear(o, r.field, u, e, "row");
225
+ H.clear(h, r.field, u, e, "row");
226
226
  }
227
227
  function w() {
228
228
  !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
229
229
  }
230
230
  return [createVNode(resolveComponent("el-select"), mergeProps({
231
- modelValue: o[p],
232
- "onUpdate:modelValue": (f) => o[p] = f,
231
+ modelValue: h[p],
232
+ "onUpdate:modelValue": (f) => h[p] = f,
233
233
  filterable: !0,
234
234
  remote: !0,
235
235
  clearable: !0,
@@ -242,18 +242,18 @@ const VxetableRender = (VXETable, {
242
242
  onChange: (f) => y(f),
243
243
  onClear: () => A(),
244
244
  onInput: (f) => C(f)
245
- }), _isSlot(h = c.map((f) => createVNode(resolveComponent("el-option"), {
245
+ }), _isSlot(o = c.map((f) => createVNode(resolveComponent("el-option"), {
246
246
  key: f[d],
247
247
  label: f[v],
248
248
  value: f[d]
249
- }, null))) ? h : {
250
- default: () => [h]
249
+ }, null))) ? o : {
250
+ default: () => [o]
251
251
  })];
252
252
  },
253
253
  renderTableDefault(a, l) {
254
- let h;
254
+ let o;
255
255
  const {
256
- row: o,
256
+ row: h,
257
257
  column: r
258
258
  } = l, {
259
259
  options: c,
@@ -268,12 +268,12 @@ const VxetableRender = (VXETable, {
268
268
  multiple: V,
269
269
  mapField: u
270
270
  } = i, H = useComponent(), p = V ? `_${r.field}` : r.field;
271
- H.setDefaultValue(i, o, r.field);
271
+ H.setDefaultValue(i, h, r.field);
272
272
  function n(f) {
273
273
  H.remote(f, r.field, a);
274
274
  }
275
275
  function y(f) {
276
- H.selectChange(f, o, r.field, a, {
276
+ H.selectChange(f, h, r.field, a, {
277
277
  column: r,
278
278
  datasource: "row"
279
279
  });
@@ -282,14 +282,14 @@ const VxetableRender = (VXETable, {
282
282
  e != null && e.input && e.input(l, f);
283
283
  }
284
284
  function A() {
285
- H.clear(o, r.field, u, e, "row");
285
+ H.clear(h, r.field, u, e, "row");
286
286
  }
287
287
  function w() {
288
288
  !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
289
289
  }
290
290
  return [createVNode(resolveComponent("el-select"), mergeProps({
291
- modelValue: o[p],
292
- "onUpdate:modelValue": (f) => o[p] = f,
291
+ modelValue: h[p],
292
+ "onUpdate:modelValue": (f) => h[p] = f,
293
293
  filterable: !0,
294
294
  remote: !0,
295
295
  clearable: !0,
@@ -302,12 +302,12 @@ const VxetableRender = (VXETable, {
302
302
  onChange: (f) => y(f),
303
303
  onClear: () => A(),
304
304
  onInput: (f) => C(f)
305
- }), _isSlot(h = c.map((f) => createVNode(resolveComponent("el-option"), {
305
+ }), _isSlot(o = c.map((f) => createVNode(resolveComponent("el-option"), {
306
306
  key: f[d],
307
307
  label: f[v],
308
308
  value: f[d]
309
- }, null))) ? h : {
310
- default: () => [h]
309
+ }, null))) ? o : {
310
+ default: () => [o]
311
311
  })];
312
312
  },
313
313
  // 可编辑显示模板
@@ -325,9 +325,9 @@ const VxetableRender = (VXETable, {
325
325
  return textValue && (val = eval(`row.${textValue}`) || row[column.field]), val && multiple && isArray(val) && (val = val && val.join(",")), [createVNode("span", null, [val])];
326
326
  },
327
327
  renderItemContent(a, l) {
328
- let h;
328
+ let o;
329
329
  const {
330
- data: o,
330
+ data: h,
331
331
  field: r
332
332
  } = l, {
333
333
  options: c,
@@ -342,12 +342,12 @@ const VxetableRender = (VXETable, {
342
342
  multiple: V,
343
343
  loading: u = !1
344
344
  } = i, H = useComponent(), p = V ? `_${r}` : r;
345
- H.setDefaultValue(i, o, r);
345
+ H.setDefaultValue(i, h, r);
346
346
  async function n(f) {
347
347
  H.remote(f, r, a);
348
348
  }
349
349
  function y(f) {
350
- H.selectChange(f, o, r, a, {
350
+ H.selectChange(f, h, r, a, {
351
351
  datasource: "data"
352
352
  });
353
353
  }
@@ -355,14 +355,14 @@ const VxetableRender = (VXETable, {
355
355
  e != null && e.input && e.input(l, f);
356
356
  }
357
357
  function A() {
358
- H.clear(o, r, m, e, "data");
358
+ H.clear(h, r, m, e, "data");
359
359
  }
360
360
  function w() {
361
361
  !c.length && n(""), e != null && e.focus && e.focus(l);
362
362
  }
363
363
  return [createVNode(resolveComponent("el-select"), mergeProps({
364
- modelValue: o[p],
365
- "onUpdate:modelValue": (f) => o[p] = f,
364
+ modelValue: h[p],
365
+ "onUpdate:modelValue": (f) => h[p] = f,
366
366
  filterable: !0,
367
367
  remote: !0,
368
368
  clearable: !0,
@@ -375,23 +375,23 @@ const VxetableRender = (VXETable, {
375
375
  onChange: (f) => y(f),
376
376
  onClear: () => A(),
377
377
  onInput: () => C()
378
- }), _isSlot(h = c.map((f) => createVNode(resolveComponent("el-option"), {
378
+ }), _isSlot(o = c.map((f) => createVNode(resolveComponent("el-option"), {
379
379
  key: f[d],
380
380
  label: f[v],
381
381
  value: f[d]
382
- }, null))) ? h : {
383
- default: () => [h]
382
+ }, null))) ? o : {
383
+ default: () => [o]
384
384
  })];
385
385
  }
386
386
  }), VXETable.renderer.add("#SuDateRange", {
387
387
  renderItemContent(a, l) {
388
388
  const {
389
- data: h,
390
- field: o
389
+ data: o,
390
+ field: h
391
391
  } = l, {
392
392
  props: r
393
393
  } = a;
394
- r != null && r.defaultValue && !h[o] && (h[o] = r.defaultValue, r.defaultValue = r.required ? r.defaultValue : null);
394
+ r != null && r.defaultValue && !o[h] && (o[h] = r.defaultValue, r.defaultValue = r.required ? r.defaultValue : null);
395
395
  const c = /* @__PURE__ */ new Date(), i = [{
396
396
  text: i18n("message.udp.today", !0),
397
397
  value: () => [Z(1, "day"), c]
@@ -415,8 +415,8 @@ const VxetableRender = (VXETable, {
415
415
  value: () => [Z(1, "year"), c]
416
416
  }], Z = (e, v) => dayjs().subtract(e, v).add("1", "day").format();
417
417
  return [createVNode(resolveComponent("el-date-picker"), mergeProps({
418
- modelValue: h[o],
419
- "onUpdate:modelValue": (e) => h[o] = e,
418
+ modelValue: o[h],
419
+ "onUpdate:modelValue": (e) => o[h] = e,
420
420
  type: (r == null ? void 0 : r.type) || "daterange",
421
421
  shortcuts: i,
422
422
  style: "width: 100%",
@@ -427,9 +427,9 @@ const VxetableRender = (VXETable, {
427
427
  }
428
428
  }), VXETable.renderer.add("#select", {
429
429
  renderTableEdit(a, l) {
430
- let h;
430
+ let o;
431
431
  const {
432
- row: o,
432
+ row: h,
433
433
  column: r
434
434
  } = l, {
435
435
  options: c,
@@ -443,42 +443,42 @@ const VxetableRender = (VXETable, {
443
443
  } = Z, {
444
444
  mapField: V
445
445
  } = i, u = useComponent();
446
- i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
446
+ i.multiple && h[r.field] && !isArray(h[r.field]) && h[r.field].split(",").forEach((n) => {
447
447
  !c.some((C) => C[v] === n) && c.push({
448
448
  [d]: n,
449
449
  [v]: n
450
450
  });
451
451
  });
452
452
  function H(n) {
453
- u.selectChange(n, o, r.field, a, {
453
+ u.selectChange(n, h, r.field, a, {
454
454
  column: r,
455
455
  datasource: "row"
456
456
  });
457
457
  }
458
458
  function p() {
459
- u.clear(o, r.field, V, e, "row");
459
+ u.clear(h, r.field, V, e, "row");
460
460
  }
461
461
  return [createVNode(resolveComponent("el-select"), mergeProps({
462
- modelValue: o[r.field],
463
- "onUpdate:modelValue": (n) => o[r.field] = n,
462
+ modelValue: h[r.field],
463
+ "onUpdate:modelValue": (n) => h[r.field] = n,
464
464
  filterable: !0,
465
465
  clearable: !0
466
466
  }, i, {
467
467
  style: "width: 100%",
468
468
  onChange: (n) => H(n),
469
469
  onClear: () => p()
470
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
470
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
471
471
  key: n[d],
472
472
  label: m && n[m] ? n[d] : n[v],
473
473
  value: n[d]
474
- }, null))) ? h : {
475
- default: () => [h]
474
+ }, null))) ? o : {
475
+ default: () => [o]
476
476
  })];
477
477
  },
478
478
  renderTableDefault(a, l) {
479
- let h;
479
+ let o;
480
480
  const {
481
- row: o,
481
+ row: h,
482
482
  column: r
483
483
  } = l, {
484
484
  options: c,
@@ -492,36 +492,36 @@ const VxetableRender = (VXETable, {
492
492
  } = Z, {
493
493
  mapField: V
494
494
  } = i, u = useComponent();
495
- i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
495
+ i.multiple && h[r.field] && !isArray(h[r.field]) && h[r.field].split(",").forEach((n) => {
496
496
  !c.some((C) => C[v] === n) && c.push({
497
497
  [d]: n,
498
498
  [v]: n
499
499
  });
500
500
  });
501
501
  function H(n) {
502
- u.selectChange(n, o, r.field, a, {
502
+ u.selectChange(n, h, r.field, a, {
503
503
  column: r,
504
504
  datasource: "row"
505
505
  });
506
506
  }
507
507
  function p() {
508
- u.clear(o, r.field, V, e, "row");
508
+ u.clear(h, r.field, V, e, "row");
509
509
  }
510
510
  return [createVNode(resolveComponent("el-select"), mergeProps({
511
- modelValue: o[r.field],
512
- "onUpdate:modelValue": (n) => o[r.field] = n,
511
+ modelValue: h[r.field],
512
+ "onUpdate:modelValue": (n) => h[r.field] = n,
513
513
  filterable: !0,
514
514
  clearable: !0
515
515
  }, i, {
516
516
  style: "width: 100%",
517
517
  onChange: (n) => H(n),
518
518
  onClear: () => p()
519
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
519
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
520
520
  key: n[d],
521
521
  label: m && n[m] ? n[d] : n[v],
522
522
  value: n[d]
523
- }, null))) ? h : {
524
- default: () => [h]
523
+ }, null))) ? o : {
524
+ default: () => [o]
525
525
  })];
526
526
  },
527
527
  // 可编辑显示模板
@@ -545,9 +545,9 @@ const VxetableRender = (VXETable, {
545
545
  return textValue && (val = eval(`row.${textValue}`) || row[column.field]), item && (val = extLabel ? item[value] : item[label]), val && (props != null && props.multiple) && isArray(val) && (val = val && val.join(",")), [createVNode("span", null, [val])];
546
546
  },
547
547
  renderItemContent(a, l) {
548
- let h;
548
+ let o;
549
549
  const {
550
- data: o,
550
+ data: h,
551
551
  field: r
552
552
  } = l, {
553
553
  options: c,
@@ -561,37 +561,37 @@ const VxetableRender = (VXETable, {
561
561
  defaultValues: V,
562
562
  mapField: u
563
563
  } = i;
564
- V && (o[r] = V);
564
+ V && (h[r] = V);
565
565
  function H(n) {
566
- m.selectChange(n, o, r, a, {
566
+ m.selectChange(n, h, r, a, {
567
567
  datasource: "data"
568
568
  });
569
569
  }
570
570
  function p() {
571
- m.clear(o, r, u, e, "data");
571
+ m.clear(h, r, u, e, "data");
572
572
  }
573
573
  return [createVNode(resolveComponent("el-select"), mergeProps({
574
- modelValue: o[r],
575
- "onUpdate:modelValue": (n) => o[r] = n,
574
+ modelValue: h[r],
575
+ "onUpdate:modelValue": (n) => h[r] = n,
576
576
  filterable: !0,
577
577
  clearable: !0,
578
578
  style: "width: 100%"
579
579
  }, i, {
580
580
  onChange: (n) => H(n),
581
581
  onClear: () => p()
582
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
582
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
583
583
  key: n[d],
584
584
  label: n[v],
585
585
  value: n[d]
586
- }, null))) ? h : {
587
- default: () => [h]
586
+ }, null))) ? o : {
587
+ default: () => [o]
588
588
  })];
589
589
  }
590
590
  }), VXETable.renderer.add("#lov", {
591
591
  renderItemContent(a, l) {
592
592
  const {
593
- data: h,
594
- field: o
593
+ data: o,
594
+ field: h
595
595
  } = l, {
596
596
  props: r,
597
597
  events: c
@@ -599,7 +599,7 @@ const VxetableRender = (VXETable, {
599
599
  defaultValues: Z,
600
600
  mapField: e
601
601
  } = r;
602
- Z && (h[o] = Z);
602
+ Z && (o[h] = Z);
603
603
  function v(m, V) {
604
604
  const {
605
605
  mapField: u,
@@ -610,11 +610,11 @@ const VxetableRender = (VXETable, {
610
610
  if (n) {
611
611
  if (n) {
612
612
  const C = {};
613
- h[p || H] = m.reduce((A, w) => {
613
+ o[p || H] = m.reduce((A, w) => {
614
614
  for (const f in u)
615
615
  C[f] = A ? C[f] + "," + w[u[f]] : w[u[f]];
616
616
  return A = A ? A + "," + w[p || H] : w[p || H], A;
617
- }, ""), Object.assign(h, C);
617
+ }, ""), Object.assign(o, C);
618
618
  }
619
619
  } else {
620
620
  const C = {
@@ -622,10 +622,10 @@ const VxetableRender = (VXETable, {
622
622
  };
623
623
  for (const A in u)
624
624
  C[A] = m[u[A]];
625
- Object.assign(h, C);
625
+ Object.assign(o, C);
626
626
  }
627
627
  const y = {
628
- row: h,
628
+ row: o,
629
629
  property: H,
630
630
  item: m,
631
631
  field: H
@@ -633,10 +633,10 @@ const VxetableRender = (VXETable, {
633
633
  c != null && c.change && c.change(y);
634
634
  }
635
635
  function d() {
636
- i.clear(h, o, e, c, "data");
636
+ i.clear(o, h, e, c, "data");
637
637
  }
638
638
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
639
- record: h
639
+ record: o
640
640
  }, r, {
641
641
  mode: "vxe",
642
642
  onChange: (m, V) => v(m, V),
@@ -646,8 +646,8 @@ const VxetableRender = (VXETable, {
646
646
  // 单元格编辑
647
647
  renderTableEdit(a, l) {
648
648
  const {
649
- row: h,
650
- column: o
649
+ row: o,
650
+ column: h
651
651
  } = l, {
652
652
  props: r,
653
653
  events: c
@@ -665,15 +665,15 @@ const VxetableRender = (VXETable, {
665
665
  };
666
666
  for (const n in m)
667
667
  p[n] = v[m[n]];
668
- Object.assign(h, p);
668
+ Object.assign(o, p);
669
669
  }
670
- c != null && c.change && c.change(l, v, h[o.field]);
670
+ c != null && c.change && c.change(l, v, o[h.field]);
671
671
  }
672
672
  function e() {
673
- i.clear(h, field, mapField, c, "row");
673
+ i.clear(o, h.field, mapField, c, "row");
674
674
  }
675
675
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
676
- record: h,
676
+ record: o,
677
677
  mode: "vxe",
678
678
  transfer: !0
679
679
  }, r, {
@@ -684,8 +684,8 @@ const VxetableRender = (VXETable, {
684
684
  // 单元格默认
685
685
  renderTableDefault(a, l) {
686
686
  const {
687
- row: h,
688
- column: o
687
+ row: o,
688
+ column: h
689
689
  } = l, {
690
690
  props: r,
691
691
  events: c
@@ -703,15 +703,15 @@ const VxetableRender = (VXETable, {
703
703
  };
704
704
  for (const n in m)
705
705
  p[n] = v[m[n]];
706
- Object.assign(h, p);
706
+ Object.assign(o, p);
707
707
  }
708
- c != null && c.change && c.change(l, v, h[o.field]);
708
+ c != null && c.change && c.change(l, v, o[h.field]);
709
709
  }
710
710
  function e() {
711
- i.clear(h, field, mapField, c, "row");
711
+ i.clear(o, h.field, mapField, c, "row");
712
712
  }
713
713
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
714
- record: h,
714
+ record: o,
715
715
  mode: "ele"
716
716
  }, r, {
717
717
  onChange: (v, d) => Z(v, d),
@@ -721,26 +721,26 @@ const VxetableRender = (VXETable, {
721
721
  // 可编辑显示模板
722
722
  renderTableCell(a, l) {
723
723
  const {
724
- row: h,
725
- column: o
724
+ row: o,
725
+ column: h
726
726
  } = l;
727
- return [createVNode("span", null, [h[o.field]])];
727
+ return [createVNode("span", null, [o[h.field]])];
728
728
  }
729
729
  }), VXETable.renderer.add("#upload", {
730
730
  renderItemContent(a, l) {
731
731
  const {
732
- data: h,
733
- field: o
732
+ data: o,
733
+ field: h
734
734
  } = l, {
735
735
  props: r,
736
736
  events: c
737
737
  } = a;
738
738
  function i() {
739
- h[o] = "", componentHook.clear(h, o, r.mapField, c, "data");
739
+ o[h] = "", componentHook.clear(o, h, r.mapField, c, "data");
740
740
  }
741
741
  return [createVNode(resolveComponent("form-upload"), mergeProps({
742
- record: h,
743
- field: o
742
+ record: o,
743
+ field: h
744
744
  }, r, {
745
745
  onClear: () => i()
746
746
  }), null)];
@@ -748,9 +748,9 @@ const VxetableRender = (VXETable, {
748
748
  }), VXETable.renderer.add("#tag", {
749
749
  // 默认显示模板
750
750
  renderTableDefault(a, l) {
751
- let h;
751
+ let o;
752
752
  const {
753
- row: o,
753
+ row: h,
754
754
  column: r
755
755
  } = l, {
756
756
  props: {
@@ -759,20 +759,20 @@ const VxetableRender = (VXETable, {
759
759
  }
760
760
  } = a;
761
761
  function Z() {
762
- return o[r.field] ? i[o[r.field]] : null;
762
+ return h[r.field] ? i[h[r.field]] : null;
763
763
  }
764
- return [o[r.field] ? createVNode(resolveComponent("el-tag"), {
764
+ return [h[r.field] ? createVNode(resolveComponent("el-tag"), {
765
765
  effect: "dark",
766
766
  type: Z()
767
- }, _isSlot(h = getValue(c, o[r.field])) ? h : {
768
- default: () => [h]
767
+ }, _isSlot(o = getValue(c, h[r.field])) ? o : {
768
+ default: () => [o]
769
769
  }) : null];
770
770
  }
771
771
  }), VXETable.renderer.add("#switch", {
772
772
  renderTableDefault(a, l) {
773
773
  const {
774
- row: h,
775
- column: o
774
+ row: o,
775
+ column: h
776
776
  } = l, {
777
777
  props: {
778
778
  code: r,
@@ -783,15 +783,15 @@ const VxetableRender = (VXETable, {
783
783
  } = a;
784
784
  function e(v) {
785
785
  const d = {
786
- row: h,
787
- column: o,
786
+ row: o,
787
+ column: h,
788
788
  value: v
789
789
  };
790
790
  Z != null && Z.change && Z.change(d);
791
791
  }
792
- return [h[o.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
793
- modelValue: h[o.field],
794
- "onUpdate:modelValue": (v) => h[o.field] = v,
792
+ return [o[h.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
793
+ modelValue: o[h.field],
794
+ "onUpdate:modelValue": (v) => o[h.field] = v,
795
795
  "inline-prompt": !0,
796
796
  size: "large",
797
797
  style: "--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
@@ -804,49 +804,49 @@ const VxetableRender = (VXETable, {
804
804
  }), VXETable.renderer.add("#iconSelect", {
805
805
  renderTableEdit(a, l) {
806
806
  const {
807
- row: h,
808
- column: o
807
+ row: o,
808
+ column: h
809
809
  } = l;
810
810
  return [createVNode(resolveComponent("SuIconSelect"), {
811
- modelValue: h[o.field],
812
- "onUpdate:modelValue": (r) => h[o.field] = r,
811
+ modelValue: o[h.field],
812
+ "onUpdate:modelValue": (r) => o[h.field] = r,
813
813
  teleported: !1
814
814
  }, null)];
815
815
  },
816
816
  renderTableCell(a, l) {
817
817
  const {
818
- row: h,
819
- column: o
818
+ row: o,
819
+ column: h
820
820
  } = l;
821
821
  return [createVNode(resolveComponent("IconifyIconOffline"), {
822
- icon: h[o.field],
822
+ icon: o[h.field],
823
823
  style: "font-size: 16px;"
824
824
  }, null)];
825
825
  },
826
826
  renderItemContent(a, l) {
827
827
  const {
828
- data: h,
829
- field: o
828
+ data: o,
829
+ field: h
830
830
  } = l;
831
831
  return [createVNode(resolveComponent("SuIconSelect"), {
832
- modelValue: h[o],
833
- "onUpdate:modelValue": (r) => h[o] = r,
832
+ modelValue: o[h],
833
+ "onUpdate:modelValue": (r) => o[h] = r,
834
834
  teleported: !0
835
835
  }, null)];
836
836
  }
837
837
  }), VXETable.renderer.add("#treeSelect", {
838
838
  renderTableEdit(a, l) {
839
839
  const {
840
- row: h,
841
- column: o
840
+ row: o,
841
+ column: h
842
842
  } = l, {
843
843
  props: r,
844
844
  sourceData: c,
845
845
  events: i
846
846
  } = a;
847
847
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
848
- modelValue: h[o.field],
849
- "onUpdate:modelValue": (Z) => h[o.field] = Z,
848
+ modelValue: o[h.field],
849
+ "onUpdate:modelValue": (Z) => o[h.field] = Z,
850
850
  data: c,
851
851
  "check-strictly": !0
852
852
  }, r, {
@@ -858,31 +858,31 @@ const VxetableRender = (VXETable, {
858
858
  },
859
859
  renderTableCell(a, l) {
860
860
  const {
861
- row: h,
862
- column: o
861
+ row: o,
862
+ column: h
863
863
  } = l, {
864
864
  sourceData: r,
865
865
  props: c = {}
866
866
  } = a, {
867
867
  children: i = "children",
868
868
  label: Z = "label"
869
- } = c, e = findTree(r, (v) => v.value === h[o.field], {
869
+ } = c, e = findTree(r, (v) => v.value === o[h.field], {
870
870
  children: i
871
871
  });
872
872
  return e ? [createVNode("span", null, [e.item[Z]])] : null;
873
873
  },
874
874
  renderItemContent(a, l) {
875
875
  const {
876
- data: h,
877
- field: o
876
+ data: o,
877
+ field: h
878
878
  } = l, {
879
879
  props: r,
880
880
  sourceData: c,
881
881
  events: i
882
882
  } = a;
883
883
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
884
- modelValue: h[o],
885
- "onUpdate:modelValue": (Z) => h[o] = Z,
884
+ modelValue: o[h],
885
+ "onUpdate:modelValue": (Z) => o[h] = Z,
886
886
  data: c,
887
887
  "check-strictly": !0
888
888
  }, r, {
@@ -968,46 +968,46 @@ const VxetableRender = (VXETable, {
968
968
  c[V] = c[V] || e[V];
969
969
  })), !c[v] && c[i] && (c[v] = Z ? (d = c[i]) == null ? void 0 : d.split(",") : c[i]);
970
970
  }
971
- }), onCheckChange = (a, l, h, o) => {
972
- console.log(a, l, h), o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
973
- }, onNodeClick = (a, l, h, o) => {
974
- o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
975
- }, onCurrentChange = (a, l, h) => {
976
- h != null && h.checkChange && (h == null || h.checkChange(a, l));
971
+ }), onCheckChange = (a, l, o, h) => {
972
+ console.log(a, l, o), h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
973
+ }, onNodeClick = (a, l, o, h) => {
974
+ h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
975
+ }, onCurrentChange = (a, l, o) => {
976
+ o != null && o.checkChange && (o == null || o.checkChange(a, l));
977
977
  };
978
978
  function getValue(a, l) {
979
- var h, o, r;
980
- return !l || !a || !dict ? l : (r = (o = (h = dict[a]) == null ? void 0 : h.children) == null ? void 0 : o.find((c) => c.dictCode === l)) == null ? void 0 : r.dictName;
979
+ var o, h, r;
980
+ return !l || !a || !dict ? l : (r = (h = (o = dict[a]) == null ? void 0 : o.children) == null ? void 0 : h.find((c) => c.dictCode === l)) == null ? void 0 : r.dictName;
981
981
  }
982
982
  return VXETable;
983
983
  }, getCookieParam = () => {
984
984
  const a = "kCookies_param";
985
985
  return cookies.get(a) ? JSON.parse(cookies.get(a)) : {};
986
986
  }, hasClass = (a, l) => {
987
- var h;
988
- return !!((h = a.className) != null && h.match(new RegExp("(\\s|^)" + l + "(\\s|$)")));
989
- }, addClass = (a, l, h) => {
990
- hasClass(a, l) || (a.className += " " + l), h && (hasClass(a, h) || (a.className += " " + h));
991
- }, removeClass = (a, l, h) => {
992
- var o, r;
987
+ var o;
988
+ return !!((o = a.className) != null && o.match(new RegExp("(\\s|^)" + l + "(\\s|$)")));
989
+ }, addClass = (a, l, o) => {
990
+ hasClass(a, l) || (a.className += " " + l), o && (hasClass(a, o) || (a.className += " " + o));
991
+ }, removeClass = (a, l, o) => {
992
+ var h, r;
993
993
  if (hasClass(a, l)) {
994
994
  const c = new RegExp("(\\s|^)" + l + "(\\s|$)");
995
- a.className = (o = a.className) == null ? void 0 : o.replace(c, " ").trim();
995
+ a.className = (h = a.className) == null ? void 0 : h.replace(c, " ").trim();
996
996
  }
997
- if (h && hasClass(a, h)) {
998
- const c = new RegExp("(\\s|^)" + h + "(\\s|$)");
997
+ if (o && hasClass(a, o)) {
998
+ const c = new RegExp("(\\s|^)" + o + "(\\s|$)");
999
999
  a.className = (r = a.className) == null ? void 0 : r.replace(c, " ").trim();
1000
1000
  }
1001
- }, toggleClass = (a, l, h) => {
1002
- const o = h || document.body;
1003
- let { className: r } = o;
1004
- r = r == null ? void 0 : r.replace(l, ""), o.className = r && a ? `${r} ${l} ` : r;
1001
+ }, toggleClass = (a, l, o) => {
1002
+ const h = o || document.body;
1003
+ let { className: r } = h;
1004
+ r = r == null ? void 0 : r.replace(l, ""), h.className = r && a ? `${r} ${l} ` : r;
1005
1005
  };
1006
1006
  function useRafThrottle(a) {
1007
1007
  let l = !1;
1008
- return function(...h) {
1008
+ return function(...o) {
1009
1009
  l || (l = !0, window.requestAnimationFrame(() => {
1010
- a.apply(this, h), l = !1;
1010
+ a.apply(this, o), l = !1;
1011
1011
  }));
1012
1012
  };
1013
1013
  }
@@ -1016,9 +1016,9 @@ const openLink = (a) => {
1016
1016
  l.setAttribute("href", a), l.setAttribute("target", "_blank"), l.setAttribute("rel", "noreferrer noopener"), l.setAttribute("id", "external"), document.getElementById("external") && document.body.removeChild(document.getElementById("external")), document.body.appendChild(l), l.click(), l.remove();
1017
1017
  }, isServer = typeof window > "u", resizeHandler = (a) => {
1018
1018
  for (const l of a) {
1019
- const h = l.target.__resizeListeners__ || [];
1020
- h.length && h.forEach((o) => {
1021
- o();
1019
+ const o = l.target.__resizeListeners__ || [];
1020
+ o.length && o.forEach((h) => {
1021
+ h();
1022
1022
  });
1023
1023
  }
1024
1024
  }, addResizeListener = (a, l) => {
@@ -1035,9 +1035,9 @@ function useWatermark(a = ref(document.body)) {
1035
1035
  if (!v) return;
1036
1036
  const { clientHeight: d, clientWidth: m } = v;
1037
1037
  i({ height: d, width: m });
1038
- }), h = domSymbol.toString(), o = shallowRef(), r = () => {
1039
- const v = unref(o);
1040
- o.value = void 0;
1038
+ }), o = domSymbol.toString(), h = shallowRef(), r = () => {
1039
+ const v = unref(h);
1040
+ h.value = void 0;
1041
1041
  const d = unref(a);
1042
1042
  d && (v && d.removeChild(v), removeResizeListener(d, l));
1043
1043
  };
@@ -1048,21 +1048,21 @@ function useWatermark(a = ref(document.body)) {
1048
1048
  return H && (H.rotate(-20 * Math.PI / 120), H.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", H.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", H.textAlign = "left", H.textBaseline = "middle", H.fillText(v, V / 20, u)), m.toDataURL("image/png");
1049
1049
  }
1050
1050
  function i(v = {}) {
1051
- const d = unref(o);
1051
+ const d = unref(h);
1052
1052
  d && (isUndefined(v.width) || (d.style.width = `${v.width}px`), isUndefined(v.height) || (d.style.height = `${v.height}px`), isUndefined(v.str) || (d.style.background = `url(${c(
1053
1053
  v.str,
1054
1054
  v.attr
1055
1055
  )}) left top repeat`));
1056
1056
  }
1057
1057
  const Z = (v, d) => {
1058
- if (unref(o))
1059
- return i({ str: v, attr: d }), h;
1058
+ if (unref(h))
1059
+ return i({ str: v, attr: d }), o;
1060
1060
  const m = document.createElement("div");
1061
- o.value = m, m.id = h, m.style.pointerEvents = "none", m.style.top = "0px", m.style.left = "0px", m.style.position = "absolute", m.style.zIndex = "100000";
1061
+ h.value = m, m.id = o, m.style.pointerEvents = "none", m.style.top = "0px", m.style.left = "0px", m.style.position = "absolute", m.style.zIndex = "100000";
1062
1062
  const V = unref(a);
1063
- if (!V) return h;
1063
+ if (!V) return o;
1064
1064
  const { clientHeight: u, clientWidth: H } = V;
1065
- return i({ str: v, width: H, height: u, attr: d }), V.appendChild(m), h;
1065
+ return i({ str: v, width: H, height: u, attr: d }), V.appendChild(m), o;
1066
1066
  };
1067
1067
  function e(v, d) {
1068
1068
  Z(v, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
@@ -1078,9 +1078,9 @@ function entries(a) {
1078
1078
  function useAttrs(a = {}) {
1079
1079
  const l = getCurrentInstance();
1080
1080
  if (!l) return {};
1081
- const { excludeListeners: h = !1, excludeKeys: o = [] } = a, r = shallowRef({}), c = o.concat(DEFAULT_EXCLUDE_KEYS);
1081
+ const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}), c = h.concat(DEFAULT_EXCLUDE_KEYS);
1082
1082
  return l.attrs = reactive(l.attrs), watchEffect(() => {
1083
- const i = entries(l.attrs).reduce((Z, [e, v]) => (!c.includes(e) && !(h && LISTENER_PREFIX.test(e)) && (Z[e] = v), Z), {});
1083
+ const i = entries(l.attrs).reduce((Z, [e, v]) => (!c.includes(e) && !(o && LISTENER_PREFIX.test(e)) && (Z[e] = v), Z), {});
1084
1084
  r.value = i;
1085
1085
  }), r;
1086
1086
  }
@@ -1095,7 +1095,7 @@ const useRender = () => {
1095
1095
  placeholder: null
1096
1096
  }, L, S;
1097
1097
  isObject(t) ? (s = Object.assign(s, t), L = t.defaultValue, S = t == null ? void 0 : t.code) : S = t;
1098
- const x = (F = storageLocal.getItem("kLov")[S]) == null ? void 0 : F.children, D = x ? x.filter((E) => E.enabled === "1") : [];
1098
+ const x = (F = storageLocal.getItem("kLov")[S]) == null ? void 0 : F.children, D = x ? x.filter((N) => N.enabled === "1") : [];
1099
1099
  return {
1100
1100
  name: "#select",
1101
1101
  optionProps: a,
@@ -1104,7 +1104,7 @@ const useRender = () => {
1104
1104
  defaultValue: L,
1105
1105
  events: b
1106
1106
  };
1107
- }, h = (t, M) => {
1107
+ }, o = (t, M) => {
1108
1108
  const b = f(M);
1109
1109
  return {
1110
1110
  name: "#SuSelect",
@@ -1113,7 +1113,7 @@ const useRender = () => {
1113
1113
  options: (t == null ? void 0 : t.options) || [],
1114
1114
  events: b
1115
1115
  };
1116
- }, o = (t, M) => {
1116
+ }, h = (t, M) => {
1117
1117
  const b = {
1118
1118
  optionProps: { extLabel: "userName", value: "employeeName" },
1119
1119
  props: {
@@ -1126,7 +1126,7 @@ const useRender = () => {
1126
1126
  fetchField: "employeeName"
1127
1127
  }
1128
1128
  };
1129
- return h(b, M);
1129
+ return o(b, M);
1130
1130
  }, r = (t) => {
1131
1131
  const M = {
1132
1132
  optionProps: { extLabel: "userName", value: "name" },
@@ -1137,7 +1137,7 @@ const useRender = () => {
1137
1137
  mapField: t == null ? void 0 : t.mapField
1138
1138
  }
1139
1139
  };
1140
- return h(M);
1140
+ return o(M);
1141
1141
  }, c = (t, M) => {
1142
1142
  const b = {
1143
1143
  label: "organizationName",
@@ -1261,12 +1261,12 @@ const useRender = () => {
1261
1261
  }
1262
1262
  return {
1263
1263
  renderDict: l,
1264
- renderSelect: h,
1264
+ renderSelect: o,
1265
1265
  renderInput: Z,
1266
1266
  renderTextarea: e,
1267
1267
  renderCheckBox: v,
1268
1268
  renderRadio: d,
1269
- renderUser: o,
1269
+ renderUser: h,
1270
1270
  renderSysUser: r,
1271
1271
  renderInvOrg: c,
1272
1272
  renderBU: i,
@@ -1283,11 +1283,11 @@ const useRender = () => {
1283
1283
  }, useGlobal = () => {
1284
1284
  const a = getCurrentInstance();
1285
1285
  if (!a) return { $global: {}, $storage: {}, $config: {} };
1286
- const l = a.appContext.app.config.globalProperties, h = l.$storage, o = l.$config, r = l.$serviceApi, c = l.$hasAuthority, i = l.$printPlugin, Z = l.$mode;
1286
+ const l = a.appContext.app.config.globalProperties, o = l.$storage, h = l.$config, r = l.$serviceApi, c = l.$hasAuthority, i = l.$printPlugin, Z = l.$mode;
1287
1287
  return {
1288
1288
  $global: l,
1289
- $storage: h,
1290
- $config: o,
1289
+ $storage: o,
1290
+ $config: h,
1291
1291
  $serviceApi: r,
1292
1292
  $hasAuthority: c,
1293
1293
  $printPlugin: i,
@@ -1304,56 +1304,60 @@ function buildUUID() {
1304
1304
  }
1305
1305
  let unique = 0;
1306
1306
  function buildShortUUID(a = "") {
1307
- const l = Date.now(), h = Math.floor(Math.random() * 1e9);
1308
- return unique++, a + "_" + h + unique + String(l);
1307
+ const l = Date.now(), o = Math.floor(Math.random() * 1e9);
1308
+ return unique++, a + "_" + o + unique + String(l);
1309
1309
  }
1310
1310
  const deviceDetection = () => {
1311
- const a = navigator.userAgent.toLowerCase(), l = a.match(/iphone os/i) === "iphone os", h = a.match(/midp/i) === "midp", o = a.match(/rv:1.2.3.4/i) === "rv:1.2.3.4", r = a.match(/ucweb/i) === "ucweb", c = a.match(/android/i) === "android", i = a.match(/windows ce/i) === "windows ce", Z = a.match(/windows mobile/i) === "windows mobile";
1312
- return l || h || o || r || c || i || Z;
1311
+ const a = navigator.userAgent.toLowerCase(), l = a.match(/iphone os/i) === "iphone os", o = a.match(/midp/i) === "midp", h = a.match(/rv:1.2.3.4/i) === "rv:1.2.3.4", r = a.match(/ucweb/i) === "ucweb", c = a.match(/android/i) === "android", i = a.match(/windows ce/i) === "windows ce", Z = a.match(/windows mobile/i) === "windows mobile";
1312
+ return l || o || h || r || c || i || Z;
1313
1313
  }, getBrowserInfo = () => {
1314
- const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, h = a.match(l);
1314
+ const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, o = a.match(l);
1315
1315
  return {
1316
- browser: h[1].replace(/version/, "'safari"),
1317
- version: h[2]
1316
+ browser: o[1].replace(/version/, "'safari"),
1317
+ version: o[2]
1318
1318
  };
1319
- }, showMessage = (a, l = "message", h = {}) => {
1320
- var o, r;
1321
- return l === "alert" ? (o = VxeUI.modal) == null ? void 0 : o.alert({ content: a, ...h }) : (r = VxeUI.modal) == null ? void 0 : r.message({ content: a, ...h });
1319
+ }, showMessage = (a, l = "message", o = {}) => {
1320
+ var h, r;
1321
+ return l === "alert" ? (h = VxeUI.modal) == null ? void 0 : h.alert({ content: a, ...o }) : (r = VxeUI.modal) == null ? void 0 : r.message({ content: a, ...o });
1322
1322
  }, successMessage = (a = "操作成功", l = {}) => {
1323
- var h;
1324
- return (h = VxeUI.modal) == null ? void 0 : h.message({ content: a, ...l, status: "success" });
1323
+ var o;
1324
+ return (o = VxeUI.modal) == null ? void 0 : o.message({ content: a, ...l, status: "success" });
1325
1325
  }, warnMessage = (a, l = {}) => {
1326
- var h, o;
1327
- return l.type === "alert" ? (h = VxeUI.modal) == null ? void 0 : h.alert({ content: a, ...l, status: "warning" }) : (o = VxeUI.modal) == null ? void 0 : o.message({
1326
+ var o, h;
1327
+ return l.type === "alert" ? (o = VxeUI.modal) == null ? void 0 : o.alert({ content: a, ...l, status: "warning" }) : (h = VxeUI.modal) == null ? void 0 : h.message({
1328
1328
  content: a,
1329
1329
  duration: 5e3,
1330
1330
  ...l,
1331
1331
  status: "warning"
1332
1332
  });
1333
1333
  }, errorMessage = (a = "操作失败", l = {}) => {
1334
- var h, o;
1335
- return l.type === "alert" ? (h = VxeUI.modal) == null ? void 0 : h.alert({ content: a, ...l, status: "error" }) : (o = VxeUI.modal) == null ? void 0 : o.message({ content: a, ...l, status: "error" });
1334
+ var o, h;
1335
+ return l.type === "alert" ? (o = VxeUI.modal) == null ? void 0 : o.alert({ content: a, ...l, status: "error" }) : (h = VxeUI.modal) == null ? void 0 : h.message({ content: a, ...l, status: "error" });
1336
1336
  }, renderHook = useRender(), i18nColums = (a) => {
1337
- let l = 0, h = 0;
1338
- const o = a.length - 1;
1337
+ let l = 0, o = 0;
1338
+ const h = a.length - 1;
1339
1339
  return a.map((r, c) => {
1340
- if (h = h + r.width, r.type) return r;
1340
+ if (o = o + r.width, r.type) return r;
1341
1341
  r.title = r.title || `message.${r.field}`;
1342
1342
  const { showOverflow: i, sortable: Z } = r;
1343
- return r.field !== "operate" && ((r.width > 99 || r.minWidth) && (r.showOverflow = i === !1 ? i : "tooltip"), r.sortable = Z === !1 ? Z : !0), l || (l = r.minWidth), !l && o === c && h < window.innerWidth && (r.minWidth = r.width, r.width = null), r;
1343
+ return r.field !== "operate" && ((r.width > 99 || r.minWidth) && (r.showOverflow = i === !1 ? i : "tooltip"), r.sortable = Z === !1 ? Z : !0), l || (l = r.minWidth), !l && h === c && o < window.innerWidth && (r.minWidth = r.width, r.width = null), r;
1344
1344
  });
1345
- }, formatItems = (a, l, h = 24) => a.length ? a.map((o) => {
1346
- var i, Z;
1347
- o.title = o.title || `message.${o.field}`, o.span = o.span || h;
1348
- let r = !1;
1349
- l === "detail" ? (r = !0, o.placeholder = null) : r = o.disabled === !1 ? o.disabled : o.disabled || ((Z = (i = o.itemRender) == null ? void 0 : i.props) == null ? void 0 : Z.disabled);
1350
- let c = {
1351
- name: "VxeInput",
1352
- props: { disabled: r, placeholder: r ? "" : o.placeholder }
1353
- };
1354
- return o.code && !o.itemRender && (c = renderHook.renderDict(o.code)), o.itemRender = o.itemRender || c, o.itemRender.props = Object.assign(o.itemRender.props || {}, {
1355
- disabled: r
1356
- }), o;
1345
+ }, formatItems = (a, l, o = 24) => a.length ? a.map((h) => {
1346
+ var r, c, i;
1347
+ if ((r = h.children) != null && r.length)
1348
+ return h.children = formatItems(h.children, l, o), h;
1349
+ {
1350
+ h.title = h.title || `message.${h.field}`, h.span = h.span || o, h.collapseNode && (h.title = "", h.titleWidth = 0);
1351
+ let Z = !1;
1352
+ l === "detail" ? (Z = !0, h.placeholder = null) : Z = h.disabled === !1 ? h.disabled : h.disabled || ((i = (c = h.itemRender) == null ? void 0 : c.props) == null ? void 0 : i.disabled);
1353
+ let e = {
1354
+ name: "VxeInput",
1355
+ props: { disabled: Z, placeholder: Z ? "" : h.placeholder }
1356
+ };
1357
+ return h.code && !h.itemRender && (e = renderHook.renderDict(h.code)), h.itemRender = h.itemRender || e, h.itemRender.props = Object.assign(h.itemRender.props || {}, {
1358
+ disabled: Z
1359
+ }), h;
1360
+ }
1357
1361
  }) : a, formSearchButtons = {
1358
1362
  span: 6,
1359
1363
  align: "right",
@@ -1379,11 +1383,11 @@ const deviceDetection = () => {
1379
1383
  events: null
1380
1384
  }
1381
1385
  }, formatGridItems = (a, l) => {
1382
- const h = a, o = h.length, r = o > 2 && h.some((v, d) => d < 3 && (v.span > 6 || getDateRange(v))), c = r || o > 3, i = {
1386
+ const o = a, h = o.length, r = h > 2 && o.some((v, d) => d < 3 && (v.span > 6 || getDateRange(v))), c = r || h > 3, i = {
1383
1387
  collapseTags: !0,
1384
1388
  collapseTagsTooltip: !0,
1385
1389
  multiple: !0
1386
- }, Z = h.map((v, d) => {
1390
+ }, Z = o.map((v, d) => {
1387
1391
  var m, V, u;
1388
1392
  return v.folding = r ? c && d > 1 : c && d > 2, v.span = getDateRange(v) ? 12 : v.span || 6, v.code && !v.itemRender && (v.itemRender = renderHook.renderDict(v.code)), v.itemRender = v.itemRender || { name: "VxeInput" }, v.resetValue = v.itemRender.defaultValue, v.title = v.title || `message.${v.field}`, (v.multiple || (V = (m = v.itemRender) == null ? void 0 : m.props) != null && V.multiple) && (v.itemRender.props = Object.assign(
1389
1393
  i,
@@ -1397,21 +1401,21 @@ const deviceDetection = () => {
1397
1401
  Z.push(e);
1398
1402
  return Z;
1399
1403
  }, getDateRange = (a) => {
1400
- var l, h, o, r, c;
1401
- return ((l = a.itemRender) == null ? void 0 : l.name) === "#SuDateRange" ? ((o = (h = a.itemRender) == null ? void 0 : h.props) == null ? void 0 : o.type) === "daterange" || !((c = (r = a.itemRender) == null ? void 0 : r.props) != null && c.type) : !1;
1404
+ var l, o, h, r, c;
1405
+ return ((l = a.itemRender) == null ? void 0 : l.name) === "#SuDateRange" ? ((h = (o = a.itemRender) == null ? void 0 : o.props) == null ? void 0 : h.type) === "daterange" || !((c = (r = a.itemRender) == null ? void 0 : r.props) != null && c.type) : !1;
1402
1406
  }, formatRules = (a, l) => {
1403
- const h = {};
1404
- return a.forEach((o) => {
1405
- if (o.required) {
1406
- const { field: r, title: c } = o, i = c == null ? void 0 : c.startsWith("message.");
1407
- h[r] = [
1407
+ const o = {};
1408
+ return a.forEach((h) => {
1409
+ if (h.required) {
1410
+ const { field: r, title: c } = h, i = c == null ? void 0 : c.startsWith("message.");
1411
+ o[r] = [
1408
1412
  {
1409
1413
  required: !0,
1410
1414
  message: `${l("message.required")}${c && i ? l(c) : c || l(`message.${r}`)}`
1411
1415
  }
1412
1416
  ];
1413
1417
  }
1414
- }), h;
1418
+ }), o;
1415
1419
  }, expandedPaths = [];
1416
1420
  function extractPathList(a) {
1417
1421
  if (!Array.isArray(a)) {
@@ -1430,8 +1434,8 @@ function deleteTreeChildren(a, l = []) {
1430
1434
  return;
1431
1435
  }
1432
1436
  if (!(!a || a.length === 0)) {
1433
- for (const [h, o] of a.entries())
1434
- o.children && o.children.length === 1 && delete o.children, o.id = h, o.parentId = l.length ? l[l.length - 1] : null, o.pathList = [...l, o.id], o.uniqueId = o.pathList.length > 1 ? o.pathList.join("-") : o.pathList[0], o.children && o.children.length > 0 && deleteTreeChildren(o.children, o.pathList);
1437
+ for (const [o, h] of a.entries())
1438
+ h.children && h.children.length === 1 && delete h.children, h.id = o, h.parentId = l.length ? l[l.length - 1] : null, h.pathList = [...l, h.id], h.uniqueId = h.pathList.length > 1 ? h.pathList.join("-") : h.pathList[0], h.children && h.children.length > 0 && deleteTreeChildren(h.children, h.pathList);
1435
1439
  return a;
1436
1440
  }
1437
1441
  }
@@ -1441,8 +1445,8 @@ function buildHierarchyTree(a, l = []) {
1441
1445
  return;
1442
1446
  }
1443
1447
  if (!(!a || a.length === 0)) {
1444
- for (const [h, o] of a.entries())
1445
- o.id = h, o.parentId = l.length ? l[l.length - 1] : null, o.pathList = [...l, o.id], o.children && o.children.length > 0 && buildHierarchyTree(o.children, o.pathList);
1448
+ for (const [o, h] of a.entries())
1449
+ h.id = o, h.parentId = l.length ? l[l.length - 1] : null, h.pathList = [...l, h.id], h.children && h.children.length > 0 && buildHierarchyTree(h.children, h.pathList);
1446
1450
  return a;
1447
1451
  }
1448
1452
  }
@@ -1452,20 +1456,20 @@ function getNodeByUniqueId(a, l) {
1452
1456
  return;
1453
1457
  }
1454
1458
  if (!a || a.length === 0) return;
1455
- const h = a.find((r) => r.uniqueId === l);
1456
- if (h) return h;
1457
- const o = a.filter((r) => r.children).map((r) => r.children).flat(1);
1458
- return getNodeByUniqueId(o, l);
1459
+ const o = a.find((r) => r.uniqueId === l);
1460
+ if (o) return o;
1461
+ const h = a.filter((r) => r.children).map((r) => r.children).flat(1);
1462
+ return getNodeByUniqueId(h, l);
1459
1463
  }
1460
- function appendFieldByUniqueId(a, l, h) {
1464
+ function appendFieldByUniqueId(a, l, o) {
1461
1465
  if (!Array.isArray(a)) {
1462
1466
  console.warn("menuTree must be an array");
1463
1467
  return;
1464
1468
  }
1465
1469
  if (!a || a.length === 0) return {};
1466
- for (const o of a) {
1467
- const r = o.children && o.children.length > 0;
1468
- o.uniqueId === l && Object.prototype.toString.call(h) === "[object Object]" && Object.assign(o, h), r && appendFieldByUniqueId(o.children, l, h);
1470
+ for (const h of a) {
1471
+ const r = h.children && h.children.length > 0;
1472
+ h.uniqueId === l && Object.prototype.toString.call(o) === "[object Object]" && Object.assign(h, o), r && appendFieldByUniqueId(h.children, l, o);
1469
1473
  }
1470
1474
  return a;
1471
1475
  }
@@ -1514,16 +1518,16 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1514
1518
  }
1515
1519
  /** 重连原始请求 */
1516
1520
  static retryOriginalRequest(l) {
1517
- return new Promise((h) => {
1518
- g.requests.push((o) => {
1519
- l.headers.Authorization = "Bearer " + o, h(l);
1521
+ return new Promise((o) => {
1522
+ g.requests.push((h) => {
1523
+ l.headers.Authorization = "Bearer " + h, o(l);
1520
1524
  });
1521
1525
  });
1522
1526
  }
1523
1527
  // 请求拦截
1524
1528
  httpInterceptorsRequest() {
1525
1529
  g.axiosInstance.interceptors.request.use(
1526
- (l) => (has(l, "loading") && isRef(l.loading) && (l.loading.value = !0), NProgress.start(), typeof l.beforeRequestCallback == "function" ? (l.beforeRequestCallback(l), l) : g.initConfig.beforeRequestCallback ? (g.initConfig.beforeRequestCallback(l), l) : ["/refreshToken", "/login"].some((o) => l.url.indexOf(o) > -1) ? l : new Promise((o) => {
1530
+ (l) => (has(l, "loading") && isRef(l.loading) && (l.loading.value = !0), NProgress.start(), typeof l.beforeRequestCallback == "function" ? (l.beforeRequestCallback(l), l) : g.initConfig.beforeRequestCallback ? (g.initConfig.beforeRequestCallback(l), l) : ["/refreshToken", "/login"].some((h) => l.url.indexOf(h) > -1) ? l : new Promise((h) => {
1527
1531
  const r = cookies.get(kTOKENKEY);
1528
1532
  if (r) {
1529
1533
  const c = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
@@ -1533,49 +1537,49 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1533
1537
  this.setToken(e), l.headers.Authorization = "Bearer " + e.access_token, g.requests.forEach((v) => v(e.access_token)), g.requests = [];
1534
1538
  }).finally(() => {
1535
1539
  g.isRefreshing = !1;
1536
- })), o(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, o(l));
1540
+ })), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, h(l));
1537
1541
  } else {
1538
1542
  const c = cookies.get("kCookies_token");
1539
- c && (l.headers["X-Token"] = c), o(l);
1543
+ c && (l.headers["X-Token"] = c), h(l);
1540
1544
  }
1541
1545
  })),
1542
1546
  (l) => Promise.reject(l)
1543
1547
  );
1544
1548
  }
1545
1549
  setToken(l) {
1546
- const { access_token: h, expires_in: o, refresh_token: r } = l, c = {
1547
- accessToken: h,
1550
+ const { access_token: o, expires_in: h, refresh_token: r } = l, c = {
1551
+ accessToken: o,
1548
1552
  refreshToken: r,
1549
- expires: Date.now() + o * 1e3
1553
+ expires: Date.now() + h * 1e3
1550
1554
  };
1551
1555
  cookies.set(kTOKENKEY, JSON.stringify(c));
1552
1556
  }
1553
1557
  // 响应拦截
1554
1558
  httpInterceptorsResponse() {
1555
1559
  g.axiosInstance.interceptors.response.use(
1556
- (h) => {
1557
- const o = h.config;
1558
- return has(o, "loading") && isRef(o.loading) && (o.loading.value = !1), NProgress.done(), typeof o.beforeResponseCallback == "function" ? (o.beforeResponseCallback(h), h.data) : (g.initConfig.beforeResponseCallback && g.initConfig.beforeResponseCallback(h), h.data);
1560
+ (o) => {
1561
+ const h = o.config;
1562
+ return has(h, "loading") && isRef(h.loading) && (h.loading.value = !1), NProgress.done(), typeof h.beforeResponseCallback == "function" ? (h.beforeResponseCallback(o), o.data) : (g.initConfig.beforeResponseCallback && g.initConfig.beforeResponseCallback(o), o.data);
1559
1563
  },
1560
- (h) => {
1564
+ (o) => {
1561
1565
  var r;
1562
- const o = h;
1563
- return has(h.config, "loading") && isRef((r = h == null ? void 0 : h.config) == null ? void 0 : r.loading) && (h.config.loading.value = !1), o.isCancelRequest = Axios.isCancel(o), NProgress.done(), Promise.reject(o);
1566
+ const h = o;
1567
+ return has(o.config, "loading") && isRef((r = o == null ? void 0 : o.config) == null ? void 0 : r.loading) && (o.config.loading.value = !1), h.isCancelRequest = Axios.isCancel(h), NProgress.done(), Promise.reject(h);
1564
1568
  }
1565
1569
  );
1566
1570
  }
1567
- transformConfigByMethod(l, h) {
1568
- const { method: o } = h, r = ["get"], c = o.toLocaleLowerCase(), i = r.includes(c) ? "params" : "data";
1571
+ transformConfigByMethod(l, o) {
1572
+ const { method: h } = o, r = ["get"], c = h.toLocaleLowerCase(), i = r.includes(c) ? "params" : "data";
1569
1573
  return {
1570
- ...h,
1574
+ ...o,
1571
1575
  [i]: l
1572
1576
  };
1573
1577
  }
1574
1578
  // 通用请求工具函数
1575
- request(l, h, o, r) {
1576
- const c = this.transformConfigByMethod(o, {
1579
+ request(l, o, h, r) {
1580
+ const c = this.transformConfigByMethod(h, {
1577
1581
  method: l,
1578
- url: h,
1582
+ url: o,
1579
1583
  ...r
1580
1584
  });
1581
1585
  return new Promise((i, Z) => {
@@ -1605,22 +1609,22 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1605
1609
  });
1606
1610
  }
1607
1611
  // 单独抽离的post工具函数
1608
- post(l, h, o) {
1609
- return this.request("post", l, h, o);
1612
+ post(l, o, h) {
1613
+ return this.request("post", l, o, h);
1610
1614
  }
1611
1615
  // 单独抽离的delete工具函数
1612
- delete(l, h, o) {
1613
- return this.request("delete", l, h, o);
1616
+ delete(l, o, h) {
1617
+ return this.request("delete", l, o, h);
1614
1618
  }
1615
1619
  // 单独抽离的put工具函数
1616
- put(l, h, o) {
1617
- return this.request("put", l, h, o);
1620
+ put(l, o, h) {
1621
+ return this.request("put", l, o, h);
1618
1622
  }
1619
1623
  // 单独抽离的get工具函数
1620
- get(l, h, o) {
1621
- for (const r in h)
1622
- h[r] || delete h[r];
1623
- return this.request("get", l, h, o);
1624
+ get(l, o, h) {
1625
+ for (const r in o)
1626
+ o[r] || delete o[r];
1627
+ return this.request("get", l, o, h);
1624
1628
  }
1625
1629
  postRouter(l) {
1626
1630
  return this.request("post", "route/service", l);
@@ -2284,10 +2288,10 @@ const http = new SuHttp(), lunarCalendar = {
2284
2288
  * @eg:var count = calendar.lYearDays(1987) ;//count=387
2285
2289
  */
2286
2290
  lYearDays: function(a) {
2287
- let l, h = 348;
2291
+ let l, o = 348;
2288
2292
  for (l = 32768; l > 8; l >>= 1)
2289
- h += this.lunarInfo[a - 1900] & l ? 1 : 0;
2290
- return h + this.leapDays(a);
2293
+ o += this.lunarInfo[a - 1900] & l ? 1 : 0;
2294
+ return o + this.leapDays(a);
2291
2295
  },
2292
2296
  /**
2293
2297
  * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
@@ -2327,8 +2331,8 @@ const http = new SuHttp(), lunarCalendar = {
2327
2331
  solarDays: function(a, l) {
2328
2332
  if (l > 12 || l < 1)
2329
2333
  return -1;
2330
- const h = l - 1;
2331
- return h === 1 ? a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 ? 29 : 28 : this.solarMonth[h];
2334
+ const o = l - 1;
2335
+ return o === 1 ? a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 ? 29 : 28 : this.solarMonth[o];
2332
2336
  },
2333
2337
  /**
2334
2338
  * 农历年份转换为干支纪年
@@ -2336,8 +2340,8 @@ const http = new SuHttp(), lunarCalendar = {
2336
2340
  * @return Cn string
2337
2341
  */
2338
2342
  toGanZhiYear: function(a) {
2339
- let l = (a - 3) % 10, h = (a - 3) % 12;
2340
- return l === 0 && (l = 10), h === 0 && (h = 12), this.Gan[l - 1] + this.Zhi[h - 1];
2343
+ let l = (a - 3) % 10, o = (a - 3) % 12;
2344
+ return l === 0 && (l = 10), o === 0 && (o = 12), this.Gan[l - 1] + this.Zhi[o - 1];
2341
2345
  },
2342
2346
  /**
2343
2347
  * 公历月、日判断所属星座
@@ -2346,8 +2350,8 @@ const http = new SuHttp(), lunarCalendar = {
2346
2350
  * @return Cn string
2347
2351
  */
2348
2352
  toAstro: function(a, l) {
2349
- const h = "摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯", o = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
2350
- return h.substr(a * 2 - (l < o[a - 1] ? 2 : 0), 2) + "座";
2353
+ const o = "摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯", h = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
2354
+ return o.substr(a * 2 - (l < h[a - 1] ? 2 : 0), 2) + "座";
2351
2355
  },
2352
2356
  /**
2353
2357
  * 传入offset偏移量返回干支
@@ -2367,12 +2371,12 @@ const http = new SuHttp(), lunarCalendar = {
2367
2371
  getTerm: function(a, l) {
2368
2372
  if (a < 1900 || a > 2100 || l < 1 || l > 24)
2369
2373
  return -1;
2370
- const h = this.sTermInfo[a - 1900], o = [];
2371
- for (let r = 0; r < h.length; r += 5) {
2372
- const c = parseInt("0x" + h.substr(r, 5)).toString();
2373
- o.push(c[0], c.substr(1, 2), c[3], c.substr(4, 2));
2374
+ const o = this.sTermInfo[a - 1900], h = [];
2375
+ for (let r = 0; r < o.length; r += 5) {
2376
+ const c = parseInt("0x" + o.substr(r, 5)).toString();
2377
+ h.push(c[0], c.substr(1, 2), c[3], c.substr(4, 2));
2374
2378
  }
2375
- return parseInt(o[l - 1]);
2379
+ return parseInt(h[l - 1]);
2376
2380
  },
2377
2381
  /**
2378
2382
  * 传入农历数字月份返回汉语通俗表示法
@@ -2427,21 +2431,21 @@ const http = new SuHttp(), lunarCalendar = {
2427
2431
  * @return JSON object
2428
2432
  * @eg:console.log(calendar.solar2lunar(1987,11,01));
2429
2433
  */
2430
- solar2lunar: function(a, l, h) {
2431
- let o = parseInt(a), r = parseInt(l), c = parseInt(h);
2432
- if (o < 1900 || o > 2100 || o === 1900 && r === 1 && c < 31)
2434
+ solar2lunar: function(a, l, o) {
2435
+ let h = parseInt(a), r = parseInt(l), c = parseInt(o);
2436
+ if (h < 1900 || h > 2100 || h === 1900 && r === 1 && c < 31)
2433
2437
  return -1;
2434
2438
  let i;
2435
- o ? i = new Date(o, parseInt(r.toString()) - 1, c) : i = /* @__PURE__ */ new Date();
2439
+ h ? i = new Date(h, parseInt(r.toString()) - 1, c) : i = /* @__PURE__ */ new Date();
2436
2440
  let Z, e = 0, v = 0;
2437
- o = i.getFullYear(), r = i.getMonth() + 1, c = i.getDate();
2441
+ h = i.getFullYear(), r = i.getMonth() + 1, c = i.getDate();
2438
2442
  let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
2439
2443
  for (Z = 1900; Z < 2101 && d > 0; Z++)
2440
2444
  v = this.lYearDays(Z), d -= v;
2441
2445
  d < 0 && (d += v, Z--);
2442
2446
  const m = /* @__PURE__ */ new Date();
2443
2447
  let V = !1;
2444
- m.getFullYear() === o && m.getMonth() + 1 === r && m.getDate() === c && (V = !0);
2448
+ m.getFullYear() === h && m.getMonth() + 1 === r && m.getDate() === c && (V = !0);
2445
2449
  let u = i.getDay();
2446
2450
  const H = this.nStr1[u];
2447
2451
  u === 0 && (u = 7);
@@ -2451,25 +2455,25 @@ const http = new SuHttp(), lunarCalendar = {
2451
2455
  for (Z = 1; Z < 13 && d > 0; Z++)
2452
2456
  e > 0 && Z === e + 1 && n === !1 ? (--Z, n = !0, v = this.leapDays(p)) : v = this.monthDays(p, Z), n === !0 && Z === e + 1 && (n = !1), d -= v;
2453
2457
  d === 0 && e > 0 && Z === e + 1 && (n ? n = !1 : (n = !0, --Z)), d < 0 && (d += v, --Z);
2454
- const y = Z, C = d + 1, A = r - 1, w = this.toGanZhiYear(p), f = this.getTerm(o, r * 2 - 1), I = this.getTerm(o, r * 2);
2455
- let t = this.toGanZhi((o - 1900) * 12 + r + 11);
2456
- c >= f && (t = this.toGanZhi((o - 1900) * 12 + r + 12));
2458
+ const y = Z, C = d + 1, A = r - 1, w = this.toGanZhiYear(p), f = this.getTerm(h, r * 2 - 1), I = this.getTerm(h, r * 2);
2459
+ let t = this.toGanZhi((h - 1900) * 12 + r + 11);
2460
+ c >= f && (t = this.toGanZhi((h - 1900) * 12 + r + 12));
2457
2461
  let M = !1, b;
2458
2462
  f === c && (M = !0, b = this.solarTerm[r * 2 - 2]), I === c && (M = !0, b = this.solarTerm[r * 2 - 1]);
2459
- const s = Date.UTC(o, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, L = this.toGanZhi(s + c - 1), S = this.toAstro(r, c), x = o + "-" + r + "-" + c, D = p + "-" + y + "-" + C, F = this.festival, E = this.lFestival, R = r + "-" + c;
2460
- let N = y + "-" + C;
2461
- return y === 12 && C === 29 && this.monthDays(p, y) === 29 && (N = "12-30"), {
2463
+ const s = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, L = this.toGanZhi(s + c - 1), S = this.toAstro(r, c), x = h + "-" + r + "-" + c, D = p + "-" + y + "-" + C, F = this.festival, N = this.lFestival, R = r + "-" + c;
2464
+ let E = y + "-" + C;
2465
+ return y === 12 && C === 29 && this.monthDays(p, y) === 29 && (E = "12-30"), {
2462
2466
  date: x,
2463
2467
  lunarDate: D,
2464
2468
  festival: F[R] ? F[R].title : null,
2465
- lunarFestival: E[N] ? E[N].title : null,
2469
+ lunarFestival: N[E] ? N[E].title : null,
2466
2470
  lYear: p,
2467
2471
  lMonth: y,
2468
2472
  lDay: C,
2469
2473
  Animal: this.getAnimal(p),
2470
2474
  IMonthCn: (n ? "闰" : "") + this.toChinaMonth(y),
2471
2475
  IDayCn: this.toChinaDay(C),
2472
- cYear: o,
2476
+ cYear: h,
2473
2477
  cMonth: r,
2474
2478
  cDay: c,
2475
2479
  gzYear: w,
@@ -2494,14 +2498,14 @@ const http = new SuHttp(), lunarCalendar = {
2494
2498
  * @return JSON object
2495
2499
  * @eg:console.log(calendar.lunar2solar(1987,9,10));
2496
2500
  */
2497
- lunar2solar: function(a, l, h, o) {
2498
- a = parseInt(a), l = parseInt(l), h = parseInt(h), o = !!o;
2501
+ lunar2solar: function(a, l, o, h) {
2502
+ a = parseInt(a), l = parseInt(l), o = parseInt(o), h = !!h;
2499
2503
  const r = this.leapMonth(a);
2500
- if (o && r !== l || a === 2100 && l === 12 && h > 1 || a === 1900 && l === 1 && h < 31)
2504
+ if (h && r !== l || a === 2100 && l === 12 && o > 1 || a === 1900 && l === 1 && o < 31)
2501
2505
  return -1;
2502
2506
  const c = this.monthDays(a, l);
2503
2507
  let i = c;
2504
- if (o && (i = this.leapDays(a)), a < 1900 || a > 2100 || h > i)
2508
+ if (h && (i = this.leapDays(a)), a < 1900 || a > 2100 || o > i)
2505
2509
  return -1;
2506
2510
  let Z = 0, e;
2507
2511
  for (e = 1900; e < a; e++)
@@ -2509,8 +2513,8 @@ const http = new SuHttp(), lunarCalendar = {
2509
2513
  let v = 0, d = !1;
2510
2514
  for (e = 1; e < l; e++)
2511
2515
  v = this.leapMonth(a), d || v <= e && v > 0 && (Z += this.leapDays(a), d = !0), Z += this.monthDays(a, e);
2512
- o && (Z += c);
2513
- const m = Date.UTC(1900, 1, 30, 0, 0, 0), V = new Date((Z + h - 31) * 864e5 + m), u = V.getUTCFullYear(), H = V.getUTCMonth() + 1, p = V.getUTCDate();
2516
+ h && (Z += c);
2517
+ const m = Date.UTC(1900, 1, 30, 0, 0, 0), V = new Date((Z + o - 31) * 864e5 + m), u = V.getUTCFullYear(), H = V.getUTCMonth() + 1, p = V.getUTCDate();
2514
2518
  return this.solar2lunar(u, H, p);
2515
2519
  }
2516
2520
  }, dict = storageLocal.getItem("kLov"), formats = {
@@ -2550,8 +2554,8 @@ const http = new SuHttp(), lunarCalendar = {
2550
2554
  tableCellFormatMethod({ cellValue: a }, l) {
2551
2555
  var r, c;
2552
2556
  if (!l) return a;
2553
- const h = XEUtils.toValueString(a), o = dict ? (c = (r = dict[l]) == null ? void 0 : r.children) == null ? void 0 : c.find((i) => i.dictCode === h) : a;
2554
- return (o == null ? void 0 : o.dictName) || a;
2557
+ const o = XEUtils.toValueString(a), h = dict ? (c = (r = dict[l]) == null ? void 0 : r.children) == null ? void 0 : c.find((i) => i.dictCode === o) : a;
2558
+ return (h == null ? void 0 : h.dictName) || a;
2555
2559
  }
2556
2560
  },
2557
2561
  formatRelateField: {
@@ -2563,22 +2567,22 @@ const http = new SuHttp(), lunarCalendar = {
2563
2567
  formatContact: {
2564
2568
  // 字段拼接展示
2565
2569
  tableCellFormatMethod({ row: a }, l) {
2566
- return l.reduce((h, o) => a[o] ? h ? h += a[o] : a[o] : h, "");
2570
+ return l.reduce((o, h) => a[h] ? o ? o += a[h] : a[h] : o, "");
2567
2571
  }
2568
2572
  },
2569
2573
  formatSelectLocal: {
2570
2574
  tableCellFormatMethod({ cellValue: a }, l) {
2571
- const [h, o = "value", r = "label"] = l, c = h == null ? void 0 : h.find((i) => i[o] === a);
2575
+ const [o, h = "value", r = "label"] = l, c = o == null ? void 0 : o.find((i) => i[h] === a);
2572
2576
  return c ? c[r] : a;
2573
2577
  }
2574
2578
  },
2575
2579
  formatMultiValue: {
2576
2580
  tableCellFormatMethod({ row: a }, l) {
2577
2581
  var c;
2578
- const [h, o] = l;
2582
+ const [o, h] = l;
2579
2583
  let r;
2580
- return (c = a[h]) == null || c.split(",").forEach((i) => {
2581
- const Z = o.find((e) => e.value === i);
2584
+ return (c = a[o]) == null || c.split(",").forEach((i) => {
2585
+ const Z = h.find((e) => e.value === i);
2582
2586
  r = r ? `${r},${Z == null ? void 0 : Z.label}` : Z == null ? void 0 : Z.label;
2583
2587
  }), r;
2584
2588
  }
@@ -10206,29 +10210,29 @@ const http = new SuHttp(), lunarCalendar = {
10206
10210
  height: 24
10207
10211
  }, withInstall = (a) => {
10208
10212
  const l = a;
10209
- return l.install = (h) => {
10210
- h.component(l.name || l.__name, a);
10213
+ return l.install = (o) => {
10214
+ o.component(l.name || l.__name, a);
10211
10215
  }, a;
10212
10216
  };
10213
10217
  function sleep(a = 64) {
10214
10218
  return new Promise((l) => {
10215
- const h = setTimeout(() => {
10216
- window.clearTimeout(h), l(a);
10219
+ const o = setTimeout(() => {
10220
+ window.clearTimeout(o), l(a);
10217
10221
  }, a);
10218
10222
  });
10219
10223
  }
10220
10224
  const delay = (a) => new Promise((l) => setTimeout(l, a)), useDark = () => ({ isDark: ref(document.documentElement.classList.contains("dark")) }), useDebounce = (a, l) => {
10221
- let h;
10225
+ let o;
10222
10226
  return () => {
10223
- h && clearTimeout(h), h = setTimeout(a, l);
10227
+ o && clearTimeout(o), o = setTimeout(a, l);
10224
10228
  };
10225
10229
  };
10226
10230
  function isUrl(a) {
10227
10231
  return /(((^http(s)?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(a);
10228
10232
  }
10229
10233
  const getDictName = (a, l) => {
10230
- var o, r;
10231
- return !a || !l ? null : (r = (o = storageLocal.getItem("kLov")[a]) == null ? void 0 : o.children.find((c) => l === c.dictCode)) == null ? void 0 : r.dictName;
10234
+ var h, r;
10235
+ return !a || !l ? null : (r = (h = storageLocal.getItem("kLov")[a]) == null ? void 0 : h.children.find((c) => l === c.dictCode)) == null ? void 0 : r.dictName;
10232
10236
  };
10233
10237
  export {
10234
10238
  W as NProgress,