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,43 +1,43 @@
1
- import { isNumber as i } from "@vft/utils";
2
- import { isInput as n } from "../component-map.js";
3
- import { FormCompEnum as r } from "../../../utils/form-register.js";
1
+ import { isNumber as n } from "@vft/utils";
2
+ import { isInput as u } from "../component-map.js";
3
+ import { FormCompEnum as e } from "../../../utils/form-register.js";
4
4
  import "@vueuse/core";
5
5
  import "../../config-provider/hooks/use-global-config.js";
6
6
  import "vue";
7
7
  import "lodash-es";
8
8
  import "../../form/index.js";
9
- function A(e, E = "") {
10
- return E = (E || "").replace(":", "") || "", [
11
- r.INPUT,
12
- r.INPUT_NUMBER,
13
- r.TEXTAREA,
14
- r.AUTOCOMPLETE
15
- ].includes(e) ? "请输入" + E : [r.PASSWORD].includes(e) ? "请输入密码" : [
16
- r.SELECT,
17
- r.RADIO,
18
- r.RADIO_SINGLE,
19
- r.RADIO_BUTTON,
20
- r.Cascader,
21
- r.ColorPicker,
22
- r.CHECKBOX,
23
- r.CHECKBOX_BUTTON
24
- ].includes(e) ? "请选择" + E : [r.CHECKBOX_SINGLE].includes(e) ? "请勾选" + E : [r.SEARCH].includes(e) ? "请输入要搜索的内容" : [r.INPUT_TAG].includes(e) ? "请输入标签内容" : [r.Upload].includes(e) ? "请选择上传文件" : [r.Slider].includes(e) ? "请拖动滑块" : [
25
- r.TIME_PICKER,
26
- r.YEAR_PICKER,
27
- r.MONTH_PICKER,
28
- r.DATE_PICKER,
29
- r.DATES_PICKER,
30
- r.DATETIME_PICKER,
31
- r.WEEK_PICKER,
32
- r.DATETIMERANGE_PICKER,
33
- r.DATERANGE_PICKER,
34
- r.MONTHRANGE_PICKER
35
- ].includes(e) ? "请选择时间" : "";
9
+ function l(r, i = "") {
10
+ return i = (i || "").replace(":", "") || "", [
11
+ e.Input,
12
+ e.InputNumber,
13
+ e.Textarea,
14
+ e.AutoComplete
15
+ ].includes(r) ? "请输入" + i : [e.Password].includes(r) ? "请输入密码" : [
16
+ e.Select,
17
+ e.Radio,
18
+ e.RadioSingle,
19
+ e.RadioButton,
20
+ e.Cascader,
21
+ e.ColorPicker,
22
+ e.Checkbox,
23
+ e.CheckboxButton
24
+ ].includes(r) ? "请选择" + i : [e.CheckboxSingle].includes(r) ? "请勾选" + i : [e.Search].includes(r) ? "请输入要搜索的内容" : [e.InputTag].includes(r) ? "请输入标签内容" : [e.Upload].includes(r) ? "请选择上传文件" : [e.Slider].includes(r) ? "请拖动滑块" : [
25
+ e.TimePicker,
26
+ e.YearPicker,
27
+ e.MonthPicker,
28
+ e.DatePicker,
29
+ e.DatesPicker,
30
+ e.DateTimePicker,
31
+ e.WeekPicker,
32
+ e.DateTimeRangePicker,
33
+ e.DateRangePicker,
34
+ e.MonthRangePicker
35
+ ].includes(r) ? "请选择时间" : "";
36
36
  }
37
- function P(e, E) {
38
- return e && n(e) && E && i(E) ? `${E}` : E;
37
+ function k(r, i) {
38
+ return r && u(r) && i && n(i) ? `${i}` : i;
39
39
  }
40
40
  export {
41
- A as createPlaceholderMessage,
42
- P as handleInputNumberValue
41
+ l as createPlaceholderMessage,
42
+ k as handleInputNumberValue
43
43
  };
@@ -1,8 +1,8 @@
1
- import { FormCompEnum as f } from "../../../utils/form-register.js";
1
+ import { FormCompEnum as u } from "../../../utils/form-register.js";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../../config-provider/hooks/use-global-config.js";
5
- import { watchEffect as u, unref as t, nextTick as p } from "vue";
5
+ import { watchEffect as f, unref as t, nextTick as p } from "vue";
6
6
  import "lodash-es";
7
7
  import "../../form/index.js";
8
8
  async function x({
@@ -11,12 +11,12 @@ async function x({
11
11
  formElRef: m,
12
12
  isInitedDefault: s
13
13
  }) {
14
- u(async () => {
14
+ f(async () => {
15
15
  if (t(s) || !t(c).autoFocusFirstItem)
16
16
  return;
17
17
  await p();
18
18
  const r = t(n), o = t(m), i = o?.$el;
19
- if (!o || !i || !r || r.length === 0 || r[0].type !== f.INPUT)
19
+ if (!o || !i || !r || r.length === 0 || r[0].type !== u.Input)
20
20
  return;
21
21
  const e = i.querySelector(
22
22
  ".vft-row:first-child input"
@@ -1,33 +1,33 @@
1
1
  import { FormCompEnum as j } from "../../../utils/form-register.js";
2
2
  import "@vueuse/core";
3
- import { isDef as H, isFunction as A, isString as x, isObject as V, isArray as m, deepMerge as nt, findDifferentValuesForObj as rt, isNullOrUndefined as J, isEmpty as st, isEmptyObject as lt } from "@vft/utils";
3
+ import { isDef as H, isFunction as A, isString as x, isObject as m, isArray as V, deepMerge as nt, findDifferentValuesForObj as rt, isNullOrUndefined as J, isEmpty as st, isEmptyObject as lt } from "@vft/utils";
4
4
  import "../../config-provider/hooks/use-global-config.js";
5
5
  import { unref as n, toRaw as S, nextTick as Q } from "vue";
6
- import { get as ot, cloneDeep as I, uniqBy as at, isEqual as ft, set as X } from "lodash-es";
6
+ import { get as ot, cloneDeep as B, uniqBy as at, isEqual as ft, set as X } from "lodash-es";
7
7
  import "../../form/index.js";
8
8
  import { formatToDate as W } from "@vft/utils/date";
9
9
  import { isInput as ct, isDatePicker as ut } from "../component-map.js";
10
10
  import { handleInputNumberValue as dt } from "./helper.js";
11
- function _(p, y) {
11
+ function _(p, v) {
12
12
  const { show: o, ifShow: f } = p;
13
13
  let h = !0, c = !0;
14
14
  return typeof o == "boolean" ? h = o : typeof o == "function" && (h = o({
15
15
  field: p.field,
16
- model: y,
16
+ model: v,
17
17
  values: {
18
- ...y
18
+ ...v
19
19
  },
20
20
  schema: p
21
21
  })), typeof f == "boolean" ? c = f : typeof f == "function" && (c = f({
22
22
  field: p.field,
23
- model: y,
23
+ model: v,
24
24
  values: {
25
- ...y
25
+ ...v
26
26
  },
27
27
  schema: p
28
28
  })), h && c;
29
29
  }
30
- function pt(p, y = {}) {
30
+ function pt(p, v = {}) {
31
31
  const o = /^\[(.+)\]$/;
32
32
  if (o.test(p)) {
33
33
  const f = p.match(o);
@@ -36,13 +36,13 @@ function pt(p, y = {}) {
36
36
  if (!h.length)
37
37
  return;
38
38
  const c = [];
39
- return h.forEach((F, B) => {
40
- X(c, B, y[F.trim()]);
39
+ return h.forEach((y, O) => {
40
+ X(c, O, v[y.trim()]);
41
41
  }), c.filter(Boolean).length ? c : void 0;
42
42
  }
43
43
  }
44
44
  }
45
- function ht(p, y = {}) {
45
+ function ht(p, v = {}) {
46
46
  const o = /^\{(.+)\}$/;
47
47
  if (o.test(p)) {
48
48
  const f = p.match(o);
@@ -51,32 +51,32 @@ function ht(p, y = {}) {
51
51
  if (!h.length)
52
52
  return;
53
53
  const c = {};
54
- return h.forEach((F) => {
55
- X(c, F.trim(), y[F.trim()]);
54
+ return h.forEach((y) => {
55
+ X(c, y.trim(), v[y.trim()]);
56
56
  }), Object.values(c).filter(Boolean).length ? c : void 0;
57
57
  }
58
58
  }
59
59
  }
60
- function Bt({
60
+ function Ot({
61
61
  emit: p,
62
- getProps: y,
62
+ getProps: v,
63
63
  formModel: o,
64
64
  getSchema: f,
65
65
  defaultValueRef: h,
66
66
  formElRef: c,
67
- schemaRef: F,
68
- handleFormValues: B,
67
+ schemaRef: y,
68
+ handleFormValues: O,
69
69
  initValues: T
70
70
  }) {
71
71
  async function Y(t) {
72
- const { resetFunc: e, submitOnReset: s } = n(y);
72
+ const { resetFunc: e, submitOnReset: s } = n(v);
73
73
  e && A(e) && await e();
74
74
  const r = n(c);
75
75
  if (r) {
76
76
  if (t?.length)
77
77
  return r.resetFields(t);
78
78
  Object.keys(o).forEach((a) => {
79
- const l = n(f).find((u) => u.field === a), i = I(h.value[a]);
79
+ const l = n(f).find((u) => u.field === a), i = B(h.value[a]);
80
80
  o[a] = ct(l?.type) ? i || "" : i;
81
81
  }), Q(() => D()), p("reset", S(o)), s && await U();
82
82
  }
@@ -88,20 +88,20 @@ function Bt({
88
88
  s.forEach((i) => {
89
89
  const u = n(f).find((d) => d.field === i);
90
90
  let b = ot(t, i);
91
- const C = Reflect.has(t, i);
91
+ const I = Reflect.has(t, i);
92
92
  b = dt(u?.type, b);
93
93
  const { componentProps: z } = u || {};
94
94
  let w = z;
95
95
  typeof z == "function" && (w = w({ formModel: n(o) }));
96
96
  const G = pt(i, t) || ht(i, t);
97
- if (C || G) {
97
+ if (I || G) {
98
98
  const d = G || b;
99
99
  if (M(i))
100
100
  if (Array.isArray(d)) {
101
- const v = [];
101
+ const F = [];
102
102
  for (const E of d)
103
- v.push(E ? W(E) : null);
104
- n(o)[i] = v;
103
+ F.push(E ? W(E) : null);
104
+ n(o)[i] = F;
105
105
  } else
106
106
  n(o)[i] = d ? w?.valueFormat ? d : W(d) : null;
107
107
  else
@@ -110,10 +110,10 @@ function Bt({
110
110
  } else
111
111
  a.forEach((d) => {
112
112
  try {
113
- const v = d.split(".").reduce((E, it) => E[it], t);
114
- H(v) && (n(o)[d] = n(v), l.push(d));
113
+ const F = d.split(".").reduce((E, it) => E[it], t);
114
+ H(F) && (n(o)[d] = n(F), l.push(d));
115
115
  } catch {
116
- H(h.value[d]) && (n(o)[d] = I(
116
+ H(h.value[d]) && (n(o)[d] = B(
117
117
  n(h.value[d])
118
118
  ));
119
119
  }
@@ -124,14 +124,14 @@ function Bt({
124
124
  });
125
125
  }
126
126
  async function Z(t) {
127
- const e = I(n(f));
127
+ const e = B(n(f));
128
128
  if (!t)
129
129
  return;
130
130
  let s = x(t) ? [t] : t;
131
131
  x(t) && (s = [t]);
132
132
  for (const r of s)
133
133
  L(r, e);
134
- F.value = e;
134
+ y.value = e;
135
135
  }
136
136
  function L(t, e) {
137
137
  if (x(t)) {
@@ -140,29 +140,29 @@ function Bt({
140
140
  }
141
141
  }
142
142
  async function K(t, e, s = !1) {
143
- const r = I(n(f)), a = r.findIndex((i) => i.field === e), l = V(t) ? [t] : t;
143
+ const r = B(n(f)), a = r.findIndex((i) => i.field === e), l = m(t) ? [t] : t;
144
144
  if (!e || a === -1 || s) {
145
- s ? r.unshift(...l) : r.push(...l), F.value = r, O(t);
145
+ s ? r.unshift(...l) : r.push(...l), y.value = r, g(t);
146
146
  return;
147
147
  }
148
- a !== -1 && r.splice(a + 1, 0, ...l), O(t), F.value = r;
148
+ a !== -1 && r.splice(a + 1, 0, ...l), g(t), y.value = r;
149
149
  }
150
- async function R(t) {
150
+ async function k(t) {
151
151
  let e = [];
152
- if (V(t) && e.push(t), m(t) && (e = [...t]), !e.every(
153
- (r) => r.type === j.DIVIDER || Reflect.has(r, "field") && r.field
152
+ if (m(t) && e.push(t), V(t) && (e = [...t]), !e.every(
153
+ (r) => r.type === j.Divider || Reflect.has(r, "field") && r.field
154
154
  )) {
155
155
  console.error(
156
156
  "All children of the form Schema array that need to be updated must contain the `field` field"
157
157
  );
158
158
  return;
159
159
  }
160
- F.value = e;
160
+ y.value = e;
161
161
  }
162
162
  async function N(t) {
163
163
  let e = [];
164
- if (V(t) && e.push(t), m(t) && (e = [...t]), !e.every(
165
- (l) => l.type === j.DIVIDER || Reflect.has(l, "field") && l.field
164
+ if (m(t) && e.push(t), V(t) && (e = [...t]), !e.every(
165
+ (l) => l.type === j.Divider || Reflect.has(l, "field") && l.field
166
166
  )) {
167
167
  console.error(
168
168
  "All children of the form Schema array that need to be updated must contain the `field` field"
@@ -179,21 +179,21 @@ function Bt({
179
179
  a.push(u);
180
180
  } else
181
181
  a.push(l);
182
- }), O(a, r), F.value = at(a, "field");
182
+ }), g(a, r), y.value = at(a, "field");
183
183
  }
184
- function O(t, e, s = !0) {
185
- if (m(e) && e?.length === 0)
184
+ function g(t, e, s = !0) {
185
+ if (V(e) && e?.length === 0)
186
186
  return;
187
187
  let r = [];
188
- V(t) && r.push(t), m(t) && (r = [...t]);
189
- const a = {}, l = g();
188
+ m(t) && r.push(t), V(t) && (r = [...t]);
189
+ const a = {}, l = C();
190
190
  r.forEach((i) => {
191
- i.type !== j.DIVIDER && Reflect.has(i, "field") && i.field && !J(i.defaultValue) && (!(i.field in l) || J(l[i.field]) || st(l[i.field])) && (a[i.field] = i.defaultValue);
191
+ i.type !== j.Divider && Reflect.has(i, "field") && i.field && !J(i.defaultValue) && (!(i.field in l) || J(l[i.field]) || st(l[i.field])) && (a[i.field] = i.defaultValue);
192
192
  }), lt(a) || q(a, s);
193
193
  }
194
- function g(t = !1) {
194
+ function C(t = !1) {
195
195
  if (!n(c)) return {};
196
- const s = B(S(n(o)));
196
+ const s = O(S(n(o)));
197
197
  if (t)
198
198
  return s;
199
199
  const r = n(f).filter((l) => _(l, n(o))).map((l) => l.field).filter(Boolean), a = {};
@@ -201,7 +201,7 @@ function Bt({
201
201
  l in s && (a[l] = s[l]);
202
202
  }), a;
203
203
  }
204
- function k(t) {
204
+ function R(t) {
205
205
  return n(c) ? S(n(o))[t] : {};
206
206
  }
207
207
  function M(t) {
@@ -224,9 +224,9 @@ function Bt({
224
224
  await n(c)?.scrollToField(t, e);
225
225
  }
226
226
  async function U(t) {
227
- const { autoCleanErrorMessage: e, watchDataIsChange: s } = n(y);
227
+ const { autoCleanErrorMessage: e, watchDataIsChange: s } = n(v);
228
228
  t && t.preventDefault(), e && await D();
229
- const { submitFunc: r, beforeSubmitFunc: a } = n(y);
229
+ const { submitFunc: r, beforeSubmitFunc: a } = n(v);
230
230
  if (a && A(a) && await a(), r && A(r)) {
231
231
  await r();
232
232
  return;
@@ -235,10 +235,10 @@ function Bt({
235
235
  try {
236
236
  if (!await P())
237
237
  return;
238
- const u = g();
238
+ const u = C();
239
239
  if (s) {
240
- const b = ft(T.value, u), C = rt(T.value, u);
241
- p("submit", u, !b, C);
240
+ const b = ft(T.value, u), I = rt(T.value, u);
241
+ p("submit", u, !b, I);
242
242
  } else
243
243
  p("submit", u);
244
244
  } catch (i) {
@@ -252,18 +252,18 @@ function Bt({
252
252
  clearValidate: D,
253
253
  validate: P,
254
254
  validateField: $,
255
- getFieldsValue: g,
255
+ getFieldsValue: C,
256
256
  updateSchema: N,
257
- resetSchema: R,
257
+ resetSchema: k,
258
258
  appendSchemaByField: K,
259
259
  removeSchemaByField: Z,
260
260
  resetFields: Y,
261
261
  setFieldsValue: q,
262
262
  scrollToField: et,
263
- getFieldValue: k,
263
+ getFieldValue: R,
264
264
  setFormItemError: tt
265
265
  };
266
266
  }
267
267
  export {
268
- Bt as useFormEvents
268
+ Ot as useFormEvents
269
269
  };
@@ -1,18 +1,11 @@
1
1
  export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- size: {
3
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
4
- };
5
- disabled: {
6
- type: import("vue").PropType<boolean>;
2
+ value: {
3
+ type: import("vue").PropType<string | number | boolean>;
7
4
  default: boolean;
8
5
  };
9
6
  width: {
10
7
  type: import("vue").PropType<string | number>;
11
8
  };
12
- value: {
13
- type: import("vue").PropType<string | number | boolean>;
14
- default: boolean;
15
- };
16
9
  borderColor: {
17
10
  type: import("vue").PropType<string>;
18
11
  };
@@ -22,6 +15,13 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
22
15
  id: {
23
16
  type: import("vue").PropType<string>;
24
17
  };
18
+ size: {
19
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
20
+ };
21
+ disabled: {
22
+ type: import("vue").PropType<boolean>;
23
+ default: boolean;
24
+ };
25
25
  modelValue: {
26
26
  type: import("vue").PropType<string | number | boolean>;
27
27
  default: boolean;
@@ -74,24 +74,17 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
74
74
  focus: () => void;
75
75
  checked: import("vue").ComputedRef<boolean>;
76
76
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
77
- input: (...args: any[]) => void;
78
77
  "update:modelValue": (...args: any[]) => void;
79
78
  change: (...args: any[]) => void;
79
+ input: (...args: any[]) => void;
80
80
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
81
- size: {
82
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
83
- };
84
- disabled: {
85
- type: import("vue").PropType<boolean>;
81
+ value: {
82
+ type: import("vue").PropType<string | number | boolean>;
86
83
  default: boolean;
87
84
  };
88
85
  width: {
89
86
  type: import("vue").PropType<string | number>;
90
87
  };
91
- value: {
92
- type: import("vue").PropType<string | number | boolean>;
93
- default: boolean;
94
- };
95
88
  borderColor: {
96
89
  type: import("vue").PropType<string>;
97
90
  };
@@ -101,6 +94,13 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
101
94
  id: {
102
95
  type: import("vue").PropType<string>;
103
96
  };
97
+ size: {
98
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
99
+ };
100
+ disabled: {
101
+ type: import("vue").PropType<boolean>;
102
+ default: boolean;
103
+ };
104
104
  modelValue: {
105
105
  type: import("vue").PropType<string | number | boolean>;
106
106
  default: boolean;
@@ -150,12 +150,12 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
150
150
  type: import("vue").PropType<Function>;
151
151
  };
152
152
  }>> & Readonly<{
153
- onInput?: ((...args: any[]) => any) | undefined;
154
153
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
155
154
  onChange?: ((...args: any[]) => any) | undefined;
155
+ onInput?: ((...args: any[]) => any) | undefined;
156
156
  }>, {
157
- disabled: boolean;
158
157
  value: boolean | string | number;
158
+ disabled: boolean;
159
159
  modelValue: boolean | string | number;
160
160
  loading: boolean;
161
161
  validateEvent: boolean;
@@ -42,9 +42,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
42
42
  */
43
43
  checked: import("vue").ComputedRef<boolean>;
44
44
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
- input: (...args: any[]) => void;
46
45
  "update:modelValue": (...args: any[]) => void;
47
46
  change: (...args: any[]) => void;
47
+ input: (...args: any[]) => void;
48
48
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SwitchProps>, {
49
49
  modelValue: boolean;
50
50
  value: boolean;
@@ -55,12 +55,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
55
55
  validateEvent: boolean;
56
56
  loading: boolean;
57
57
  }>>> & Readonly<{
58
- onInput?: ((...args: any[]) => any) | undefined;
59
58
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
60
59
  onChange?: ((...args: any[]) => any) | undefined;
60
+ onInput?: ((...args: any[]) => any) | undefined;
61
61
  }>, {
62
- disabled: boolean;
63
62
  value: boolean | string | number;
63
+ disabled: boolean;
64
64
  modelValue: boolean | string | number;
65
65
  loading: boolean;
66
66
  validateEvent: boolean;
@@ -1,4 +1,4 @@
1
- import { type PaginationProps } from 'vft/es/components/pagination';
1
+ import type { PaginationProps } from 'vft/es/components/pagination';
2
2
  import type { TableInstance, TableProps } from './types';
3
3
  declare function setProps(props: Partial<TableProps>): void;
4
4
  declare function __VLS_template(): {
@@ -21,8 +21,8 @@ import xe from "xe-utils";
21
21
  import { PageSize as T } from "./constants.js";
22
22
  import { useColumns as Se } from "./use/use-columns.js";
23
23
  import { useDataSource as Be } from "./use/use-data-source.js";
24
- import { useLoading as Re } from "./use/use-loading.js";
25
- import { usePagination as ze } from "./use/use-pagination.js";
24
+ import { useLoading as ze } from "./use/use-loading.js";
25
+ import { usePagination as Re } from "./use/use-pagination.js";
26
26
  import { EmptyEnum as Pe } from "../empty/constants.js";
27
27
  const De = {
28
28
  "vft-loading-text": "加载中..."
@@ -390,17 +390,17 @@ const De = {
390
390
  "zoom"
391
391
  ],
392
392
  setup(_e, {
393
- expose: A,
394
- emit: E
393
+ expose: O,
394
+ emit: V
395
395
  }) {
396
- const l = E, g = be("table"), O = ae(), b = s(), C = s(), V = s([]), d = s(), $ = te(), t = P(() => F($.props, e(d))), {
396
+ const l = V, g = be("table"), A = ae(), b = s(), C = s(), E = s([]), d = s(), $ = te(), t = P(() => F($.props, e(d))), {
397
397
  getLoading: q,
398
398
  setLoading: G
399
- } = Re(t), {
399
+ } = ze(t), {
400
400
  getPaginationInfo: i,
401
401
  setPagination: u,
402
402
  getCurrentPage: I
403
- } = ze(t), {
403
+ } = Re(t), {
404
404
  getViewColumns: K,
405
405
  setColumns: L
406
406
  } = Se(t);
@@ -434,7 +434,7 @@ const De = {
434
434
  getRawDataSource: k,
435
435
  tableSearch: x
436
436
  } = Be(t, {
437
- tableData: V,
437
+ tableData: E,
438
438
  setLoading: G,
439
439
  getPaginationInfo: i,
440
440
  setPagination: u
@@ -575,7 +575,7 @@ const De = {
575
575
  });
576
576
  const r = P(() => {
577
577
  const a = e(w), o = {
578
- ...O,
578
+ ...A,
579
579
  ...e(t),
580
580
  columns: re(e(K)),
581
581
  loading: e(q),
@@ -583,7 +583,7 @@ const De = {
583
583
  ...B
584
584
  };
585
585
  return ue && (o.maxHeight = e(t)?.maxHeight ? e(t)?.maxHeight : `${window.innerHeight - e(t)?.extraSysHeight - (t.value?.showPager ? t.value?.pageHeight || 40 : 0)}px`, o.minHeight = e(t)?.toolbarConfig?.custom ? 300 : e(t)?.minHeight), o;
586
- }), R = {
586
+ }), z = {
587
587
  setPagination: u,
588
588
  emit: l,
589
589
  setProps: y,
@@ -599,14 +599,14 @@ const De = {
599
599
  getRawDataSource: k,
600
600
  tableSearch: x
601
601
  };
602
- l("register", R);
602
+ l("register", z);
603
603
  const Q = {
604
604
  field: "_filterTableData",
605
605
  label: "",
606
- type: pe.SEARCH,
607
- componentProps: ({}) => ({
606
+ type: pe.Search,
607
+ componentProps: () => ({
608
608
  onChange: (a) => {
609
- z({
609
+ R({
610
610
  _filterTableData: a
611
611
  });
612
612
  }
@@ -630,15 +630,15 @@ const De = {
630
630
  r.value?.formOptions,
631
631
  ["showActionForm", "addSearchAllSchema"]
632
632
  // 'union' | 'intersection' | 'concat' | 'replace' = 'union'
633
- ), "replace")), z = (a) => {
633
+ ), "replace")), R = (a) => {
634
634
  Reflect.has(a, "_filterTableData") && x(a._filterTableData), l("form-submit", a);
635
635
  }, ee = () => {
636
636
  v(k()), l("form-reset");
637
637
  };
638
- return A({
638
+ return O({
639
639
  table: b,
640
640
  pageRef: C,
641
- ...R
641
+ ...z
642
642
  }), (a, o) => (m(), f(e(Ce), null, {
643
643
  fallback: c(() => [p(e(we))]),
644
644
  default: c(() => [D("div", {
@@ -650,7 +650,7 @@ const De = {
650
650
  toolbarButtons: c(() => [h(a.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (m(), f(e(ve), {
651
651
  key: 0,
652
652
  onRegister: e(Z),
653
- onSubmit: z,
653
+ onSubmit: R,
654
654
  onReset: ee
655
655
  }, null, 8, ["onRegister"])) : H("", !0), h(a.$slots, "toolbar-right")]),
656
656
  empty: c(() => [h(a.$slots, "empty", {}, () => [p(e(ge), ie(se(r.value.emptyCfg)), null, 16)])]),
@@ -13,7 +13,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
13
13
  type: import("vue").PropType<boolean>;
14
14
  };
15
15
  tabPosition: {
16
- type: import("vue").PropType<"top" | "bottom" | "left" | "right">;
16
+ type: import("vue").PropType<"left" | "right" | "bottom" | "top">;
17
17
  };
18
18
  beforeLeave: {
19
19
  type: import("vue").PropType<Function>;
@@ -89,7 +89,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
89
89
  tabChange: (name: string | number) => void;
90
90
  tabRemove: (name: string | number) => void;
91
91
  tabAdd: () => void;
92
- edit: (paneName: string | number | undefined, action: "add" | "remove") => void;
92
+ edit: (paneName: string | number | undefined, action: "remove" | "add") => void;
93
93
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
94
94
  closable: {
95
95
  type: import("vue").PropType<boolean>;
@@ -104,7 +104,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
104
104
  type: import("vue").PropType<boolean>;
105
105
  };
106
106
  tabPosition: {
107
- type: import("vue").PropType<"top" | "bottom" | "left" | "right">;
107
+ type: import("vue").PropType<"left" | "right" | "bottom" | "top">;
108
108
  };
109
109
  beforeLeave: {
110
110
  type: import("vue").PropType<Function>;
@@ -178,7 +178,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
178
178
  isFocusInsidePane: () => boolean | undefined;
179
179
  }, index: number, ev: Event) => any) | undefined;
180
180
  onTabChange?: ((name: string | number) => any) | undefined;
181
- onEdit?: ((paneName: string | number | undefined, action: "add" | "remove") => any) | undefined;
181
+ onEdit?: ((paneName: string | number | undefined, action: "remove" | "add") => any) | undefined;
182
182
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & {
183
183
  TabPane: {
184
184
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{