vft 0.0.485 → 0.0.493

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 (98) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
  4. package/es/components/autocomplete/index.d.ts +6 -6
  5. package/es/components/button/index.d.ts +9 -9
  6. package/es/components/carousel/use-carousel.js +1 -1
  7. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  8. package/es/components/dialog/use-dialog.js +11 -11
  9. package/es/components/input/input.vue2.js +4 -4
  10. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  11. package/es/components/message/message.vue2.js +45 -42
  12. package/es/components/message/types.d.ts +8 -2
  13. package/es/components/message/types.js +2 -1
  14. package/es/components/modal/index.d.ts +72 -3
  15. package/es/components/modal/modal-footer-action.vue.d.ts +1 -1
  16. package/es/components/modal/modal-footer-action.vue2.js +13 -15
  17. package/es/components/modal/modal.vue.d.ts +27 -3
  18. package/es/components/modal/modal.vue2.js +59 -59
  19. package/es/components/modal/types.d.ts +2 -0
  20. package/es/components/popconfirm/index.d.ts +15 -15
  21. package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
  22. package/es/components/router-view-content/index.d.ts +6 -0
  23. package/es/components/router-view-content/router-view-content.vue.d.ts +1 -0
  24. package/es/components/router-view-content/router-view-content.vue2.js +19 -18
  25. package/es/components/select/index.d.ts +4 -4
  26. package/es/components/select/select.vue.d.ts +4 -4
  27. package/es/components/select/useSelect.d.ts +4 -4
  28. package/es/components/super-form/index.d.ts +30 -24
  29. package/es/components/super-form/super-form-item.vue2.js +263 -231
  30. package/es/components/super-form/super-form.vue.d.ts +3 -1
  31. package/es/components/super-form/super-form.vue2.js +153 -132
  32. package/es/components/super-form/types.d.ts +4 -2
  33. package/es/components/super-form/use/helper.d.ts +34 -0
  34. package/es/components/super-form/use/helper.js +81 -34
  35. package/es/components/switch/index.d.ts +1 -0
  36. package/es/components/switch/switch.vue.d.ts +1 -25
  37. package/es/components/switch/types.d.ts +25 -0
  38. package/es/components/switch/types.js +1 -0
  39. package/es/components/table/index.d.ts +6 -0
  40. package/es/components/table/table.vue.d.ts +4 -0
  41. package/es/components/table/table.vue2.js +164 -149
  42. package/es/package.json.d.ts +1 -1
  43. package/es/package.json.js +1 -1
  44. package/es/utils/form-register.d.ts +1 -1
  45. package/es/utils/form-register.js +1 -1
  46. package/es/utils/vue/vnode.js +1 -1
  47. package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
  48. package/lib/components/autocomplete/index.d.ts +6 -6
  49. package/lib/components/button/index.d.ts +9 -9
  50. package/lib/components/dialog/use-dialog.cjs +1 -1
  51. package/lib/components/input/input.vue2.cjs +1 -1
  52. package/lib/components/message/message.vue2.cjs +1 -1
  53. package/lib/components/message/types.cjs +1 -1
  54. package/lib/components/message/types.d.ts +8 -2
  55. package/lib/components/modal/index.d.ts +72 -3
  56. package/lib/components/modal/modal-footer-action.vue.d.ts +1 -1
  57. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  58. package/lib/components/modal/modal.vue.d.ts +27 -3
  59. package/lib/components/modal/modal.vue2.cjs +1 -1
  60. package/lib/components/modal/types.d.ts +2 -0
  61. package/lib/components/popconfirm/index.d.ts +15 -15
  62. package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
  63. package/lib/components/router-view-content/index.d.ts +6 -0
  64. package/lib/components/router-view-content/router-view-content.vue.d.ts +1 -0
  65. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  66. package/lib/components/select/index.d.ts +4 -4
  67. package/lib/components/select/select.vue.d.ts +4 -4
  68. package/lib/components/select/useSelect.d.ts +4 -4
  69. package/lib/components/super-form/index.d.ts +30 -24
  70. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  71. package/lib/components/super-form/super-form.vue.d.ts +3 -1
  72. package/lib/components/super-form/super-form.vue2.cjs +1 -1
  73. package/lib/components/super-form/types.d.ts +4 -2
  74. package/lib/components/super-form/use/helper.cjs +1 -1
  75. package/lib/components/super-form/use/helper.d.ts +34 -0
  76. package/lib/components/switch/index.d.ts +1 -0
  77. package/lib/components/switch/switch.vue.d.ts +1 -25
  78. package/lib/components/switch/types.cjs +1 -0
  79. package/lib/components/switch/types.d.ts +25 -0
  80. package/lib/components/table/index.d.ts +6 -0
  81. package/lib/components/table/table.vue.d.ts +4 -0
  82. package/lib/components/table/table.vue2.cjs +1 -1
  83. package/lib/package.json.cjs +1 -1
  84. package/lib/package.json.d.ts +1 -1
  85. package/lib/utils/form-register.cjs +1 -1
  86. package/lib/utils/form-register.d.ts +1 -1
  87. package/package.json +5 -5
  88. package/tags.json +1 -1
  89. package/theme-style/index.css +1 -1
  90. package/theme-style/src/dialog.scss +1 -1
  91. package/theme-style/src/message.scss +8 -4
  92. package/theme-style/src/super-form.scss +6 -0
  93. package/theme-style/src/table.scss +25 -6
  94. package/theme-style/vft-dialog.css +1 -1
  95. package/theme-style/vft-message.css +1 -1
  96. package/theme-style/vft-super-form.css +1 -1
  97. package/theme-style/vft-table.css +1 -1
  98. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as X, computed as j, ref as re, unref as c, useSlots as oe, createVNode as a, mergeProps as q, withDirectives as ie, vShow as ne, isVNode as le, createTextVNode as O, resolveComponent as N } from "vue";
1
+ import { defineComponent as te, computed as F, ref as Y, watch as se, unref as c, useSlots as me, createVNode as m, mergeProps as V, withDirectives as ce, vShow as pe, isVNode as ue, createTextVNode as K, resolveComponent as O } from "vue";
2
2
  import "../alert/index.js";
3
3
  import "../avatar/index.js";
4
4
  import "../avatar-stack/index.js";
@@ -13,24 +13,24 @@ import "../clamp/index.js";
13
13
  import "../client-only/index.js";
14
14
  import "../clamp-toggle/index.js";
15
15
  import "../clamp-tooltip/index.js";
16
- import { VftCol as H } from "../col/index.js";
16
+ import { VftCol as Q } from "../col/index.js";
17
17
  import "../collapse-transition/index.js";
18
18
  import "../color-picker/index.js";
19
19
  import "../config-provider/index.js";
20
20
  import "../container/index.js";
21
- import { isFunction as C, isBoolean as $, singleAttrToObj as W, cloneDeep as ae, isArray as Y, isNull as se, upperFirst as me, isString as ce } from "@vft/utils";
21
+ import { isBoolean as U, isFunction as x, singleAttrToObj as G, cloneDeep as de, isArray as X, isNull as fe, upperFirst as he, isString as ge } from "@vft/utils";
22
22
  import "../context-menu/context-menu.vue2.js";
23
- import { VftIcon as K } from "../icon/index.js";
23
+ import { VftIcon as Z } from "../icon/index.js";
24
24
  import "../date-picker/index.js";
25
25
  import "../date-time-select/index.js";
26
26
  import "../descriptions/index.js";
27
27
  import "../dialog/index.js";
28
- import { VftDivider as pe } from "../divider/index.js";
28
+ import { VftDivider as Pe } from "../divider/index.js";
29
29
  import "../drawer/index.js";
30
30
  import "../dropdown/index.js";
31
31
  import "../empty/index.js";
32
32
  import "../footer-layout/index.js";
33
- import { VftFormItem as ue } from "../form/index.js";
33
+ import { VftFormItem as be } from "../form/index.js";
34
34
  import "../full-screen/index.js";
35
35
  import "../header-layout/index.js";
36
36
  import "../horizontal-menu/index.js";
@@ -70,7 +70,7 @@ import "../table/index.js";
70
70
  import "../tabs/index.js";
71
71
  import "../tag/index.js";
72
72
  import "../time-picker/index.js";
73
- import { VftTooltip as de } from "../tooltip/index.js";
73
+ import { VftTooltip as ye } from "../tooltip/index.js";
74
74
  import "../tree/index.js";
75
75
  import "../verify-code/index.js";
76
76
  import "../virtual-list/components/fixed-size-list.js";
@@ -99,26 +99,26 @@ import "../md-container/index.js";
99
99
  import "../md-tabs/index.js";
100
100
  import "../md-vue-playground/index.js";
101
101
  import "../infinite-scroll/index.js";
102
- import { FormCompEnum as e, getComponent as Q } from "../../utils/form-register.js";
102
+ import { FormCompEnum as e, getComponent as _ } from "../../utils/form-register.js";
103
103
  import "@vueuse/core";
104
104
  import "../config-provider/hooks/use-global-config.js";
105
105
  import "lodash-es";
106
- import { useNamespace as fe } from "../../hooks/use-namespace/index.js";
106
+ import { useNamespace as ke } from "../../hooks/use-namespace/index.js";
107
107
  import "../../hooks/use-model-toggle/index.js";
108
108
  import "@popperjs/core";
109
109
  import "../../hooks/use-z-index/index.js";
110
110
  import "../message/index.js";
111
111
  import "../progress-i/index.js";
112
112
  import "./index.js";
113
- import { isRangePicker as he, isInput as ge, isDatePicker as Pe } from "./component-map.js";
114
- import { createPlaceholderMessage as G } from "./use/helper.js";
115
- function B(o) {
116
- return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !le(o);
113
+ import { isRangePicker as xe, isInput as Ce, isDatePicker as Re } from "./component-map.js";
114
+ import { createPlaceholderMessage as ee } from "./use/helper.js";
115
+ function z(r) {
116
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !ue(r);
117
117
  }
118
- const be = X({
118
+ const Se = te({
119
119
  inheritAttrs: !1
120
- }), Ir = /* @__PURE__ */ X({
121
- ...be,
120
+ }), jo = /* @__PURE__ */ te({
121
+ ...Se,
122
122
  __name: "super-form-item",
123
123
  props: {
124
124
  schema: {},
@@ -129,31 +129,55 @@ const be = X({
129
129
  updateSchema: {},
130
130
  formActionType: {}
131
131
  },
132
- setup(o) {
133
- const w = fe("super-form"), y = j(() => {
132
+ setup(r) {
133
+ const v = ke("super-form"), k = F(() => {
134
134
  const {
135
- mergeDynamicData: r
136
- } = o.formProps;
135
+ mergeDynamicData: o
136
+ } = r.formProps;
137
137
  return {
138
- field: o.schema.field,
139
- model: o.formModel,
138
+ field: r.schema.field,
139
+ model: r.formModel,
140
140
  values: {
141
- ...r,
142
- ...o.allDefaultValues,
143
- ...o.formModel
141
+ ...o,
142
+ ...r.allDefaultValues,
143
+ ...r.formModel
144
144
  },
145
- schema: o.schema,
146
- elRef: V
145
+ schema: r.schema,
146
+ elRef: N
147
+ };
148
+ }), oe = /* @__PURE__ */ new Set([e.Select, e.Radio, e.Checkbox, e.RadioButton, e.CheckboxButton, e.Cascader, e.AutoComplete]), B = () => r.schema.type && oe.has(r.schema.type) ? {
149
+ options: []
150
+ } : {}, j = Y(B());
151
+ async function re() {
152
+ const {
153
+ componentProps: o = {}
154
+ } = r.schema;
155
+ if (x(o)) {
156
+ const t = B();
157
+ j.value = t;
158
+ try {
159
+ const l = o({
160
+ schema: r.schema,
161
+ formModel: r.formModel,
162
+ formActionType: r.formActionType
163
+ }), s = l instanceof Promise ? await l : l;
164
+ j.value = {
165
+ ...t,
166
+ ...s ?? {}
167
+ };
168
+ } catch (l) {
169
+ console.error("componentProps 执行错误:", l), j.value = B();
170
+ }
171
+ } else
172
+ j.value = o;
173
+ }
174
+ se(() => r.schema.componentProps, (o, t) => (o || t) && re(), {
175
+ immediate: !0
176
+ });
177
+ const A = F(() => {
178
+ let o = {
179
+ ...j.value
147
180
  };
148
- }), T = j(() => {
149
- let {
150
- componentProps: r = {}
151
- } = o.schema;
152
- C(r) && (r = r({
153
- schema: o.schema,
154
- formModel: o.formModel,
155
- formActionType: o.formActionType
156
- }) ?? {});
157
181
  const t = /* @__PURE__ */ new Map([[e.Divider, {
158
182
  type: "horizontal"
159
183
  }], [e.Textarea, {
@@ -197,302 +221,310 @@ const be = X({
197
221
  "start-placeholder": "开始月份",
198
222
  "end-placeholder": "结束月份"
199
223
  }]]);
200
- return t.has(o.schema.type) && (r = Object.assign(t.get(o.schema.type) || {}, r)), o.formProps.inputMaxLength && [e.Input].includes(o.schema.type) && !r?.maxlength && (r.maxlength = o.formProps.inputMaxLength), r;
201
- }), Z = j(() => {
224
+ r.schema.type && t.has(r.schema.type) && (o = Object.assign(t.get(r.schema.type) || {}, o));
225
+ const l = o;
226
+ return r.formProps.inputMaxLength && r.schema.type === e.Input && !l?.maxlength && (l.maxlength = r.formProps.inputMaxLength), l;
227
+ }), ie = F(() => {
202
228
  const {
203
- disabled: r
204
- } = o.formProps, {
229
+ disabled: o
230
+ } = r.formProps, {
205
231
  dynamicDisabled: t
206
- } = o.schema, {
207
- disabled: m = !1
208
- } = c(T);
209
- let s = !!r || m;
210
- return $(t) && (s = t), C(t) && (s = t(c(y))), s;
232
+ } = r.schema, {
233
+ disabled: l = !1
234
+ } = c(A);
235
+ let s = !!o || l;
236
+ return U(t) && (s = t), x(t) && (s = t(c(k))), s;
211
237
  });
212
- function U() {
238
+ function J() {
213
239
  const {
214
- show: r,
240
+ show: o,
215
241
  ifShow: t
216
- } = o.schema;
217
- let m = !0, s = !0;
218
- return $(r) && (m = r), $(t) && (s = t), C(r) && (m = r(c(y))), C(t) && (s = t(c(y))), {
219
- isShow: m,
242
+ } = r.schema;
243
+ let l = !0, s = !0;
244
+ return U(o) && (l = o), U(t) && (s = t), x(o) && (l = o(c(k))), x(t) && (s = t(c(k))), {
245
+ isShow: l,
220
246
  isIfShow: s
221
247
  };
222
248
  }
223
- function _() {
249
+ function ne() {
224
250
  const {
225
- rules: r = [],
251
+ rules: o = [],
226
252
  type: t = e.Input,
227
- rulesMessageJoinLabel: m,
253
+ rulesMessageJoinLabel: l,
228
254
  label: s,
229
- title: P,
230
- dynamicRule: u,
231
- required: h,
232
- dynamicRuleAdd: d = !0
233
- } = o.schema, p = s || P;
234
- if (C(u) && !d)
235
- return u(c(y));
236
- let i = ae(Y(r) ? r : [r]);
255
+ title: y,
256
+ dynamicRule: d,
257
+ required: b,
258
+ dynamicRuleAdd: f = !0
259
+ } = r.schema, p = x(b) ? b(c(k)) : b;
260
+ if (!p)
261
+ return [];
262
+ const h = s || y;
263
+ if (x(d) && !f)
264
+ return d(c(k));
265
+ let i = de(X(o) ? o : [o]);
237
266
  const {
238
- rulesMessageJoinLabel: k
239
- } = o.formProps, S = Reflect.has(o.schema, "rulesMessageJoinLabel") ? m : k, I = G(t, `${S ? p : ""}`);
240
- function M(n, l) {
241
- const A = n.message || I;
242
- return l === void 0 || se(l) || t === e.CheckboxSingle && !l || Array.isArray(l) && l.length === 0 || typeof l == "string" && l.trim() === "" || typeof l == "object" && Reflect.has(l, "checked") && Reflect.has(l, "halfChecked") && Array.isArray(l.checked) && Array.isArray(l.halfChecked) && l.checked.length === 0 && l.halfChecked.length === 0 ? Promise.reject(A) : Promise.resolve();
267
+ rulesMessageJoinLabel: C
268
+ } = r.formProps, D = Reflect.has(r.schema, "rulesMessageJoinLabel") ? l : C, R = ee(t, `${D ? h : ""}`);
269
+ function g(n, a) {
270
+ const T = n.message || R;
271
+ return a === void 0 || fe(a) || t === e.CheckboxSingle && !a || Array.isArray(a) && a.length === 0 || typeof a == "string" && a.trim() === "" || typeof a == "object" && Reflect.has(a, "checked") && Reflect.has(a, "halfChecked") && Array.isArray(a.checked) && Array.isArray(a.halfChecked) && a.checked.length === 0 && a.halfChecked.length === 0 ? Promise.reject(T) : Promise.resolve();
243
272
  }
244
- const f = C(h) ? h(c(y)) : h, R = [e.Radio, e.Select, e.Radio, e.RadioSingle, e.RadioButton, e.Checkbox, e.CheckboxSingle, e.CheckboxButton, e.AutoComplete, e.Cascader, e.ColorPicker, e.Upload, e.Slider].includes(t);
245
- f && (!i || i.length === 0 ? i = [{
246
- required: f,
247
- validator: M,
248
- trigger: R ? "change" : "blur"
249
- }] : i.findIndex((l) => Reflect.has(l, "required")) === -1 && i.unshift({
250
- required: f,
251
- validator: M,
252
- trigger: R ? "change" : "blur"
253
- }));
254
- const v = i.findIndex((n) => Reflect.has(n, "required") && !Reflect.has(n, "validator"));
255
- if (v !== -1) {
256
- const n = i[v], {
257
- isShow: l
258
- } = U();
259
- l || (n.required = !1), t && (n.message = n.message || I);
273
+ const S = [e.Radio, e.Select, e.RadioSingle, e.RadioButton, e.Checkbox, e.CheckboxSingle, e.CheckboxButton, e.AutoComplete, e.Cascader, e.ColorPicker, e.Upload, e.Slider].includes(t);
274
+ if (p)
275
+ !i || i.length === 0 ? i = [{
276
+ required: p,
277
+ validator: g,
278
+ trigger: S ? "change" : "blur"
279
+ }] : i.findIndex((a) => Reflect.has(a, "required")) === -1 && i.unshift({
280
+ required: p,
281
+ validator: g,
282
+ trigger: S ? "change" : "blur"
283
+ });
284
+ else
285
+ return i;
286
+ const L = i.findIndex((n) => Reflect.has(n, "required") && !Reflect.has(n, "validator"));
287
+ if (L !== -1) {
288
+ const n = i[L], {
289
+ isShow: a
290
+ } = J();
291
+ a || (n.required = !1), t && (n.message = n.message || R);
260
292
  }
261
- const g = i.findIndex((n) => n.min), b = i.findIndex((n) => n.max);
262
- function x(n, l, A = "all") {
263
- const L = i[l], E = L.isNumber ? isNaN(n) ? n?.length || 0 : Number(n) : n?.length || 0;
264
- return ["min", "all"].includes(A) && E < L.min ? Promise.reject(`${p}至少为${L.min}位`) : ["max", "all"].includes(A) && E > L.max ? Promise.reject(`${p}最多${L.max}位`) : Promise.resolve();
293
+ const u = i.findIndex((n) => n.min), P = i.findIndex((n) => n.max);
294
+ function M(n, a, T = "all") {
295
+ const q = i[a], W = q.isNumber ? isNaN(n) ? n?.length || 0 : Number(n) : n?.length || 0;
296
+ return ["min", "all"].includes(T) && W < q.min ? Promise.reject(`${h}至少为${q.min}位`) : ["max", "all"].includes(T) && W > q.max ? Promise.reject(`${h}最多${q.max}位`) : Promise.resolve();
265
297
  }
266
- (g !== -1 || b !== -1) && (g !== -1 && b !== -1 && !i[g].validator && !i[g].message ? i[g].validator = (n, l) => x(l, g) : g !== -1 && !i[g].validator && !i[g].message ? i[g].validator = (n, l) => x(l, g, "min") : b !== -1 && !i[b].validator && !i[b].message && (i[b].validator = (n, l) => x(l, b, "max")));
267
- const D = i.findIndex((n) => n.len);
268
- if (D !== -1 && (i[D].validator = (n, l) => l.length !== i[D].len ? Promise.reject(`${p}必须是${i[D].len}位`) : Promise.resolve()), C(u) && d) {
269
- let n = u(c(y));
270
- n = Y(n) ? n : [n], i = i.concat(n);
298
+ (u !== -1 || P !== -1) && (u !== -1 && P !== -1 && !i[u].validator && !i[u].message ? i[u].validator = (n, a) => M(a, u) : u !== -1 && !i[u].validator && !i[u].message ? i[u].validator = (n, a) => M(a, u, "min") : P !== -1 && !i[P].validator && !i[P].message && (i[P].validator = (n, a) => M(a, P, "max")));
299
+ const w = i.findIndex((n) => n.len);
300
+ if (w !== -1 && (i[w].validator = (n, a) => a.length !== i[w].len ? Promise.reject(`${h}必须是${i[w].len}位`) : Promise.resolve()), x(d) && f) {
301
+ let n = d(c(k));
302
+ n = X(n) ? n : [n], i = i.concat(n);
271
303
  }
272
304
  return i;
273
305
  }
274
- const V = re(), ee = () => {
306
+ const N = Y(), le = () => {
275
307
  const {
276
- renderComponentContent: r,
308
+ renderComponentContent: o,
277
309
  type: t = e.Input,
278
- field: m,
310
+ field: l,
279
311
  changeEvent: s = "change",
280
- valueField: P,
281
- label: u,
282
- title: h,
283
- placeholderJoinLabel: d = !0
284
- } = o.schema;
312
+ valueField: y,
313
+ label: d,
314
+ title: b,
315
+ placeholderJoinLabel: f = !0
316
+ } = r.schema;
285
317
  let p = s;
286
- ge(t) ? p = "input" : Pe(t) || t === e.TimePicker || [e.InputTag, e.AutoComplete, e.Cascader, e.ColorPicker, e.Slider].includes(t) ? p = "update:modelValue" : t === e.Upload && (p = "update:fileList");
287
- const i = `on${me(p)}`, k = {
288
- [i]: (...x) => {
289
- const [D] = x;
290
- f[i] && f[i](...x);
291
- const n = D ? D.target : null, l = n ? n.value : D;
292
- o.setFormModel(m, l, o.schema);
318
+ Ce(t) ? p = "input" : Re(t) || t === e.TimePicker || t === e.InputTag || t === e.AutoComplete || t === e.Cascader || t === e.ColorPicker || t === e.Slider ? p = "update:modelValue" : t === e.Upload && (p = "update:fileList");
319
+ const h = `on${he(p)}`, i = {
320
+ [h]: (...P) => {
321
+ const [M] = P;
322
+ g[h] && g[h](...P);
323
+ const w = M ? M.target : null, n = w ? w.value : M;
324
+ r.setFormModel(l, n, r.schema);
293
325
  }
294
- }, S = Q(t), {
295
- autoSetPlaceHolder: I,
296
- size: M
297
- } = o.formProps, f = {
326
+ }, C = _(t), {
327
+ autoSetPlaceHolder: D,
328
+ size: R
329
+ } = r.formProps, g = {
298
330
  clearable: !0,
299
- ...c(T)
331
+ ...c(A)
300
332
  };
301
- if ([e.Search].includes(t) || (f.size = c(T)?.size || M, f.disabled = c(Z)), !f.disabled && I && !he(t) && t) {
302
- const x = u || h;
303
- f.placeholder = c(T)?.placeholder || G(t, d && ce(x) ? x : "");
333
+ if (t !== e.Search && (g.size = c(A)?.size || R, g.disabled = c(ie)), !g.disabled && D && !xe(t) && t) {
334
+ const P = d || b;
335
+ g.placeholder = c(A)?.placeholder || ee(t, f && ge(P) ? P : "");
304
336
  }
305
- const v = {
306
- [P || "model-value"]: o.formModel[m]
307
- }, g = {
308
- ...k,
309
- ...f,
310
- ...v
337
+ const S = {
338
+ [y || "model-value"]: r.formModel[l]
339
+ }, L = {
340
+ ...i,
341
+ ...g,
342
+ ...S
311
343
  };
312
- if (!r && t !== e.Upload)
313
- return a(S, q({
314
- ref: V
315
- }, g), null);
316
- let b;
317
- if (b = C(r) ? {
318
- ...r({
319
- ...c(y),
320
- elRef: V
344
+ if (!o && t !== e.Upload)
345
+ return m(C, V({
346
+ ref: N
347
+ }, L), null);
348
+ let u;
349
+ if (u = x(o) ? {
350
+ ...o({
351
+ ...c(k),
352
+ elRef: N
321
353
  })
322
354
  } : {
323
- default: () => r
324
- }, t === e.Upload && !r) {
355
+ default: () => o
356
+ }, t === e.Upload && !o) {
325
357
  const {
326
- drag: x
327
- } = c(T);
328
- b = x ? {
329
- default: () => a(N("vft-icon"), {
358
+ drag: P
359
+ } = c(A);
360
+ u = P ? {
361
+ default: () => m(O("vft-icon"), {
330
362
  icon: "icon-arrow-upload"
331
363
  }, null)
332
364
  } : {
333
- default: () => a(N("vft-button"), {
365
+ default: () => m(O("vft-button"), {
334
366
  type: "primary"
335
367
  }, {
336
- default: () => [a(N("vft-icon"), {
368
+ default: () => [m(O("vft-icon"), {
337
369
  icon: "icon-arrow-upload"
338
370
  }, null)]
339
371
  })
340
372
  };
341
373
  }
342
- return a(S, q({
343
- ref: V
344
- }, g), B(b) ? b : {
345
- default: () => [b]
374
+ return m(C, V({
375
+ ref: N
376
+ }, L), z(u) ? u : {
377
+ default: () => [u]
346
378
  });
347
379
  };
348
- function F() {
380
+ function $() {
349
381
  const {
350
- showLabel: r = !0,
382
+ showLabel: o = !0,
351
383
  label: t,
352
- title: m,
384
+ title: l,
353
385
  subLabel: s,
354
- labelRequired: P,
355
- helpIcon: u,
356
- helpTooltip: h
357
- } = o.schema;
358
- let d = t || m;
359
- d = P ? a("span", null, [a("span", {
386
+ labelRequired: y,
387
+ helpIcon: d,
388
+ helpTooltip: b
389
+ } = r.schema;
390
+ let f = t || l;
391
+ f = y ? m("span", null, [m("span", {
360
392
  class: "label-required"
361
- }, [O("*")]), a("span", null, [d])]) : d;
393
+ }, [K("*")]), m("span", null, [f])]) : f;
362
394
  const p = () => {
363
- if (!u && !h) return null;
364
- const i = j(() => W(u, "icon", {
395
+ if (!d && !b) return null;
396
+ const h = F(() => G(d, "icon", {
365
397
  size: 20,
366
398
  pointer: !0,
367
399
  icon: "icon-help"
368
400
  }));
369
- if (h) {
370
- const k = j(() => W(h, "content", {
401
+ if (b) {
402
+ const i = F(() => G(b, "content", {
371
403
  placement: "right-start"
372
404
  }));
373
- return a(de, q({
405
+ return m(ye, V({
374
406
  className: "box-item"
375
- }, k.value), {
376
- default: () => [a(K, i.value, null)]
407
+ }, i.value), {
408
+ default: () => [m(Z, h.value, null)]
377
409
  });
378
410
  }
379
- return a(K, i.value, null);
411
+ return m(Z, h.value, null);
380
412
  };
381
- return r && d ? s ? a("div", {
413
+ return o && f ? s ? m("div", {
382
414
  class: "label-content"
383
- }, [a("div", null, [d, O(" "), a("span", {
415
+ }, [m("div", null, [f, K(" "), m("span", {
384
416
  class: "sub-label"
385
- }, [s])]), p()]) : a("div", {
417
+ }, [s])]), p()]) : m("div", {
386
418
  class: "label-content"
387
- }, [a("div", null, [d]), p()]) : void 0;
419
+ }, [m("div", null, [f]), p()]) : void 0;
388
420
  }
389
- const z = oe();
390
- function J(r, t = "default", m) {
391
- if (!r || !Reflect.has(r, t))
421
+ const E = me();
422
+ function H(o, t = "default", l) {
423
+ if (!o || !Reflect.has(o, t))
392
424
  return null;
393
- if (!C(r[t]))
425
+ if (!x(o[t]))
394
426
  return console.error(`${t} is not a function!`), null;
395
- const s = r[t];
396
- return s ? s(m) : null;
427
+ const s = o[t];
428
+ return s ? s(l) : null;
397
429
  }
398
- function te() {
430
+ function ae() {
399
431
  const {
400
- itemProps: r,
432
+ itemProps: o,
401
433
  slot: t,
402
- render: m,
434
+ render: l,
403
435
  field: s,
404
- suffix: P,
405
- prefix: u,
406
- prefixParentStyle: h
407
- } = o.schema, {
408
- autoCleanErrorMessage: d,
436
+ suffix: y,
437
+ prefix: d,
438
+ prefixParentStyle: b
439
+ } = r.schema, {
440
+ autoCleanErrorMessage: f,
409
441
  compFullWidth: p
410
- } = o.formProps, i = () => t ? J(z, t, c(y)) : m ? m(c(y)) : ee(), k = !!P, S = !!u, I = C(P) ? P(c(y)) : P, M = C(u) ? u(c(y)) : u, f = () => {
411
- o.updateSchema([{
442
+ } = r.formProps, h = () => t ? H(E, t, c(k)) : l ? l(c(k)) : le(), i = !!y, C = !!d, D = x(y) ? y(c(k)) : y, R = x(d) ? d(c(k)) : d, g = () => {
443
+ r.updateSchema([{
412
444
  field: s,
413
445
  itemProps: {
414
446
  error: ""
415
447
  }
416
448
  }]);
417
- }, R = () => a(ue, q({
449
+ }, I = () => m(be, V({
418
450
  style: {
419
- marginRight: o.formProps.customLayout ? "10px" : 0
451
+ marginRight: r.formProps.customLayout ? "10px" : 0
420
452
  },
421
453
  prop: s,
422
454
  class: [{
423
- [w.is("suffix")]: k
455
+ [v.is("suffix")]: i
424
456
  }, {
425
- [w.is("comp-full-width")]: p
426
- }, w.e("item")]
427
- }, r, {
428
- label: r?.label || r?.title,
429
- "onUpdate:error": d ? f : () => {
457
+ [v.is("comp-full-width")]: p
458
+ }, v.e("item")]
459
+ }, o, {
460
+ label: o?.label || o?.title,
461
+ "onUpdate:error": f ? g : () => {
430
462
  },
431
- rules: _()
463
+ rules: ne()
432
464
  }), {
433
- default: () => [a("div", {
434
- class: w.e("container")
435
- }, [a("div", {
436
- class: w.e("content")
437
- }, [i(), k && a("span", {
438
- class: w.m("suffix")
439
- }, [I])])])],
440
- label: F() ? () => F() : void 0
465
+ default: () => [m("div", {
466
+ class: v.e("container")
467
+ }, [m("div", {
468
+ class: v.e("content")
469
+ }, [h(), i && m("span", {
470
+ class: v.m("suffix")
471
+ }, [D])])])],
472
+ label: $() ? () => $() : void 0
441
473
  });
442
- return S ? a("div", {
443
- style: h
444
- }, [a("span", {
445
- class: w.m("prefix")
446
- }, [M]), R()]) : R();
474
+ return C ? m("div", {
475
+ style: b
476
+ }, [m("span", {
477
+ class: v.m("prefix")
478
+ }, [R]), I()]) : I();
447
479
  }
448
480
  return () => {
449
- let r;
481
+ let o;
450
482
  const {
451
483
  colProps: t = {},
452
- colSlot: m,
484
+ colSlot: l,
453
485
  renderColContent: s,
454
- type: P = e.Input,
455
- render: u,
456
- quickColSpan: h
457
- } = o.schema;
458
- if (!Q(P) && !s && !u)
486
+ type: y = e.Input,
487
+ render: d,
488
+ quickColSpan: b
489
+ } = r.schema;
490
+ if (!_(y) && !s && !d)
459
491
  return null;
460
492
  const {
461
- baseColProps: d = {},
493
+ baseColProps: f = {},
462
494
  quickColSpan: p
463
- } = o.formProps, i = p ? {
495
+ } = r.formProps, h = p ? {
464
496
  span: Math.ceil(24 / p),
465
- ...d
497
+ ...f
466
498
  } : {
467
- ...d
468
- }, k = h ? {
469
- span: Math.ceil(24 / h),
499
+ ...f
500
+ }, i = b ? {
501
+ span: Math.ceil(24 / b),
470
502
  ...t
471
503
  } : {
472
504
  ...t
473
- }, S = {
474
- ...i,
475
- ...k
505
+ }, C = {
506
+ ...h,
507
+ ...i
476
508
  }, {
477
- isIfShow: I,
478
- isShow: M
479
- } = U(), f = c(y), R = () => m ? J(z, m, f) : s ? s(f) : te();
480
- if (P === e.Divider) {
481
- let v;
482
- return a(H, q({
509
+ isIfShow: D,
510
+ isShow: R
511
+ } = J(), g = c(k), I = () => l ? H(E, l, g) : s ? s(g) : ae();
512
+ if (y === e.Divider) {
513
+ let S;
514
+ return m(Q, V({
483
515
  span: 24
484
- }, k), {
485
- default: () => [a(pe, c(T), B(v = F()) ? v : {
486
- default: () => [v]
516
+ }, i), {
517
+ default: () => [m(Pe, c(A), z(S = $()) ? S : {
518
+ default: () => [S]
487
519
  })]
488
520
  });
489
521
  }
490
- return I && (o.formProps.customLayout ? R() : ie(a(H, S, B(r = R()) ? r : {
491
- default: () => [r]
492
- }), [[ne, M]]));
522
+ return D && (r.formProps.customLayout ? I() : ce(m(Q, C, z(o = I()) ? o : {
523
+ default: () => [o]
524
+ }), [[pe, R]]));
493
525
  };
494
526
  }
495
527
  });
496
528
  export {
497
- Ir as default
529
+ jo as default
498
530
  };