@dazhicheng/ui 1.6.70 → 1.6.72

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 (116) hide show
  1. package/dist/components/tt-api-component/index.js +4 -3
  2. package/dist/components/tt-api-component/index.vue2.js +3 -2
  3. package/dist/components/tt-area/TtArea.vue3.js +3 -2
  4. package/dist/components/tt-button/index.js +5 -4
  5. package/dist/components/tt-button/index.vue2.js +18 -17
  6. package/dist/components/tt-checkbox/index.js +4 -3
  7. package/dist/components/tt-checkbox/index.vue.js +9 -8
  8. package/dist/components/tt-config-provider/index.js +4 -3
  9. package/dist/components/tt-custom-export-modal/index.js +4 -3
  10. package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue2.js +3 -2
  11. package/dist/components/tt-custom-export-panel/index.js +4 -3
  12. package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue.js +3 -2
  13. package/dist/components/tt-drawer/index.js +4 -3
  14. package/dist/components/tt-drawer/src/RenderDrawer.vue.js +3 -2
  15. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +3 -2
  16. package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +7 -6
  17. package/dist/components/tt-drawer/src/props.js +3 -2
  18. package/dist/components/tt-drawer/src/utils/drawer-api.js +3 -2
  19. package/dist/components/tt-empty/index.js +4 -3
  20. package/dist/components/tt-form/index.js +9 -8
  21. package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +8 -7
  22. package/dist/components/tt-form/src/components/FormActions.vue2.js +33 -32
  23. package/dist/components/tt-form/src/form/FormDescription.vue.js +3 -2
  24. package/dist/components/tt-form/src/form/FormItem.vue.js +3 -2
  25. package/dist/components/tt-form/src/form/FormLabel.vue.js +6 -5
  26. package/dist/components/tt-form/src/form/FormMessage.vue.js +5 -5
  27. package/dist/components/tt-form/src/form/RenderContent.vue.js +7 -6
  28. package/dist/components/tt-form/src/form-render/FormField.vue2.js +86 -81
  29. package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +3 -2
  30. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +1 -0
  31. package/dist/components/tt-form/src/form-render/array-register/utils.js +3 -2
  32. package/dist/components/tt-form/src/form-render/dependencies.js +30 -29
  33. package/dist/components/tt-form/src/form-render/form.vue2.js +3 -2
  34. package/dist/components/tt-form/src/form-render/helper.js +3 -2
  35. package/dist/components/tt-form/src/form-render/rootWrapperClass.js +3 -2
  36. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +7 -3
  37. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +1 -0
  38. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +3 -2
  39. package/dist/components/tt-form/src/group-form/groupFormApi.js +3 -2
  40. package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +13 -12
  41. package/dist/components/tt-form/src/hooks/useSelectCollapse.js +3 -2
  42. package/dist/components/tt-form/src/index.vue2.js +3 -2
  43. package/dist/components/tt-form/src/useFormContext.js +10 -9
  44. package/dist/components/tt-form-item-error-tooltip/index.js +5 -4
  45. package/dist/components/tt-form-item-error-tooltip/index.vue.js +3 -2
  46. package/dist/components/tt-icon/index.js +6 -5
  47. package/dist/components/tt-image/index.js +6 -5
  48. package/dist/components/tt-image/src/components/ImageViewer.js +8 -7
  49. package/dist/components/tt-input-textarea/index.js +4 -3
  50. package/dist/components/tt-input-textarea/index.vue.js +3 -2
  51. package/dist/components/tt-loading/index.js +4 -3
  52. package/dist/components/tt-loading/src/directive.js +4 -3
  53. package/dist/components/tt-log/index.js +4 -3
  54. package/dist/components/tt-log/index.vue.js +5 -4
  55. package/dist/components/tt-modal/index.js +8 -7
  56. package/dist/components/tt-modal/src/RenderModal.vue.js +3 -2
  57. package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +3 -2
  58. package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +3 -2
  59. package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +3 -2
  60. package/dist/components/tt-modal/src/props.js +3 -2
  61. package/dist/components/tt-modal/src/utils/modal-api.js +9 -8
  62. package/dist/components/tt-modal-form/index.vue.js +3 -2
  63. package/dist/components/tt-nav-anchor/index.js +4 -3
  64. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +3 -2
  65. package/dist/components/tt-panel-select/index.js +4 -3
  66. package/dist/components/tt-panel-select/src/common.js +5 -4
  67. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +3 -2
  68. package/dist/components/tt-panel-select/src/index.vue.js +3 -2
  69. package/dist/components/tt-radio-group/index.js +4 -3
  70. package/dist/components/tt-radio-group/index.vue.js +18 -17
  71. package/dist/components/tt-select/index.js +4 -3
  72. package/dist/components/tt-select/src/Select.vue.js +3 -2
  73. package/dist/components/tt-select/src/components/SelectTable.vue.js +3 -2
  74. package/dist/components/tt-select/src/components/Table.vue.js +3 -2
  75. package/dist/components/tt-select/src/hooks/useDataSource.js +3 -2
  76. package/dist/components/tt-select/src/hooks/useSelect.js +18 -17
  77. package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +3 -2
  78. package/dist/components/tt-table/index.js +6 -5
  79. package/dist/components/tt-table/src/Table.vue.js +3 -2
  80. package/dist/components/tt-table/src/TableForm.vue.js +3 -2
  81. package/dist/components/tt-table/src/components/TableAction.vue.js +8 -7
  82. package/dist/components/tt-table/src/components/TableButtons.js +3 -2
  83. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +3 -2
  84. package/dist/components/tt-table/src/components/TableToolbarTools.vue.js +3 -2
  85. package/dist/components/tt-table/src/hooks/useColumnPersistence.js +17 -16
  86. package/dist/components/tt-table/src/hooks/useColumns.js +3 -2
  87. package/dist/components/tt-table/src/hooks/useKeyboardNav.js +18 -17
  88. package/dist/components/tt-table/src/hooks/usePagination.js +20 -19
  89. package/dist/components/tt-table/src/hooks/useQuery.js +9 -8
  90. package/dist/components/tt-table/src/hooks/useRowIdentity.js +3 -2
  91. package/dist/components/tt-table/src/hooks/useRowSelection.js +25 -24
  92. package/dist/components/tt-table/src/hooks/useSideSlot.js +9 -8
  93. package/dist/components/tt-table/src/hooks/useSyncProps.js +11 -10
  94. package/dist/components/tt-table/src/hooks/useTableData.js +5 -4
  95. package/dist/components/tt-table/src/hooks/useTableFooter.js +13 -12
  96. package/dist/components/tt-table/src/hooks/useTableForm.js +20 -19
  97. package/dist/components/tt-table/src/props.js +7 -6
  98. package/dist/components/tt-table/src/table-mutation-events.js +12 -11
  99. package/dist/components/tt-table/src/utils/action-tab-index.js +5 -4
  100. package/dist/components/tt-table/src/utils/context.js +9 -8
  101. package/dist/components/tt-text/index.js +4 -3
  102. package/dist/components/tt-upload/index.js +6 -5
  103. package/dist/components/tt-upload/src/TtUpload.vue.js +3 -2
  104. package/dist/directives/disabled-tip/index.js +3 -2
  105. package/dist/hooks/useFormSchemasLink.js +3 -2
  106. package/dist/hooks/useFormat.js +3 -2
  107. package/dist/hooks/usePanelSelectSchemas.js +3 -2
  108. package/dist/hooks/useScreenshotOss.js +3 -2
  109. package/dist/packages/hooks/src/useDebounce.js +3 -2
  110. package/dist/packages/hooks/src/useElementScreenshot.js +3 -2
  111. package/dist/packages/hooks/src/usePriorityValue.js +9 -8
  112. package/dist/packages/utils/src/stateHandler.js +15 -9
  113. package/dist/plugins/default/renderCellContent.js +12 -11
  114. package/dist/plugins/vxeTable/switchStatus.js +13 -12
  115. package/dist/style.css +1 -1
  116. package/package.json +3 -3
@@ -1,14 +1,15 @@
1
- import { defineComponent as he, useTemplateRef as H, unref as l, computed as a, reactive as be, markRaw as ye, toRaw as F, watch as J, nextTick as Ce, onUnmounted as ge, createBlock as p, createCommentVNode as d, openBlock as m, mergeProps as O, withCtx as h, withDirectives as Fe, createVNode as x, createElementVNode as L, createElementBlock as Q, normalizeClass as w, normalizeStyle as X, renderSlot as xe, normalizeProps as Se, guardReactiveProps as Ne, resolveDynamicComponent as Re, createSlots as ke, renderList as Oe, Transition as we, vShow as Ee } from "vue";
1
+ import { defineComponent as he, useTemplateRef as J, unref as l, computed as a, reactive as be, markRaw as ye, toRaw as C, watch as Q, nextTick as Ce, onUnmounted as ge, createBlock as p, createCommentVNode as d, openBlock as c, mergeProps as O, withCtx as h, withDirectives as Fe, createVNode as g, createElementVNode as L, createElementBlock as $, normalizeClass as w, normalizeStyle as X, renderSlot as xe, normalizeProps as Se, guardReactiveProps as ke, resolveDynamicComponent as Ne, createSlots as Re, renderList as Oe, Transition as we, vShow as Ee } from "vue";
2
2
  import Pe from "../form/FormControl.vue.js";
3
3
  import Te from "../form/FormDescription.vue.js";
4
4
  import Be from "../form/FormItem.vue.js";
5
5
  import "axios";
6
6
  import "element-plus";
7
- import { isString as b, isFunction as $, isObject as Ve } from "../../../../packages/utils/src/is.js";
7
+ import { isString as b, isFunction as q, isObject as Ve } from "../../../../packages/utils/src/is.js";
8
8
  import "dayjs";
9
9
  import "numeral";
10
- import { clnm as q } from "../../../../packages/utils/src/tool.js";
10
+ import { clnm as j } from "../../../../packages/utils/src/tool.js";
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";
@@ -31,7 +32,10 @@ import { isEventObjectLike as Y } from "./helper.js";
31
32
  const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
32
33
  key: 0,
33
34
  class: "ml-1"
34
- }, wt = /* @__PURE__ */ he({
35
+ }, Ze = {
36
+ key: 1,
37
+ class: "min-h-(--form-valid-error-nocompact-padding-bottom)"
38
+ }, Pt = /* @__PURE__ */ he({
35
39
  __name: "FormField",
36
40
  props: {
37
41
  component: {},
@@ -68,7 +72,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
68
72
  commonComponentProps: {}
69
73
  },
70
74
  setup(e) {
71
- const P = H("wrapperRef"), { componentBindEventMap: Z, componentMap: _, isVertical: s } = ze(), ee = Ke(), N = je(), te = Ae(e.fieldName), f = H("fieldComponentRef"), [ne, le] = De(), j = l(ne).formApi, y = a(() => ee.compact), C = a(() => {
75
+ const P = J("wrapperRef"), { componentBindEventMap: Z, componentMap: _, isVertical: s } = ze(), ee = Ke(), k = je(), te = Ae(e.fieldName), f = J("fieldComponentRef"), [ne, le] = De(), A = l(ne).formApi, F = a(() => ee.compact), x = a(() => {
72
76
  var t;
73
77
  return ((t = te.value) == null ? void 0 : t.length) > 0;
74
78
  }), T = be(
@@ -79,7 +83,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
79
83
  * @returns 当前表单值
80
84
  */
81
85
  get(t, n) {
82
- return Le(N.value, n);
86
+ return Le(k.value, n);
83
87
  },
84
88
  /**
85
89
  * @param _target 代理目标
@@ -88,58 +92,58 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
88
92
  * @returns 是否设置成功
89
93
  */
90
94
  set(t, n, o) {
91
- return Ie(N.value, n, o), le.validateField(n, { warn: !1 }), !0;
95
+ return Ie(k.value, n, o), le.validateField(n, { warn: !1 }), !0;
92
96
  }
93
97
  })
94
- ), A = a(() => {
98
+ ), M = a(() => {
95
99
  const t = b(e.component) ? _.value[e.component] : e.component;
96
- return ye(F(t));
97
- }), { dynamicComponentProps: oe, dynamicRules: ie, isDisabled: ae, isIf: M, isRequired: B, isShow: U } = Ge(
100
+ return ye(C(t));
101
+ }), { dynamicComponentProps: oe, dynamicRules: ie, isDisabled: ae, isIf: U, isRequired: B, isShow: D } = Ge(
98
102
  () => e.dependencies
99
103
  ), re = a(() => {
100
104
  var t;
101
105
  return (t = e.labelClass) != null && t.includes("w-") || s.value ? {} : {
102
106
  width: `${e.labelWidth}px`
103
107
  };
104
- }), D = a(() => {
108
+ }), W = a(() => {
105
109
  const t = ie.value || e.rules;
106
- return t && F(t);
107
- }), W = a(() => !e.hide && M.value && U.value), V = a(() => {
110
+ return t && C(t);
111
+ }), z = a(() => !e.hide && U.value && D.value), V = a(() => {
108
112
  var r, S, u;
109
- if (!W.value)
113
+ if (!z.value)
110
114
  return !1;
111
- const t = D.value;
115
+ const t = W.value;
112
116
  if (!t)
113
117
  return B.value;
114
118
  if (B.value)
115
119
  return !0;
116
120
  if (b(t))
117
121
  return ["required", "selectRequired"].includes(t);
118
- const n = F(t);
122
+ const n = C(t);
119
123
  let o = (r = n == null ? void 0 : n.isOptional) == null ? void 0 : r.call(n);
120
124
  const i = n == null ? void 0 : n.def;
121
125
  if ((i == null ? void 0 : i.type) === "default" && "innerType" in i) {
122
- const k = i.innerType;
123
- k && (o = (u = (S = F(k)).isOptional) == null ? void 0 : u.call(S));
126
+ const R = i.innerType;
127
+ R && (o = (u = (S = C(R)).isOptional) == null ? void 0 : u.call(S));
124
128
  }
125
129
  return !o;
126
130
  }), ue = a(() => {
127
131
  var i;
128
- if (!W.value)
132
+ if (!z.value)
129
133
  return null;
130
- const t = D.value;
134
+ const t = W.value;
131
135
  if (!t)
132
- return B.value ? He(A.value) : null;
136
+ return B.value ? He(M.value) : null;
133
137
  if (b(t))
134
138
  return t;
135
- let n = F(t);
139
+ let n = C(t);
136
140
  if (!!V.value) {
137
141
  const r = (i = n == null ? void 0 : n.unwrap) == null ? void 0 : i.call(n);
138
- r && (n = F(r));
142
+ r && (n = C(r));
139
143
  }
140
144
  return Ue(n);
141
- }), c = a(() => {
142
- const t = $(e.componentProps) ? e.componentProps(N.value, j) : e.componentProps;
145
+ }), m = a(() => {
146
+ const t = q(e.componentProps) ? e.componentProps(k.value, A) : e.componentProps;
143
147
  return {
144
148
  ...e.commonComponentProps,
145
149
  ...t,
@@ -147,16 +151,16 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
147
151
  };
148
152
  }), { selectComponentProps: ce } = Qe(
149
153
  a(() => ({
150
- componentProps: c,
154
+ componentProps: m,
151
155
  component: e.component,
152
156
  selectWrapRef: P,
153
157
  selectRef: f
154
158
  }))
155
159
  );
156
- J(
160
+ Q(
157
161
  () => {
158
162
  var t;
159
- return (t = c.value) == null ? void 0 : t.autofocus;
163
+ return (t = m.value) == null ? void 0 : t.autofocus;
160
164
  },
161
165
  (t) => {
162
166
  t === !0 && Ce(() => {
@@ -165,10 +169,10 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
165
169
  },
166
170
  { immediate: !0 }
167
171
  );
168
- const R = a(() => {
172
+ const N = a(() => {
169
173
  var t;
170
- return ae.value || e.disabled || ((t = c.value) == null ? void 0 : t.disabled);
171
- }), z = a(() => $(e.renderComponentContent) ? e.renderComponentContent(N.value, j) : {}), me = a(() => Object.keys(z.value)), de = a(() => {
174
+ return ae.value || e.disabled || ((t = m.value) == null ? void 0 : t.disabled);
175
+ }), K = a(() => q(e.renderComponentContent) ? e.renderComponentContent(k.value, A) : {}), me = a(() => Object.keys(K.value)), de = a(() => {
172
176
  const t = ue.value;
173
177
  return {
174
178
  keepValue: !0,
@@ -189,12 +193,12 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
189
193
  [`onUpdate:${i}`]: o,
190
194
  [i]: r === void 0 ? e.emptyStateValue : r,
191
195
  onChange: e.disabledOnChangeListener ? void 0 : (u) => {
192
- var G;
193
- const k = Y(u), g = (G = t == null ? void 0 : t.componentField) == null ? void 0 : G.onChange;
194
- if (!k)
195
- return g == null ? void 0 : g(u);
196
+ var H;
197
+ const R = Y(u), y = (H = t == null ? void 0 : t.componentField) == null ? void 0 : H.onChange;
198
+ if (!R)
199
+ return y == null ? void 0 : y(u);
196
200
  const I = u.target;
197
- return g == null ? void 0 : g((I == null ? void 0 : I[i]) ?? u);
201
+ return y == null ? void 0 : y((I == null ? void 0 : I[i]) ?? u);
198
202
  },
199
203
  ...e.disabledOnInputListener ? { onInput: void 0 } : {}
200
204
  } : {
@@ -203,49 +207,48 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
203
207
  };
204
208
  }
205
209
  const fe = /* @__PURE__ */ new Set(["ElCheckbox", "ElCheckboxButton", "ElSwitch"]), ve = /* @__PURE__ */ new Set(["ElInputNumber"]);
206
- function K(t) {
210
+ function G(t) {
207
211
  const n = se(t), o = {
208
212
  ...t.componentField,
209
- ...c.value,
213
+ ...m.value,
210
214
  ...ce.value,
211
215
  ...n,
212
- ...Reflect.has(c.value, "onChange") ? { onChange: c.value.onChange } : {},
213
- ...Reflect.has(c.value, "onInput") ? { onInput: c.value.onInput } : {}
216
+ ...Reflect.has(m.value, "onChange") ? { onChange: m.value.onChange } : {},
217
+ ...Reflect.has(m.value, "onInput") ? { onInput: m.value.onInput } : {}
214
218
  };
215
- return Reflect.has(c.value, "name") || delete o.name, b(e.component) && fe.has(e.component) && o.modelValue === void 0 && (o.modelValue = !1), b(e.component) && ve.has(e.component) && (o.controls = !1, o.align = "left"), {
219
+ return Reflect.has(m.value, "name") || delete o.name, b(e.component) && fe.has(e.component) && o.modelValue === void 0 && (o.modelValue = !1), b(e.component) && ve.has(e.component) && (o.controls = !1, o.align = "left"), {
216
220
  ...o,
217
- placeholder: R.value ? "" : o.placeholder
221
+ placeholder: N.value ? "" : o.placeholder
218
222
  };
219
223
  }
220
224
  function pe() {
221
225
  var t, n;
222
- f.value && $(f.value.focus) && // 检查当前是否有元素被聚焦
226
+ f.value && q(f.value.focus) && // 检查当前是否有元素被聚焦
223
227
  document.activeElement !== f.value && ((n = (t = f.value) == null ? void 0 : t.focus) == null || n.call(t));
224
228
  }
225
229
  const v = We();
226
- return J(f, (t) => {
230
+ return Q(f, (t) => {
227
231
  v == null || v.set(e.fieldName, t);
228
232
  }), ge(() => {
229
233
  v != null && v.has(e.fieldName) && v.delete(e.fieldName);
230
- }), (t, n) => !e.hide && l(M) ? (m(), p(l(Me), O({ key: 0 }, de.value, { name: e.fieldName }), {
234
+ }), (t, n) => !e.hide && l(U) ? (c(), p(l(Me), O({ key: 0 }, de.value, { name: e.fieldName }), {
231
235
  default: h((o) => [
232
- Fe(x(l(Be), O({
236
+ Fe(g(l(Be), O({
233
237
  class: [{
234
- "form-valid-error": C.value,
238
+ "form-valid-error": x.value,
235
239
  "form-is-required": V.value,
236
- "pb-(--form-valid-error-nocompact-padding-bottom)": !y.value && !C.value,
237
- "pb-(--tt-spacing-1)": y.value,
238
- "self-center": y.value && !l(s)
240
+ "pb-(--tt-spacing-1)": F.value,
241
+ "self-center": F.value && !l(s)
239
242
  }, "relative"]
240
243
  }, t.$attrs), {
241
244
  default: h(() => [
242
245
  L("div", {
243
246
  class: w([{ "flex-col": l(s), "flex-row items-center": !l(s) }, "flex"])
244
247
  }, [
245
- e.hideLabel ? d("", !0) : (m(), p(Je, {
248
+ e.hideLabel ? d("", !0) : (c(), p(Je, {
246
249
  key: 0,
247
250
  class: w(
248
- l(q)(
251
+ l(j)(
249
252
  "flex leading-(--tt-line-height)",
250
253
  {
251
254
  "mr-(--tt-form-label-gap) shrink-0 items-center justify-end text-right": !l(s),
@@ -265,7 +268,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
265
268
  "tool-tip-text": e.toolTipText
266
269
  }, {
267
270
  default: h(() => [
268
- e.label ? (m(), p(l(E), {
271
+ e.label ? (c(), p(l(E), {
269
272
  key: 0,
270
273
  content: e.label
271
274
  }, null, 8, ["content"])) : d("", !0)
@@ -276,35 +279,35 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
276
279
  L("div", {
277
280
  ref_key: "wrapperRef",
278
281
  ref: P,
279
- class: w(l(q)("relative flex w-full items-center", e.wrapperClass))
282
+ class: w(l(j)("relative flex w-full items-center", e.wrapperClass))
280
283
  }, [
281
- x(l(Pe), {
282
- class: w(l(q)(e.controlClass))
284
+ g(l(Pe), {
285
+ class: w(l(j)(e.controlClass))
283
286
  }, {
284
287
  default: h(() => [
285
- xe(t.$slots, "default", Se(Ne({
288
+ xe(t.$slots, "default", Se(ke({
286
289
  ...o,
287
- ...K(o),
288
- disabled: R.value,
289
- isInValid: C.value,
290
+ ...G(o),
291
+ disabled: N.value,
292
+ isInValid: x.value,
290
293
  form: T,
291
294
  fieldName: e.fieldName
292
295
  })), () => [
293
- (m(), p(Re(A.value), O({
296
+ (c(), p(Ne(M.value), O({
294
297
  ref_key: "fieldComponentRef",
295
298
  ref: f
296
299
  }, {
297
- ...K(o),
298
- disabled: R.value,
299
- isInValid: C.value,
300
+ ...G(o),
301
+ disabled: N.value,
302
+ isInValid: x.value,
300
303
  form: T,
301
304
  fieldName: e.fieldName
302
- }, { disabled: R.value }), ke({ _: 2 }, [
305
+ }, { disabled: N.value }), Re({ _: 2 }, [
303
306
  Oe(me.value, (i) => ({
304
307
  name: i,
305
308
  fn: h((r) => [
306
- x(l(E), O({
307
- content: z.value[i]
309
+ g(l(E), O({
310
+ content: K.value[i]
308
311
  }, { ...r, formContext: o }), null, 16, ["content"])
309
312
  ])
310
313
  }))
@@ -313,42 +316,44 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
313
316
  ]),
314
317
  _: 2
315
318
  }, 1032, ["class"]),
316
- e.suffix ? (m(), Q("div", Ye, [
317
- x(l(E), { content: e.suffix }, null, 8, ["content"])
319
+ e.suffix ? (c(), $("div", Ye, [
320
+ g(l(E), { content: e.suffix }, null, 8, ["content"])
318
321
  ])) : d("", !0),
319
- y.value && C.value ? (m(), p(l($e), {
322
+ F.value && x.value ? (c(), p(l($e), {
320
323
  key: 1,
321
324
  "ref-dom": P.value
322
325
  }, null, 8, ["ref-dom"])) : d("", !0)
323
326
  ], 2)
324
327
  ])
325
328
  ], 2),
326
- e.description || !y.value ? (m(), Q("div", {
329
+ e.description || !F.value ? (c(), $("div", {
327
330
  key: 0,
328
331
  style: X(
329
332
  !l(s) && !e.hideLabel ? { paddingLeft: `calc(${e.labelWidth || 0}px + var(--tt-form-label-gap))` } : {}
330
333
  )
331
334
  }, [
332
- e.description ? (m(), p(l(Te), {
335
+ e.description ? (c(), p(l(Te), {
333
336
  key: 0,
334
337
  class: "text-[12px]"
335
338
  }, {
336
339
  default: h(() => [
337
- x(l(E), { content: e.description }, null, 8, ["content"])
340
+ g(l(E), { content: e.description }, null, 8, ["content"])
338
341
  ]),
339
342
  _: 1
340
343
  })) : d("", !0),
341
- x(we, { name: "slide-up" }, {
342
- default: h(() => [
343
- !y.value && C.value ? (m(), p(l(qe), { key: 0 })) : d("", !0)
344
- ]),
345
- _: 1
346
- })
344
+ F.value ? d("", !0) : (c(), $("div", Ze, [
345
+ g(we, { name: "slide-up" }, {
346
+ default: h(() => [
347
+ x.value ? (c(), p(l(qe), { key: 0 })) : d("", !0)
348
+ ]),
349
+ _: 1
350
+ })
351
+ ]))
347
352
  ], 4)) : d("", !0)
348
353
  ]),
349
354
  _: 2
350
355
  }, 1040, ["class"]), [
351
- [Ee, l(U)]
356
+ [Ee, l(D)]
352
357
  ])
353
358
  ]),
354
359
  _: 3
@@ -356,5 +361,5 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
356
361
  }
357
362
  });
358
363
  export {
359
- wt as default
364
+ Pt as default
360
365
  };
@@ -9,6 +9,7 @@ import "dayjs";
9
9
  import "numeral";
10
10
  import { clnm as V } from "../../../../packages/utils/src/tool.js";
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";
@@ -27,7 +28,7 @@ const N = {
27
28
  }, E = { class: "flex items-center" }, F = { key: 0 }, q = { class: "flex items-center" }, L = {
28
29
  key: 3,
29
30
  class: "ml-[2px]"
30
- }, le = /* @__PURE__ */ x({
31
+ }, re = /* @__PURE__ */ x({
31
32
  __name: "FormLabel",
32
33
  props: {
33
34
  class: {},
@@ -107,5 +108,5 @@ const N = {
107
108
  }
108
109
  });
109
110
  export {
110
- le as default
111
+ re as default
111
112
  };
@@ -5,6 +5,7 @@ import "dayjs";
5
5
  import "numeral";
6
6
  import { clnm as W } from "../../../../../packages/utils/src/tool.js";
7
7
  import "../../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
8
+ import "../../../../../packages/utils/src/stateHandler.js";
8
9
  import "../../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
9
10
  import "../../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
10
11
  import "../../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
@@ -6,6 +6,7 @@ import "dayjs";
6
6
  import "numeral";
7
7
  import { clnm as d } from "../../../../../packages/utils/src/tool.js";
8
8
  import "../../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
9
+ import "../../../../../packages/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 c(r, t, o) {
15
16
  return r || !!t || !!o;
16
17
  }
17
- function M(r, t) {
18
+ function R(r, t) {
18
19
  const { dynamicRules: o, dynamicDisabled: m, props: s } = t, e = r.rules ?? o ?? s.rules, i = r.formItemClass || s.formItemClass, p = a(i) ? i() : i, l = r.wrapperClass, n = c(m, !!r.disabled, !!s.disabled);
19
20
  return { rules: e, formItemClass: d("col-span-1", p), disabled: n, wrapperClass: l };
20
21
  }
21
22
  export {
22
23
  c as getMergedDisabled,
23
- M as resolveArrayItemState
24
+ R as resolveArrayItemState
24
25
  };
@@ -8,6 +8,7 @@ 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";
@@ -24,67 +25,67 @@ const M = /* @__PURE__ */ new Set([
24
25
  "ElMention",
25
26
  "TtInputTextarea"
26
27
  ]);
27
- function ae(e) {
28
- const t = q(e) ? e : (e == null ? void 0 : e.name) ?? (e == null ? void 0 : e.__name);
29
- return q(t) && M.has(t) ? "required" : "selectRequired";
28
+ function or(r) {
29
+ const e = q(r) ? r : (r == null ? void 0 : r.name) ?? (r == null ? void 0 : r.__name);
30
+ return q(e) && M.has(e) ? "required" : "selectRequired";
30
31
  }
31
- function W(e, t) {
32
- if (t.startsWith("[") && t.endsWith("]")) {
33
- const w = t.slice(1, -1);
34
- return e[w];
32
+ function W(r, e) {
33
+ if (e.startsWith("[") && e.endsWith("]")) {
34
+ const w = e.slice(1, -1);
35
+ return r[w];
35
36
  }
36
- return B(e, t);
37
+ return B(r, e);
37
38
  }
38
- function oe(e) {
39
+ function lr(r) {
39
40
  var E;
40
- const t = C(), [w] = K(), s = V(w).formApi;
41
- if (!t)
41
+ const e = C(), [w] = K(), s = V(w).formApi;
42
+ if (!e)
42
43
  throw new Error("useDependencies should be used within <TtForm>");
43
44
  const l = n(!0), f = n(!1), m = n(!0), g = n(!1), h = n({}), F = N(), S = O(() => {
44
45
  var i;
45
- return (((i = e()) == null ? void 0 : i.triggerFields) ?? []).map((d) => W(t.value, d));
46
+ return (((i = r()) == null ? void 0 : i.triggerFields) ?? []).map((d) => W(e.value, d));
46
47
  });
47
48
  let x = 0;
48
49
  return j(
49
- [S, e],
50
+ [S, r],
50
51
  async ([_, i]) => {
51
52
  var b;
52
53
  if (!i || !((b = i == null ? void 0 : i.triggerFields) != null && b.length))
53
54
  return;
54
- const d = ++x, u = () => d !== x, { componentProps: T, disabled: v, if: c, required: R, rules: y, show: p, trigger: P } = i, a = t.value;
55
+ const d = ++x, u = () => d !== x, { componentProps: T, disabled: v, if: c, required: R, rules: y, show: p, trigger: P } = i, a = e.value;
55
56
  if (o(c)) {
56
- const r = !!await c(a, s);
57
- if (u() || (l.value = r, !l.value)) return;
57
+ const t = !!await c(a, s);
58
+ if (u() || (l.value = t, !l.value)) return;
58
59
  } else if (I(c)) {
59
60
  if (l.value = c, !l.value) return;
60
61
  } else
61
62
  l.value = !0;
62
63
  if (o(p)) {
63
- const r = !!await p(a, s);
64
+ const t = !!await p(a, s);
64
65
  if (u()) return;
65
- m.value = r;
66
+ m.value = t;
66
67
  } else I(p) ? m.value = p : m.value = !0;
67
68
  if (o(T)) {
68
- const r = await T(a, s);
69
+ const t = await T(a, s);
69
70
  if (u()) return;
70
- h.value = r;
71
+ h.value = t;
71
72
  } else
72
73
  h.value = {};
73
74
  if (o(y)) {
74
- const r = await y(a, s);
75
+ const t = await y(a, s);
75
76
  if (u()) return;
76
- F.value = A(r) ? k(r) : r;
77
+ F.value = A(t) ? k(t) : t;
77
78
  } else
78
79
  F.value = void 0;
79
80
  if (o(v)) {
80
- const r = !!await v(a, s);
81
+ const t = !!await v(a, s);
81
82
  if (u()) return;
82
- f.value = r;
83
+ f.value = t;
83
84
  } else I(v) ? f.value = v : f.value = !1;
84
85
  if (o(R)) {
85
- const r = !!await R(a, s);
86
+ const t = !!await R(a, s);
86
87
  if (u()) return;
87
- g.value = r;
88
+ g.value = t;
88
89
  } else
89
90
  g.value = !1;
90
91
  if (o(P)) {
@@ -92,7 +93,7 @@ function oe(e) {
92
93
  await P(a, s);
93
94
  }
94
95
  },
95
- { deep: !0, immediate: ((E = e()) == null ? void 0 : E.immediate) ?? !0 }
96
+ { deep: !0, immediate: ((E = r()) == null ? void 0 : E.immediate) ?? !0 }
96
97
  ), {
97
98
  dynamicComponentProps: h,
98
99
  dynamicRules: F,
@@ -103,7 +104,7 @@ function oe(e) {
103
104
  };
104
105
  }
105
106
  export {
106
- oe as default,
107
- ae as resolveRequiredRuleName,
107
+ lr as default,
108
+ or as resolveRequiredRuleName,
108
109
  W as resolveValueByFieldName
109
110
  };
@@ -8,6 +8,7 @@ import "numeral";
8
8
  import { clnm as F } from "../../../../packages/utils/src/tool.js";
9
9
  import { mergeWithArrayOverride as me } from "../../../../packages/utils/src/merge.js";
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";
@@ -27,7 +28,7 @@ import { getBaseRules as ve, getDefaultValueInZodStack as ge } from "./helper.js
27
28
  import "../../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
28
29
  import { useDesign as ye } from "../../../../packages/hooks/src/useDesign.js";
29
30
  import "vue-router";
30
- const Je = /* @__PURE__ */ ee({
31
+ const Ke = /* @__PURE__ */ ee({
31
32
  name: "FormRender",
32
33
  __name: "form",
33
34
  props: {
@@ -206,5 +207,5 @@ const Je = /* @__PURE__ */ ee({
206
207
  }
207
208
  });
208
209
  export {
209
- Je as default
210
+ Ke as default
210
211
  };
@@ -8,6 +8,7 @@ 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";
@@ -30,11 +31,11 @@ function f(e) {
30
31
  return f(i(t.def.schema));
31
32
  }
32
33
  }
33
- function v(e) {
34
+ function O(e) {
34
35
  return !e || !p(e) ? !1 : Reflect.has(e, "target") && Reflect.has(e, "stopPropagation");
35
36
  }
36
37
  export {
37
38
  n as getBaseRules,
38
39
  f as getDefaultValueInZodStack,
39
- v as isEventObjectLike
40
+ O as isEventObjectLike
40
41
  };
@@ -5,17 +5,18 @@ import "vue";
5
5
  import "numeral";
6
6
  import { clnm as m } from "../../../../packages/utils/src/tool.js";
7
7
  import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
8
+ import "../../../../packages/utils/src/stateHandler.js";
8
9
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
9
10
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
10
11
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
11
12
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
12
13
  import "lodash-es";
13
14
  const s = "grid-cols-1 sm:grid-cols-2 md:grid-cols-3";
14
- function _(o) {
15
+ function A(o) {
15
16
  const { layout: p, compact: r, wrapperClass: i } = o, t = ["flex"];
16
17
  return p === "inline" ? t.push("flex-wrap gap-x-(--tt-spacing-1)") : t.push(r ? "gap-x-(--tt-spacing-1)" : "gap-x-(--tt-spacing-2)", "flex-col grid"), m(...t, i ?? s);
17
18
  }
18
19
  export {
19
20
  s as FORM_RENDER_DEFAULT_WRAPPER_CLASS,
20
- _ as getFormRootWrapperClass
21
+ A as getFormRootWrapperClass
21
22
  };
@@ -11,6 +11,7 @@ import "xe-utils";
11
11
  import "dayjs/plugin/utc";
12
12
  import "dayjs/plugin/timezone";
13
13
  import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
14
+ import "../../../../packages/utils/src/stateHandler.js";
14
15
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
15
16
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
16
17
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
@@ -26,7 +27,7 @@ import be from "./GroupSection.vue2.js";
26
27
  import { RENDER_SCHEDULER_KEY as Ne, createRenderScheduler as Oe, GROUP_VISIBILITY_CALLBACK_KEY as He, HIDDEN_GROUP_KEYS_KEY as Pe } from "./lazyContext.js";
27
28
  import { getSchemaKey as Ge, isGroupSchema as Ie } from "./utils.js";
28
29
  import { getFormRootWrapperClass as ke } from "../form-render/rootWrapperClass.js";
29
- const Le = 5, Ve = 500, fo = /* @__PURE__ */ ae({
30
+ const Le = 5, Ve = 500, go = /* @__PURE__ */ ae({
30
31
  name: "TtVirtualGroupForm",
31
32
  inheritAttrs: !1,
32
33
  __name: "GroupForm",
@@ -85,7 +86,10 @@ const Le = 5, Ve = 500, fo = /* @__PURE__ */ ae({
85
86
  componentBindEventMap: Ee,
86
87
  form: v,
87
88
  layout: r.value.layout,
88
- compact: r.value.compact,
89
+ /** 保留响应式读取,让已挂载和后续懒挂载字段都使用最新的紧凑模式。 */
90
+ get compact() {
91
+ return r.value.compact;
92
+ },
89
93
  wrapperClass: r.value.wrapperClass
90
94
  }), Me(M), g.formApi.mount(v, M);
91
95
  const f = ie("scrollRef"), y = a(() => {
@@ -251,5 +255,5 @@ const Le = 5, Ve = 500, fo = /* @__PURE__ */ ae({
251
255
  }
252
256
  });
253
257
  export {
254
- fo as default
258
+ go as default
255
259
  };