vft 0.0.370 → 0.0.371

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 (52) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/button/index.d.ts +9 -9
  3. package/es/components/form/form-item.vue.d.ts +1 -1
  4. package/es/components/form/form-item.vue2.js +3 -2
  5. package/es/components/form/index.d.ts +30 -30
  6. package/es/components/popconfirm/index.d.ts +15 -15
  7. package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
  8. package/es/components/select/defaults.d.ts +7 -2
  9. package/es/components/select/defaults.js +3 -1
  10. package/es/components/select/option-item.vue.d.ts +12 -2
  11. package/es/components/select/select-dropdown.js +6 -6
  12. package/es/components/skeleton/index.d.ts +12 -0
  13. package/es/components/skeleton/skeleton-item.vue.d.ts +2 -0
  14. package/es/components/skeleton/skeleton-item.vue2.js +22 -16
  15. package/es/components/super-form/index.d.ts +5 -0
  16. package/es/components/super-form/super-form-action.vue2.js +42 -40
  17. package/es/components/super-form/super-form-item.vue2.js +312 -188
  18. package/es/components/super-form/super-form.vue.d.ts +2 -0
  19. package/es/components/super-form/super-form.vue2.js +64 -63
  20. package/es/components/super-form/types.d.ts +6 -0
  21. package/es/components/super-form/use/helper.js +1 -1
  22. package/es/components/super-form/use/use-form-context.d.ts +1 -0
  23. package/es/package.json.d.ts +1 -1
  24. package/es/package.json.js +1 -1
  25. package/lib/components/button/index.d.ts +9 -9
  26. package/lib/components/form/form-item.vue.d.ts +1 -1
  27. package/lib/components/form/form-item.vue2.cjs +1 -1
  28. package/lib/components/form/index.d.ts +30 -30
  29. package/lib/components/popconfirm/index.d.ts +15 -15
  30. package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
  31. package/lib/components/select/defaults.cjs +1 -1
  32. package/lib/components/select/defaults.d.ts +7 -2
  33. package/lib/components/select/option-item.vue.d.ts +12 -2
  34. package/lib/components/select/select-dropdown.cjs +1 -1
  35. package/lib/components/skeleton/index.d.ts +12 -0
  36. package/lib/components/skeleton/skeleton-item.vue.d.ts +2 -0
  37. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  38. package/lib/components/super-form/index.d.ts +5 -0
  39. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  40. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  41. package/lib/components/super-form/super-form.vue.d.ts +2 -0
  42. package/lib/components/super-form/super-form.vue2.cjs +1 -1
  43. package/lib/components/super-form/types.d.ts +6 -0
  44. package/lib/components/super-form/use/use-form-context.d.ts +1 -0
  45. package/lib/package.json.cjs +1 -1
  46. package/lib/package.json.d.ts +1 -1
  47. package/package.json +4 -4
  48. package/theme-style/index.css +1 -1
  49. package/theme-style/src/common/icon.scss +1 -0
  50. package/theme-style/src/super-form.scss +15 -0
  51. package/theme-style/vft-super-form.css +1 -1
  52. package/web-types.json +1 -1
@@ -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
  };