vft 0.0.317 → 0.0.320

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 (94) hide show
  1. package/dist/index.css +1 -1
  2. package/es/component.js +157 -155
  3. package/es/components/avatar-stack/avatar-stack.vue.d.ts +12 -0
  4. package/es/components/avatar-stack/avatar-stack.vue.js +4 -0
  5. package/es/components/avatar-stack/avatar-stack.vue2.js +69 -0
  6. package/es/components/avatar-stack/index.d.ts +43 -0
  7. package/es/components/avatar-stack/index.js +12 -0
  8. package/es/components/avatar-stack/style/css.d.ts +4 -0
  9. package/es/components/avatar-stack/style/css.js +6 -0
  10. package/es/components/avatar-stack/style/index.d.ts +4 -0
  11. package/es/components/avatar-stack/style/index.js +6 -0
  12. package/es/components/avatar-stack/types.d.ts +14 -0
  13. package/es/components/avatar-stack/types.js +1 -0
  14. package/es/components/button/index.d.ts +9 -9
  15. package/es/components/color-picker/color-picker.vue2.js +1 -1
  16. package/es/components/form/form-item.vue.d.ts +1 -1
  17. package/es/components/form/index.d.ts +30 -30
  18. package/es/components/index.d.ts +13 -12
  19. package/es/components/index.js +421 -419
  20. package/es/components/list-cell/list-cell.vue2.js +36 -36
  21. package/es/components/popconfirm/index.d.ts +15 -15
  22. package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
  23. package/es/components/super-form/component-map.d.ts +6 -0
  24. package/es/components/super-form/component-map.js +42 -30
  25. package/es/components/super-form/style/css.d.ts +6 -0
  26. package/es/components/super-form/style/css.js +15 -6
  27. package/es/components/super-form/style/index.d.ts +6 -0
  28. package/es/components/super-form/style/index.js +16 -7
  29. package/es/components/super-form/super-form-item.vue2.js +217 -199
  30. package/es/components/super-form/use/helper.js +137 -23
  31. package/es/components/table/style/css.js +15 -6
  32. package/es/components/table/style/index.js +16 -7
  33. package/es/components/tree/index.d.ts +5 -5
  34. package/es/components/tree/tree.vue.d.ts +2 -2
  35. package/es/components/upload/index.d.ts +15 -15
  36. package/es/components/upload/upload-content.vue.d.ts +1 -1
  37. package/es/components/upload/upload-content.vue2.js +51 -47
  38. package/es/components/upload/upload-list.vue2.js +70 -66
  39. package/es/components/upload/upload.vue.d.ts +1 -1
  40. package/es/components/upload/upload.vue2.js +30 -30
  41. package/es/index.js +562 -560
  42. package/es/package.json.d.ts +1 -1
  43. package/es/package.json.js +1 -1
  44. package/lib/component.cjs +1 -1
  45. package/lib/components/avatar-stack/avatar-stack.vue.cjs +1 -0
  46. package/lib/components/avatar-stack/avatar-stack.vue.d.ts +12 -0
  47. package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -0
  48. package/lib/components/avatar-stack/index.cjs +1 -0
  49. package/lib/components/avatar-stack/index.d.ts +43 -0
  50. package/lib/components/avatar-stack/style/css.cjs +1 -0
  51. package/lib/components/avatar-stack/style/css.d.ts +4 -0
  52. package/lib/components/avatar-stack/style/index.cjs +1 -0
  53. package/lib/components/avatar-stack/style/index.d.ts +4 -0
  54. package/lib/components/avatar-stack/types.cjs +1 -0
  55. package/lib/components/avatar-stack/types.d.ts +14 -0
  56. package/lib/components/button/index.d.ts +9 -9
  57. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  58. package/lib/components/form/form-item.vue.d.ts +1 -1
  59. package/lib/components/form/index.d.ts +30 -30
  60. package/lib/components/index.cjs +1 -1
  61. package/lib/components/index.d.ts +13 -12
  62. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  63. package/lib/components/popconfirm/index.d.ts +15 -15
  64. package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
  65. package/lib/components/super-form/component-map.cjs +1 -1
  66. package/lib/components/super-form/component-map.d.ts +6 -0
  67. package/lib/components/super-form/style/css.cjs +1 -1
  68. package/lib/components/super-form/style/css.d.ts +6 -0
  69. package/lib/components/super-form/style/index.cjs +1 -1
  70. package/lib/components/super-form/style/index.d.ts +6 -0
  71. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  72. package/lib/components/super-form/use/helper.cjs +1 -1
  73. package/lib/components/table/style/css.cjs +1 -1
  74. package/lib/components/table/style/index.cjs +1 -1
  75. package/lib/components/tree/index.d.ts +5 -5
  76. package/lib/components/tree/tree.vue.d.ts +2 -2
  77. package/lib/components/upload/index.d.ts +15 -15
  78. package/lib/components/upload/upload-content.vue.d.ts +1 -1
  79. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  80. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  81. package/lib/components/upload/upload.vue.d.ts +1 -1
  82. package/lib/components/upload/upload.vue2.cjs +1 -1
  83. package/lib/index.cjs +1 -1
  84. package/lib/package.json.cjs +1 -1
  85. package/lib/package.json.d.ts +1 -1
  86. package/package.json +4 -4
  87. package/theme-style/index.css +1 -1
  88. package/theme-style/src/avatar-stack.scss +38 -0
  89. package/theme-style/src/common/var.scss +16 -2
  90. package/theme-style/src/index.scss +1 -0
  91. package/theme-style/src/super-form.scss +6 -1
  92. package/theme-style/vft-avatar-stack.css +1 -0
  93. package/theme-style/vft-super-form.css +1 -1
  94. package/web-types.json +1 -1
@@ -1,23 +1,23 @@
1
- import { defineComponent as z, computed as L, unref as u, useSlots as Z, createVNode as m, mergeProps as k, withDirectives as _, vShow as ee, isVNode as te, createTextVNode as F } from "vue";
2
- import { VftCol as H } from "../col/index.js";
3
- import { VftDivider as re } from "../divider/index.js";
4
- import { VftFormItem as ne } from "../form/index.js";
1
+ import { defineComponent as W, computed as L, unref as u, useSlots as _, createVNode as d, mergeProps as F, withDirectives as ee, vShow as te, createTextVNode as H, isVNode as re, resolveComponent as U } from "vue";
2
+ import { VftCol as G } from "../col/index.js";
3
+ import { VftDivider as ne } from "../divider/index.js";
4
+ import { VftFormItem as oe } from "../form/index.js";
5
5
  import "@vueuse/core";
6
- import { isFunction as g, isBoolean as q, cloneDeep as oe, isArray as G, isNull as le, upperFirst as se, isString as ie } from "@vft/utils";
6
+ import { isFunction as C, isBoolean as v, cloneDeep as le, isArray as J, isNull as se, upperFirst as ie, isString as ae } from "@vft/utils";
7
7
  import "../config-provider/hooks/use-global-config.js";
8
8
  import "lodash-es";
9
- import { useNamespace as ae } from "../../hooks/use-namespace/index.js";
9
+ import { useNamespace as ce } from "../../hooks/use-namespace/index.js";
10
10
  import "../../hooks/use-model-toggle/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../hooks/use-z-index/index.js";
13
- import { FormCompEnum as t, componentMap as J, isInput as ce, isDatePicker as ue, isRangePicker as fe } from "./component-map.js";
14
- import { createPlaceholderMessage as X } from "./use/helper.js";
15
- function j(r) {
16
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !te(r);
13
+ import { FormCompEnum as e, componentMap as X, isInput as ue, isDatePicker as de, isRangePicker as fe } from "./component-map.js";
14
+ import { createPlaceholderMessage as z } from "./use/helper.js";
15
+ function q(n) {
16
+ return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !re(n);
17
17
  }
18
- const me = z({
18
+ const me = W({
19
19
  inheritAttrs: !1
20
- }), xe = /* @__PURE__ */ z({
20
+ }), Se = /* @__PURE__ */ W({
21
21
  ...me,
22
22
  __name: "super-form-item",
23
23
  props: {
@@ -29,318 +29,336 @@ const me = z({
29
29
  updateSchema: {},
30
30
  formActionType: {}
31
31
  },
32
- setup(r) {
33
- const N = ae("super-form"), p = L(() => {
32
+ setup(n) {
33
+ const D = ce("super-form"), P = L(() => {
34
34
  const {
35
- mergeDynamicData: e
36
- } = r.formProps;
35
+ mergeDynamicData: t
36
+ } = n.formProps;
37
37
  return {
38
- field: r.schema.field,
39
- model: r.formModel,
38
+ field: n.schema.field,
39
+ model: n.formModel,
40
40
  values: {
41
- ...e,
42
- ...r.allDefaultValues,
43
- ...r.formModel
41
+ ...t,
42
+ ...n.allDefaultValues,
43
+ ...n.formModel
44
44
  },
45
- schema: r.schema
45
+ schema: n.schema
46
46
  };
47
47
  }), K = L(() => {
48
48
  let {
49
- componentProps: e = {}
50
- } = r.schema;
51
- g(e) && (e = e({
52
- schema: r.schema,
53
- formModel: r.formModel,
54
- formActionType: r.formActionType
49
+ componentProps: t = {}
50
+ } = n.schema;
51
+ C(t) && (t = t({
52
+ schema: n.schema,
53
+ formModel: n.formModel,
54
+ formActionType: n.formActionType
55
55
  }) ?? {});
56
- const n = /* @__PURE__ */ new Map([[t.DIVIDER, {
56
+ const r = /* @__PURE__ */ new Map([[e.DIVIDER, {
57
57
  type: "horizontal"
58
- }], [t.TEXTAREA, {
58
+ }], [e.TEXTAREA, {
59
59
  type: "textarea"
60
- }], [t.PASSWORD, {
60
+ }], [e.PASSWORD, {
61
61
  type: "password",
62
62
  "show-password": !0
63
- }], [t.INPUT_NUMBER, {
63
+ }], [e.INPUT_NUMBER, {
64
64
  type: "number"
65
- }], [t.CHECKBOX_BUTTON, {
65
+ }], [e.CHECKBOX_BUTTON, {
66
66
  useButton: !0
67
- }], [t.RADIO_BUTTON, {
67
+ }], [e.RADIO_BUTTON, {
68
68
  useButton: !0
69
- }], [t.YEAR_PICKER, {
70
- type: t.YEAR_PICKER
71
- }], [t.MONTH_PICKER, {
72
- type: t.MONTH_PICKER
73
- }], [t.DATE_PICKER, {
74
- type: t.DATE_PICKER
75
- }], [t.DATES_PICKER, {
76
- type: t.DATES_PICKER
77
- }], [t.DATETIME_PICKER, {
78
- type: t.DATETIME_PICKER
79
- }], [t.WEEK_PICKER, {
80
- type: t.WEEK_PICKER
81
- }], [t.TIMERANGE_PICKER, {
82
- type: t.TIME_PICKER,
69
+ }], [e.YEAR_PICKER, {
70
+ type: e.YEAR_PICKER
71
+ }], [e.MONTH_PICKER, {
72
+ type: e.MONTH_PICKER
73
+ }], [e.DATE_PICKER, {
74
+ type: e.DATE_PICKER
75
+ }], [e.DATES_PICKER, {
76
+ type: e.DATES_PICKER
77
+ }], [e.DATETIME_PICKER, {
78
+ type: e.DATETIME_PICKER
79
+ }], [e.WEEK_PICKER, {
80
+ type: e.WEEK_PICKER
81
+ }], [e.TIMERANGE_PICKER, {
82
+ type: e.TIME_PICKER,
83
83
  "is-range": !0,
84
84
  "start-placeholder": "开始时间",
85
85
  "end-placeholder": "结束时间"
86
- }], [t.DATETIMERANGE_PICKER, {
87
- type: t.DATETIMERANGE_PICKER,
86
+ }], [e.DATETIMERANGE_PICKER, {
87
+ type: e.DATETIMERANGE_PICKER,
88
88
  "start-placeholder": "开始日期",
89
89
  "end-placeholder": "结束日期"
90
- }], [t.DATERANGE_PICKER, {
91
- type: t.DATERANGE_PICKER,
90
+ }], [e.DATERANGE_PICKER, {
91
+ type: e.DATERANGE_PICKER,
92
92
  "start-placeholder": "开始日期",
93
93
  "end-placeholder": "结束日期"
94
- }], [t.MONTHRANGE_PICKER, {
95
- type: t.MONTHRANGE_PICKER,
94
+ }], [e.MONTHRANGE_PICKER, {
95
+ type: e.MONTHRANGE_PICKER,
96
96
  "start-placeholder": "开始月份",
97
97
  "end-placeholder": "结束月份"
98
98
  }]]);
99
- return n.has(r.schema.type) && (e = Object.assign(n.get(r.schema.type) || {}, e)), r.formProps.inputMaxLength && [t.INPUT].includes(r.schema.type) && !e?.maxlength && (e.maxlength = r.formProps.inputMaxLength), e;
100
- }), W = L(() => {
99
+ return r.has(n.schema.type) && (t = Object.assign(r.get(n.schema.type) || {}, t)), n.formProps.inputMaxLength && [e.INPUT].includes(n.schema.type) && !t?.maxlength && (t.maxlength = n.formProps.inputMaxLength), t;
100
+ }), $ = L(() => {
101
101
  const {
102
- disabled: e
103
- } = r.formProps, {
104
- dynamicDisabled: n
105
- } = r.schema, {
102
+ disabled: t
103
+ } = n.formProps, {
104
+ dynamicDisabled: r
105
+ } = n.schema, {
106
106
  disabled: a = !1
107
107
  } = u(K);
108
- let i = !!e || a;
109
- return q(n) && (i = n), g(n) && (i = n(u(p))), i;
108
+ let i = !!t || a;
109
+ return v(r) && (i = r), C(r) && (i = r(u(P))), i;
110
110
  });
111
- function v() {
111
+ function j() {
112
112
  const {
113
- show: e,
114
- ifShow: n
115
- } = r.schema;
113
+ show: t,
114
+ ifShow: r
115
+ } = n.schema;
116
116
  let a = !0, i = !0;
117
- return q(e) && (a = e), q(n) && (i = n), g(e) && (a = e(u(p))), g(n) && (i = n(u(p))), {
117
+ return v(t) && (a = t), v(r) && (i = r), C(t) && (a = t(u(P))), C(r) && (i = r(u(P))), {
118
118
  isShow: a,
119
119
  isIfShow: i
120
120
  };
121
121
  }
122
- function $() {
122
+ function Y() {
123
123
  const {
124
- rules: e = [],
125
- type: n = t.INPUT,
124
+ rules: t = [],
125
+ type: r = e.INPUT,
126
126
  rulesMessageJoinLabel: a,
127
127
  label: i,
128
- title: h,
128
+ title: p,
129
129
  dynamicRule: c,
130
- required: R,
131
- dynamicRuleAdd: I = !0
132
- } = r.schema, E = i || h;
133
- if (g(c) && !I)
134
- return c(u(p));
135
- let o = oe(G(e) ? e : [e]);
130
+ required: I,
131
+ dynamicRuleAdd: R = !0
132
+ } = n.schema, m = i || p;
133
+ if (C(c) && !R)
134
+ return c(u(P));
135
+ let o = le(J(t) ? t : [t]);
136
136
  const {
137
- rulesMessageJoinLabel: C
138
- } = r.formProps, A = Reflect.has(r.schema, "rulesMessageJoinLabel") ? a : C, T = X(n, `${A ? E : ""}`);
137
+ rulesMessageJoinLabel: b
138
+ } = n.formProps, y = Reflect.has(n.schema, "rulesMessageJoinLabel") ? a : b, A = z(r, `${y ? m : ""}`);
139
139
  function M(l, s) {
140
- const S = l.message || T;
141
- return s === void 0 || le(s) || Array.isArray(s) && s.length === 0 || typeof s == "string" && s.trim() === "" || typeof s == "object" && Reflect.has(s, "checked") && Reflect.has(s, "halfChecked") && Array.isArray(s.checked) && Array.isArray(s.halfChecked) && s.checked.length === 0 && s.halfChecked.length === 0 ? Promise.reject(S) : Promise.resolve();
140
+ const N = l.message || A;
141
+ return s === void 0 || se(s) || Array.isArray(s) && s.length === 0 || typeof s == "string" && s.trim() === "" || typeof s == "object" && Reflect.has(s, "checked") && Reflect.has(s, "halfChecked") && Array.isArray(s.checked) && Array.isArray(s.halfChecked) && s.checked.length === 0 && s.halfChecked.length === 0 ? Promise.reject(N) : Promise.resolve();
142
142
  }
143
- const f = g(R) ? R(u(p)) : R, b = [t.RADIO, t.SELECT, t.RADIO, t.RADIO_SINGLE, t.RADIO_BUTTON, t.CHECKBOX, t.CHECKBOX_SINGLE, t.CHECKBOX_BUTTON].includes(n);
143
+ const f = C(I) ? I(u(P)) : I, T = [e.RADIO, e.SELECT, e.RADIO, e.RADIO_SINGLE, e.RADIO_BUTTON, e.CHECKBOX, e.CHECKBOX_SINGLE, e.CHECKBOX_BUTTON, e.AUTOCOMPLETE, e.Cascader, e.ColorPicker, e.Upload, e.Slider].includes(r);
144
144
  f && (!o || o.length === 0 ? o = [{
145
145
  required: f,
146
146
  validator: M,
147
- trigger: b ? "change" : "blur"
147
+ trigger: T ? "change" : "blur"
148
148
  }] : o.findIndex((s) => Reflect.has(s, "required")) === -1 && o.unshift({
149
149
  required: f,
150
150
  validator: M,
151
- trigger: b ? "change" : "blur"
151
+ trigger: T ? "change" : "blur"
152
152
  }));
153
153
  const x = o.findIndex((l) => Reflect.has(l, "required") && !Reflect.has(l, "validator"));
154
154
  if (x !== -1) {
155
155
  const l = o[x], {
156
156
  isShow: s
157
- } = v();
158
- s || (l.required = !1), n && (l.message = l.message || T);
157
+ } = j();
158
+ s || (l.required = !1), r && (l.message = l.message || A);
159
159
  }
160
- const d = o.findIndex((l) => l.min), P = o.findIndex((l) => l.max);
161
- function y(l, s, S = "all") {
162
- const O = o[s], U = O.isNumber ? isNaN(l) ? l?.length || 0 : Number(l) : l?.length || 0;
163
- return ["min", "all"].includes(S) && U < O.min ? Promise.reject(E + "至少为" + O.min + "位") : ["max", "all"].includes(S) && U > O.max ? Promise.reject(E + "最多" + O.max + "位") : Promise.resolve();
160
+ const h = o.findIndex((l) => l.min), E = o.findIndex((l) => l.max);
161
+ function g(l, s, N = "all") {
162
+ const O = o[s], B = O.isNumber ? isNaN(l) ? l?.length || 0 : Number(l) : l?.length || 0;
163
+ return ["min", "all"].includes(N) && B < O.min ? Promise.reject(m + "至少为" + O.min + "位") : ["max", "all"].includes(N) && B > O.max ? Promise.reject(m + "最多" + O.max + "位") : Promise.resolve();
164
164
  }
165
- (d !== -1 || P !== -1) && (d !== -1 && P !== -1 && !o[d].validator && !o[d].message ? o[d].validator = (l, s) => y(s, d) : d !== -1 && !o[d].validator && !o[d].message ? o[d].validator = (l, s) => y(s, d, "min") : P !== -1 && !o[P].validator && !o[P].message && (o[P].validator = (l, s) => y(s, P, "max")));
166
- const D = o.findIndex((l) => l.len);
167
- if (D !== -1 && (o[D].validator = (l, s) => s.length !== o[D].len ? Promise.reject(E + "必须是" + o[D].len + "位") : Promise.resolve()), g(c) && I) {
168
- let l = c(u(p));
169
- l = G(l) ? l : [l], o = o.concat(l);
165
+ (h !== -1 || E !== -1) && (h !== -1 && E !== -1 && !o[h].validator && !o[h].message ? o[h].validator = (l, s) => g(s, h) : h !== -1 && !o[h].validator && !o[h].message ? o[h].validator = (l, s) => g(s, h, "min") : E !== -1 && !o[E].validator && !o[E].message && (o[E].validator = (l, s) => g(s, E, "max")));
166
+ const S = o.findIndex((l) => l.len);
167
+ if (S !== -1 && (o[S].validator = (l, s) => s.length !== o[S].len ? Promise.reject(m + "必须是" + o[S].len + "位") : Promise.resolve()), C(c) && R) {
168
+ let l = c(u(P));
169
+ l = J(l) ? l : [l], o = o.concat(l);
170
170
  }
171
171
  return o;
172
172
  }
173
- const Y = () => {
173
+ const Q = () => {
174
174
  const {
175
- renderComponentContent: e,
176
- type: n = t.INPUT,
175
+ renderComponentContent: t,
176
+ type: r = e.INPUT,
177
177
  field: a,
178
178
  changeEvent: i = "change",
179
- valueField: h,
179
+ valueField: p,
180
180
  label: c,
181
- title: R,
182
- placeholderJoinLabel: I = !0
183
- } = r.schema;
184
- let E = i;
185
- ce(n) ? E = "input" : (ue(n) || n === t.TIME_PICKER) && (E = "update:modelValue");
186
- const o = `on${se(E)}`, C = {
187
- [o]: (...y) => {
188
- const [D] = y;
189
- f[o] && f[o](...y);
190
- const l = D ? D.target : null, s = l ? l.value : D;
191
- r.setFormModel(a, s, r.schema);
181
+ title: I,
182
+ placeholderJoinLabel: R = !0
183
+ } = n.schema;
184
+ let m = i;
185
+ ue(r) ? m = "input" : de(r) || r === e.TIME_PICKER || [e.INPUT_TAG, e.AUTOCOMPLETE, e.Cascader, e.ColorPicker, e.Slider].includes(r) ? m = "update:modelValue" : r === e.Upload && (m = "update:fileList");
186
+ const o = `on${ie(m)}`, b = {
187
+ [o]: (...g) => {
188
+ const [S] = g;
189
+ f[o] && f[o](...g);
190
+ const l = S ? S.target : null, s = l ? l.value : S;
191
+ n.setFormModel(a, s, n.schema);
192
192
  }
193
- }, A = J.get(n), {
194
- autoSetPlaceHolder: T,
193
+ }, y = X.get(r), {
194
+ autoSetPlaceHolder: A,
195
195
  size: M
196
- } = r.formProps, f = {
196
+ } = n.formProps, f = {
197
197
  clearable: !0,
198
198
  ...u(K)
199
199
  };
200
- if ([t.SEARCH].includes(n) || (f.size = u(K)?.size || M, f.disabled = u(W)), !f.disabled && T && !fe(n) && n) {
201
- const y = c || R;
202
- f.placeholder = u(K)?.placeholder || X(n, I && ie(y) ? y : "");
200
+ if ([e.SEARCH].includes(r) || (f.size = u(K)?.size || M, f.disabled = u($)), !f.disabled && A && !fe(r) && r) {
201
+ const g = c || I;
202
+ f.placeholder = u(K)?.placeholder || z(r, R && ae(g) ? g : "");
203
203
  }
204
204
  const x = {
205
- [h || "model-value"]: r.formModel[a]
206
- }, d = {
207
- ...C,
205
+ [p || "model-value"]: n.formModel[a]
206
+ }, h = {
207
+ ...b,
208
208
  ...f,
209
209
  ...x
210
210
  };
211
- if (!e)
212
- return m(A, d, null);
213
- const P = g(e) ? {
214
- ...e(u(p))
211
+ if (!t && r !== e.Upload)
212
+ return d(y, h, null);
213
+ let E;
214
+ if (E = C(t) ? {
215
+ ...t(u(P))
215
216
  } : {
216
- default: () => e
217
- };
218
- return m(A, d, j(P) ? P : {
219
- default: () => [P]
217
+ default: () => t
218
+ }, r === e.Upload && !t) {
219
+ const {
220
+ drag: g
221
+ } = u(K);
222
+ E = g ? {
223
+ default: () => d(U("vft-icon"), {
224
+ icon: "icon-arrow-upload"
225
+ }, null)
226
+ } : {
227
+ default: () => d(U("vft-button"), {
228
+ type: "primary"
229
+ }, {
230
+ default: () => [d(U("vft-icon"), {
231
+ icon: "icon-arrow-upload"
232
+ }, null)]
233
+ })
234
+ };
235
+ }
236
+ return d(y, h, q(E) ? E : {
237
+ default: () => [E]
220
238
  });
221
239
  };
222
240
  function w() {
223
241
  const {
224
- showLabel: e = !0,
225
- label: n,
242
+ showLabel: t = !0,
243
+ label: r,
226
244
  title: a,
227
245
  subLabel: i,
228
- labelRequired: h
229
- } = r.schema;
230
- let c = n || a;
231
- return c = h ? m("span", null, [m("span", {
246
+ labelRequired: p
247
+ } = n.schema;
248
+ let c = r || a;
249
+ return c = p ? d("span", null, [d("span", {
232
250
  class: "label-required"
233
- }, [F("*")]), m("span", null, [c])]) : c, e && c ? i ? m("span", null, [c, F(" "), m("span", {
251
+ }, [H("*")]), d("span", null, [c])]) : c, t && c ? i ? d("span", null, [c, H(" "), d("span", {
234
252
  class: "sub-label"
235
253
  }, [i])]) : c : void 0;
236
254
  }
237
- const V = Z();
238
- function B(e, n = "default", a) {
239
- if (!e || !Reflect.has(e, n))
255
+ const k = _();
256
+ function V(t, r = "default", a) {
257
+ if (!t || !Reflect.has(t, r))
240
258
  return null;
241
- if (!g(e[n]))
242
- return console.error(`${n} is not a function!`), null;
243
- const i = e[n];
259
+ if (!C(t[r]))
260
+ return console.error(`${r} is not a function!`), null;
261
+ const i = t[r];
244
262
  return i ? i(a) : null;
245
263
  }
246
- function Q() {
264
+ function Z() {
247
265
  const {
248
- itemProps: e,
249
- slot: n,
266
+ itemProps: t,
267
+ slot: r,
250
268
  render: a,
251
269
  field: i,
252
- suffix: h,
270
+ suffix: p,
253
271
  prefix: c,
254
- prefixParentStyle: R
255
- } = r.schema, {
256
- autoCleanErrorMessage: I,
257
- compFullWidth: E
258
- } = r.formProps, o = () => n ? B(V, n, u(p)) : a ? a(u(p)) : Y(), C = !!h, A = !!c, T = g(h) ? h(u(p)) : h, M = g(c) ? c(u(p)) : c, f = () => {
259
- r.updateSchema([{
272
+ prefixParentStyle: I
273
+ } = n.schema, {
274
+ autoCleanErrorMessage: R,
275
+ compFullWidth: m
276
+ } = n.formProps, o = () => r ? V(k, r, u(P)) : a ? a(u(P)) : Q(), b = !!p, y = !!c, A = C(p) ? p(u(P)) : p, M = C(c) ? c(u(P)) : c, f = () => {
277
+ n.updateSchema([{
260
278
  field: i,
261
279
  itemProps: {
262
280
  error: ""
263
281
  }
264
282
  }]);
265
- }, b = () => m(ne, k({
283
+ }, T = () => d(oe, F({
266
284
  style: {
267
- marginRight: r.formProps.customLayout ? "10px" : 0
285
+ marginRight: n.formProps.customLayout ? "10px" : 0
268
286
  },
269
287
  prop: i,
270
288
  class: [{
271
- [N.is("suffix")]: C
289
+ [D.is("suffix")]: b
272
290
  }, {
273
- [N.is("comp-full-width")]: E
274
- }, N.e("item")]
275
- }, e, {
276
- label: e?.label || e?.title,
277
- "onUpdate:error": I ? f : () => {
291
+ [D.is("comp-full-width")]: m
292
+ }, D.e("item")]
293
+ }, t, {
294
+ label: t?.label || t?.title,
295
+ "onUpdate:error": R ? f : () => {
278
296
  },
279
- rules: $()
297
+ rules: Y()
280
298
  }), {
281
- default: () => [m("div", {
282
- class: N.e("container")
283
- }, [m("div", {
284
- class: N.e("content")
285
- }, [o(), C && m("span", {
286
- class: N.m("suffix")
287
- }, [T])])])],
299
+ default: () => [d("div", {
300
+ class: D.e("container")
301
+ }, [d("div", {
302
+ class: D.e("content")
303
+ }, [o(), b && d("span", {
304
+ class: D.m("suffix")
305
+ }, [A])])])],
288
306
  label: w() ? () => w() : void 0
289
307
  });
290
- return A ? m("div", {
291
- style: R
292
- }, [m("span", {
293
- class: N.m("prefix")
294
- }, [M]), b()]) : b();
308
+ return y ? d("div", {
309
+ style: I
310
+ }, [d("span", {
311
+ class: D.m("prefix")
312
+ }, [M]), T()]) : T();
295
313
  }
296
314
  return () => {
297
- let e;
315
+ let t;
298
316
  const {
299
- colProps: n = {},
317
+ colProps: r = {},
300
318
  colSlot: a,
301
319
  renderColContent: i,
302
- type: h = t.INPUT,
320
+ type: p = e.INPUT,
303
321
  render: c,
304
- quickColSpan: R
305
- } = r.schema;
306
- if (!J.has(h) && !i && !c)
322
+ quickColSpan: I
323
+ } = n.schema;
324
+ if (!X.has(p) && !i && !c)
307
325
  return null;
308
326
  const {
309
- baseColProps: I = {},
310
- quickColSpan: E
311
- } = r.formProps, o = E ? {
312
- span: Math.ceil(24 / E),
313
- ...I
327
+ baseColProps: R = {},
328
+ quickColSpan: m
329
+ } = n.formProps, o = m ? {
330
+ span: Math.ceil(24 / m),
331
+ ...R
314
332
  } : {
315
- ...I
316
- }, C = R ? {
317
- span: Math.ceil(24 / R),
318
- ...n
333
+ ...R
334
+ }, b = I ? {
335
+ span: Math.ceil(24 / I),
336
+ ...r
319
337
  } : {
320
- ...n
321
- }, A = {
338
+ ...r
339
+ }, y = {
322
340
  ...o,
323
- ...C
341
+ ...b
324
342
  }, {
325
- isIfShow: T,
343
+ isIfShow: A,
326
344
  isShow: M
327
- } = v(), f = u(p), b = () => a ? B(V, a, f) : i ? i(f) : Q();
328
- if (h === t.DIVIDER) {
345
+ } = j(), f = u(P), T = () => a ? V(k, a, f) : i ? i(f) : Z();
346
+ if (p === e.DIVIDER) {
329
347
  let x;
330
- return m(H, k({
348
+ return d(G, F({
331
349
  span: 24
332
- }, C), {
333
- default: () => [m(re, u(K), j(x = w()) ? x : {
350
+ }, b), {
351
+ default: () => [d(ne, u(K), q(x = w()) ? x : {
334
352
  default: () => [x]
335
353
  })]
336
354
  });
337
355
  }
338
- return T && (r.formProps.customLayout ? b() : _(m(H, A, j(e = b()) ? e : {
339
- default: () => [e]
340
- }), [[ee, M]]));
356
+ return A && (n.formProps.customLayout ? T() : ee(d(G, y, q(t = T()) ? t : {
357
+ default: () => [t]
358
+ }), [[te, M]]));
341
359
  };
342
360
  }
343
361
  });
344
362
  export {
345
- xe as default
363
+ Se as default
346
364
  };