@dazhicheng/ui 1.6.71 → 1.6.73

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.
Files changed (142) hide show
  1. package/dist/assets/svg/download.svg.js +1 -1
  2. package/dist/components/tt-api-component/index.js +4 -3
  3. package/dist/components/tt-api-component/index.vue2.js +3 -2
  4. package/dist/components/tt-area/TtArea.vue.js +1 -1
  5. package/dist/components/tt-area/TtArea.vue3.js +3 -2
  6. package/dist/components/tt-button/index.d.ts +28 -28
  7. package/dist/components/tt-button/index.js +5 -4
  8. package/dist/components/tt-button/index.vue.d.ts +16 -16
  9. package/dist/components/tt-button/index.vue2.js +18 -17
  10. package/dist/components/tt-checkbox/index.js +4 -3
  11. package/dist/components/tt-checkbox/index.vue.js +9 -8
  12. package/dist/components/tt-config-provider/index.js +4 -3
  13. package/dist/components/tt-custom-export-modal/index.js +4 -3
  14. package/dist/components/tt-custom-export-modal/src/assets/search.svg.js +5 -5
  15. package/dist/components/tt-custom-export-modal/src/assets/star.svg.js +3 -3
  16. package/dist/components/tt-custom-export-modal/src/assets/trash.svg.js +7 -7
  17. package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.js +1 -1
  18. package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue2.js +3 -2
  19. package/dist/components/tt-custom-export-panel/index.js +4 -3
  20. package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue.js +3 -2
  21. package/dist/components/tt-drawer/index.d.ts +109 -109
  22. package/dist/components/tt-drawer/index.js +4 -3
  23. package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +60 -60
  24. package/dist/components/tt-drawer/src/RenderDrawer.vue.js +3 -2
  25. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +3 -2
  26. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
  27. package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +7 -6
  28. package/dist/components/tt-drawer/src/props.js +3 -2
  29. package/dist/components/tt-drawer/src/utils/drawer-api.js +3 -2
  30. package/dist/components/tt-empty/index.d.ts +4 -4
  31. package/dist/components/tt-empty/index.js +4 -3
  32. package/dist/components/tt-form/index.js +9 -8
  33. package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +8 -7
  34. package/dist/components/tt-form/src/components/FormActions.vue2.js +33 -32
  35. package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +10 -10
  36. package/dist/components/tt-form/src/form/FormDescription.vue.js +3 -2
  37. package/dist/components/tt-form/src/form/FormItem.vue.js +3 -2
  38. package/dist/components/tt-form/src/form/FormLabel.vue.js +6 -5
  39. package/dist/components/tt-form/src/form/RenderContent.vue.js +7 -6
  40. package/dist/components/tt-form/src/form-render/FormField.vue2.js +3 -2
  41. package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +3 -2
  42. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +1 -0
  43. package/dist/components/tt-form/src/form-render/array-register/utils.js +3 -2
  44. package/dist/components/tt-form/src/form-render/dependencies.js +30 -29
  45. package/dist/components/tt-form/src/form-render/form.vue2.js +3 -2
  46. package/dist/components/tt-form/src/form-render/helper.js +3 -2
  47. package/dist/components/tt-form/src/form-render/rootWrapperClass.js +3 -2
  48. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +3 -2
  49. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +1 -0
  50. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +3 -2
  51. package/dist/components/tt-form/src/group-form/groupFormApi.js +3 -2
  52. package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +13 -12
  53. package/dist/components/tt-form/src/hooks/useSelectCollapse.js +3 -2
  54. package/dist/components/tt-form/src/index.vue2.js +3 -2
  55. package/dist/components/tt-form/src/useFormContext.js +10 -9
  56. package/dist/components/tt-form-item-error-tooltip/index.js +5 -4
  57. package/dist/components/tt-form-item-error-tooltip/index.vue.js +3 -2
  58. package/dist/components/tt-icon/index.js +6 -5
  59. package/dist/components/tt-icon/index.vue.js +2 -2
  60. package/dist/components/tt-image/index.d.ts +29 -29
  61. package/dist/components/tt-image/index.js +6 -5
  62. package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
  63. package/dist/components/tt-image/src/components/ImageViewer.js +8 -7
  64. package/dist/components/tt-image/tt-image.d.ts +29 -29
  65. package/dist/components/tt-input-textarea/index.js +4 -3
  66. package/dist/components/tt-input-textarea/index.vue.d.ts +40 -40
  67. package/dist/components/tt-input-textarea/index.vue.js +3 -2
  68. package/dist/components/tt-loading/index.js +4 -3
  69. package/dist/components/tt-loading/src/directive.js +4 -3
  70. package/dist/components/tt-loading/src/loading.vue.js +2 -2
  71. package/dist/components/tt-log/index.js +4 -3
  72. package/dist/components/tt-log/index.vue.js +5 -4
  73. package/dist/components/tt-modal/index.d.ts +150 -150
  74. package/dist/components/tt-modal/index.js +8 -7
  75. package/dist/components/tt-modal/src/RenderModal.vue.d.ts +42 -42
  76. package/dist/components/tt-modal/src/RenderModal.vue.js +3 -2
  77. package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +3 -2
  78. package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +3 -2
  79. package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +3 -2
  80. package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +17 -17
  81. package/dist/components/tt-modal/src/props.js +3 -2
  82. package/dist/components/tt-modal/src/utils/modal-api.js +9 -8
  83. package/dist/components/tt-modal-form/index.vue.js +3 -2
  84. package/dist/components/tt-nav-anchor/index.js +4 -3
  85. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +3 -2
  86. package/dist/components/tt-panel-select/index.js +4 -3
  87. package/dist/components/tt-panel-select/src/common.js +5 -4
  88. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +5 -5
  89. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +3 -2
  90. package/dist/components/tt-panel-select/src/index.vue.d.ts +5 -5
  91. package/dist/components/tt-panel-select/src/index.vue.js +3 -2
  92. package/dist/components/tt-radio-group/index.js +4 -3
  93. package/dist/components/tt-radio-group/index.vue.js +18 -17
  94. package/dist/components/tt-select/index.js +4 -3
  95. package/dist/components/tt-select/src/Select.vue.js +3 -2
  96. package/dist/components/tt-select/src/components/SelectTable.vue.js +3 -2
  97. package/dist/components/tt-select/src/components/Table.vue.js +3 -2
  98. package/dist/components/tt-select/src/hooks/useDataSource.js +3 -2
  99. package/dist/components/tt-select/src/hooks/useSelect.js +18 -17
  100. package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +3 -2
  101. package/dist/components/tt-table/index.js +6 -5
  102. package/dist/components/tt-table/src/Table.vue.js +3 -2
  103. package/dist/components/tt-table/src/TableForm.vue.js +3 -2
  104. package/dist/components/tt-table/src/components/TableAction.vue.js +8 -7
  105. package/dist/components/tt-table/src/components/TableButtons.js +3 -2
  106. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +3 -2
  107. package/dist/components/tt-table/src/components/TableToolbarTools.vue.js +3 -2
  108. package/dist/components/tt-table/src/hooks/useColumnPersistence.js +17 -16
  109. package/dist/components/tt-table/src/hooks/useColumns.js +3 -2
  110. package/dist/components/tt-table/src/hooks/useKeyboardNav.js +18 -17
  111. package/dist/components/tt-table/src/hooks/usePagination.js +20 -19
  112. package/dist/components/tt-table/src/hooks/useQuery.js +9 -8
  113. package/dist/components/tt-table/src/hooks/useRowIdentity.js +3 -2
  114. package/dist/components/tt-table/src/hooks/useRowSelection.js +25 -24
  115. package/dist/components/tt-table/src/hooks/useSideSlot.js +9 -8
  116. package/dist/components/tt-table/src/hooks/useSyncProps.js +11 -10
  117. package/dist/components/tt-table/src/hooks/useTableData.js +5 -4
  118. package/dist/components/tt-table/src/hooks/useTableFooter.js +13 -12
  119. package/dist/components/tt-table/src/hooks/useTableForm.js +20 -19
  120. package/dist/components/tt-table/src/props.js +7 -6
  121. package/dist/components/tt-table/src/table-mutation-events.js +12 -11
  122. package/dist/components/tt-table/src/utils/action-tab-index.js +5 -4
  123. package/dist/components/tt-table/src/utils/context.js +9 -8
  124. package/dist/components/tt-text/index.js +4 -3
  125. package/dist/components/tt-upload/index.d.ts +60 -60
  126. package/dist/components/tt-upload/index.js +6 -5
  127. package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
  128. package/dist/components/tt-upload/src/TtUpload.vue.js +3 -2
  129. package/dist/components/tt-upload/src/typing.d.ts +17 -17
  130. package/dist/directives/disabled-tip/index.js +3 -2
  131. package/dist/hooks/useFormSchemasLink.js +3 -2
  132. package/dist/hooks/useFormat.js +3 -2
  133. package/dist/hooks/usePanelSelectSchemas.js +3 -2
  134. package/dist/hooks/useScreenshotOss.js +3 -2
  135. package/dist/packages/hooks/src/useDebounce.js +3 -2
  136. package/dist/packages/hooks/src/useElementScreenshot.js +3 -2
  137. package/dist/packages/hooks/src/usePriorityValue.js +9 -8
  138. package/dist/packages/utils/src/stateHandler.js +15 -9
  139. package/dist/plugins/default/renderCellContent.js +12 -11
  140. package/dist/plugins/vxeTable/switchStatus.js +13 -12
  141. package/dist/style.css +1 -1
  142. package/package.json +3 -3
@@ -6,6 +6,7 @@ import { toValue as v, getCurrentInstance as d, useSlots as b, useAttrs as O, co
6
6
  import "numeral";
7
7
  import { getFirstNonNullOrUndefined as V } from "../../utils/src/tool.js";
8
8
  import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
9
+ import "../../utils/src/stateHandler.js";
9
10
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
10
11
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
11
12
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
@@ -14,11 +15,11 @@ import "lodash-es";
14
15
  function g(o, e, r) {
15
16
  const t = d(), u = b(), c = O();
16
17
  return P(() => {
17
- var i, s;
18
- const m = ((i = t == null ? void 0 : t.vnode) == null ? void 0 : i.props) || {}, n = {};
18
+ var n, s;
19
+ const m = ((n = t == null ? void 0 : t.vnode) == null ? void 0 : n.props) || {}, i = {};
19
20
  for (const [l, f] of Object.entries(m))
20
- n[a(l)] = f;
21
- const p = (n == null ? void 0 : n[o]) === void 0 ? void 0 : e[o];
21
+ i[a(l)] = f;
22
+ const p = (i == null ? void 0 : i[o]) === void 0 ? void 0 : e[o];
22
23
  return V(
23
24
  u[o],
24
25
  c[o],
@@ -27,20 +28,20 @@ function g(o, e, r) {
27
28
  );
28
29
  });
29
30
  }
30
- function q(o, e) {
31
+ function w(o, e) {
31
32
  const r = {};
32
33
  return Object.keys(o).forEach((t) => {
33
34
  r[t] = g(t, o, e);
34
35
  }), r;
35
36
  }
36
- function w(o) {
37
+ function z(o) {
37
38
  const e = {};
38
39
  for (const [r, t] of Object.entries(o))
39
40
  e[r] = v(t);
40
41
  return e;
41
42
  }
42
43
  export {
43
- w as getPriorityValues,
44
+ z as getPriorityValues,
44
45
  g as usePriorityValue,
45
- q as usePriorityValues
46
+ w as usePriorityValues
46
47
  };
@@ -1,10 +1,16 @@
1
- var t = Object.defineProperty;
2
- var n = (e, s, i) => s in e ? t(e, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[s] = i;
3
- var o = (e, s, i) => n(e, typeof s != "symbol" ? s + "" : s, i);
4
- class h {
1
+ var n = Object.defineProperty;
2
+ var l = (s, e, i) => e in s ? n(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
3
+ var r = (s, e, i) => l(s, typeof e != "symbol" ? e + "" : e, i);
4
+ typeof Promise.withResolvers > "u" && (Promise.withResolvers = function() {
5
+ let s, e;
6
+ return { promise: new Promise((o, t) => {
7
+ s = o, e = t;
8
+ }), resolve: s, reject: e };
9
+ });
10
+ class c {
5
11
  constructor() {
6
- o(this, "condition", !1);
7
- o(this, "promiseResolvers", null);
12
+ r(this, "condition", !1);
13
+ r(this, "promiseResolvers", null);
8
14
  }
9
15
  isConditionTrue() {
10
16
  return this.condition;
@@ -21,13 +27,13 @@ class h {
21
27
  waitForCondition() {
22
28
  if (this.condition)
23
29
  return Promise.resolve();
24
- const { promise: s, resolve: i, reject: r } = Promise.withResolvers();
25
- return this.promiseResolvers = { resolve: i, reject: r }, s;
30
+ const { promise: e, resolve: i, reject: o } = Promise.withResolvers();
31
+ return this.promiseResolvers = { resolve: i, reject: o }, e;
26
32
  }
27
33
  clearPromises() {
28
34
  this.promiseResolvers = null;
29
35
  }
30
36
  }
31
37
  export {
32
- h as StateHandler
38
+ c as StateHandler
33
39
  };
@@ -8,12 +8,13 @@ import "xe-utils";
8
8
  import "dayjs/plugin/utc";
9
9
  import "dayjs/plugin/timezone";
10
10
  import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
11
+ import "../../packages/utils/src/stateHandler.js";
11
12
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
12
13
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
13
14
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
14
15
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
15
- import { cloneDeep as f } from "lodash-es";
16
- function _() {
16
+ import { cloneDeep as m } from "lodash-es";
17
+ function j() {
17
18
  return {
18
19
  install(C) {
19
20
  C.renderer.add("renderCellContent", {
@@ -24,7 +25,7 @@ function _() {
24
25
  if (c(e.customRender))
25
26
  return l(
26
27
  e.customRender({
27
- result: f(t),
28
+ result: m(t),
28
29
  row: u,
29
30
  column: n,
30
31
  $table: r
@@ -36,26 +37,26 @@ function _() {
36
37
  const h = w({
37
38
  name: "RenderCellContent",
38
39
  setup() {
39
- var m;
40
+ var f;
40
41
  const t = b([]);
41
42
  async function o() {
42
- var s, p;
43
+ var p, s;
43
44
  if (r[d]) return;
44
45
  let a = {};
45
- c(e.beforeFetch) && (a = await ((s = e.beforeFetch) == null ? void 0 : s.call(e, u, n)));
46
- const R = await ((p = e.api) == null ? void 0 : p.call(e, a));
47
- t.value = R, c(e.afterFetch) && (t.value = await e.afterFetch(t.value, u, n)), r[`${n.field}Option`] = f(t.value);
46
+ c(e.beforeFetch) && (a = await ((p = e.beforeFetch) == null ? void 0 : p.call(e, u, n)));
47
+ const R = await ((s = e.api) == null ? void 0 : s.call(e, a));
48
+ t.value = R, c(e.afterFetch) && (t.value = await e.afterFetch(t.value, u, n)), r[`${n.field}Option`] = m(t.value);
48
49
  }
49
50
  if ($(o), e.customRender)
50
51
  return () => l(
51
52
  e.customRender({
52
- result: f(t.value),
53
+ result: m(t.value),
53
54
  row: u,
54
55
  column: n,
55
56
  $table: r
56
57
  })
57
58
  );
58
- const i = (m = t.value) == null ? void 0 : m.find((a) => a[e.valueField] === n.field);
59
+ const i = (f = t.value) == null ? void 0 : f.find((a) => a[e.valueField] === n.field);
59
60
  return () => l("div", null, (i == null ? void 0 : i[e.labelField]) ?? "");
60
61
  }
61
62
  });
@@ -66,5 +67,5 @@ function _() {
66
67
  };
67
68
  }
68
69
  export {
69
- _ as createVxePluginRenderCellContent
70
+ j as createVxePluginRenderCellContent
70
71
  };
@@ -9,6 +9,7 @@ import "xe-utils";
9
9
  import "dayjs/plugin/utc";
10
10
  import "dayjs/plugin/timezone";
11
11
  import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
12
+ import "../../packages/utils/src/stateHandler.js";
12
13
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
13
14
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
14
15
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
@@ -25,12 +26,12 @@ const D = [
25
26
  "afterFetch",
26
27
  "beforeChange"
27
28
  ];
28
- function C(a) {
29
- return Object.fromEntries(Object.entries(a).map(([t, l]) => [I(t), l]));
29
+ function C(i) {
30
+ return Object.fromEntries(Object.entries(i).map(([t, l]) => [I(t), l]));
30
31
  }
31
32
  const M = "1", O = "0";
32
- function j(a) {
33
- const t = C(a);
33
+ function j(i) {
34
+ const t = C(i);
34
35
  return {
35
36
  active: t.activeValue ?? M,
36
37
  inactive: t.inactiveValue ?? O
@@ -38,10 +39,10 @@ function j(a) {
38
39
  }
39
40
  function ae() {
40
41
  return {
41
- install(a) {
42
- a.renderer.add("switchStatus", {
42
+ install(i) {
43
+ i.renderer.add("switchStatus", {
43
44
  renderTableDefault(t, l) {
44
- const { row: i, column: r } = l, e = t.props ?? {}, v = U(e, [...D]), E = C(v);
45
+ const { row: a, column: r } = l, e = t.props ?? {}, v = U(e, [...D]), E = C(v);
45
46
  return w(
46
47
  _({
47
48
  name: "TtVxeSwitchCell",
@@ -51,14 +52,14 @@ function ae() {
51
52
  activeValue: n,
52
53
  inactiveValue: m,
53
54
  ...E,
54
- modelValue: i[r.field],
55
+ modelValue: a[r.field],
55
56
  loading: s.value,
56
57
  "onUpdate:modelValue": (o) => {
57
- i[r.field] = o;
58
+ a[r.field] = o;
58
59
  },
59
60
  beforeChange: async () => {
60
61
  var d;
61
- const o = i[r.field];
62
+ const o = a[r.field];
62
63
  if ((u(e.beforeChange) ? await ((d = e.beforeChange) == null ? void 0 : d.call(e, o)) : !0) === !1 || !u(e.api)) return !1;
63
64
  const T = o === n ? m : n, b = `是否确认${o === n ? "关闭" : "开启"}`;
64
65
  let p = !1;
@@ -73,9 +74,9 @@ function ae() {
73
74
  var h, V;
74
75
  if (B === "confirm") {
75
76
  f.confirmButtonLoading = !0;
76
- let c = { [r.field]: T, id: i.id };
77
+ let c = { [r.field]: T, id: a.id };
77
78
  if (s.value = !0, u(e.beforeFetch)) {
78
- const S = await ((h = e.beforeFetch) == null ? void 0 : h.call(e, c, i, r));
79
+ const S = await ((h = e.beforeFetch) == null ? void 0 : h.call(e, c, a, r));
79
80
  c = {
80
81
  ...c,
81
82
  ...S