@dazhicheng/ui 1.5.265 → 1.6.0

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 (104) hide show
  1. package/dist/components/tt-area/TtArea.vue.js +1 -1
  2. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
  3. package/dist/components/tt-drawer/src/hooks/useResizable.js +2 -2
  4. package/dist/components/tt-form/src/components/FormElInput.vue.js +51 -38
  5. package/dist/components/tt-form/src/form-render/FormField.vue2.js +36 -36
  6. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +3 -3
  7. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +3 -1
  8. package/dist/components/tt-icon/index.vue.js +2 -2
  9. package/dist/components/tt-loading/src/loading.vue.js +2 -2
  10. package/dist/components/tt-modal-form/index.vue.js +13 -12
  11. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +2 -2
  12. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +93 -86
  13. package/dist/components/tt-panel-select/src/index.vue.js +1 -0
  14. package/dist/components/tt-select/src/Select.vue.d.ts +4 -4
  15. package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
  16. package/dist/components/tt-table/index.d.ts +523 -358
  17. package/dist/components/tt-table/index.js +7 -4
  18. package/dist/components/tt-table/src/Table.vue.d.ts +306 -216
  19. package/dist/components/tt-table/src/Table.vue.js +405 -618
  20. package/dist/components/tt-table/src/TableForm.vue.d.ts +384 -19
  21. package/dist/components/tt-table/src/TableForm.vue.js +219 -228
  22. package/dist/components/tt-table/src/components/TableAction.vue.js +108 -131
  23. package/dist/components/tt-table/src/components/TableButtons.js +25 -25
  24. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +88 -85
  25. package/dist/components/tt-table/src/components/TableToolbarTools.vue.d.ts +80 -0
  26. package/dist/components/tt-table/src/components/{TableToobalTools.vue.js → TableToolbarTools.vue.js} +29 -31
  27. package/dist/components/tt-table/src/components/TableToolbarTools.vue2.js +4 -0
  28. package/dist/components/tt-table/src/emits.js +2 -1
  29. package/dist/components/tt-table/src/hooks/useColumnPersistence.d.ts +19 -0
  30. package/dist/components/tt-table/src/hooks/useColumnPersistence.js +63 -0
  31. package/dist/components/tt-table/src/hooks/useColumns.d.ts +505 -21
  32. package/dist/components/tt-table/src/hooks/useColumns.js +100 -245
  33. package/dist/components/tt-table/src/hooks/useGridProps.d.ts +36 -0
  34. package/dist/components/tt-table/src/hooks/useGridProps.js +121 -0
  35. package/dist/components/tt-table/src/hooks/useKeyboardNav.d.ts +11 -0
  36. package/dist/components/tt-table/src/hooks/useKeyboardNav.js +97 -0
  37. package/dist/components/tt-table/src/hooks/usePagination.d.ts +14 -8
  38. package/dist/components/tt-table/src/hooks/usePagination.js +29 -33
  39. package/dist/components/tt-table/src/hooks/useQuery.d.ts +41 -0
  40. package/dist/components/tt-table/src/hooks/useQuery.js +147 -0
  41. package/dist/components/tt-table/src/hooks/useRowIdentity.d.ts +22 -0
  42. package/dist/components/tt-table/src/hooks/useRowIdentity.js +96 -0
  43. package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +23 -7
  44. package/dist/components/tt-table/src/hooks/useRowSelection.js +95 -71
  45. package/dist/components/tt-table/src/hooks/{useLeftRightSlot.d.ts → useSideSlot.d.ts} +25 -17
  46. package/dist/components/tt-table/src/hooks/useSideSlot.js +77 -0
  47. package/dist/components/tt-table/src/hooks/useSyncProps.d.ts +12 -0
  48. package/dist/components/tt-table/src/hooks/useSyncProps.js +55 -0
  49. package/dist/components/tt-table/src/hooks/useTableData.d.ts +71 -0
  50. package/dist/components/tt-table/src/hooks/useTableData.js +307 -0
  51. package/dist/components/tt-table/src/hooks/useTableFooter.d.ts +15 -0
  52. package/dist/components/tt-table/src/hooks/useTableFooter.js +46 -0
  53. package/dist/components/tt-table/src/hooks/useTableForm.d.ts +10 -5
  54. package/dist/components/tt-table/src/hooks/useTableForm.js +55 -48
  55. package/dist/components/tt-table/src/hooks/useTableMethods.d.ts +165 -0
  56. package/dist/components/tt-table/src/hooks/useTableMethods.js +183 -0
  57. package/dist/components/tt-table/src/hooks/useTableRender.d.ts +24 -55
  58. package/dist/components/tt-table/src/props.d.ts +318 -151
  59. package/dist/components/tt-table/src/props.js +117 -270
  60. package/dist/components/tt-table/src/table-defaults.d.ts +25 -0
  61. package/dist/components/tt-table/src/table-defaults.js +71 -0
  62. package/dist/components/tt-table/src/table-mutation-events.d.ts +43 -0
  63. package/dist/components/tt-table/src/table-mutation-events.js +70 -0
  64. package/dist/components/tt-table/src/types/table.d.ts +207 -88
  65. package/dist/components/tt-table/src/types/tableAction.d.ts +23 -0
  66. package/dist/components/tt-table/src/types/tableForm.d.ts +15 -26
  67. package/dist/components/tt-table/src/utils/action-tab-index.d.ts +2 -0
  68. package/dist/components/tt-table/src/utils/action-tab-index.js +50 -0
  69. package/dist/components/tt-table/src/utils/context.js +25 -12
  70. package/dist/components/tt-table/src/utils/table-api.d.ts +136 -58
  71. package/dist/components/tt-table/src/utils/table-api.js +198 -165
  72. package/dist/components/tt-table/src/utils/table-form-api.d.ts +11 -11
  73. package/dist/components/tt-table/src/utils/table-form-api.js +41 -31
  74. package/dist/components/types.d.ts +0 -20
  75. package/dist/hooks/useSetup.js +0 -3
  76. package/dist/index.d.ts +1 -0
  77. package/dist/index.js +105 -101
  78. package/dist/packages/hooks/src/useDebounce.js +6 -6
  79. package/dist/packages/utils/src/is.js +20 -18
  80. package/dist/packages/utils/src/tool.js +76 -149
  81. package/dist/style.css +1 -1
  82. package/dist/utils/uppercaseInput.d.ts +29 -0
  83. package/dist/utils/uppercaseInput.js +16 -0
  84. package/package.json +3 -3
  85. package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +0 -576
  86. package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +0 -4
  87. package/dist/components/tt-table/src/enum.d.ts +0 -2
  88. package/dist/components/tt-table/src/hooks/useCellArea.d.ts +0 -15
  89. package/dist/components/tt-table/src/hooks/useCellArea.js +0 -15
  90. package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +0 -20
  91. package/dist/components/tt-table/src/hooks/useCustomColumns.js +0 -65
  92. package/dist/components/tt-table/src/hooks/useDataSource.d.ts +0 -29
  93. package/dist/components/tt-table/src/hooks/useDataSource.js +0 -232
  94. package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +0 -64
  95. package/dist/components/tt-table/src/hooks/useTable.d.ts +0 -7
  96. package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +0 -101
  97. package/dist/components/tt-table/src/hooks/useTableEvent.js +0 -197
  98. package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +0 -10
  99. package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +0 -15
  100. package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +0 -11
  101. package/dist/components/tt-table/src/hooks/useTableSlot.js +0 -17
  102. package/dist/components/tt-table/src/utils/filters.d.ts +0 -109
  103. package/dist/components/tt-table/src/utils/vxeTable.d.ts +0 -28
  104. package/dist/packages/utils/src/check.js +0 -10
@@ -1,7 +1,7 @@
1
1
  import o from "./TtArea.vue3.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b814e001"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-116cb5cb"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import r from "./DrawerHeader.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ o(r, [["__scopeId", "data-v-9b698cc3"]]);
4
+ const f = /* @__PURE__ */ o(r, [["__scopeId", "data-v-6cdf82e0"]]);
5
5
  export {
6
- c as default
6
+ f as default
7
7
  };
@@ -74,8 +74,8 @@ function Y(d, p, v) {
74
74
  ]
75
75
  ),
76
76
  {
77
- inheritAttrs: !1,
78
- name: "ResizableBar"
77
+ name: "ResizableBar",
78
+ inheritAttrs: !1
79
79
  }
80
80
  );
81
81
  return M(
@@ -1,80 +1,93 @@
1
- import { defineComponent as g, useAttrs as C, useSlots as h, useTemplateRef as k, computed as s, createBlock as w, openBlock as y, unref as r, mergeProps as P, createSlots as T, renderList as A, withCtx as B, renderSlot as E, normalizeProps as I, guardReactiveProps as V } from "vue";
2
- import { ElInput as F } from "element-plus";
3
- const D = /* @__PURE__ */ g({
1
+ import { defineComponent as w, useAttrs as C, useSlots as P, computed as r, useTemplateRef as h, createBlock as k, openBlock as A, unref as p, mergeProps as I, createSlots as T, renderList as B, withCtx as E, renderSlot as V, normalizeProps as F, guardReactiveProps as L } from "vue";
2
+ import { createUppercaseInputProps as U } from "../../../../utils/uppercaseInput.js";
3
+ import { ElInput as $ } from "element-plus";
4
+ const H = /* @__PURE__ */ w({
4
5
  inheritAttrs: !1,
5
6
  __name: "FormElInput",
6
7
  props: {
7
8
  form: {}
8
9
  },
9
- setup(L, { expose: a }) {
10
- const u = C(), l = h(), t = k("inputRef"), i = s(() => {
10
+ setup(j, { expose: c }) {
11
+ const u = C(), i = P(), l = r(() => {
12
+ const e = u;
13
+ if (e.uppercase !== !0)
14
+ return u;
15
+ const { uppercase: s, formatter: n, parser: o, ...a } = e;
16
+ return {
17
+ ...a,
18
+ ...U({
19
+ formatter: typeof n == "function" ? n : void 0,
20
+ parser: typeof o == "function" ? o : void 0
21
+ })
22
+ };
23
+ }), t = h("inputRef"), f = r(() => {
11
24
  var e;
12
25
  return (e = t.value) == null ? void 0 : e.input;
13
- }), c = s(() => {
26
+ }), m = r(() => {
14
27
  var e;
15
28
  return (e = t.value) == null ? void 0 : e.textarea;
16
- }), p = s(() => {
29
+ }), v = r(() => {
17
30
  var e;
18
31
  return (e = t.value) == null ? void 0 : e.ref;
19
- }), f = s(() => {
32
+ }), d = r(() => {
20
33
  var e;
21
34
  return (e = t.value) == null ? void 0 : e.textareaStyle;
22
- }), m = s(() => {
35
+ }), _ = r(() => {
23
36
  var e;
24
37
  return (e = t.value) == null ? void 0 : e.autosize;
25
- }), v = s(() => {
38
+ }), x = r(() => {
26
39
  var e;
27
40
  return (e = t.value) == null ? void 0 : e.isComposing;
28
- }), _ = s(() => {
41
+ }), b = r(() => {
29
42
  var e;
30
43
  return (e = t.value) == null ? void 0 : e.passwordVisible;
31
44
  });
32
- function x() {
45
+ function y() {
33
46
  var e;
34
47
  (e = t.value) == null || e.focus();
35
48
  }
36
- function d() {
49
+ function z() {
37
50
  var e;
38
51
  (e = t.value) == null || e.blur();
39
52
  }
40
- function z() {
53
+ function R() {
41
54
  var e;
42
55
  (e = t.value) == null || e.select();
43
56
  }
44
- function R(e) {
45
- var o;
46
- (o = t.value) == null || o.clear(e);
57
+ function S(e) {
58
+ var s;
59
+ (s = t.value) == null || s.clear(e);
47
60
  }
48
- function S() {
61
+ function g() {
49
62
  var e;
50
63
  (e = t.value) == null || e.resizeTextarea();
51
64
  }
52
- return a({
53
- input: i,
54
- textarea: c,
55
- ref: p,
56
- textareaStyle: f,
57
- autosize: m,
58
- isComposing: v,
59
- passwordVisible: _,
60
- focus: x,
61
- blur: d,
62
- select: z,
63
- clear: R,
64
- resizeTextarea: S
65
- }), (e, o) => (y(), w(r(F), P({
65
+ return c({
66
+ input: f,
67
+ textarea: m,
68
+ ref: v,
69
+ textareaStyle: d,
70
+ autosize: _,
71
+ isComposing: x,
72
+ passwordVisible: b,
73
+ focus: y,
74
+ blur: z,
75
+ select: R,
76
+ clear: S,
77
+ resizeTextarea: g
78
+ }), (e, s) => (A(), k(p($), I({
66
79
  ref_key: "inputRef",
67
80
  ref: t
68
- }, r(u)), T({ _: 2 }, [
69
- A(r(l), ($, n) => ({
70
- name: n,
71
- fn: B((b) => [
72
- E(e.$slots, n, I(V(b || {})))
81
+ }, l.value), T({ _: 2 }, [
82
+ B(p(i), (n, o) => ({
83
+ name: o,
84
+ fn: E((a) => [
85
+ V(e.$slots, o, F(L(a || {})))
73
86
  ])
74
87
  }))
75
88
  ]), 1040));
76
89
  }
77
90
  });
78
91
  export {
79
- D as default
92
+ H as default
80
93
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as ve, useTemplateRef as K, unref as l, computed as a, reactive as he, markRaw as be, toRaw as ye, watch as G, nextTick as Ce, onUnmounted as ge, createBlock as h, createCommentVNode as c, openBlock as u, mergeProps as k, withCtx as b, withDirectives as Fe, createVNode as F, createElementVNode as L, createElementBlock as H, normalizeClass as O, normalizeStyle as J, renderSlot as Re, normalizeProps as we, guardReactiveProps as Se, resolveDynamicComponent as Ne, createSlots as ke, renderList as Oe, Transition as Ee, vShow as Pe } from "vue";
1
+ import { defineComponent as ve, useTemplateRef as K, unref as l, computed as i, reactive as he, markRaw as be, toRaw as ye, watch as G, nextTick as Ce, onUnmounted as ge, createBlock as h, createCommentVNode as c, openBlock as u, mergeProps as k, withCtx as b, withDirectives as Fe, createVNode as F, createElementVNode as L, createElementBlock as H, normalizeClass as O, normalizeStyle as J, renderSlot as we, normalizeProps as Re, guardReactiveProps as Se, resolveDynamicComponent as Ne, createSlots as ke, renderList as Oe, Transition as Ee, vShow as Pe } from "vue";
2
2
  import Be from "../form/FormControl.vue.js";
3
3
  import Te from "../form/FormDescription.vue.js";
4
4
  import Ve from "../form/FormItem.vue.js";
@@ -66,7 +66,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
66
66
  commonComponentProps: {}
67
67
  },
68
68
  setup(n) {
69
- const P = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = xe(), Z = Ke(), S = Ae(), _ = Me(n.fieldName), f = K("fieldComponentRef"), [ee, ne] = We(), j = l(ee).formApi, R = a(() => Z.compact), w = a(() => {
69
+ const P = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = xe(), Z = Ke(), S = Ae(), _ = Me(n.fieldName), f = K("fieldComponentRef"), [ee, ne] = We(), j = l(ee).formApi, w = i(() => Z.compact), R = i(() => {
70
70
  var e;
71
71
  return ((e = _.value) == null ? void 0 : e.length) > 0;
72
72
  }), B = he(
@@ -86,21 +86,21 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
86
86
  * @returns 是否设置成功
87
87
  */
88
88
  set(e, t, o) {
89
- return Le(S.value, t, o), ne.validateField(t), !0;
89
+ return Le(S.value, t, o), ne.validateField(t, { warn: !1 }), !0;
90
90
  }
91
91
  })
92
- ), A = a(() => {
92
+ ), A = i(() => {
93
93
  const e = y(n.component) ? Y.value[n.component] : n.component;
94
94
  return be(ye(e));
95
95
  }), { dynamicComponentProps: te, dynamicRules: oe, isDisabled: le, isIf: M, isRequired: T, isShow: U } = Ge(
96
96
  () => n.dependencies
97
- ), ie = a(() => {
97
+ ), ae = i(() => {
98
98
  var e;
99
99
  return (e = n.labelClass) != null && e.includes("w-") || C.value ? {} : {
100
100
  width: `${n.labelWidth}px`
101
101
  };
102
- }), s = a(() => oe.value || n.rules), D = a(() => !n.hide && M.value && U.value), V = a(() => {
103
- var o, i, m;
102
+ }), s = i(() => oe.value || n.rules), D = i(() => !n.hide && M.value && U.value), V = i(() => {
103
+ var o, a, m;
104
104
  if (!D.value)
105
105
  return !1;
106
106
  if (!s.value)
@@ -109,14 +109,14 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
109
109
  return !0;
110
110
  if (y(s.value))
111
111
  return ["required", "selectRequired"].includes(s.value);
112
- let e = (i = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : i.call(o);
112
+ let e = (a = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : a.call(o);
113
113
  const t = s.value.def;
114
114
  if ((t == null ? void 0 : t.type) === "default" && "innerType" in t) {
115
115
  const v = t.innerType;
116
116
  v && (e = (m = v.isOptional) == null ? void 0 : m.call(v));
117
117
  }
118
118
  return !e;
119
- }), ae = a(() => {
119
+ }), ie = i(() => {
120
120
  var o;
121
121
  if (!D.value)
122
122
  return null;
@@ -126,11 +126,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
126
126
  if (y(e))
127
127
  return e;
128
128
  if (!!V.value) {
129
- const i = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
130
- i && (e = i);
129
+ const a = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
130
+ a && (e = a);
131
131
  }
132
132
  return De(e);
133
- }), r = a(() => {
133
+ }), r = i(() => {
134
134
  const e = $(n.componentProps) ? n.componentProps(S.value, j) : n.componentProps;
135
135
  return {
136
136
  ...n.commonComponentProps,
@@ -138,7 +138,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
138
138
  ...te.value
139
139
  };
140
140
  }), { selectComponentProps: re } = Qe(
141
- a(() => ({
141
+ i(() => ({
142
142
  componentProps: r,
143
143
  component: n.component,
144
144
  selectWrapRef: P,
@@ -157,11 +157,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
157
157
  },
158
158
  { immediate: !0 }
159
159
  );
160
- const N = a(() => {
160
+ const N = i(() => {
161
161
  var e;
162
162
  return le.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
163
- }), W = a(() => $(n.renderComponentContent) ? n.renderComponentContent(S.value, j) : {}), ue = a(() => Object.keys(W.value)), se = a(() => {
164
- const e = ae.value;
163
+ }), W = i(() => $(n.renderComponentContent) ? n.renderComponentContent(S.value, j) : {}), ue = i(() => Object.keys(W.value)), se = i(() => {
164
+ const e = ie.value;
165
165
  return {
166
166
  keepValue: !0,
167
167
  label: y(n.label) ? n.label : "",
@@ -171,22 +171,22 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
171
171
  });
172
172
  function me(e) {
173
173
  var v;
174
- const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], i = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
174
+ const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], a = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
175
175
  let m = t;
176
- if (t && Ie(t) && i) {
176
+ if (t && Ie(t) && a) {
177
177
  const d = t.target;
178
- m = Q(t) ? d == null ? void 0 : d[i] : (t == null ? void 0 : t[i]) ?? t;
178
+ m = Q(t) ? d == null ? void 0 : d[a] : (t == null ? void 0 : t[a]) ?? t;
179
179
  }
180
- return i ? {
181
- [`onUpdate:${i}`]: o,
182
- [i]: m === void 0 ? n.emptyStateValue : m,
180
+ return a ? {
181
+ [`onUpdate:${a}`]: o,
182
+ [a]: m === void 0 ? n.emptyStateValue : m,
183
183
  onChange: n.disabledOnChangeListener ? void 0 : (d) => {
184
184
  var x;
185
185
  const pe = Q(d), g = (x = e == null ? void 0 : e.componentField) == null ? void 0 : x.onChange;
186
186
  if (!pe)
187
187
  return g == null ? void 0 : g(d);
188
188
  const I = d.target;
189
- return g == null ? void 0 : g((I == null ? void 0 : I[i]) ?? d);
189
+ return g == null ? void 0 : g((I == null ? void 0 : I[a]) ?? d);
190
190
  },
191
191
  ...n.disabledOnInputListener ? { onInput: void 0 } : {}
192
192
  } : {
@@ -223,10 +223,10 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
223
223
  default: b((o) => [
224
224
  Fe(F(l(Ve), k({
225
225
  class: [{
226
- "form-valid-error": w.value,
226
+ "form-valid-error": R.value,
227
227
  "form-is-required": V.value,
228
- "pb-(--form-valid-error-nocompact-padding-bottom)": !R.value,
229
- "pb-2": R.value
228
+ "pb-(--form-valid-error-nocompact-padding-bottom)": !w.value,
229
+ "pb-2": w.value
230
230
  }, "relative"]
231
231
  }, e.$attrs), {
232
232
  default: b(() => [
@@ -249,7 +249,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
249
249
  colon: e.colon,
250
250
  label: e.label,
251
251
  required: V.value && !e.hideRequiredMark,
252
- style: J(ie.value),
252
+ style: J(ae.value),
253
253
  "tool-tip": e.toolTip,
254
254
  "help-trigger": e.helpTrigger,
255
255
  form: B,
@@ -273,11 +273,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
273
273
  class: O(l(q)(e.controlClass))
274
274
  }, {
275
275
  default: b(() => [
276
- Re(e.$slots, "default", we(Se({
276
+ we(e.$slots, "default", Re(Se({
277
277
  ...o,
278
278
  ...z(o),
279
279
  disabled: N.value,
280
- isInValid: w.value,
280
+ isInValid: R.value,
281
281
  form: B,
282
282
  fieldName: e.fieldName
283
283
  })), () => [
@@ -287,15 +287,15 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
287
287
  }, {
288
288
  ...z(o),
289
289
  disabled: N.value,
290
- isInValid: w.value,
290
+ isInValid: R.value,
291
291
  form: B,
292
292
  fieldName: e.fieldName
293
293
  }, { disabled: N.value }), ke({ _: 2 }, [
294
- Oe(ue.value, (i) => ({
295
- name: i,
294
+ Oe(ue.value, (a) => ({
295
+ name: a,
296
296
  fn: b((m) => [
297
297
  F(l(E), k({
298
- content: W.value[i]
298
+ content: W.value[a]
299
299
  }, { ...m, formContext: o }), null, 16, ["content"])
300
300
  ])
301
301
  }))
@@ -307,14 +307,14 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
307
307
  e.suffix ? (u(), H("div", Ye, [
308
308
  F(l(E), { content: e.suffix }, null, 8, ["content"])
309
309
  ])) : c("", !0),
310
- R.value && w.value ? (u(), h(l(qe), {
310
+ w.value && R.value ? (u(), h(l(qe), {
311
311
  key: 1,
312
312
  "ref-dom": P.value
313
313
  }, null, 8, ["ref-dom"])) : c("", !0)
314
314
  ], 2)
315
315
  ])
316
316
  ], 2),
317
- e.description || !R.value ? (u(), H("div", {
317
+ e.description || !w.value ? (u(), H("div", {
318
318
  key: 0,
319
319
  style: J(!l(C) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
320
320
  }, [
@@ -329,7 +329,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
329
329
  })) : c("", !0),
330
330
  F(Ee, { name: "slide-up" }, {
331
331
  default: b(() => [
332
- !R.value && w.value ? (u(), h(l(je), {
332
+ !w.value && R.value ? (u(), h(l(je), {
333
333
  key: 0,
334
334
  class: "absolute"
335
335
  })) : c("", !0)
@@ -4,36 +4,36 @@ import { FieldEntry } from '../../types/forms';
4
4
  export declare const FormArrayRegister: import('vue').DefineComponent<{
5
5
  disabled?: boolean | undefined;
6
6
  hide?: boolean | undefined;
7
+ rules?: import('../../types').FormSchemaRuleType | undefined;
7
8
  defaultValue?: any;
8
9
  wrapperClass?: string | undefined;
9
10
  arraySchema?: FormSchema<Record<string, any>>[] | ((entry: FieldEntry<Recordable>, currentIndex: number, ctx: ArraySchemaContext) => FormSchema<Record<string, any>>[]) | undefined;
10
11
  dependencies?: import('./types').ArrayRegisterDependencies<Record<string, any>> | undefined;
11
12
  fieldName: string;
12
- rules?: import('../../types').FormSchemaRuleType | undefined;
13
13
  formItemClass?: (() => string) | string | undefined;
14
14
  virtual?: boolean | undefined;
15
15
  progressive?: boolean | undefined;
16
16
  }, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
17
17
  disabled?: boolean | undefined;
18
18
  hide?: boolean | undefined;
19
+ rules?: import('../../types').FormSchemaRuleType | undefined;
19
20
  defaultValue?: any;
20
21
  wrapperClass?: string | undefined;
21
22
  arraySchema?: FormSchema<Record<string, any>>[] | ((entry: FieldEntry<Recordable>, currentIndex: number, ctx: ArraySchemaContext) => FormSchema<Record<string, any>>[]) | undefined;
22
23
  dependencies?: import('./types').ArrayRegisterDependencies<Record<string, any>> | undefined;
23
24
  fieldName: string;
24
- rules?: import('../../types').FormSchemaRuleType | undefined;
25
25
  formItemClass?: (() => string) | string | undefined;
26
26
  virtual?: boolean | undefined;
27
27
  progressive?: boolean | undefined;
28
28
  }> & Readonly<{}>, {
29
29
  readonly disabled: boolean | undefined;
30
30
  readonly hide: boolean | undefined;
31
+ readonly rules: import('../../types').FormSchemaRuleType | undefined;
31
32
  readonly defaultValue: any;
32
33
  readonly wrapperClass: string;
33
34
  readonly useArraySchema: boolean | undefined;
34
35
  readonly arraySchema: import('./props').ArraySchemaProp;
35
36
  readonly dependencies: import('./types').ArrayRegisterDependencies | undefined;
36
- readonly rules: import('../../types').FormSchemaRuleType | undefined;
37
37
  readonly formItemClass: NonNullable<string | (() => string) | undefined>;
38
38
  readonly virtual: boolean;
39
39
  readonly progressive: boolean;
@@ -40,7 +40,9 @@ const se = ["fieldName", "arraySchema", "useArraySchema", "useFieldArray", "rule
40
40
  return J(y.value, a);
41
41
  },
42
42
  set(e, a, t) {
43
- return q(y.value, a, t), N == null || N.validateField(String(a)), !0;
43
+ return q(y.value, a, t), N == null || N.validateField(String(a), {
44
+ warn: !1
45
+ }), !0;
44
46
  },
45
47
  ownKeys() {
46
48
  return Reflect.ownKeys(y.value);
@@ -2,7 +2,7 @@ import o from "./index.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6dba01d4"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d731bb93"]]);
6
6
  export {
7
- _ as default
7
+ a as default
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./loading.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5d760747"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7e6228e4"]]);
5
5
  export {
6
- a as default
6
+ r as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as H, useSlots as J, ref as K, computed as C, toValue as Q, nextTick as y, watch as W, createBlock as M, openBlock as B, unref as d, createSlots as P, withCtx as A, renderSlot as h, createVNode as X, renderList as S, normalizeProps as b, guardReactiveProps as V, createCommentVNode as Y } from "vue";
2
2
  import "axios";
3
3
  import { ElCheckbox as Z, ElMessage as O } from "element-plus";
4
- import { isFunction as c } from "../../packages/utils/src/is.js";
4
+ import { isFunction as m } from "../../packages/utils/src/is.js";
5
5
  import "xe-utils";
6
6
  import "dayjs";
7
7
  import "dayjs/plugin/utc";
@@ -19,6 +19,7 @@ import "../tt-panel-select/index.js";
19
19
  import "../tt-upload/index.js";
20
20
  import "../tt-api-component/index.js";
21
21
  import "vee-validate";
22
+ import "../../utils/uppercaseInput.js";
22
23
  import { useForm as oe } from "../tt-form/src/useForm.js";
23
24
  import "zod";
24
25
  import "@vee-validate/zod";
@@ -29,7 +30,7 @@ import { useGroupForm as te } from "../tt-form/src/group-form/useGroupForm.js";
29
30
  import "../tt-modal/index.js";
30
31
  import { useModalFormSlot as ie } from "./hooks/useModalFormSlot.js";
31
32
  import { useModalRender as ne } from "../tt-modal/src/hooks/useModalRender.js";
32
- const Ee = /* @__PURE__ */ H({
33
+ const Re = /* @__PURE__ */ H({
33
34
  name: "TtModalForm",
34
35
  __name: "index",
35
36
  props: {
@@ -56,7 +57,7 @@ const Ee = /* @__PURE__ */ H({
56
57
  emits: ["submit", "fetch", "getinfo"],
57
58
  setup(I, { emit: D }) {
58
59
  var w, F;
59
- const o = I, m = D, L = J(), f = K(), r = K(!1), { getFormSlotKeys: T, getModalSlotKeys: E, replaceFormSlotKey: R, replaceModalSlotKey: _ } = ie(L), x = C(() => E.value.filter(Boolean)), $ = C(() => T.value.filter(Boolean)), v = {
60
+ const o = I, c = D, L = J(), f = K(), r = K(!1), { getFormSlotKeys: T, getModalSlotKeys: E, replaceFormSlotKey: R, replaceModalSlotKey: _ } = ie(L), x = C(() => E.value.filter(Boolean)), $ = C(() => T.value.filter(Boolean)), v = {
60
61
  showDefaultActions: !1,
61
62
  ...Q(o.formProps)
62
63
  }, [z, s] = o.renderType === "groupForm" ? te(v) : oe(v), [N, a] = ne({
@@ -68,7 +69,7 @@ const Ee = /* @__PURE__ */ H({
68
69
  }
69
70
  if (e.schemas && s.setState({ schema: e.schemas }), e != null && e.title && a.setModalProps({ title: e.title }), f.value = e[o.infoApiIdKey], e != null && e[o.infoApiIdKey]) {
70
71
  const i = o.infoApi;
71
- if (!c(i)) {
72
+ if (!m(i)) {
72
73
  g(e);
73
74
  return;
74
75
  }
@@ -77,8 +78,8 @@ const Ee = /* @__PURE__ */ H({
77
78
  const t = {
78
79
  ...o.infoApiParams,
79
80
  [o.infoApiIdKey]: e[o.infoApiIdKey]
80
- }, n = c(o.infoApiBefore) ? await o.infoApiBefore(t) : t, l = await i(n), p = o.dataField ? ee(l, o.dataField) : l, u = c(o.infoApiAfter) ? await o.infoApiAfter(p) : p;
81
- k(u), m("getinfo", u), await y(), await s.resetForm({ values: u });
81
+ }, n = m(o.infoApiBefore) ? await o.infoApiBefore(t) : t, l = await i(n), p = o.dataField ? ee(l, o.dataField) : l, u = m(o.infoApiAfter) ? await o.infoApiAfter(p) : p;
82
+ k(u), c("getinfo", u), await y(), await s.resetForm({ values: u });
82
83
  } finally {
83
84
  a.changeLoading(!1);
84
85
  }
@@ -115,18 +116,18 @@ const Ee = /* @__PURE__ */ H({
115
116
  ...e,
116
117
  ...i
117
118
  };
118
- return t = c(o.saveApiBefore) ? await o.saveApiBefore(t) : t, { reqParams: t, formValue: e };
119
+ return t = m(o.saveApiBefore) ? await o.saveApiBefore(t) : t, { reqParams: t, formValue: e };
119
120
  }
120
121
  async function G(e, i) {
121
122
  const { editApi: t } = o;
122
- !t || !c(t) || (e[o.infoApiIdKey] = f.value, await t(e, i.files), O.success("修改成功"), m("submit", {
123
+ !t || !m(t) || (e[o.infoApiIdKey] = f.value, await t(e, i.files), O.success("修改成功"), c("submit", {
123
124
  ...e,
124
125
  continuousChecked: r.value
125
126
  }), a.closeModal());
126
127
  }
127
128
  async function U(e, i) {
128
129
  const { addApi: t } = o;
129
- !t || !c(t) || (await t(e, i.files), O.success("新增成功"), m("submit", {
130
+ !t || !m(t) || (await t(e, i.files), O.success("新增成功"), c("submit", {
130
131
  ...e,
131
132
  continuousChecked: r.value
132
133
  }), (!r.value || !o.isContinuousChecked) && a.closeModal());
@@ -141,7 +142,7 @@ const Ee = /* @__PURE__ */ H({
141
142
  return;
142
143
  const { addApi: n, editApi: l } = o;
143
144
  if (!n && !l) {
144
- m("submit", {
145
+ c("submit", {
145
146
  ...i,
146
147
  [o.infoApiIdKey]: f.value,
147
148
  continuousChecked: r.value
@@ -162,7 +163,7 @@ const Ee = /* @__PURE__ */ H({
162
163
  if (e) {
163
164
  await y();
164
165
  const i = await s.getValues();
165
- m("fetch", i);
166
+ c("fetch", i);
166
167
  } else
167
168
  r.value = !1;
168
169
  }
@@ -199,5 +200,5 @@ const Ee = /* @__PURE__ */ H({
199
200
  }
200
201
  });
201
202
  export {
202
- Ee as default
203
+ Re as default
203
204
  };
@@ -157,7 +157,7 @@ declare const _default: import('vue').DefineComponent<PanelMiddleProps, {
157
157
  };
158
158
  $forceUpdate: () => void;
159
159
  $nextTick: typeof nextTick;
160
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.TtText, typeof __VLS_components.TtText, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
160
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
161
161
  } & Readonly<{
162
162
  type: import('element-plus').InputType;
163
163
  disabled: boolean;
@@ -307,7 +307,7 @@ declare const _default: import('vue').DefineComponent<PanelMiddleProps, {
307
307
  };
308
308
  $forceUpdate: () => void;
309
309
  $nextTick: typeof nextTick;
310
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.TtText, typeof __VLS_components.TtText, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
310
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
311
311
  } & Readonly<{
312
312
  tabindex: number | string;
313
313
  height: number | string;