@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,24 +1,36 @@
1
- import { defineComponent as he, ref as x, useAttrs as ke, useSlots as ve, getCurrentInstance as Te, computed as u, unref as o, watch as R, reactive as Ce, provide as ye, nextTick as Be, onMounted as Pe, onUnmounted as $e, withDirectives as Ie, createElementBlock as Oe, openBlock as Me, createVNode as k, mergeProps as j, h as we, createSlots as y, withCtx as c, normalizeClass as Se, renderSlot as p, renderList as B, normalizeProps as P, guardReactiveProps as $, createElementVNode as Fe } from "vue";
2
- import { TtIcon as De } from "../../tt-icon/index.js";
3
- import { useDesign as Ve, usePriorityValues as ze, getPriorityValues as Ae } from "@dazhicheng/hooks";
4
- import Le from "../../../directives/dialog-resize/index.js";
5
- import { generateTestId as I, toKebabCase as _e } from "@dazhicheng/utils";
6
- import { useStore as xe } from "@tanstack/vue-store";
7
- import { dialogProps as E, ElDialog as Re } from "element-plus";
1
+ import { defineComponent as ko, ref as x, useAttrs as vo, useSlots as To, getCurrentInstance as Co, computed as c, unref as e, watch as R, reactive as yo, provide as Bo, nextTick as Po, onMounted as $o, onUnmounted as Io, withDirectives as Oo, createElementBlock as Mo, openBlock as wo, createVNode as k, mergeProps as j, h as So, createSlots as y, withCtx as p, normalizeClass as Fo, renderSlot as u, renderList as B, normalizeProps as P, guardReactiveProps as $, createElementVNode as Do } from "vue";
2
+ import { TtIcon as Vo } from "../../tt-icon/index.js";
3
+ 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";
4
+ import { useDesign as zo } from "../../../packages/hooks/src/useDesign.js";
5
+ import { usePriorityValues as Ao, getPriorityValues as Lo } from "../../../packages/hooks/src/usePriorityValue.js";
6
+ import "axios";
7
+ import { dialogProps as E, ElDialog as _o } from "element-plus";
8
+ import "dayjs";
9
+ import { generateTestId as I, toKebabCase as xo } from "../../../packages/utils/src/testid-helper.js";
10
+ import "xe-utils";
11
+ import "dayjs/plugin/utc";
12
+ import "dayjs/plugin/timezone";
13
+ import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
14
+ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
15
+ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
16
+ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
17
+ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
8
18
  import { omit as H, pick as O } from "lodash-es";
9
- import je from "./components/ModalFooter.vue.js";
10
- import Ee from "./components/ModalHeader.vue.js";
11
- import He from "./components/ModalWrapper.vue.js";
12
- import { basicProps as We } from "./props.js";
13
- import { ModalApi as Ne } from "./utils/modal-api.js";
14
- import { pushModal as qe, removeModal as W } from "./utils/modal-stack.js";
15
- import Ke from "../../../assets/svg/close.svg.js";
16
- const Ue = ["aria-tt-id", "data-testid"], Ge = ["data-testid"], uo = /* @__PURE__ */ he({
19
+ import Ro from "../../../directives/dialog-resize/index.js";
20
+ import { useStore as jo } from "@tanstack/vue-store";
21
+ import Eo from "./components/ModalFooter.vue.js";
22
+ import Ho from "./components/ModalHeader.vue.js";
23
+ import Wo from "./components/ModalWrapper.vue.js";
24
+ import { basicProps as No } from "./props.js";
25
+ import { ModalApi as qo } from "./utils/modal-api.js";
26
+ import { pushModal as Ko, removeModal as W } from "./utils/modal-stack.js";
27
+ import Uo from "../../../assets/svg/close.svg.js";
28
+ const Go = ["aria-tt-id", "data-testid"], Jo = ["data-testid"], Be = /* @__PURE__ */ ko({
17
29
  name: "TtModal",
18
30
  __name: "RenderModal",
19
31
  props: {
20
32
  ...E,
21
- ...We,
33
+ ...No,
22
34
  /** modalApi */
23
35
  modalApi: {
24
36
  type: Object,
@@ -28,22 +40,22 @@ const Ue = ["aria-tt-id", "data-testid"], Ge = ["data-testid"], uo = /* @__PURE_
28
40
  emits: ["visible-change", "register", "update:visible"],
29
41
  setup(N, { expose: q, emit: K }) {
30
42
  var L;
31
- const n = N, v = K, f = x(), { prefixCls: U } = Ve("modal"), d = ke(), G = ve(), t = Te(), M = x(!1);
32
- let a = n.modalApi;
33
- if (!a) {
34
- const e = n.okButtonProps ? {
43
+ const n = N, v = K, m = x(), { prefixCls: U } = zo("modal"), d = vo(), G = To(), t = Co(), M = x(!1);
44
+ let i = n.modalApi;
45
+ if (!i) {
46
+ const o = n.okButtonProps ? {
35
47
  ...n.okButtonProps,
36
48
  disabledTip: Array.isArray(n.okButtonProps.disabledTip) ? n.okButtonProps.disabledTip : n.okButtonProps.disabledTip ? [n.okButtonProps.disabledTip] : void 0
37
49
  } : void 0, s = {
38
50
  ...n,
39
- okButtonProps: e
51
+ okButtonProps: o
40
52
  };
41
- a = new Ne(s), a.useStore = (i) => {
42
- const r = i ?? ((l) => l);
43
- return xe(a.store, r);
53
+ i = new qo(s), i.useStore = (a) => {
54
+ const r = a ?? ((l) => l);
55
+ return jo(i.store, r);
44
56
  };
45
57
  }
46
- const g = (L = a.useStore) == null ? void 0 : L.call(a), {
58
+ const g = (L = i.useStore) == null ? void 0 : L.call(i), {
47
59
  visible: T,
48
60
  title: w,
49
61
  width: S,
@@ -54,230 +66,230 @@ const Ue = ["aria-tt-id", "data-testid"], Ge = ["data-testid"], uo = /* @__PURE_
54
66
  isBottom: D,
55
67
  draggable: Y,
56
68
  showCancelBtn: Z,
57
- okText: ee,
58
- cancelText: oe,
69
+ okText: oo,
70
+ cancelText: eo,
59
71
  okButtonProps: b,
60
- cancelButtonProps: te,
61
- confirmLoading: se,
62
- cancelLoading: re,
63
- showOkBtn: ae,
72
+ cancelButtonProps: to,
73
+ confirmLoading: so,
74
+ cancelLoading: ro,
75
+ showOkBtn: io,
64
76
  loading: V,
65
- height: ie,
77
+ height: ao,
66
78
  showFooter: z,
67
- loadingTip: le,
68
- ...ne
69
- } = ze(n, g), de = u(() => {
70
- const e = {
79
+ loadingTip: lo,
80
+ ...no
81
+ } = Ao(n, g), po = c(() => {
82
+ const o = {
71
83
  mini: "448px",
72
84
  small: "592px",
73
85
  medium: "876px"
74
86
  };
75
- return o(S) ? o(S) : e[o(F)] ? e[o(F)] : "500px";
76
- }), ce = u(() => {
77
- const e = Ae(ne), s = H(d, ["onVisibleChange", "onClose", "onClosed", "onOk", "onReceiveSharedData"]);
87
+ return e(S) ? e(S) : o[e(F)] ? o[e(F)] : "500px";
88
+ }), co = c(() => {
89
+ const o = Lo(no), s = H(d, ["onVisibleChange", "onClose", "onClosed", "onOk", "onReceiveSharedData"]);
78
90
  return {
79
91
  appendToBody: !0,
80
- ...O(e, Object.keys(E)),
92
+ ...O(o, Object.keys(E)),
81
93
  ...s,
82
- modelValue: o(T),
83
- width: o(de),
94
+ modelValue: e(T),
95
+ width: e(po),
84
96
  destroyOnClose: !0,
85
97
  closeOnClickModal: !1,
86
98
  // 禁用 element-plus 原生 ESC 关闭,改由 modal-stack 统一管理:
87
99
  // 1. 多弹窗时逐个关闭;2. 表单聚焦时 ESC 不关闭弹窗
88
100
  closeOnPressEscape: !1,
89
- top: o(X) ?? o(D) ? "40px" : "15vh",
101
+ top: e(X) ?? e(D) ? "40px" : "15vh",
90
102
  fullscreen: !1,
91
103
  draggable: !1,
92
- modalClass: `${e.modalClass || ""} tt-id-${t == null ? void 0 : t.uid}`
104
+ modalClass: `${o.modalClass || ""} tt-id-${t == null ? void 0 : t.uid}`
93
105
  };
94
- }), ue = u(() => ({
95
- showCancelBtn: o(Z),
96
- okText: o(ee),
97
- cancelText: o(oe),
98
- okButtonProps: o(b),
99
- cancelButtonProps: o(te),
100
- confirmLoading: o(se),
101
- cancelLoading: o(re),
102
- showOkBtn: o(ae)
103
- })), A = u(() => {
106
+ }), uo = c(() => ({
107
+ showCancelBtn: e(Z),
108
+ okText: e(oo),
109
+ cancelText: e(eo),
110
+ okButtonProps: e(b),
111
+ cancelButtonProps: e(to),
112
+ confirmLoading: e(so),
113
+ cancelLoading: e(ro),
114
+ showOkBtn: e(io)
115
+ })), A = c(() => {
104
116
  var l, _;
105
- const e = (l = o(b)) == null ? void 0 : l.disabled, s = o(V), i = (_ = o(b)) == null ? void 0 : _.disabledTip, r = Array.isArray(i) ? i : i ? [i] : [];
106
- return e || s ? [!0, r] : [!1, []];
117
+ const o = (l = e(b)) == null ? void 0 : l.disabled, s = e(V), a = (_ = e(b)) == null ? void 0 : _.disabledTip, r = Array.isArray(a) ? a : a ? [a] : [];
118
+ return o || s ? [!0, r] : [!1, []];
107
119
  });
108
120
  R(
109
121
  () => {
110
- var e;
111
- return (e = g.value) == null ? void 0 : e.visible;
122
+ var o;
123
+ return (o = g.value) == null ? void 0 : o.visible;
112
124
  },
113
- (e) => {
125
+ (o) => {
114
126
  var s;
115
- e !== T.value && (v("visible-change", !!e), v("update:visible", !!e)), t && ((s = m.emitVisible) == null || s.call(m, !!e, t == null ? void 0 : t.uid)), t != null && t.uid && (e ? qe({ uid: t.uid, close: () => a.onClosed() }) : W(t.uid)), e || a.changeOkLoading(!1);
127
+ o !== T.value && (v("visible-change", !!o), v("update:visible", !!o)), t && ((s = f.emitVisible) == null || s.call(f, !!o, t == null ? void 0 : t.uid)), t != null && t.uid && (o ? Ko({ uid: t.uid, close: () => i.onClosed() }) : W(t.uid)), o || i.changeOkLoading(!1);
116
128
  },
117
129
  {
118
130
  immediate: !1
119
131
  }
120
132
  ), R(
121
- () => o(T),
122
- (e) => {
133
+ () => e(T),
134
+ (o) => {
123
135
  var s;
124
- e !== ((s = g.value) == null ? void 0 : s.visible) && a.setState({ visible: e }), e || a.changeOkLoading(!1);
136
+ o !== ((s = g.value) == null ? void 0 : s.visible) && i.setState({ visible: o }), o || i.changeOkLoading(!1);
125
137
  },
126
138
  {
127
139
  immediate: !1
128
140
  }
129
141
  );
130
- function pe(e) {
131
- M.value = e;
142
+ function mo(o) {
143
+ M.value = o;
132
144
  }
133
- function fe() {
145
+ function fo() {
134
146
  document.querySelectorAll(".el-select__popper").forEach((s) => {
135
147
  s.style.display !== "none" && (s.style.display = "none");
136
148
  });
137
149
  }
138
- function C(e) {
139
- return e.toLowerCase().includes("modal") ? e : `modal-${e}`;
150
+ function C(o) {
151
+ return o.toLowerCase().includes("modal") ? o : `modal-${o}`;
140
152
  }
141
- function me() {
142
- const e = d["data-testid"] || d.dataTestid || d.testId || d["test-id"];
143
- return e && typeof e == "string" ? e : void 0;
153
+ function go() {
154
+ const o = d["data-testid"] || d.dataTestid || d.testId || d["test-id"];
155
+ return o && typeof o == "string" ? o : void 0;
144
156
  }
145
- const h = u(() => {
157
+ const h = c(() => {
146
158
  var l;
147
- const e = (l = g.value) == null ? void 0 : l.testId;
148
- if (e)
149
- return C(e);
159
+ const o = (l = g.value) == null ? void 0 : l.testId;
160
+ if (o)
161
+ return C(o);
150
162
  const s = n.testId;
151
163
  if (s)
152
164
  return C(s);
153
- const i = me();
154
- if (i)
155
- return C(i);
156
- const r = o(w);
157
- return r && typeof r == "string" && r.trim() ? I("modal", _e(r)) : t != null && t.uid ? `modal-${t.uid}` : "modal";
158
- }), ge = u(() => I(h.value, "footer")), be = u(() => I(h.value, "body"));
159
- ye("modalIdContext", h);
160
- const m = Ce({
161
- setModalProps: a.setState,
165
+ const a = go();
166
+ if (a)
167
+ return C(a);
168
+ const r = e(w);
169
+ return r && typeof r == "string" && r.trim() ? I("modal", xo(r)) : t != null && t.uid ? `modal-${t.uid}` : "modal";
170
+ }), bo = c(() => I(h.value, "footer")), ho = c(() => I(h.value, "body"));
171
+ Bo("modalIdContext", h);
172
+ const f = yo({
173
+ setModalProps: i.setState,
162
174
  emitVisible: void 0,
163
175
  redoModalHeight: () => {
164
- Be(() => {
165
- o(f) && o(f).setModalHeight();
176
+ Po(() => {
177
+ e(m) && e(m).setModalHeight();
166
178
  });
167
179
  },
168
180
  scrollToBottom: () => {
169
- var e;
170
- o(f) && ((e = o(f)) == null || e.onScrollBottom());
181
+ var o;
182
+ e(m) && ((o = e(m)) == null || o.onScrollBottom());
171
183
  }
172
184
  });
173
- return t && v("register", m, `${t == null ? void 0 : t.uid}`), Pe(() => {
174
- const e = O(d, ["onVisibleChange", "onClosed", "onOk"]);
175
- a.mount(
185
+ return t && v("register", f, `${t == null ? void 0 : t.uid}`), $o(() => {
186
+ const o = O(d, ["onVisibleChange", "onClosed", "onOk"]);
187
+ i.mount(
176
188
  {
177
- ...e,
178
- onClosed: e.onClosed || d.onCancel || d.onClose
189
+ ...o,
190
+ onClosed: o.onClosed || d.onCancel || d.onClose
179
191
  },
180
- m
192
+ f
181
193
  );
182
- }), $e(() => {
194
+ }), Io(() => {
183
195
  t != null && t.uid && W(t.uid);
184
196
  }), q({
185
- modalApi: a
186
- }), (e, s) => {
187
- var i;
188
- return Ie((Me(), Oe("div", {
189
- "aria-tt-id": `tt-id-${(i = o(t)) == null ? void 0 : i.uid}`,
197
+ modalApi: i
198
+ }), (o, s) => {
199
+ var a;
200
+ return Oo((wo(), Mo("div", {
201
+ "aria-tt-id": `tt-id-${(a = e(t)) == null ? void 0 : a.uid}`,
190
202
  "data-testid": h.value
191
203
  }, [
192
- k(o(Re), j(ce.value, {
193
- class: ["tt-ui-modal", o(U)],
194
- "before-close": o(a).onClosed,
195
- "close-icon": () => we(o(De), {
204
+ k(e(_o), j(co.value, {
205
+ class: ["tt-ui-modal", e(U)],
206
+ "before-close": e(i).onClosed,
207
+ "close-icon": () => So(e(Vo), {
196
208
  size: 16,
197
- icon: o(Ke),
209
+ icon: e(Uo),
198
210
  isCustomSvg: !0
199
211
  })
200
212
  }), y({
201
- default: c(() => [
202
- k(He, {
213
+ default: p(() => [
214
+ k(Wo, {
203
215
  ref_key: "modalWrapperRef",
204
- ref: f,
205
- "is-bottom": o(D),
206
- height: o(ie),
207
- loading: o(V),
208
- "loading-tip": o(le),
209
- class: Se({ "pb-2!": !o(z) }),
210
- "data-testid": be.value,
211
- onIsScroll: pe
216
+ ref: m,
217
+ "is-bottom": e(D),
218
+ height: e(ao),
219
+ loading: e(V),
220
+ "loading-tip": e(lo),
221
+ class: Fo({ "pb-2!": !e(z) }),
222
+ "data-testid": ho.value,
223
+ onIsScroll: mo
212
224
  }, {
213
- default: c(() => [
214
- p(e.$slots, "default")
225
+ default: p(() => [
226
+ u(o.$slots, "default")
215
227
  ]),
216
228
  _: 3
217
229
  }, 8, ["is-bottom", "height", "loading", "loading-tip", "class", "data-testid"])
218
230
  ]),
219
231
  _: 2
220
232
  }, [
221
- e.$slots.header ? {
233
+ o.$slots.header ? {
222
234
  name: "header",
223
- fn: c(() => [
224
- p(e.$slots, "header")
235
+ fn: p(() => [
236
+ u(o.$slots, "header")
225
237
  ]),
226
238
  key: "1"
227
239
  } : {
228
240
  name: "header",
229
- fn: c(() => [
230
- k(Ee, {
231
- title: o(w),
232
- onMousedown: fe
241
+ fn: p(() => [
242
+ k(Ho, {
243
+ title: e(w),
244
+ onMousedown: fo
233
245
  }, y({
234
- titleToolbar: c(() => [
235
- p(e.$slots, "titleToolbar")
246
+ titleToolbar: p(() => [
247
+ u(o.$slots, "titleToolbar")
236
248
  ]),
237
249
  _: 2
238
250
  }, [
239
- B(Object.keys(e.$slots), (r) => ({
251
+ B(Object.keys(o.$slots), (r) => ({
240
252
  name: r,
241
- fn: c((l) => [
242
- p(e.$slots, r, P($(l || {})))
253
+ fn: p((l) => [
254
+ u(o.$slots, r, P($(l || {})))
243
255
  ])
244
256
  }))
245
257
  ]), 1032, ["title"])
246
258
  ]),
247
259
  key: "0"
248
260
  },
249
- o(G).footer || o(z) ? {
261
+ e(G).footer || e(z) ? {
250
262
  name: "footer",
251
- fn: c(() => [
252
- p(e.$slots, "footer", {}, () => [
253
- Fe("div", { "data-testid": ge.value }, [
254
- k(je, j(ue.value, {
263
+ fn: p(() => [
264
+ u(o.$slots, "footer", {}, () => [
265
+ Do("div", { "data-testid": bo.value }, [
266
+ k(Eo, j(uo.value, {
255
267
  class: "footer",
256
268
  style: { borderTop: M.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
257
269
  "ok-button-props": {
258
- ...o(b),
270
+ ...e(b),
259
271
  disabledTip: A.value[1],
260
272
  disabled: A.value[0]
261
273
  },
262
- onFooterok: o(a).onOk,
263
- onCancel: o(a).onClosed
274
+ onFooterok: e(i).onOk,
275
+ onCancel: e(i).onClosed
264
276
  }), y({ _: 2 }, [
265
277
  B(Object.keys(
266
- o(O)(e.$slots, ["beforeFooter", "insertFooter", "centerFooter", "appendFooter"])
278
+ e(O)(o.$slots, ["beforeFooter", "insertFooter", "centerFooter", "appendFooter"])
267
279
  ), (r) => ({
268
280
  name: r,
269
- fn: c((l) => [
270
- p(e.$slots, r, P($({ ...l || {} })))
281
+ fn: p((l) => [
282
+ u(o.$slots, r, P($({ ...l || {} })))
271
283
  ])
272
284
  }))
273
285
  ]), 1040, ["style", "ok-button-props", "onFooterok", "onCancel"])
274
- ], 8, Ge)
286
+ ], 8, Jo)
275
287
  ])
276
288
  ]),
277
289
  key: "2"
278
290
  } : void 0,
279
291
  B(Object.keys(
280
- o(H)(e.$slots, [
292
+ e(H)(o.$slots, [
281
293
  "default",
282
294
  "titleToolbar",
283
295
  "header",
@@ -289,22 +301,22 @@ const Ue = ["aria-tt-id", "data-testid"], Ge = ["data-testid"], uo = /* @__PURE_
289
301
  ])
290
302
  ), (r) => ({
291
303
  name: r,
292
- fn: c((l) => [
293
- p(e.$slots, r, P($(l || {})))
304
+ fn: p((l) => [
305
+ u(o.$slots, r, P($(l || {})))
294
306
  ])
295
307
  }))
296
308
  ]), 1040, ["class", "before-close", "close-icon"])
297
- ], 8, Ue)), [
298
- [o(Le), {
299
- draggable: o(Y),
300
- fullscreen: o(J),
301
- resizer: o(Q),
302
- resizeChange: o(d).resizeChange
309
+ ], 8, Go)), [
310
+ [e(Ro), {
311
+ draggable: e(Y),
312
+ fullscreen: e(J),
313
+ resizer: e(Q),
314
+ resizeChange: e(d).resizeChange
303
315
  }]
304
316
  ]);
305
317
  };
306
318
  }
307
319
  });
308
320
  export {
309
- uo as default
321
+ Be as default
310
322
  };
@@ -1,10 +1,20 @@
1
- import { defineComponent as h, inject as v, computed as r, unref as t, createElementBlock as b, openBlock as n, createElementVNode as F, createVNode as P, renderSlot as o, withCtx as a, createBlock as s, createCommentVNode as l, mergeProps as d, withModifiers as c, createTextVNode as p, toDisplayString as m } from "vue";
1
+ import { defineComponent as h, inject as v, computed as a, unref as e, createElementBlock as b, openBlock as n, createElementVNode as F, createVNode as P, renderSlot as o, withCtx as i, createBlock as s, createCommentVNode as l, mergeProps as d, withModifiers as c, createTextVNode as p, toDisplayString as m } from "vue";
2
2
  import { TtButton as u } from "../../../tt-button/index.js";
3
- import { generateTestId as f } from "@dazhicheng/utils";
3
+ import "axios";
4
4
  import { ElSpace as w } from "element-plus";
5
+ import "dayjs";
6
+ import { generateTestId as f } from "../../../../packages/utils/src/testid-helper.js";
7
+ import "xe-utils";
8
+ import "dayjs/plugin/utc";
9
+ import "dayjs/plugin/timezone";
10
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
11
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
12
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
13
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
14
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
5
15
  import { pick as y } from "lodash-es";
6
16
  import { basicProps as I } from "../props.js";
7
- const $ = { class: "flex" }, L = { class: "flex-1" }, D = /* @__PURE__ */ h({
17
+ const $ = { class: "flex" }, L = { class: "flex-1" }, W = /* @__PURE__ */ h({
8
18
  name: "TtModalFooter",
9
19
  __name: "ModalFooter",
10
20
  props: y(I, [
@@ -19,50 +29,50 @@ const $ = { class: "flex" }, L = { class: "flex-1" }, D = /* @__PURE__ */ h({
19
29
  ]),
20
30
  emits: ["cancel"],
21
31
  setup(N, { emit: k }) {
22
- const B = k, i = v("modalIdContext", ""), T = r(() => f(t(i), "btn-confirm")), g = r(() => f(t(i), "btn-cancel"));
23
- function C(e) {
24
- B("cancel", e);
32
+ const B = k, r = v("modalIdContext", ""), T = a(() => f(e(r), "btn-confirm")), g = a(() => f(e(r), "btn-cancel"));
33
+ function C(t) {
34
+ B("cancel", t);
25
35
  }
26
- return (e, V) => (n(), b("div", $, [
36
+ return (t, V) => (n(), b("div", $, [
27
37
  F("div", L, [
28
- o(e.$slots, "beforeFooter", {}, void 0, !0)
38
+ o(t.$slots, "beforeFooter", {}, void 0, !0)
29
39
  ]),
30
- P(t(w), {
40
+ P(e(w), {
31
41
  size: 12,
32
42
  class: "flex items-center justify-end"
33
43
  }, {
34
- default: a(() => [
35
- o(e.$slots, "insertFooter", {}, void 0, !0),
36
- e.showCancelBtn ? (n(), s(t(u), d({
44
+ default: i(() => [
45
+ o(t.$slots, "insertFooter", {}, void 0, !0),
46
+ t.showCancelBtn ? (n(), s(e(u), d({
37
47
  key: 0,
38
- loading: e.cancelLoading
39
- }, e.cancelButtonProps, {
40
- title: e.cancelText,
48
+ loading: t.cancelLoading
49
+ }, t.cancelButtonProps, {
50
+ title: t.cancelText,
41
51
  "data-testid": g.value,
42
52
  onClick: c(C, ["stop"])
43
53
  }), {
44
- default: a(() => [
45
- p(m(e.cancelText), 1)
54
+ default: i(() => [
55
+ p(m(t.cancelText), 1)
46
56
  ]),
47
57
  _: 1
48
58
  }, 16, ["loading", "title", "data-testid"])) : l("", !0),
49
- o(e.$slots, "centerFooter", {}, void 0, !0),
50
- e.showOkBtn ? (n(), s(t(u), d({
59
+ o(t.$slots, "centerFooter", {}, void 0, !0),
60
+ t.showOkBtn ? (n(), s(e(u), d({
51
61
  key: 1,
52
- "disabled-tip": e.okButtonProps.disabledTip,
62
+ "disabled-tip": t.okButtonProps.disabledTip,
53
63
  type: "primary"
54
- }, e.okButtonProps, {
55
- loading: e.confirmLoading,
56
- title: e.okText,
64
+ }, t.okButtonProps, {
65
+ loading: t.confirmLoading,
66
+ title: t.okText,
57
67
  "data-testid": T.value,
58
- onClick: c(e.$attrs.onFooterok, ["stop"])
68
+ onClick: c(t.$attrs.onFooterok, ["stop"])
59
69
  }), {
60
- default: a(() => [
61
- p(m(e.okText), 1)
70
+ default: i(() => [
71
+ p(m(t.okText), 1)
62
72
  ]),
63
73
  _: 1
64
74
  }, 16, ["disabled-tip", "loading", "title", "data-testid", "onClick"])) : l("", !0),
65
- o(e.$slots, "appendFooter", {}, void 0, !0)
75
+ o(t.$slots, "appendFooter", {}, void 0, !0)
66
76
  ]),
67
77
  _: 3
68
78
  })
@@ -70,5 +80,5 @@ const $ = { class: "flex" }, L = { class: "flex-1" }, D = /* @__PURE__ */ h({
70
80
  }
71
81
  });
72
82
  export {
73
- D as default
83
+ W as default
74
84
  };
@@ -1,22 +1,35 @@
1
- import { defineComponent as s, createElementBlock as l, openBlock as a, normalizeClass as n, unref as i, createTextVNode as p, renderSlot as t, toDisplayString as d } from "vue";
2
- import { propTypes as m, useDesign as c } from "@dazhicheng/hooks";
3
- const v = /* @__PURE__ */ s({
1
+ import { defineComponent as i, createElementBlock as p, openBlock as m, normalizeClass as s, unref as l, createTextVNode as a, renderSlot as o, toDisplayString as n } from "vue";
2
+ import { propTypes as d } from "../../../../packages/hooks/src/propTypes.js";
3
+ import { useDesign as c } from "../../../../packages/hooks/src/useDesign.js";
4
+ import "axios";
5
+ import "element-plus";
6
+ import "dayjs";
7
+ import "xe-utils";
8
+ import "dayjs/plugin/utc";
9
+ import "dayjs/plugin/timezone";
10
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
11
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
12
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
13
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
14
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
15
+ import "lodash-es";
16
+ const x = /* @__PURE__ */ i({
4
17
  __name: "ModalHeader",
5
18
  props: {
6
19
  /** 标题 */
7
- title: m.string
20
+ title: d.string
8
21
  },
9
- setup(o) {
22
+ setup(e) {
10
23
  const { prefixCls: r } = c("modal-header");
11
- return (e, u) => (a(), l("div", {
12
- class: n(i(r))
24
+ return (t, f) => (m(), p("div", {
25
+ class: s(l(r))
13
26
  }, [
14
- p(d(e.$slots.title ? "" : o.title) + " ", 1),
15
- t(e.$slots, "titleToolbar", {}, void 0, !0),
16
- t(e.$slots, "appendHeader", {}, void 0, !0)
27
+ a(n(t.$slots.title ? "" : e.title) + " ", 1),
28
+ o(t.$slots, "titleToolbar", {}, void 0, !0),
29
+ o(t.$slots, "appendHeader", {}, void 0, !0)
17
30
  ], 2));
18
31
  }
19
32
  });
20
33
  export {
21
- v as default
34
+ x as default
22
35
  };