@utogether/utils 3.0.0-beta.30 → 3.0.0-beta.31

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.
@@ -86,7 +86,7 @@ export declare const useRender: () => {
86
86
  value: any;
87
87
  };
88
88
  options: any[];
89
- methods: any;
89
+ events: any;
90
90
  };
91
91
  renderBU: (attrs?: any, methods?: any) => {
92
92
  name: string;
@@ -101,7 +101,7 @@ export declare const useRender: () => {
101
101
  value: any;
102
102
  };
103
103
  options: any[];
104
- methods: any;
104
+ events: any;
105
105
  };
106
106
  renderNumber: (attrs?: any, methods?: any) => {
107
107
  name: string;
package/dist/utils.es.js CHANGED
@@ -224,7 +224,7 @@ const VxetableRender = (VXETable, {
224
224
  function A() {
225
225
  m.clear(h, r.field, u, v, "row");
226
226
  }
227
- function w() {
227
+ function k() {
228
228
  !e.length && M(""), v != null && v.focus && v.focus(l, r.field);
229
229
  }
230
230
  return [createVNode(resolveComponent("el-select"), mergeProps({
@@ -238,7 +238,7 @@ const VxetableRender = (VXETable, {
238
238
  "remote-method": M,
239
239
  loading: n
240
240
  }, i, {
241
- onFocus: () => w(),
241
+ onFocus: () => k(),
242
242
  onChange: (V) => p(V),
243
243
  onClear: () => A(),
244
244
  onInput: (V) => y(V)
@@ -284,7 +284,7 @@ const VxetableRender = (VXETable, {
284
284
  function A() {
285
285
  m.clear(h, r.field, u, v, "row");
286
286
  }
287
- function w() {
287
+ function k() {
288
288
  !e.length && M(""), v != null && v.focus && v.focus(l, r.field);
289
289
  }
290
290
  return [createVNode(resolveComponent("el-select"), mergeProps({
@@ -298,7 +298,7 @@ const VxetableRender = (VXETable, {
298
298
  "remote-method": M,
299
299
  loading: n
300
300
  }, i, {
301
- onFocus: () => w(),
301
+ onFocus: () => k(),
302
302
  onChange: (V) => p(V),
303
303
  onClear: () => A(),
304
304
  onInput: (V) => y(V)
@@ -357,7 +357,7 @@ const VxetableRender = (VXETable, {
357
357
  function A() {
358
358
  m.clear(h, r, n, v, "data");
359
359
  }
360
- function w() {
360
+ function k() {
361
361
  !e.length && M(""), v != null && v.focus && v.focus(l);
362
362
  }
363
363
  return [createVNode(resolveComponent("el-select"), mergeProps({
@@ -371,7 +371,7 @@ const VxetableRender = (VXETable, {
371
371
  loading: u,
372
372
  "remote-method": M
373
373
  }, i, {
374
- onFocus: () => w(),
374
+ onFocus: () => k(),
375
375
  onChange: (V) => p(V),
376
376
  onClear: () => A(),
377
377
  onInput: () => y()
@@ -601,10 +601,10 @@ const VxetableRender = (VXETable, {
601
601
  if (M) {
602
602
  if (M) {
603
603
  const y = {};
604
- o[s || m] = n.reduce((A, w) => {
604
+ o[s || m] = n.reduce((A, k) => {
605
605
  for (const V in u)
606
- y[V] = A ? y[V] + "," + w[u[V]] : w[u[V]];
607
- return A = A ? A + "," + w[s || m] : w[s || m], A;
606
+ y[V] = A ? y[V] + "," + k[u[V]] : k[u[V]];
607
+ return A = A ? A + "," + k[s || m] : k[s || m], A;
608
608
  }, ""), Object.assign(o, y);
609
609
  }
610
610
  } else {
@@ -665,7 +665,7 @@ const VxetableRender = (VXETable, {
665
665
  e != null && e.change && e.change(s);
666
666
  }
667
667
  function v() {
668
- i.clear(o, h.field, mapField, e, "row");
668
+ i.clear(o, h.field, r.mapField, e, "row");
669
669
  }
670
670
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
671
671
  record: o,
@@ -1077,8 +1077,8 @@ const VxetableRender = (VXETable, {
1077
1077
  e[i] = null, !isEmpty(r) && (f != null && f.multiple) ? (e[i] = r.join(","), Z = [], r.forEach((M) => {
1078
1078
  const p = n.find((y) => M === y[u == null ? void 0 : u.value]);
1079
1079
  p && !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((y) => {
1080
- const A = p[f.mapField[y]], w = e[y] ? e[y].toString() : "";
1081
- e[y] = w && !w.includes(A) ? `${w},${A}` : A;
1080
+ const A = p[f.mapField[y]], k = e[y] ? e[y].toString() : "";
1081
+ e[y] = k && !k.includes(A) ? `${k},${A}` : A;
1082
1082
  }), p && Z.push(p);
1083
1083
  }), Object.assign(s, {
1084
1084
  options: Z
@@ -1219,7 +1219,7 @@ function useAttrs(a = {}) {
1219
1219
  const useRender = () => {
1220
1220
  const a = { value: "dictCode", label: "dictName" }, l = (c, b) => {
1221
1221
  var N;
1222
- const H = k(b);
1222
+ const H = w(b);
1223
1223
  let C = {
1224
1224
  clearable: !0,
1225
1225
  disabled: !1,
@@ -1237,7 +1237,7 @@ const useRender = () => {
1237
1237
  events: H
1238
1238
  };
1239
1239
  }, o = (c, b) => {
1240
- const H = k(b);
1240
+ const H = w(b);
1241
1241
  return {
1242
1242
  name: "#SuSelect",
1243
1243
  optionProps: (c == null ? void 0 : c.optionProps) || { label: "label", value: "value" },
@@ -1283,7 +1283,13 @@ const useRender = () => {
1283
1283
  organizationId: "id",
1284
1284
  organizationCode: "organizationCode"
1285
1285
  };
1286
- return Object.assign(C.mapField, L, (c == null ? void 0 : c.mapField) || {}), { name: "#SuSelect", props: C, optionProps: H, options: [], methods: b };
1286
+ return Object.assign(C.mapField, L, (c == null ? void 0 : c.mapField) || {}), {
1287
+ name: "#SuSelect",
1288
+ props: C,
1289
+ optionProps: H,
1290
+ options: [],
1291
+ events: w(b)
1292
+ };
1287
1293
  }, i = (c, b) => {
1288
1294
  const H = {
1289
1295
  label: "orgName",
@@ -1294,14 +1300,20 @@ const useRender = () => {
1294
1300
  url: "/uums/org",
1295
1301
  fetchField: "orgName"
1296
1302
  }, L = { orgId: "id", orgCode: "orgCode" };
1297
- return Object.assign(C.mapField, L, (c == null ? void 0 : c.mapField) || {}), { name: "#SuSelect", props: C, optionProps: H, options: [], methods: b };
1303
+ return Object.assign(C.mapField, L, (c == null ? void 0 : c.mapField) || {}), {
1304
+ name: "#SuSelect",
1305
+ props: C,
1306
+ optionProps: H,
1307
+ options: [],
1308
+ events: w(b)
1309
+ };
1298
1310
  }, t = (c, b) => {
1299
1311
  const H = Object.assign({ disabled: !1 }, c), C = H == null ? void 0 : H.defaultValue;
1300
1312
  return {
1301
1313
  name: "VxeInput",
1302
1314
  props: H,
1303
1315
  defaultValue: C,
1304
- events: k(b)
1316
+ events: w(b)
1305
1317
  };
1306
1318
  }, v = (c, b) => {
1307
1319
  const H = Object.assign({ disabled: !1, rows: 3 }, c), C = H == null ? void 0 : H.defaultValue;
@@ -1309,14 +1321,14 @@ const useRender = () => {
1309
1321
  name: "#textarea",
1310
1322
  props: H,
1311
1323
  defaultValue: C,
1312
- events: k(b)
1324
+ events: w(b)
1313
1325
  };
1314
1326
  }, Z = (c, b) => {
1315
1327
  const H = "VxeCheckbox", { defaultValue: C, options: L, props: S } = n(c);
1316
- return { name: H, defaultValue: C, options: L, props: S, events: k(b) };
1328
+ return { name: H, defaultValue: C, options: L, props: S, events: w(b) };
1317
1329
  }, d = (c, b) => {
1318
1330
  const H = "VxeRadio", { defaultValue: C, options: L, props: S } = n(c);
1319
- return { name: H, defaultValue: C, options: L, props: S, events: k(b) };
1331
+ return { name: H, defaultValue: C, options: L, props: S, events: w(b) };
1320
1332
  }, n = (c) => {
1321
1333
  var I;
1322
1334
  let b = { disabled: !1 }, H;
@@ -1326,7 +1338,7 @@ const useRender = () => {
1326
1338
  const S = L ? (I = C[L]) == null ? void 0 : I.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
1327
1339
  return { props: b, defaultValue: H, options: S };
1328
1340
  }, f = (c, b) => {
1329
- const H = k(b);
1341
+ const H = w(b);
1330
1342
  return {
1331
1343
  name: "VxeNumberInput",
1332
1344
  props: Object.assign(
@@ -1337,10 +1349,10 @@ const useRender = () => {
1337
1349
  events: H
1338
1350
  };
1339
1351
  }, u = (c, b) => {
1340
- const H = k(b), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.defaultValue;
1352
+ const H = w(b), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.defaultValue;
1341
1353
  return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {}), defaultValue: L, events: H };
1342
1354
  }, m = (c, b) => {
1343
- const H = k(b), 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, T = Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {});
1355
+ const H = w(b), 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, T = Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {});
1344
1356
  return {
1345
1357
  name: "VxeDateRangePicker",
1346
1358
  startField: I,
@@ -1351,10 +1363,10 @@ const useRender = () => {
1351
1363
  events: H
1352
1364
  };
1353
1365
  }, s = (c, b) => {
1354
- const H = k(b);
1366
+ const H = w(b);
1355
1367
  return { name: "#lov", props: Object.assign({}, c || {}), events: H };
1356
1368
  }, M = (c, b) => {
1357
- const H = k(b), C = (c == null ? void 0 : c.optionProps) || {
1369
+ const H = w(b), C = (c == null ? void 0 : c.optionProps) || {
1358
1370
  label: "label",
1359
1371
  value: "value"
1360
1372
  }, L = Object.assign(
@@ -1376,7 +1388,7 @@ const useRender = () => {
1376
1388
  closeValue: "N"
1377
1389
  }, C = "Y";
1378
1390
  isObject(c) && !isFunction(c) ? (H = Object.assign(H, c || {}), C = c.defaultValue || C) : !isEmpty(c) && isString(c) && (C = c, H = Object.assign(H, { defaultValue: C }));
1379
- const L = isFunction(c) ? k(c) : k(b);
1391
+ const L = isFunction(c) ? w(c) : w(b);
1380
1392
  return { name: "VxeSwitch", props: H, defaultValue: C, events: L };
1381
1393
  }, y = (c, b) => ({ name: "#tag", props: { code: c, tagMap: b } }), A = (c, b) => {
1382
1394
  const H = {
@@ -1389,14 +1401,14 @@ const useRender = () => {
1389
1401
  !isFunction(c) && isObject(c) && Object.assign(H, c);
1390
1402
  const C = isFunction(c) ? c : b;
1391
1403
  return p(H, C);
1392
- }, w = () => ({ name: "#iconSelect" }), V = (c = [], b = {}, H) => ({ name: "#treeSelect", sourceData: c, props: b, events: H }), R = (c, b) => {
1393
- const H = k(b);
1404
+ }, k = () => ({ name: "#iconSelect" }), V = (c = [], b = {}, H) => ({ name: "#treeSelect", sourceData: c, props: b, events: H }), R = (c, b) => {
1405
+ const H = w(b);
1394
1406
  return {
1395
1407
  name: "#area",
1396
1408
  props: { mapField: (c == null ? void 0 : c.mapField) || ["province", "city", "region"] },
1397
1409
  events: H
1398
1410
  };
1399
- }, k = (c) => {
1411
+ }, w = (c) => {
1400
1412
  let b = {};
1401
1413
  return isObject(c) && !isFunction(c) ? b = {
1402
1414
  change: (c == null ? void 0 : c.change) || F,
@@ -1439,7 +1451,7 @@ const useRender = () => {
1439
1451
  renderSwitch: p,
1440
1452
  renderCellTag: y,
1441
1453
  renderEnabled: A,
1442
- renderIconSelect: w,
1454
+ renderIconSelect: k,
1443
1455
  renderTreeSelect: V,
1444
1456
  renderArea: R,
1445
1457
  renderUpload: E
@@ -2623,9 +2635,9 @@ const http = new SuHttp(), lunarCalendar = {
2623
2635
  for (t = 1; t < 13 && d > 0; t++)
2624
2636
  v > 0 && t === v + 1 && M === !1 ? (--t, M = !0, Z = this.leapDays(s)) : Z = this.monthDays(s, t), M === !0 && t === v + 1 && (M = !1), d -= Z;
2625
2637
  d === 0 && v > 0 && t === v + 1 && (M ? M = !1 : (M = !0, --t)), d < 0 && (d += Z, --t);
2626
- const p = t, y = d + 1, A = r - 1, w = this.toGanZhiYear(s), V = this.getTerm(h, r * 2 - 1), R = this.getTerm(h, r * 2);
2627
- let k = this.toGanZhi((h - 1900) * 12 + r + 11);
2628
- e >= V && (k = this.toGanZhi((h - 1900) * 12 + r + 12));
2638
+ const p = t, y = d + 1, A = r - 1, k = this.toGanZhiYear(s), V = this.getTerm(h, r * 2 - 1), R = this.getTerm(h, r * 2);
2639
+ let w = this.toGanZhi((h - 1900) * 12 + r + 11);
2640
+ e >= V && (w = this.toGanZhi((h - 1900) * 12 + r + 12));
2629
2641
  let E = !1, F;
2630
2642
  V === e && (E = !0, F = this.solarTerm[r * 2 - 2]), R === e && (E = !0, F = this.solarTerm[r * 2 - 1]);
2631
2643
  const c = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, b = 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;
@@ -2644,8 +2656,8 @@ const http = new SuHttp(), lunarCalendar = {
2644
2656
  cYear: h,
2645
2657
  cMonth: r,
2646
2658
  cDay: e,
2647
- gzYear: w,
2648
- gzMonth: k,
2659
+ gzYear: k,
2660
+ gzMonth: w,
2649
2661
  gzDay: b,
2650
2662
  isToday: f,
2651
2663
  isLeap: M,