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

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
@@ -1229,11 +1229,11 @@ const i18n = window.$i18n, useRender = () => {
1229
1229
  placeholder: null
1230
1230
  }, L, S;
1231
1231
  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") : [];
1232
+ const I = (N = storageLocal.getItem("kLov")[S]) == null ? void 0 : N.children, D = I ? I.filter((E) => E.enabled === "1") : [];
1233
1233
  return {
1234
1234
  name: "#select",
1235
1235
  optionProps: a,
1236
- options: F,
1236
+ options: D,
1237
1237
  props: C,
1238
1238
  defaultValue: L,
1239
1239
  events: H
@@ -1338,7 +1338,7 @@ const i18n = window.$i18n, useRender = () => {
1338
1338
  const C = storageLocal.getItem("kLov");
1339
1339
  let L = "";
1340
1340
  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 })) : [];
1341
+ const S = L ? (I = C[L]) == null ? void 0 : I.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
1342
1342
  return {
1343
1343
  props: u,
1344
1344
  defaultValue: H,
@@ -1359,7 +1359,7 @@ const i18n = window.$i18n, useRender = () => {
1359
1359
  const H = w(u), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.defaultValue;
1360
1360
  return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {}), defaultValue: L, events: H };
1361
1361
  }, 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 = {
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, D = c == null ? void 0 : c.endField, N = {
1363
1363
  type: "date",
1364
1364
  valueFormat: C,
1365
1365
  clearable: !0,
@@ -1400,7 +1400,7 @@ const i18n = window.$i18n, useRender = () => {
1400
1400
  return {
1401
1401
  name: "VxeDateRangePicker",
1402
1402
  startField: I,
1403
- endField: F,
1403
+ endField: D,
1404
1404
  startValue: L,
1405
1405
  endValue: S,
1406
1406
  props: E,
@@ -1455,11 +1455,11 @@ const i18n = window.$i18n, useRender = () => {
1455
1455
  }, w = (c) => {
1456
1456
  let u = {};
1457
1457
  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,
1458
+ change: (c == null ? void 0 : c.change) || F,
1459
+ blur: (c == null ? void 0 : c.blur) || F,
1460
+ focus: (c == null ? void 0 : c.focus) || F,
1461
+ input: (c == null ? void 0 : c.input) || F,
1462
+ clear: (c == null ? void 0 : c.clear) || F,
1463
1463
  searchClick: c == null ? void 0 : c.searchClick,
1464
1464
  suffixClick: c == null ? void 0 : c.suffixClick,
1465
1465
  prefixClick: c == null ? void 0 : c.prefixClick,
@@ -1474,7 +1474,7 @@ const i18n = window.$i18n, useRender = () => {
1474
1474
  autoHiddenButton: !0
1475
1475
  }), C === "image" && (c.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: c, events: u };
1476
1476
  };
1477
- function D() {
1477
+ function F() {
1478
1478
  }
1479
1479
  return {
1480
1480
  renderDict: l,
@@ -2688,14 +2688,14 @@ const http = new SuHttp(), lunarCalendar = {
2688
2688
  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
2689
  let w = this.toGanZhi((h - 1900) * 12 + r + 11);
2690
2690
  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;
2691
+ let R = !1, F;
2692
+ V === e && (R = !0, F = this.solarTerm[r * 2 - 2]), T === e && (R = !0, F = 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, D = r + "-" + e;
2694
2694
  let N = p + "-" + y;
2695
2695
  return p === 12 && y === 29 && this.monthDays(s, p) === 29 && (N = "12-30"), {
2696
2696
  date: C,
2697
2697
  lunarDate: L,
2698
- festival: S[F] ? S[F].title : null,
2698
+ festival: S[D] ? S[D].title : null,
2699
2699
  lunarFestival: I[N] ? I[N].title : null,
2700
2700
  lYear: s,
2701
2701
  lMonth: p,
@@ -2714,7 +2714,7 @@ const http = new SuHttp(), lunarCalendar = {
2714
2714
  nWeek: b,
2715
2715
  ncWeek: "星期" + m,
2716
2716
  isTerm: R,
2717
- Term: D,
2717
+ Term: F,
2718
2718
  astro: H
2719
2719
  };
2720
2720
  },
@@ -2788,6 +2788,18 @@ const http = new SuHttp(), lunarCalendar = {
2788
2788
  return (h == null ? void 0 : h.dictName) || a;
2789
2789
  }
2790
2790
  },
2791
+ formattMultileCode: {
2792
+ tableCellFormatMethod({ cellValue: a }, l) {
2793
+ if (!l || !dict) return a;
2794
+ const o = a == null ? void 0 : a.split(",");
2795
+ let h = "";
2796
+ return o == null || o.forEach((r) => {
2797
+ var i, t;
2798
+ const e = (t = (i = dict[l]) == null ? void 0 : i.children) == null ? void 0 : t.find((v) => v.dictCode === r);
2799
+ h ? h += `,${e.dictName}` : h = e.dictName;
2800
+ }), h;
2801
+ }
2802
+ },
2791
2803
  formatRelateField: {
2792
2804
  // 转换相应的字段值eg: 'display/obj.test.test'
2793
2805
  tableCellFormatMethod({ row, cellValue }, field) {