@utogether/utils 3.0.0-beta.37 → 3.0.0-beta.39

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.
@@ -29,6 +29,11 @@ export declare const formats: {
29
29
  cellValue: any;
30
30
  }, dictCode: any): any;
31
31
  };
32
+ formattMultileCode: {
33
+ tableCellFormatMethod({ cellValue }: {
34
+ cellValue: any;
35
+ }, dictCode: any): any;
36
+ };
32
37
  formatRelateField: {
33
38
  tableCellFormatMethod({ row, cellValue }: {
34
39
  row: any;
package/dist/utils.es.js CHANGED
@@ -460,6 +460,7 @@ const VxetableRender = (VXETable, {
460
460
  clearable: !0
461
461
  }, i, {
462
462
  style: "width: 100%",
463
+ class: "udp-select-wrapper",
463
464
  onChange: (p) => s(p),
464
465
  onClear: () => M()
465
466
  }), _isSlot(o = e.map((p) => createVNode(resolveComponent("el-option"), {
@@ -1229,11 +1230,11 @@ const i18n = window.$i18n, useRender = () => {
1229
1230
  placeholder: null
1230
1231
  }, L, S;
1231
1232
  isObject(c) ? (C = Object.assign(C, c), L = c.defaultValue, S = c == null ? void 0 : c.code) : S = c;
1232
- const I = (N = storageLocal.getItem("kLov")[S]) == null ? void 0 : N.children, F = I ? I.filter((E) => E.enabled === "1") : [];
1233
+ const I = (N = storageLocal.getItem("kLov")[S]) == null ? void 0 : N.children, D = I ? I.filter((E) => E.enabled === "1") : [];
1233
1234
  return {
1234
1235
  name: "#select",
1235
1236
  optionProps: a,
1236
- options: F,
1237
+ options: D,
1237
1238
  props: C,
1238
1239
  defaultValue: L,
1239
1240
  events: H
@@ -1338,7 +1339,7 @@ const i18n = window.$i18n, useRender = () => {
1338
1339
  const C = storageLocal.getItem("kLov");
1339
1340
  let L = "";
1340
1341
  isObject(c) ? (H = c.defaultValue, L = c.code, c.options ? u = Object.assign(u, c.props || {}) : u = Object.assign(u, c || {})) : isString(c) && (L = c);
1341
- const S = L ? (I = C[L]) == null ? void 0 : I.children.map((F) => ({ label: F.dictName, value: F.dictCode })) : [];
1342
+ const S = L ? (I = C[L]) == null ? void 0 : I.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
1342
1343
  return {
1343
1344
  props: u,
1344
1345
  defaultValue: H,
@@ -1359,7 +1360,7 @@ const i18n = window.$i18n, useRender = () => {
1359
1360
  const H = w(u), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.defaultValue;
1360
1361
  return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {}), defaultValue: L, events: H };
1361
1362
  }, m = (c, u) => {
1362
- const H = w(u), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.startValue, S = c == null ? void 0 : c.endValue, I = c == null ? void 0 : c.startField, F = c == null ? void 0 : c.endField, N = {
1363
+ const H = w(u), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.startValue, S = c == null ? void 0 : c.endValue, I = c == null ? void 0 : c.startField, D = c == null ? void 0 : c.endField, N = {
1363
1364
  type: "date",
1364
1365
  valueFormat: C,
1365
1366
  clearable: !0,
@@ -1400,7 +1401,7 @@ const i18n = window.$i18n, useRender = () => {
1400
1401
  return {
1401
1402
  name: "VxeDateRangePicker",
1402
1403
  startField: I,
1403
- endField: F,
1404
+ endField: D,
1404
1405
  startValue: L,
1405
1406
  endValue: S,
1406
1407
  props: E,
@@ -1455,11 +1456,11 @@ const i18n = window.$i18n, useRender = () => {
1455
1456
  }, w = (c) => {
1456
1457
  let u = {};
1457
1458
  return isObject(c) && !isFunction(c) ? u = {
1458
- change: (c == null ? void 0 : c.change) || D,
1459
- blur: (c == null ? void 0 : c.blur) || D,
1460
- focus: (c == null ? void 0 : c.focus) || D,
1461
- input: (c == null ? void 0 : c.input) || D,
1462
- clear: (c == null ? void 0 : c.clear) || D,
1459
+ change: (c == null ? void 0 : c.change) || F,
1460
+ blur: (c == null ? void 0 : c.blur) || F,
1461
+ focus: (c == null ? void 0 : c.focus) || F,
1462
+ input: (c == null ? void 0 : c.input) || F,
1463
+ clear: (c == null ? void 0 : c.clear) || F,
1463
1464
  searchClick: c == null ? void 0 : c.searchClick,
1464
1465
  suffixClick: c == null ? void 0 : c.suffixClick,
1465
1466
  prefixClick: c == null ? void 0 : c.prefixClick,
@@ -1474,7 +1475,7 @@ const i18n = window.$i18n, useRender = () => {
1474
1475
  autoHiddenButton: !0
1475
1476
  }), C === "image" && (c.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: c, events: u };
1476
1477
  };
1477
- function D() {
1478
+ function F() {
1478
1479
  }
1479
1480
  return {
1480
1481
  renderDict: l,
@@ -2688,14 +2689,14 @@ const http = new SuHttp(), lunarCalendar = {
2688
2689
  const p = t, y = d + 1, A = r - 1, k = this.toGanZhiYear(s), V = this.getTerm(h, r * 2 - 1), T = this.getTerm(h, r * 2);
2689
2690
  let w = this.toGanZhi((h - 1900) * 12 + r + 11);
2690
2691
  e >= V && (w = this.toGanZhi((h - 1900) * 12 + r + 12));
2691
- let R = !1, D;
2692
- V === e && (R = !0, D = this.solarTerm[r * 2 - 2]), T === e && (R = !0, D = this.solarTerm[r * 2 - 1]);
2693
- const c = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, u = this.toGanZhi(c + e - 1), H = this.toAstro(r, e), C = h + "-" + r + "-" + e, L = s + "-" + p + "-" + y, S = this.festival, I = this.lFestival, F = r + "-" + e;
2692
+ let R = !1, F;
2693
+ V === e && (R = !0, F = this.solarTerm[r * 2 - 2]), T === e && (R = !0, F = this.solarTerm[r * 2 - 1]);
2694
+ const c = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, u = this.toGanZhi(c + e - 1), H = this.toAstro(r, e), C = h + "-" + r + "-" + e, L = s + "-" + p + "-" + y, S = this.festival, I = this.lFestival, D = r + "-" + e;
2694
2695
  let N = p + "-" + y;
2695
2696
  return p === 12 && y === 29 && this.monthDays(s, p) === 29 && (N = "12-30"), {
2696
2697
  date: C,
2697
2698
  lunarDate: L,
2698
- festival: S[F] ? S[F].title : null,
2699
+ festival: S[D] ? S[D].title : null,
2699
2700
  lunarFestival: I[N] ? I[N].title : null,
2700
2701
  lYear: s,
2701
2702
  lMonth: p,
@@ -2714,7 +2715,7 @@ const http = new SuHttp(), lunarCalendar = {
2714
2715
  nWeek: b,
2715
2716
  ncWeek: "星期" + m,
2716
2717
  isTerm: R,
2717
- Term: D,
2718
+ Term: F,
2718
2719
  astro: H
2719
2720
  };
2720
2721
  },
@@ -2788,6 +2789,18 @@ const http = new SuHttp(), lunarCalendar = {
2788
2789
  return (h == null ? void 0 : h.dictName) || a;
2789
2790
  }
2790
2791
  },
2792
+ formattMultileCode: {
2793
+ tableCellFormatMethod({ cellValue: a }, l) {
2794
+ if (!l || !dict) return a;
2795
+ const o = a == null ? void 0 : a.split(",");
2796
+ let h = "";
2797
+ return o == null || o.forEach((r) => {
2798
+ var i, t;
2799
+ const e = (t = (i = dict[l]) == null ? void 0 : i.children) == null ? void 0 : t.find((v) => v.dictCode === r);
2800
+ h ? h += `,${e.dictName}` : h = e.dictName;
2801
+ }), h;
2802
+ }
2803
+ },
2791
2804
  formatRelateField: {
2792
2805
  // 转换相应的字段值eg: 'display/obj.test.test'
2793
2806
  tableCellFormatMethod({ row, cellValue }, field) {