vft 0.0.370 → 0.0.372

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 (56) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/button/index.d.ts +9 -9
  3. package/es/components/carousel/use-carousel.js +1 -1
  4. package/es/components/form/form-item.vue.d.ts +1 -1
  5. package/es/components/form/form-item.vue2.js +3 -2
  6. package/es/components/form/index.d.ts +30 -30
  7. package/es/components/input/input.vue2.js +4 -4
  8. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  9. package/es/components/popconfirm/index.d.ts +15 -15
  10. package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
  11. package/es/components/select/defaults.d.ts +7 -2
  12. package/es/components/select/defaults.js +3 -1
  13. package/es/components/select/option-item.vue.d.ts +12 -2
  14. package/es/components/select/select-dropdown.js +6 -6
  15. package/es/components/skeleton/index.d.ts +12 -0
  16. package/es/components/skeleton/skeleton-item.vue.d.ts +2 -0
  17. package/es/components/skeleton/skeleton-item.vue2.js +22 -16
  18. package/es/components/super-form/index.d.ts +5 -0
  19. package/es/components/super-form/super-form-action.vue2.js +42 -40
  20. package/es/components/super-form/super-form-item.vue2.js +312 -188
  21. package/es/components/super-form/super-form.vue.d.ts +2 -0
  22. package/es/components/super-form/super-form.vue2.js +64 -63
  23. package/es/components/super-form/types.d.ts +6 -0
  24. package/es/components/super-form/use/use-form-context.d.ts +1 -0
  25. package/es/package.json.d.ts +1 -1
  26. package/es/package.json.js +1 -1
  27. package/es/utils/vue/vnode.js +1 -1
  28. package/lib/components/button/index.d.ts +9 -9
  29. package/lib/components/form/form-item.vue.d.ts +1 -1
  30. package/lib/components/form/form-item.vue2.cjs +1 -1
  31. package/lib/components/form/index.d.ts +30 -30
  32. package/lib/components/input/input.vue2.cjs +1 -1
  33. package/lib/components/popconfirm/index.d.ts +15 -15
  34. package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
  35. package/lib/components/select/defaults.cjs +1 -1
  36. package/lib/components/select/defaults.d.ts +7 -2
  37. package/lib/components/select/option-item.vue.d.ts +12 -2
  38. package/lib/components/select/select-dropdown.cjs +1 -1
  39. package/lib/components/skeleton/index.d.ts +12 -0
  40. package/lib/components/skeleton/skeleton-item.vue.d.ts +2 -0
  41. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  42. package/lib/components/super-form/index.d.ts +5 -0
  43. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  44. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  45. package/lib/components/super-form/super-form.vue.d.ts +2 -0
  46. package/lib/components/super-form/super-form.vue2.cjs +1 -1
  47. package/lib/components/super-form/types.d.ts +6 -0
  48. package/lib/components/super-form/use/use-form-context.d.ts +1 -0
  49. package/lib/package.json.cjs +1 -1
  50. package/lib/package.json.d.ts +1 -1
  51. package/package.json +5 -5
  52. package/theme-style/index.css +1 -1
  53. package/theme-style/src/common/icon.scss +1 -0
  54. package/theme-style/src/super-form.scss +15 -0
  55. package/theme-style/vft-super-form.css +1 -1
  56. package/web-types.json +1 -1
@@ -123,6 +123,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
123
123
  onSubmit?: ((formData: Record<string, any>, isChange?: boolean | undefined, changeData?: any[] | undefined) => any) | undefined;
124
124
  onRegister?: ((instance: Partial<import("./types").FormActionType>) => any) | undefined;
125
125
  "onField-value-change"?: (() => any) | undefined;
126
+ "onCommon-btn-click"?: (() => any) | undefined;
126
127
  }>, {
127
128
  getFieldsValue: (showHideData?: boolean) => import("../types").Recordable;
128
129
  getFieldValue: (field: string) => string | number | import("../types").Recordable;
@@ -145,6 +146,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
145
146
  reset: (data: import("../types").Recordable) => void;
146
147
  submit: (formData: Record<string, any>, isChange?: boolean | undefined, changeData?: any[] | undefined) => void;
147
148
  "field-value-change": () => void;
149
+ "common-btn-click": () => void;
148
150
  }, import("vue").PublicProps, {
149
151
  size: import("vft/es/constants").ComponentSize;
150
152
  labelPosition: "left" | "right" | "top";
@@ -293,6 +295,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
293
295
  onSubmit?: ((formData: Record<string, any>, isChange?: boolean | undefined, changeData?: any[] | undefined) => any) | undefined;
294
296
  onRegister?: ((instance: Partial<import("./types").FormActionType>) => any) | undefined;
295
297
  "onField-value-change"?: (() => any) | undefined;
298
+ "onCommon-btn-click"?: (() => any) | undefined;
296
299
  }>, {
297
300
  getFieldsValue: (showHideData?: boolean) => import("../types").Recordable;
298
301
  getFieldValue: (field: string) => string | number | import("../types").Recordable;
@@ -455,6 +458,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
455
458
  onSubmit?: ((formData: Record<string, any>, isChange?: boolean | undefined, changeData?: any[] | undefined) => any) | undefined;
456
459
  onRegister?: ((instance: Partial<import("./types").FormActionType>) => any) | undefined;
457
460
  "onField-value-change"?: (() => any) | undefined;
461
+ "onCommon-btn-click"?: (() => any) | undefined;
458
462
  }>, {
459
463
  getFieldsValue: (showHideData?: boolean) => import("../types").Recordable;
460
464
  getFieldValue: (field: string) => string | number | import("../types").Recordable;
@@ -477,6 +481,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
477
481
  reset: (data: import("../types").Recordable) => void;
478
482
  submit: (formData: Record<string, any>, isChange?: boolean | undefined, changeData?: any[] | undefined) => void;
479
483
  "field-value-change": () => void;
484
+ "common-btn-click": () => void;
480
485
  }, string, {
481
486
  size: import("vft/es/constants").ComponentSize;
482
487
  labelPosition: "left" | "right" | "top";
@@ -1,17 +1,17 @@
1
- import { defineComponent as g, computed as i, createBlock as l, openBlock as r, unref as e, normalizeProps as k, guardReactiveProps as R, withCtx as u, createVNode as T, normalizeClass as x, createCommentVNode as c, renderSlot as v, mergeProps as p, createTextVNode as B, toDisplayString as f } from "vue";
1
+ import { defineComponent as g, computed as a, createBlock as l, openBlock as c, unref as o, normalizeProps as R, guardReactiveProps as T, withCtx as u, createVNode as x, normalizeClass as N, createCommentVNode as r, renderSlot as v, mergeProps as p, createTextVNode as B, toDisplayString as f } from "vue";
2
2
  import { VftButton as b } from "../button/index.js";
3
- import { VftFormItem as N } from "../form/index.js";
4
- import { VftRow as V } from "../row/index.js";
3
+ import { VftFormItem as V } from "../form/index.js";
4
+ import { VftRow as S } from "../row/index.js";
5
5
  import "@vueuse/core";
6
6
  import "@vft/utils";
7
7
  import "../config-provider/hooks/use-global-config.js";
8
8
  import "lodash-es";
9
- import { useNamespace as S } from "../../hooks/use-namespace/index.js";
9
+ import { useNamespace as j } 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 { useFormContext as j } from "./use/use-form-context.js";
14
- const M = /* @__PURE__ */ g({
13
+ import { useFormContext as A } from "./use/use-form-context.js";
14
+ const Q = /* @__PURE__ */ g({
15
15
  __name: "super-form-action",
16
16
  props: {
17
17
  showResetButton: { type: Boolean },
@@ -23,43 +23,44 @@ const M = /* @__PURE__ */ g({
23
23
  actionRowOptions: {},
24
24
  submitResetReverse: { type: Boolean }
25
25
  },
26
- setup(o) {
27
- const m = S("form-action"), { resetAction: w, submitAction: C } = j(), O = i(() => ({
26
+ setup(e) {
27
+ const m = j("form-action"), { resetAction: k, submitAction: w, commonAction: C } = A(), O = a(() => ({
28
28
  justify: "end",
29
- ...o.actionRowOptions
30
- })), h = i(
31
- () => Object.assign({ btnText: "重置" }, o.resetButtonOptions)
32
- ), d = i(
33
- () => Object.assign({ btnText: "确认" }, o.submitButtonOptions)
34
- ), n = i(
35
- () => Object.assign({ btnText: "取消" }, o.commonButtonOptions)
29
+ ...e.actionRowOptions
30
+ })), h = a(
31
+ () => Object.assign({ btnText: "重置" }, e.resetButtonOptions)
32
+ ), d = a(
33
+ () => Object.assign({ btnText: "确认" }, e.submitButtonOptions)
34
+ ), n = a(
35
+ () => Object.assign({ btnText: "取消" }, e.commonButtonOptions)
36
36
  ), y = (t) => ({
37
37
  type: t ? "warning" : "primary",
38
38
  options: t ? h.value : d.value,
39
- action: t ? w : C,
39
+ action: t ? k : w,
40
40
  className: t ? m.e("reset") : m.e("submit"),
41
- show: t ? o.showResetButton : o.showSubmitButton
42
- }), s = i(
43
- () => y(!o.submitResetReverse)
44
- ), a = i(
45
- () => y(o.submitResetReverse)
41
+ show: t ? e.showResetButton : e.showSubmitButton
42
+ }), s = a(
43
+ () => y(!e.submitResetReverse)
44
+ ), i = a(
45
+ () => y(e.submitResetReverse)
46
46
  );
47
- return (t, A) => (r(), l(e(V), k(R(O.value)), {
47
+ return (t, P) => (c(), l(o(S), R(T(O.value)), {
48
48
  default: u(() => [
49
- T(e(N), {
50
- class: x([{ "submit-block": d.value.block }, e(m).b()])
49
+ x(o(V), {
50
+ class: N([{ "submit-block": d.value.block }, o(m).b()])
51
51
  }, {
52
52
  default: u(() => [
53
- t.showCommonButton && !n.value.isBehind ? (r(), l(e(b), p({ key: 0 }, n.value, {
54
- class: e(m).e("common")
53
+ t.showCommonButton && !n.value.isBehind ? (c(), l(o(b), p({ key: 0 }, n.value, {
54
+ class: o(m).e("common"),
55
+ onClick: o(C)
55
56
  }), {
56
57
  default: u(() => [
57
58
  B(f(n.value.btnText), 1)
58
59
  ]),
59
60
  _: 1
60
- }, 16, ["class"])) : c("", !0),
61
+ }, 16, ["class", "onClick"])) : r("", !0),
61
62
  v(t.$slots, "resetBefore"),
62
- s.value.show ? (r(), l(e(b), p({
63
+ s.value.show ? (c(), l(o(b), p({
63
64
  key: 1,
64
65
  type: s.value.type
65
66
  }, s.value.options, {
@@ -70,29 +71,30 @@ const M = /* @__PURE__ */ g({
70
71
  B(f(s.value.options.btnText), 1)
71
72
  ]),
72
73
  _: 1
73
- }, 16, ["type", "onClick", "class"])) : c("", !0),
74
+ }, 16, ["type", "onClick", "class"])) : r("", !0),
74
75
  v(t.$slots, "submitBefore"),
75
- a.value.show ? (r(), l(e(b), p({
76
+ i.value.show ? (c(), l(o(b), p({
76
77
  key: 2,
77
- type: a.value.type
78
- }, a.value.options, {
79
- onClick: a.value.action,
80
- class: a.value.className
78
+ type: i.value.type
79
+ }, i.value.options, {
80
+ onClick: i.value.action,
81
+ class: i.value.className
81
82
  }), {
82
83
  default: u(() => [
83
- B(f(a.value.options.btnText), 1)
84
+ B(f(i.value.options.btnText), 1)
84
85
  ]),
85
86
  _: 1
86
- }, 16, ["type", "onClick", "class"])) : c("", !0),
87
+ }, 16, ["type", "onClick", "class"])) : r("", !0),
87
88
  v(t.$slots, "submitAfter"),
88
- t.showCommonButton && n.value.isBehind ? (r(), l(e(b), p({ key: 3 }, n.value, {
89
- class: e(m).e("common")
89
+ t.showCommonButton && n.value.isBehind ? (c(), l(o(b), p({ key: 3 }, n.value, {
90
+ class: o(m).e("common"),
91
+ onClick: o(C)
90
92
  }), {
91
93
  default: u(() => [
92
94
  B(f(n.value.btnText), 1)
93
95
  ]),
94
96
  _: 1
95
- }, 16, ["class"])) : c("", !0)
97
+ }, 16, ["class", "onClick"])) : r("", !0)
96
98
  ]),
97
99
  _: 3
98
100
  }, 8, ["class"])
@@ -102,5 +104,5 @@ const M = /* @__PURE__ */ g({
102
104
  }
103
105
  });
104
106
  export {
105
- M as default
107
+ Q as default
106
108
  };