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.
- package/dist/index.css +1 -1
- package/es/components/button/index.d.ts +9 -9
- package/es/components/form/form-item.vue.d.ts +1 -1
- package/es/components/form/form-item.vue2.js +3 -2
- package/es/components/form/index.d.ts +30 -30
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/select/defaults.d.ts +7 -2
- package/es/components/select/defaults.js +3 -1
- package/es/components/select/option-item.vue.d.ts +12 -2
- package/es/components/select/select-dropdown.js +6 -6
- package/es/components/skeleton/index.d.ts +12 -0
- package/es/components/skeleton/skeleton-item.vue.d.ts +2 -0
- package/es/components/skeleton/skeleton-item.vue2.js +22 -16
- package/es/components/super-form/index.d.ts +5 -0
- package/es/components/super-form/super-form-action.vue2.js +42 -40
- package/es/components/super-form/super-form-item.vue2.js +312 -188
- package/es/components/super-form/super-form.vue.d.ts +2 -0
- package/es/components/super-form/super-form.vue2.js +64 -63
- package/es/components/super-form/types.d.ts +6 -0
- package/es/components/super-form/use/helper.js +1 -1
- package/es/components/super-form/use/use-form-context.d.ts +1 -0
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/form/form-item.vue.d.ts +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/form/index.d.ts +30 -30
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/select/defaults.cjs +1 -1
- package/lib/components/select/defaults.d.ts +7 -2
- package/lib/components/select/option-item.vue.d.ts +12 -2
- package/lib/components/select/select-dropdown.cjs +1 -1
- package/lib/components/skeleton/index.d.ts +12 -0
- package/lib/components/skeleton/skeleton-item.vue.d.ts +2 -0
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/super-form/index.d.ts +5 -0
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue.d.ts +2 -0
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +6 -0
- package/lib/components/super-form/use/use-form-context.d.ts +1 -0
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/icon.scss +1 -0
- package/theme-style/src/super-form.scss +15 -0
- package/theme-style/vft-super-form.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as g, computed as
|
|
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
|
|
4
|
-
import { VftRow as
|
|
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
|
|
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
|
|
14
|
-
const
|
|
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(
|
|
27
|
-
const m =
|
|
26
|
+
setup(e) {
|
|
27
|
+
const m = j("form-action"), { resetAction: k, submitAction: w, commonAction: C } = A(), O = a(() => ({
|
|
28
28
|
justify: "end",
|
|
29
|
-
...
|
|
30
|
-
})), h =
|
|
31
|
-
() => Object.assign({ btnText: "重置" },
|
|
32
|
-
), d =
|
|
33
|
-
() => Object.assign({ btnText: "确认" },
|
|
34
|
-
), n =
|
|
35
|
-
() => Object.assign({ btnText: "取消" },
|
|
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 ?
|
|
39
|
+
action: t ? k : w,
|
|
40
40
|
className: t ? m.e("reset") : m.e("submit"),
|
|
41
|
-
show: t ?
|
|
42
|
-
}), s =
|
|
43
|
-
() => y(!
|
|
44
|
-
),
|
|
45
|
-
() => y(
|
|
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,
|
|
47
|
+
return (t, P) => (c(), l(o(S), R(T(O.value)), {
|
|
48
48
|
default: u(() => [
|
|
49
|
-
|
|
50
|
-
class:
|
|
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 ? (
|
|
54
|
-
class:
|
|
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"])) :
|
|
61
|
+
}, 16, ["class", "onClick"])) : r("", !0),
|
|
61
62
|
v(t.$slots, "resetBefore"),
|
|
62
|
-
s.value.show ? (
|
|
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"])) :
|
|
74
|
+
}, 16, ["type", "onClick", "class"])) : r("", !0),
|
|
74
75
|
v(t.$slots, "submitBefore"),
|
|
75
|
-
|
|
76
|
+
i.value.show ? (c(), l(o(b), p({
|
|
76
77
|
key: 2,
|
|
77
|
-
type:
|
|
78
|
-
},
|
|
79
|
-
onClick:
|
|
80
|
-
class:
|
|
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(
|
|
84
|
+
B(f(i.value.options.btnText), 1)
|
|
84
85
|
]),
|
|
85
86
|
_: 1
|
|
86
|
-
}, 16, ["type", "onClick", "class"])) :
|
|
87
|
+
}, 16, ["type", "onClick", "class"])) : r("", !0),
|
|
87
88
|
v(t.$slots, "submitAfter"),
|
|
88
|
-
t.showCommonButton && n.value.isBehind ? (
|
|
89
|
-
class:
|
|
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"])) :
|
|
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
|
-
|
|
107
|
+
Q as default
|
|
106
108
|
};
|