vft 0.0.493 → 0.0.495

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