vft 0.0.442 → 0.0.445

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