@dazhicheng/ui 1.5.202 → 1.5.204

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 (149) hide show
  1. package/dist/_virtual/___vite-browser-external.js +6 -0
  2. package/dist/_virtual/__vite-browser-external.js +4 -0
  3. package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
  4. package/dist/_virtual/_commonjsHelpers.js +24 -0
  5. package/dist/_virtual/aes.js +4 -0
  6. package/dist/_virtual/cipher-core.js +4 -0
  7. package/dist/_virtual/core.js +4 -0
  8. package/dist/_virtual/enc-base64.js +4 -0
  9. package/dist/_virtual/enc-utf8.js +4 -0
  10. package/dist/_virtual/evpkdf.js +4 -0
  11. package/dist/_virtual/hmac.js +4 -0
  12. package/dist/_virtual/md5.js +4 -0
  13. package/dist/_virtual/mode-ecb.js +4 -0
  14. package/dist/_virtual/pad-pkcs7.js +4 -0
  15. package/dist/_virtual/sha1.js +4 -0
  16. package/dist/components/tt-api-component/index.js +17 -4
  17. package/dist/components/tt-api-component/index.vue2.js +24 -13
  18. package/dist/components/tt-area/TtArea.vue3.js +24 -13
  19. package/dist/components/tt-button/index.js +18 -5
  20. package/dist/components/tt-button/index.vue2.js +27 -16
  21. package/dist/components/tt-checkbox/index.js +17 -4
  22. package/dist/components/tt-checkbox/index.vue.js +38 -28
  23. package/dist/components/tt-drawer/index.js +17 -7
  24. package/dist/components/tt-drawer/src/RenderDrawer.vue.js +48 -36
  25. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +39 -26
  26. package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +23 -10
  27. package/dist/components/tt-drawer/src/props.js +22 -9
  28. package/dist/components/tt-drawer/src/utils/drawer-api.js +42 -33
  29. package/dist/components/tt-empty/index.js +28 -18
  30. package/dist/components/tt-form/index.js +22 -14
  31. package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +23 -14
  32. package/dist/components/tt-form/src/components/FormActions.vue2.js +42 -32
  33. package/dist/components/tt-form/src/form/FormDescription.vue.js +19 -10
  34. package/dist/components/tt-form/src/form/FormItem.vue.js +18 -9
  35. package/dist/components/tt-form/src/form/FormLabel.vue.js +18 -9
  36. package/dist/components/tt-form/src/form/RenderContent.vue.js +25 -13
  37. package/dist/components/tt-form/src/form-render/FormField.vue2.js +62 -55
  38. package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +36 -28
  39. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +64 -56
  40. package/dist/components/tt-form/src/form-render/array-register/utils.js +18 -8
  41. package/dist/components/tt-form/src/form-render/dependencies.js +36 -24
  42. package/dist/components/tt-form/src/form-render/form.vue2.js +17 -7
  43. package/dist/components/tt-form/src/form-render/helper.js +29 -16
  44. package/dist/components/tt-form/src/form-render/rootWrapperClass.js +17 -7
  45. package/dist/components/tt-form/src/formApi.js +59 -48
  46. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +17 -4
  47. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +67 -57
  48. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +55 -46
  49. package/dist/components/tt-form/src/group-form/groupFormApi.js +21 -10
  50. package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +27 -17
  51. package/dist/components/tt-form/src/hooks/useSelectCollapse.js +32 -23
  52. package/dist/components/tt-form/src/index.vue2.js +53 -45
  53. package/dist/components/tt-form/src/useFormContext.js +74 -62
  54. package/dist/components/tt-form-item-error-tooltip/index.js +18 -5
  55. package/dist/components/tt-form-item-error-tooltip/index.vue.js +32 -21
  56. package/dist/components/tt-icon/index.js +20 -7
  57. package/dist/components/tt-image/index.js +19 -6
  58. package/dist/components/tt-image/src/components/ImageViewer.js +27 -17
  59. package/dist/components/tt-loading/index.js +16 -4
  60. package/dist/components/tt-loading/src/directive.js +34 -22
  61. package/dist/components/tt-log/index.js +17 -4
  62. package/dist/components/tt-log/index.vue.js +21 -8
  63. package/dist/components/tt-modal/index.js +16 -5
  64. package/dist/components/tt-modal/src/RenderModal.vue.js +163 -151
  65. package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +38 -28
  66. package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +24 -11
  67. package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +36 -23
  68. package/dist/components/tt-modal/src/props.js +22 -9
  69. package/dist/components/tt-modal/src/utils/modal-api.js +39 -29
  70. package/dist/components/tt-modal-form/index.vue.js +44 -36
  71. package/dist/components/tt-nav-anchor/index.js +17 -4
  72. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +69 -57
  73. package/dist/components/tt-panel-select/index.js +17 -4
  74. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +51 -40
  75. package/dist/components/tt-panel-select/src/index.vue.js +35 -24
  76. package/dist/components/tt-select/index.js +17 -4
  77. package/dist/components/tt-select/src/Select.vue.js +79 -68
  78. package/dist/components/tt-select/src/components/SelectTable.vue.js +41 -30
  79. package/dist/components/tt-select/src/components/Table.vue.js +86 -76
  80. package/dist/components/tt-select/src/hooks/useDataSource.js +59 -49
  81. package/dist/components/tt-select/src/hooks/useSelect.js +46 -38
  82. package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +123 -112
  83. package/dist/components/tt-table/index.js +19 -12
  84. package/dist/components/tt-table/src/Table.vue.js +82 -71
  85. package/dist/components/tt-table/src/TableForm.vue.js +77 -65
  86. package/dist/components/tt-table/src/components/TableAction.vue.js +49 -39
  87. package/dist/components/tt-table/src/components/TableButtons.js +73 -60
  88. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +14 -3
  89. package/dist/components/tt-table/src/components/TableToobalTools.vue.js +36 -25
  90. package/dist/components/tt-table/src/hooks/useColumns.js +72 -65
  91. package/dist/components/tt-table/src/hooks/useCustomColumns.js +43 -31
  92. package/dist/components/tt-table/src/hooks/useDataSource.js +50 -42
  93. package/dist/components/tt-table/src/hooks/usePagination.js +36 -25
  94. package/dist/components/tt-table/src/props.js +55 -42
  95. package/dist/components/tt-table/src/utils/table-api.js +33 -22
  96. package/dist/components/tt-table/src/utils/table-form-api.js +35 -24
  97. package/dist/components/tt-text/index.js +17 -4
  98. package/dist/components/tt-upload/index.js +19 -6
  99. package/dist/components/tt-upload/src/TtUpload.vue.js +77 -66
  100. package/dist/directives/disabled-tip/index.js +37 -26
  101. package/dist/hooks/useFormSchemasLink.js +90 -79
  102. package/dist/hooks/useScreenshotOss.js +49 -35
  103. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
  104. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +64 -0
  105. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +545 -0
  106. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +508 -0
  107. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +81 -0
  108. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js +10 -0
  109. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +71 -0
  110. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +84 -0
  111. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +72 -0
  112. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +22 -0
  113. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js +11 -0
  114. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +50 -0
  115. package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js +1024 -0
  116. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +32 -0
  117. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js +11 -0
  118. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js +92 -0
  119. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js +34 -0
  120. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js +52 -0
  121. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js +43 -0
  122. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js +47 -0
  123. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js +122 -0
  124. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js +30 -0
  125. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js +24 -0
  126. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js +106 -0
  127. package/dist/node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js +16 -0
  128. package/dist/node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js +21 -0
  129. package/dist/node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2922 -0
  130. package/dist/node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js +93 -0
  131. package/dist/packages/hooks/src/propTypes.js +17 -0
  132. package/dist/packages/hooks/src/tools.js +6 -0
  133. package/dist/packages/hooks/src/useDebounce.js +32 -0
  134. package/dist/packages/hooks/src/useDesign.js +12 -0
  135. package/dist/packages/hooks/src/useElementScreenshot.js +136 -0
  136. package/dist/packages/hooks/src/useIsScroll.js +12 -0
  137. package/dist/packages/hooks/src/usePriorityValue.js +45 -0
  138. package/dist/packages/utils/src/calc.js +14 -0
  139. package/dist/packages/utils/src/check.js +10 -0
  140. package/dist/packages/utils/src/install.js +11 -0
  141. package/dist/packages/utils/src/is.js +64 -0
  142. package/dist/packages/utils/src/merge.js +13 -0
  143. package/dist/packages/utils/src/stateHandler.js +33 -0
  144. package/dist/packages/utils/src/string.js +6 -0
  145. package/dist/packages/utils/src/testid-helper.js +14 -0
  146. package/dist/packages/utils/src/tool.js +181 -0
  147. package/dist/plugins/default/renderCellContent.js +39 -28
  148. package/dist/plugins/vxeTable/switchStatus.js +37 -26
  149. package/package.json +3 -3
@@ -1,44 +1,52 @@
1
- import { calcWordsWidth as W } from "@dazhicheng/utils";
2
- import { get as I } from "lodash-es";
3
- import { ref as w, computed as d, unref as t, watchEffect as L } from "vue";
4
- function z(n, e) {
5
- const S = w(1), h = /* @__PURE__ */ new Map(), g = w(0), b = w(!1), C = d(() => e.collapse ?? t(n).multiple), E = d(() => e.isFilterMethod ?? !0), p = d(() => e.searchField), v = d(() => {
1
+ import "axios";
2
+ import "element-plus";
3
+ import "dayjs";
4
+ import { ref as w, computed as d, unref as t, watchEffect as I } from "vue";
5
+ import { calcWordsWidth as M } from "../../../../packages/utils/src/tool.js";
6
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
7
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
8
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
9
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
10
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
11
+ import { get as L } from "lodash-es";
12
+ function q(n, e) {
13
+ const S = w(1), h = /* @__PURE__ */ new Map(), m = w(0), p = w(!1), b = d(() => e.collapse ?? t(n).multiple), W = d(() => e.isFilterMethod ?? !0), E = d(() => e.searchField), v = d(() => {
6
14
  if (e.autoSelectWidth && !t(n).multiple && t(e.selectOption)) {
7
15
  const l = t(e.selectOption).label || "";
8
- return `${W(l) + 45}px`;
16
+ return `${M(l) + 45}px`;
9
17
  }
10
18
  return "100%";
11
19
  });
12
20
  function y(l) {
13
21
  var r, f;
14
- const a = (r = e.getKeyboardEvent) == null ? void 0 : r.call(e);
22
+ const i = (r = e.getKeyboardEvent) == null ? void 0 : r.call(e);
15
23
  if (!l) {
16
- e.options.value = t(e.dataList), e.setActiveIndex(-1), a.ArrowDown();
24
+ e.options.value = t(e.dataList), e.setActiveIndex(-1), i.ArrowDown();
17
25
  return;
18
26
  }
19
27
  let s = [];
20
- const c = p.value;
28
+ const c = E.value;
21
29
  if (c)
22
30
  s = t(e.dataList).filter(
23
- (o) => String(I(o, c)).toUpperCase().includes(String(l).toUpperCase())
31
+ (o) => String(L(o, c)).toUpperCase().includes(String(l).toUpperCase())
24
32
  );
25
33
  else {
26
34
  const o = (f = t(e.columnsFields)) != null && f.length ? t(e.columnsFields) : ["label"];
27
35
  s = t(e.dataList).filter(
28
- (i) => o.some((m) => String(i[m]).toUpperCase().includes(String(l).toUpperCase()))
36
+ (a) => o.some((g) => String(a[g]).toUpperCase().includes(String(l).toUpperCase()))
29
37
  );
30
38
  }
31
- if (e.allowCreate && l && !s.some((i) => String(i.label).toUpperCase() === String(l).toUpperCase())) {
32
- const i = { label: l, value: l };
33
- s = [{ ...i, item: i }, ...s];
39
+ if (e.allowCreate && l && !s.some((a) => String(a.label).toUpperCase() === String(l).toUpperCase())) {
40
+ const a = { label: l, value: l };
41
+ s = [{ ...a, item: a }, ...s];
34
42
  }
35
- e.options.value = s, e.setActiveIndex(-1), a.ArrowDown();
43
+ e.options.value = s, e.setActiveIndex(-1), i.ArrowDown();
36
44
  }
37
- const T = d(() => t(e.showPager) ? e.setSearchValue : t(E) ? y : void 0), U = d(() => ({
45
+ const T = d(() => t(e.showPager) ? e.setSearchValue : t(W) ? y : void 0), U = d(() => ({
38
46
  // 是否折叠标签
39
- collapseTags: t(C),
47
+ collapseTags: t(b),
40
48
  // 折叠标签时是否显示工具提示
41
- collapseTagsTooltip: t(C),
49
+ collapseTagsTooltip: t(b),
42
50
  // 最大折叠标签数
43
51
  maxCollapseTags: t(n).maxCollapseTags ?? t(S),
44
52
  // 占位符文本
@@ -52,30 +60,30 @@ function z(n, e) {
52
60
  var s;
53
61
  const l = t(e.selectOption);
54
62
  if (!t(n).multiple || !l || l.length <= 1) return;
55
- const a = l.map((c) => c.label).filter(Boolean);
56
- if (t(e.selectRef) && a.length) {
57
- const c = (s = t(e.selectRef)) == null ? void 0 : s.$el.getElementsByClassName("el-select__selection")[0], r = window.getComputedStyle(c), f = Number(r.width.slice(0, -2)), o = r.fontFamily, i = r.fontSize;
58
- h.clear(), a.forEach((u, R) => {
63
+ const i = l.map((c) => c.label).filter(Boolean);
64
+ if (t(e.selectRef) && i.length) {
65
+ const c = (s = t(e.selectRef)) == null ? void 0 : s.$el.getElementsByClassName("el-select__selection")[0], r = window.getComputedStyle(c), f = Number(r.width.slice(0, -2)), o = r.fontFamily, a = r.fontSize;
66
+ h.clear(), i.forEach((u, R) => {
59
67
  if (R >= 10)
60
68
  return;
61
- const A = W(u, i, o) + 32 + 4;
69
+ const A = M(u, a, o) + 32 + 4;
62
70
  h.set(u, A);
63
71
  });
64
- const m = f - 43;
65
- let F = 0, M = 0;
72
+ const g = f - 43;
73
+ let x = 0, F = 0;
66
74
  h.forEach((u) => {
67
- if (F += u, F < m)
68
- return M += 1, !1;
69
- }), S.value = M || 1;
75
+ if (x += u, x < g)
76
+ return F += 1, !1;
77
+ }), S.value = F || 1;
70
78
  }
71
79
  }
72
- function x() {
73
- var a, s;
74
- const l = t(e.selectRef) ? (s = (a = t(e.selectRef)) == null ? void 0 : a.$el) == null ? void 0 : s.offsetWidth : 0;
80
+ function C() {
81
+ var i, s;
82
+ const l = t(e.selectRef) ? (s = (i = t(e.selectRef)) == null ? void 0 : i.$el) == null ? void 0 : s.offsetWidth : 0;
75
83
  return t(n).multiple ? l - 50 : l;
76
84
  }
77
- return L(() => {
78
- t(g) === 0 && t(e.selectRef) && (g.value = x());
85
+ return I(() => {
86
+ t(m) === 0 && t(e.selectRef) && (m.value = C());
79
87
  }), {
80
88
  // 其他选择器属性
81
89
  getOtherSelectProps: U,
@@ -84,17 +92,17 @@ function z(n, e) {
84
92
  // 计算选择器宽度的计算属性
85
93
  calcSelectWidth: v,
86
94
  // 获取select宽度
87
- getSelectWidth: x,
95
+ getSelectWidth: C,
88
96
  // select宽度
89
- selectWidth: g,
97
+ selectWidth: m,
90
98
  // select 是否展开
91
- showPopup: b,
99
+ showPopup: p,
92
100
  // 设置select是否展开
93
101
  setShowPopup: (l) => {
94
- b.value = l;
102
+ p.value = l;
95
103
  }
96
104
  };
97
105
  }
98
106
  export {
99
- z as useSelect
107
+ q as useSelect
100
108
  };
@@ -1,15 +1,26 @@
1
- import { isEmpty as F, isNullOrUnDef as C, isArray as D, isFunction as N } from "@dazhicheng/utils";
1
+ import "axios";
2
+ import "element-plus";
3
+ import { isEmpty as F, isNullOrUnDef as C, isArray as D, isFunction as N } from "../../../../packages/utils/src/is.js";
4
+ import { ref as M, computed as q, watch as O, unref as a, nextTick as f, toValue as m, watchEffect as G, toRaw as K } from "vue";
5
+ import "xe-utils";
6
+ import "dayjs";
7
+ import "dayjs/plugin/utc";
8
+ import "dayjs/plugin/timezone";
9
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
10
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
11
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
12
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
13
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
2
14
  import { cloneDeep as I, isEqual as x } from "lodash-es";
3
- import { ref as M, computed as q, watch as O, unref as a, nextTick as f, toValue as g, watchEffect as G, toRaw as K } from "vue";
4
15
  import { useKeyboard as U } from "./useKeyboard.js";
5
- function J(r, e, b) {
16
+ function ne(r, e, b) {
6
17
  const y = M({
7
18
  scrollTop: 0
8
- }), { keyboardCaptureEvent: m } = U({
19
+ }), { keyboardCaptureEvent: g } = U({
9
20
  // 获取表格实例的方法
10
21
  tableInstance: () => {
11
- var l;
12
- return (l = a(e.tableRef)) == null ? void 0 : l.getGridInstance();
22
+ var t;
23
+ return (t = a(e.tableRef)) == null ? void 0 : t.getGridInstance();
13
24
  },
14
25
  // 当前活动行的索引
15
26
  activeIndex: e.activeIndex,
@@ -28,83 +39,83 @@ function J(r, e, b) {
28
39
  // 是否加载数据
29
40
  loading: e.loading
30
41
  });
31
- async function S(l, t, n) {
42
+ async function S(t, l, n) {
32
43
  var c;
33
44
  const i = (c = a(e.tableRef)) == null ? void 0 : c.getGridInstance();
34
45
  let s = !0;
35
46
  if (a(r).beforeChange && N(a(r).beforeChange)) {
36
- const u = t && n ? { ...K(t), actionType: n } : t;
37
- s = await a(r).beforeChange(l ?? e.selectValue.value, a(r).modelValue, u);
47
+ const u = l && n ? { ...K(l), actionType: n } : l;
48
+ s = await a(r).beforeChange(t ?? e.selectValue.value, a(r).modelValue, u);
38
49
  }
39
50
  return s || (e.setSelectValue(a(r).modelValue, w({ value: a(r).modelValue }), !1), i && i.clearCurrentRow()), s;
40
51
  }
41
- function w(l) {
52
+ function w(t) {
42
53
  var c;
43
- const t = (c = a(e.tableRef)) == null ? void 0 : c.getGridInstance();
44
- if (C(l.value)) {
45
- t && t.clearCurrentRow();
54
+ const l = (c = a(e.tableRef)) == null ? void 0 : c.getGridInstance();
55
+ if (C(t.value)) {
56
+ l && l.clearCurrentRow();
46
57
  return;
47
58
  }
48
- const n = g(e.options).find((u) => u.value === l.value);
59
+ const n = m(e.options).find((u) => u.value === t.value);
49
60
  if (a(e).dataNoBindValueClear && !n) {
50
61
  k.clear();
51
62
  return;
52
63
  }
53
- const s = a(e.selectOption) && a(e.selectOption).value === l.value ? a(e.selectOption) : void 0;
64
+ const s = a(e.selectOption) && a(e.selectOption).value === t.value ? a(e.selectOption) : void 0;
54
65
  return n || s || void 0;
55
66
  }
56
- function h(l) {
67
+ function h(t) {
57
68
  var i;
58
- const t = (i = a(e.tableRef)) == null ? void 0 : i.getGridInstance();
59
- return D(l) ? l.reduce((s, c) => {
69
+ const l = (i = a(e.tableRef)) == null ? void 0 : i.getGridInstance();
70
+ return D(t) ? t.reduce((s, c) => {
60
71
  if (!C(c)) {
61
- const u = g(e.options).find((T) => T.value === c), d = a(e.selectOption), R = d ? d.find((T) => T.value === c) : void 0, o = u || R;
72
+ const u = m(e.options).find((T) => T.value === c), d = a(e.selectOption), R = d ? d.find((T) => T.value === c) : void 0, o = u || R;
62
73
  o && s && s.push(o);
63
74
  }
64
75
  return s;
65
- }, []) : (t && t.clearCurrentRow(), []);
76
+ }, []) : (l && l.clearCurrentRow(), []);
66
77
  }
67
- function v(l) {
78
+ function v(t) {
68
79
  var n;
69
- const t = (n = a(e.tableRef)) == null ? void 0 : n.getGridInstance();
70
- t && (e.multiple ? (t.clearCheckboxRow(), t.setCheckboxRow(l || [], !0)) : (t.clearRadioRow(), t.setRadioRow(l)));
80
+ const l = (n = a(e.tableRef)) == null ? void 0 : n.getGridInstance();
81
+ l && (e.multiple ? (l.clearCheckboxRow(), l.setCheckboxRow(t || [], !0)) : (l.clearRadioRow(), l.setRadioRow(t)));
71
82
  }
72
83
  const A = {
73
84
  /**
74
85
  * 单选框改变事件处理函数
75
86
  */
76
- radioChange: async ({ oldValue: l, row: t }) => {
87
+ radioChange: async ({ oldValue: t, row: l }) => {
77
88
  var c, u;
78
89
  const n = (c = a(e.tableRef)) == null ? void 0 : c.getGridInstance();
79
- if (t.isDelete)
90
+ if (l.isDelete)
80
91
  return;
81
- if (!await S(t.value, t, "add")) {
82
- n && l ? n.setRadioRow(l) : n.clearRadioRow();
92
+ if (!await S(l.value, l, "add")) {
93
+ n && t ? n.setRadioRow(t) : n.clearRadioRow();
83
94
  return;
84
95
  }
85
96
  const s = n == null ? void 0 : n.getCurrentRecord();
86
- e.setActiveIndex(n == null ? void 0 : n.getRowIndex(s)), e.setSelectValue(t.value, w(t)), (u = a(e.selectRef)) == null || u.blur(), f(() => {
97
+ e.setActiveIndex(n == null ? void 0 : n.getRowIndex(s)), e.setSelectValue(l.value, w(l)), (u = a(e.selectRef)) == null || u.blur(), f(() => {
87
98
  e.updateOptionsDisabled();
88
99
  });
89
100
  },
90
101
  /**
91
102
  * 复选框改变事件处理函数
92
103
  */
93
- checkboxChange: async ({ checked: l, row: t }) => {
104
+ checkboxChange: async ({ checked: t, row: l }) => {
94
105
  var u;
95
106
  const n = (u = a(e.tableRef)) == null ? void 0 : u.getGridInstance(), i = I(a(e.selectValue));
96
- if (!await S(t.value, t, l ? "add" : "remove")) {
97
- n && n.setCheckboxRow(t, !1);
107
+ if (!await S(l.value, l, t ? "add" : "remove")) {
108
+ n && n.setCheckboxRow(l, !1);
98
109
  return;
99
110
  }
100
111
  const c = D(i) ? i : [];
101
- if (l)
102
- c.push(t.value);
112
+ if (t)
113
+ c.push(l.value);
103
114
  else {
104
- const d = c.findIndex((R) => R === t.value);
115
+ const d = c.findIndex((R) => R === l.value);
105
116
  c.splice(d, 1);
106
117
  }
107
- n == null || n.setCurrentRow(t), e.setActiveIndex(n == null ? void 0 : n.getRowIndex(t)), e.setSelectValue(c, h(c)), e.checkedClearSearchValue && g(e.searchValue) && (e.setSearchValue(""), e.reload(!0), f(() => {
118
+ n == null || n.setCurrentRow(l), e.setActiveIndex(n == null ? void 0 : n.getRowIndex(l)), e.setSelectValue(c, h(c)), e.checkedClearSearchValue && m(e.searchValue) && (e.setSearchValue(""), e.reload(!0), f(() => {
108
119
  const d = a(e.selectRef);
109
120
  d && (d.isFocused = !0, d.states.inputValue = "");
110
121
  })), f(() => {
@@ -114,29 +125,29 @@ function J(r, e, b) {
114
125
  /**
115
126
  * 表格滚动事件处理函数
116
127
  */
117
- scroll: (l) => {
118
- y.value = l, b("scroll", l);
128
+ scroll: (t) => {
129
+ y.value = t, b("scroll", t);
119
130
  },
120
- scrollBoundary: (l) => {
121
- const { scrollTop: t } = l;
122
- if (t <= 100 || !a(e.showPager) || a(e.loading)) return;
131
+ scrollBoundary: (t) => {
132
+ const { scrollTop: l } = t;
133
+ if (l <= 100 || !a(e.showPager) || a(e.loading)) return;
123
134
  const { total: n, currentPage: i = 0 } = e.getPagination();
124
135
  (n && a(e.options).length < n || a(e.hasNextPage)) && (e.setPagination({ currentPage: i + 1 }), f(async () => {
125
136
  await e.reload();
126
- })), b("scroll-boundary", l);
137
+ })), b("scroll-boundary", t);
127
138
  },
128
139
  /**
129
140
  * 全选复选框改变事件处理函数
130
141
  */
131
- checkboxAll: ({ checked: l }) => {
132
- if (l) {
133
- const t = a(e.options).filter((n) => !n.disabled && !n.isDelete).map((n) => n.value);
142
+ checkboxAll: ({ checked: t }) => {
143
+ if (t) {
144
+ const l = a(e.options).filter((n) => !n.disabled && !n.isDelete).map((n) => n.value);
134
145
  if (a(r).selectProps.multipleLimit) {
135
- const n = t.slice(0, a(r).selectProps.multipleLimit), i = h(n);
146
+ const n = l.slice(0, a(r).selectProps.multipleLimit), i = h(n);
136
147
  e.setSelectValue(n, i), v(i);
137
148
  } else {
138
- const n = h(t);
139
- e.setSelectValue(t, n), v(n);
149
+ const n = h(l);
150
+ e.setSelectValue(l, n), v(n);
140
151
  }
141
152
  } else
142
153
  e.setSelectValue([], void 0), v([]);
@@ -148,49 +159,49 @@ function J(r, e, b) {
148
159
  * 键盘按下事件处理函数
149
160
  * @param event 键盘事件对象
150
161
  */
151
- keydown: (l) => {
152
- var t;
153
- l.preventDefault(), (t = m[l.key]) == null || t.call(m);
162
+ keydown: (t) => {
163
+ var l;
164
+ t.preventDefault(), (l = g[t.key]) == null || l.call(g);
154
165
  }
155
166
  };
156
- function P(l) {
167
+ function P(t) {
157
168
  var n;
158
- const t = (n = a(e.tableRef)) == null ? void 0 : n.getGridInstance();
169
+ const l = (n = a(e.tableRef)) == null ? void 0 : n.getGridInstance();
159
170
  if (e.multiple)
160
- l = t == null ? void 0 : t.getCurrentRecord();
171
+ t = l == null ? void 0 : l.getCurrentRecord();
161
172
  else {
162
- const i = t == null ? void 0 : t.getRowIndex(l);
163
- i !== -1 && l && (t == null || t.setCurrentRow(l), e.setActiveIndex(i));
173
+ const i = l == null ? void 0 : l.getRowIndex(t);
174
+ i !== -1 && t && (l == null || l.setCurrentRow(t), e.setActiveIndex(i));
164
175
  }
165
176
  }
166
- function E(l, t = !1) {
177
+ function E(t, l = !1) {
167
178
  var s;
168
179
  const n = (s = a(e.tableRef)) == null ? void 0 : s.getGridInstance();
169
- a(r).configProps.isOpenPopupScrollToTop || t ? n && n.scrollTo(0, 0) : setTimeout(() => {
180
+ a(r).configProps.isOpenPopupScrollToTop || l ? n && n.scrollTo(0, 0) : setTimeout(() => {
170
181
  var u;
171
182
  const c = (u = a(y)) == null ? void 0 : u.scrollTop;
172
- a(r).renderType === "table" ? n == null || n.scrollTo(0, c || 0) : l ? n == null || n.scrollToRow(l) : c && (n == null || n.scrollTo(0, c || 0));
183
+ a(r).renderType === "table" ? n == null || n.scrollTo(0, c || 0) : t ? n == null || n.scrollToRow(t) : c && (n == null || n.scrollTo(0, c || 0));
173
184
  }, 16);
174
185
  }
175
- function L(l) {
186
+ function L(t) {
176
187
  var i;
177
- const t = (i = a(e.tableRef)) == null ? void 0 : i.getGridInstance();
178
- if (!t) return;
179
- let n = I(l);
188
+ const l = (i = a(e.tableRef)) == null ? void 0 : i.getGridInstance();
189
+ if (!l) return;
190
+ let n = I(t);
180
191
  if (e.persistent)
181
192
  P(n);
182
- else if (!l || l.length === 0 || l.length > 1) {
183
- const s = t.getData(g(e.activeIndex));
184
- s && t.setCurrentRow(s), n = s;
193
+ else if (!t || t.length === 0 || t.length > 1) {
194
+ const s = l.getData(m(e.activeIndex));
195
+ s && l.setCurrentRow(s), n = s;
185
196
  } else
186
197
  f(() => {
187
- const s = t.getRowIndex(l);
188
- s !== -1 && (t.setCurrentRow(l), e.setActiveIndex(s));
198
+ const s = l.getRowIndex(t);
199
+ s !== -1 && (l.setCurrentRow(t), e.setActiveIndex(s));
189
200
  });
190
201
  return n;
191
202
  }
192
- function B(l, t, n) {
193
- const i = Array.isArray(l) ? l : [], s = i.map((o) => o == null ? void 0 : o.value), c = D(t) ? t : [], u = s.length > c.length, d = u ? s.find((o) => !c.includes(o)) : c.find((o) => !s.includes(o)), R = u ? i.find((o) => (o == null ? void 0 : o.value) === d) : n.find((o) => (o == null ? void 0 : o.value) === d);
203
+ function B(t, l, n) {
204
+ const i = Array.isArray(t) ? t : [], s = i.map((o) => o == null ? void 0 : o.value), c = D(l) ? l : [], u = s.length > c.length, d = u ? s.find((o) => !c.includes(o)) : c.find((o) => !s.includes(o)), R = u ? i.find((o) => (o == null ? void 0 : o.value) === d) : n.find((o) => (o == null ? void 0 : o.value) === d);
194
205
  return {
195
206
  isAdd: u,
196
207
  actionValue: d,
@@ -199,46 +210,46 @@ function J(r, e, b) {
199
210
  oldValues: c
200
211
  };
201
212
  }
202
- function V(l, t = !1, n = !1, i = !1) {
213
+ function V(t, l = !1, n = !1, i = !1) {
203
214
  let s, c;
204
- e.multiple ? (s = h(l || []), c = s ? l : []) : (s = w({ value: l }), c = s ? l : void 0), e.setSelectValue(c, s, i);
215
+ e.multiple ? (s = h(t || []), c = s ? t : []) : (s = w({ value: t }), c = s ? t : void 0), e.setSelectValue(c, s, i);
205
216
  const u = L(s);
206
- n || E(u, t), v(s);
217
+ n || E(u, l), v(s);
207
218
  }
208
219
  const k = {
209
220
  /**
210
221
  * 清空选择器事件处理函数
211
222
  */
212
223
  clear: () => {
213
- var t;
214
- const l = (t = a(e.tableRef)) == null ? void 0 : t.getGridInstance();
215
- e.multiple ? (l && l.clearCheckboxRow(), e.setSelectValue([], void 0)) : (l && l.clearRadioRow(), e.setSelectValue(void 0, void 0)), e.setActiveIndex(-1), b("clear");
224
+ var l;
225
+ const t = (l = a(e.tableRef)) == null ? void 0 : l.getGridInstance();
226
+ e.multiple ? (t && t.clearCheckboxRow(), e.setSelectValue([], void 0)) : (t && t.clearRadioRow(), e.setSelectValue(void 0, void 0)), e.setActiveIndex(-1), b("clear");
216
227
  },
217
228
  /**
218
229
  * 选择器可见性改变事件处理函数
219
230
  * @param bool 是否可见
220
231
  */
221
- visibleChange: (l) => {
232
+ visibleChange: (t) => {
222
233
  var i;
223
- const t = (i = a(e.tableRef)) == null ? void 0 : i.getGridInstance();
224
- t && (e.multiple ? t == null || t.clearCheckboxRow() : t.clearRadioRow()), e.setShowPopup(l);
225
- const n = a(e.isLoaded) || a(e.needLoad) || g(e.isExpandLoadData);
226
- l ? (b("focus"), f(async () => {
234
+ const l = (i = a(e.tableRef)) == null ? void 0 : i.getGridInstance();
235
+ l && (e.multiple ? l == null || l.clearCheckboxRow() : l.clearRadioRow()), e.setShowPopup(t);
236
+ const n = a(e.isLoaded) || a(e.needLoad) || m(e.isExpandLoadData);
237
+ t ? (b("focus"), f(async () => {
227
238
  n && e.reload(!0), V(a(r).modelValue, n), e.updateOptionsDisabled();
228
- })) : b("blur"), b("visible-change", l);
239
+ })) : b("blur"), b("visible-change", t);
229
240
  },
230
241
  /**
231
242
  * 择器值改变事件处理函数(el 删除/清除会触发)
232
243
  * beforeChangeCheck(val, row):val 为当前操作的值,row 为当前操作的响应式对象
233
244
  * @param val 选中的选项(el-select 的 v-model:单选为对象,多选为对象数组)
234
245
  */
235
- change: async (l) => {
236
- const t = I(a(e.selectValue));
246
+ change: async (t) => {
247
+ const l = I(a(e.selectValue));
237
248
  if (e.multiple) {
238
249
  const { actionValue: n, actionRow: i, newValues: s, oldValues: c, isAdd: u } = B(
239
- l,
240
250
  t,
241
- g(e.options)
251
+ l,
252
+ m(e.options)
242
253
  );
243
254
  if (!await S(n, i, u ? "add" : "remove")) {
244
255
  const o = h(c);
@@ -248,9 +259,9 @@ function J(r, e, b) {
248
259
  const R = h(s);
249
260
  e.setSelectValue(s, R), v(R);
250
261
  } else {
251
- const n = l, i = (n == null ? void 0 : n.value) ?? void 0;
262
+ const n = t, i = (n == null ? void 0 : n.value) ?? void 0;
252
263
  if (!await S(i, n, i === void 0 ? "remove" : "add")) {
253
- const u = t, d = w({ value: u });
264
+ const u = l, d = w({ value: u });
254
265
  e.setSelectValue(u, d), v(d), f(() => e.updateOptionsDisabled());
255
266
  return;
256
267
  }
@@ -265,67 +276,67 @@ function J(r, e, b) {
265
276
  * 选择器键盘按下捕获事件处理函数
266
277
  * @param event 键盘事件对象
267
278
  */
268
- keydownCapture: (l) => {
269
- var t;
270
- m[l.key] && (l.preventDefault(), l.stopPropagation(), (t = m[l.key]) == null || t.call(m));
279
+ keydownCapture: (t) => {
280
+ var l;
281
+ g[t.key] && (t.preventDefault(), t.stopPropagation(), (l = g[t.key]) == null || l.call(g));
271
282
  },
272
- removeTag: (l) => {
273
- b("remove-tag", l);
283
+ removeTag: (t) => {
284
+ b("remove-tag", t);
274
285
  }
275
286
  };
276
287
  return O(
277
288
  () => I(a(r).modelValue),
278
- (l, t) => {
279
- if (!x(l, t)) {
289
+ (t, l) => {
290
+ if (!x(t, l)) {
280
291
  const n = I(a(e.selectValue));
281
- if (x(l, n))
292
+ if (x(t, n))
282
293
  return;
283
294
  f(() => {
284
- V(l, !1, !1, a(r).immediateEmitChange), e.updateOptionsDisabled();
295
+ V(t, !1, !1, a(r).immediateEmitChange), e.updateOptionsDisabled();
285
296
  });
286
297
  }
287
298
  },
288
- { immediate: !g(e.getImmediate), deep: !0 }
299
+ { immediate: !m(e.getImmediate), deep: !0 }
289
300
  ), O(
290
- () => g(e.options),
291
- (l, t = []) => {
292
- x(l, t) || f(() => {
301
+ () => m(e.options),
302
+ (t, l = []) => {
303
+ x(t, l) || f(() => {
293
304
  V(a(r).modelValue, !1, !0), e.updateOptionsDisabled();
294
305
  });
295
306
  },
296
- { immediate: !g(e.getImmediate), deep: !0 }
307
+ { immediate: !m(e.getImmediate), deep: !0 }
297
308
  ), O(
298
309
  () => a(r).configProps.defaultChecked,
299
- (l, t) => {
300
- if (F(g(l))) return;
301
- x(g(l), g(t)) || C(a(r).modelValue) || (V(a(r).modelValue), f(() => {
310
+ (t, l) => {
311
+ if (F(m(t))) return;
312
+ x(m(t), m(l)) || C(a(r).modelValue) || (V(a(r).modelValue), f(() => {
302
313
  e.updateOptionsDisabled();
303
314
  }));
304
315
  },
305
316
  { deep: !0 }
306
317
  ), G(() => {
307
- var l;
318
+ var t;
308
319
  if (a(e.getDefaultSingle)) {
309
320
  if (a(e.options).length === 0 || a(e.options).length > 1)
310
321
  return;
311
- const t = e.multiple ? a(e.options).map((n) => n.value) : (l = a(e.options)[0]) == null ? void 0 : l.value;
322
+ const l = e.multiple ? a(e.options).map((n) => n.value) : (t = a(e.options)[0]) == null ? void 0 : t.value;
312
323
  setTimeout(() => {
313
- V(t, !1, !1, !0), e.updateOptionsDisabled();
324
+ V(l, !1, !1, !0), e.updateOptionsDisabled();
314
325
  });
315
326
  }
316
327
  }), G(() => {
317
- var l;
328
+ var t;
318
329
  if (a(e.getIsSelectFirstOption)) {
319
330
  if (a(e.options).length === 0)
320
331
  return;
321
- const t = (l = a(e.options)[0]) == null ? void 0 : l.value, n = e.multiple ? [t] : t;
332
+ const l = (t = a(e.options)[0]) == null ? void 0 : t.value, n = e.multiple ? [l] : l;
322
333
  setTimeout(() => {
323
334
  V(n, !0, !1, !0), e.updateOptionsDisabled();
324
335
  });
325
336
  }
326
337
  }), f(() => {
327
338
  setTimeout(async () => {
328
- g(e.getImmediate) && (e.reload(!0), f(() => {
339
+ m(e.getImmediate) && (e.reload(!0), f(() => {
329
340
  e.updateOptionsDisabled();
330
341
  }));
331
342
  }, 16);
@@ -335,11 +346,11 @@ function J(r, e, b) {
335
346
  // 选择器事件处理对象
336
347
  selectEvent: k,
337
348
  // 键盘事件处理对象
338
- keyboardEvent: m,
349
+ keyboardEvent: g,
339
350
  // 默认选中数据
340
351
  defaultDataSelect: V
341
352
  };
342
353
  }
343
354
  export {
344
- J as useSelectTableEvent
355
+ ne as useSelectTableEvent
345
356
  };
@@ -1,26 +1,34 @@
1
- import { withInstall as t } from "@dazhicheng/utils";
1
+ import "axios";
2
+ import "element-plus";
3
+ import "dayjs";
4
+ import "vue";
5
+ import { withInstall as t } from "../../packages/utils/src/install.js";
6
+ import "xe-utils";
7
+ import "dayjs/plugin/utc";
8
+ import "dayjs/plugin/timezone";
9
+ import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
10
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
11
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
12
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
13
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
14
+ import "lodash-es";
2
15
  import o from "./src/components/TableAction.vue.js";
3
16
  import r from "./src/components/TableButtons.js";
4
17
  import m from "./src/Table.vue.js";
5
18
  /* empty css */
6
- import "vue";
7
19
  import "@tanstack/vue-store";
8
20
  import "../tt-button/index.js";
9
21
  import "../tt-checkbox/index.js";
10
22
  import "../tt-empty/index.js";
11
- import "element-plus";
12
23
  import "../tt-select/index.js";
13
24
  import "../tt-panel-select/index.js";
14
25
  import "../tt-upload/index.js";
15
26
  import "../tt-api-component/index.js";
16
27
  import "vee-validate";
17
- import "dayjs";
18
- import "dayjs/plugin/timezone";
19
- import "lodash-es";
20
28
  import "es-toolkit/compat";
21
29
  import "zod";
22
30
  import "../tt-form/src/shared/zod-defaults.js";
23
- import "@dazhicheng/hooks";
31
+ import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
24
32
  import "@vueuse/core";
25
33
  import "../tt-icon/index.js";
26
34
  /* empty css */
@@ -41,7 +49,6 @@ import "../tt-image/index.js";
41
49
  import "../tt-drawer/index.js";
42
50
  import "../tt-modal/index.js";
43
51
  import "../../directives/disabled-tip/index.js";
44
- import "xe-utils";
45
52
  import "../tt-log/index.js";
46
53
  /* empty css */
47
54
  /* empty css */
@@ -55,9 +62,9 @@ import "sortablejs";
55
62
  /* empty css */
56
63
  import "./src/emits.js";
57
64
  import "./src/props.js";
58
- const st = t(o), Tt = t(r), at = t(m);
65
+ const bt = t(o), _t = t(r), ut = t(m);
59
66
  export {
60
- at as TtTable,
61
- st as TtTableAction,
62
- Tt as TtTableButton
67
+ ut as TtTable,
68
+ bt as TtTableAction,
69
+ _t as TtTableButton
63
70
  };