vft 0.0.112 → 0.0.115
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/es/components/super-form/style/css.js +6 -0
- package/es/components/super-form/style/index.js +4 -0
- package/es/components/super-form/super-form-action.vue2.js +142 -50
- package/es/components/super-form/super-form-item.vue2.js +7 -7
- package/es/components/super-form/super-form.vue2.js +244 -149
- package/es/package.json.js +1 -1
- package/lib/components/super-form/style/css.cjs +1 -1
- package/lib/components/super-form/style/index.cjs +1 -1
- 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.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -17,5 +17,11 @@ import "vft/theme-style/vft-virtual-list.css";
|
|
|
17
17
|
import "vft/theme-style/vft-select.css";
|
|
18
18
|
import "vft/theme-style/vft-switch.css";
|
|
19
19
|
import "vft/theme-style/vft-divider.css";
|
|
20
|
+
import "vft/theme-style/vft-row.css";
|
|
21
|
+
import "vft/theme-style/vft-col.css";
|
|
22
|
+
import "vft/theme-style/vft-icon.css";
|
|
23
|
+
import "vft/theme-style/vft-button.css";
|
|
24
|
+
import "vft/theme-style/vft-form.css";
|
|
25
|
+
import "vft/theme-style/vft-form-item.css";
|
|
20
26
|
import "vft/theme-style/vft-time-select.css";
|
|
21
27
|
import "vft/theme-style/vft-super-form.css";
|
|
@@ -19,5 +19,9 @@ import "vft/theme-style/src/virtual-list.scss";
|
|
|
19
19
|
import "vft/theme-style/src/select.scss";
|
|
20
20
|
import "vft/theme-style/src/switch.scss";
|
|
21
21
|
import "vft/theme-style/src/divider.scss";
|
|
22
|
+
import "vft/theme-style/src/row.scss";
|
|
23
|
+
import "vft/theme-style/src/col.scss";
|
|
24
|
+
import "vft/theme-style/src/form.scss";
|
|
25
|
+
import "vft/theme-style/src/form-item.scss";
|
|
22
26
|
import "vft/theme-style/src/time-select.scss";
|
|
23
27
|
import "vft/theme-style/src/super-form.scss";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as g, computed as p, openBlock as e, createBlock as n, unref as t, normalizeProps as k, guardReactiveProps as y, withCtx as m, createVNode as h, normalizeClass as v, mergeProps as u, createTextVNode as a, toDisplayString as l, createCommentVNode as c, renderSlot as f } from "vue";
|
|
2
|
+
import { useNamespace as R } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
5
5
|
import "../../hooks/use-z-index/index.js";
|
|
@@ -7,65 +7,157 @@ import "@vueuse/core";
|
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../utils/ns-cover.js";
|
|
9
9
|
import { useFormContext as T } from "./use/use-form-context.js";
|
|
10
|
-
|
|
10
|
+
import "../divider/index.js";
|
|
11
|
+
import "../icon/index.js";
|
|
12
|
+
import "../avatar/index.js";
|
|
13
|
+
import "../empty/index.js";
|
|
14
|
+
import "../result/index.js";
|
|
15
|
+
import "../tabs/index.js";
|
|
16
|
+
import "../popper/index.js";
|
|
17
|
+
import "../collapse-transition/index.js";
|
|
18
|
+
import "../tooltip/index.js";
|
|
19
|
+
import "../popover/index.js";
|
|
20
|
+
import "../menu/index.js";
|
|
21
|
+
import "../context-menu/context-menu.vue2.js";
|
|
22
|
+
import "../multiple-tabs/index.js";
|
|
23
|
+
import "../header-layout/index.js";
|
|
24
|
+
import "../footer-layout/index.js";
|
|
25
|
+
import "../iframe-layout/index.js";
|
|
26
|
+
import "../router-view-content/index.js";
|
|
27
|
+
import "../logo/index.js";
|
|
28
|
+
import "../backtop/index.js";
|
|
29
|
+
import "../container/index.js";
|
|
30
|
+
import "../config-provider/index.js";
|
|
31
|
+
import "../descriptions/index.js";
|
|
32
|
+
import "../full-screen/index.js";
|
|
33
|
+
import "../icon-text/index.js";
|
|
34
|
+
import "../image/index.js";
|
|
35
|
+
import "../input/index.js";
|
|
36
|
+
import "../link/index.js";
|
|
37
|
+
import "../pagination/index.js";
|
|
38
|
+
import "../tag/index.js";
|
|
39
|
+
import "../side-menu/index.js";
|
|
40
|
+
import "../qrcode/index.js";
|
|
41
|
+
import "../overlay/index.js";
|
|
42
|
+
import "../clamp/index.js";
|
|
43
|
+
import "../clamp-toggle/index.js";
|
|
44
|
+
import "../page-wrapper/index.js";
|
|
45
|
+
import "../exception/index.js";
|
|
46
|
+
import "../search/index.js";
|
|
47
|
+
import { VftFormItem as V } from "../form/index.js";
|
|
48
|
+
import { VftButton as B } from "../button/index.js";
|
|
49
|
+
import "../checkbox/index.js";
|
|
50
|
+
import "../radio/index.js";
|
|
51
|
+
import "../switch/index.js";
|
|
52
|
+
import "../color-picker/index.js";
|
|
53
|
+
import "../scrollbar/index.js";
|
|
54
|
+
import "../dropdown/index.js";
|
|
55
|
+
import "../virtual-list/components/fixed-size-list.js";
|
|
56
|
+
import "../virtual-list/components/dynamic-size-list.js";
|
|
57
|
+
import "../virtual-list/components/fixed-size-grid.js";
|
|
58
|
+
import "../virtual-list/components/dynamic-size-grid.js";
|
|
59
|
+
import "../virtual-list/props.js";
|
|
60
|
+
import "../select/index.js";
|
|
61
|
+
import "../verify-code/index.js";
|
|
62
|
+
import "../table/index.js";
|
|
63
|
+
import "../image-viewer/index.js";
|
|
64
|
+
import "../list-cell/index.js";
|
|
65
|
+
import "../dialog/index.js";
|
|
66
|
+
import "../date-time-select/index.js";
|
|
67
|
+
import "../col/index.js";
|
|
68
|
+
import { VftRow as x } from "../row/index.js";
|
|
69
|
+
import "../horizontal-menu/index.js";
|
|
70
|
+
import "../time-picker/index.js";
|
|
71
|
+
import "../date-picker/index.js";
|
|
72
|
+
import "../check-tag/index.js";
|
|
73
|
+
import "../tree/index.js";
|
|
74
|
+
import "../skeleton/index.js";
|
|
75
|
+
import "../space/index.js";
|
|
76
|
+
import "../card/index.js";
|
|
77
|
+
import "../popconfirm/index.js";
|
|
78
|
+
import "../alert/index.js";
|
|
79
|
+
import "../drawer/index.js";
|
|
80
|
+
import "../input-number/index.js";
|
|
81
|
+
import "../slider/index.js";
|
|
82
|
+
import "../autocomplete/index.js";
|
|
83
|
+
import "./index.js";
|
|
84
|
+
import "../progress/index.js";
|
|
85
|
+
import "../upload/index.js";
|
|
86
|
+
import "../md-container/index.js";
|
|
87
|
+
import "../md-comment/index.js";
|
|
88
|
+
import "../md-tabs/index.js";
|
|
89
|
+
import "../md-vue-playground/index.js";
|
|
90
|
+
import "../md-code-demo/index.js";
|
|
91
|
+
import "../md-code-tabs/index.js";
|
|
92
|
+
import "../message/index.js";
|
|
93
|
+
const Bo = /* @__PURE__ */ g({
|
|
11
94
|
__name: "super-form-action",
|
|
12
95
|
props: {
|
|
13
96
|
showResetButton: { type: Boolean },
|
|
14
97
|
showSubmitButton: { type: Boolean },
|
|
98
|
+
showCommonButton: { type: Boolean },
|
|
15
99
|
resetButtonOptions: {},
|
|
16
100
|
submitButtonOptions: {},
|
|
101
|
+
commonButtonOptions: {},
|
|
17
102
|
actionRowOptions: {}
|
|
18
103
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
104
|
+
setup(i) {
|
|
105
|
+
const r = R("form-action");
|
|
106
|
+
console.log(i.showCommonButton);
|
|
107
|
+
const {
|
|
21
108
|
resetAction: d,
|
|
22
|
-
submitAction:
|
|
23
|
-
} = T(),
|
|
109
|
+
submitAction: w
|
|
110
|
+
} = T(), C = p(() => ({
|
|
24
111
|
justify: "end",
|
|
25
|
-
...
|
|
26
|
-
})),
|
|
27
|
-
return (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
112
|
+
...i.actionRowOptions
|
|
113
|
+
})), b = p(() => Object.assign({ btnText: "重置" }, i.resetButtonOptions)), s = p(() => Object.assign({ btnText: "确认" }, i.submitButtonOptions)), O = p(() => Object.assign({ btnText: "取消" }, i.commonButtonOptions));
|
|
114
|
+
return (o, S) => (e(), n(t(x), k(y(C.value)), {
|
|
115
|
+
default: m(() => [
|
|
116
|
+
h(t(V), {
|
|
117
|
+
class: v([{ "submit-block": s.value.block }, t(r).b()])
|
|
118
|
+
}, {
|
|
119
|
+
default: m(() => [
|
|
120
|
+
o.showCommonButton ? (e(), n(t(B), u({ key: 0 }, O.value, {
|
|
121
|
+
class: t(r).e("common")
|
|
122
|
+
}), {
|
|
123
|
+
default: m(() => [
|
|
124
|
+
a(l(O.value.btnText), 1)
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 16, ["class"])) : c("", !0),
|
|
128
|
+
f(o.$slots, "resetBefore"),
|
|
129
|
+
o.showResetButton ? (e(), n(t(B), u({
|
|
130
|
+
key: 1,
|
|
131
|
+
type: "warning"
|
|
132
|
+
}, b.value, {
|
|
133
|
+
onClick: t(d),
|
|
134
|
+
class: t(r).e("reset")
|
|
135
|
+
}), {
|
|
136
|
+
default: m(() => [
|
|
137
|
+
a(l(b.value.btnText), 1)
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 16, ["onClick", "class"])) : c("", !0),
|
|
141
|
+
f(o.$slots, "submitBefore"),
|
|
142
|
+
o.showSubmitButton ? (e(), n(t(B), u({
|
|
143
|
+
key: 2,
|
|
144
|
+
type: "primary",
|
|
145
|
+
class: t(r).e("submit")
|
|
146
|
+
}, s.value, { onClick: t(w) }), {
|
|
147
|
+
default: m(() => [
|
|
148
|
+
a(l(s.value.btnText), 1)
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 16, ["class", "onClick"])) : c("", !0),
|
|
152
|
+
f(o.$slots, "submitAfter")
|
|
153
|
+
]),
|
|
154
|
+
_: 3
|
|
155
|
+
}, 8, ["class"])
|
|
156
|
+
]),
|
|
157
|
+
_: 3
|
|
158
|
+
}, 16));
|
|
67
159
|
}
|
|
68
160
|
});
|
|
69
161
|
export {
|
|
70
|
-
|
|
162
|
+
Bo as default
|
|
71
163
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as k, computed as w, unref as c, useSlots as $, createVNode as d, mergeProps as q,
|
|
2
|
-
import "../divider/index.js";
|
|
1
|
+
import { defineComponent as k, computed as w, unref as c, useSlots as $, createVNode as d, mergeProps as q, withDirectives as z, vShow as X, isVNode as Y, createTextVNode as Q } from "vue";
|
|
2
|
+
import { VftDivider as Z } from "../divider/index.js";
|
|
3
3
|
import "../icon/index.js";
|
|
4
4
|
import "../avatar/index.js";
|
|
5
5
|
import "../empty/index.js";
|
|
@@ -92,7 +92,7 @@ import "../../utils/ns-cover.js";
|
|
|
92
92
|
import { FormCompEnum as s, componentMap as B, isInput as ie, isDatePicker as ne, isRangePicker as se } from "./component-map.js";
|
|
93
93
|
import { createPlaceholderMessage as F } from "./use/helper.js";
|
|
94
94
|
function v(t) {
|
|
95
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
95
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Y(t);
|
|
96
96
|
}
|
|
97
97
|
const me = k({
|
|
98
98
|
inheritAttrs: !1
|
|
@@ -292,7 +292,7 @@ const me = k({
|
|
|
292
292
|
label: e,
|
|
293
293
|
subLabel: a
|
|
294
294
|
} = t.schema;
|
|
295
|
-
return o && e ? a ? d("span", null, [e,
|
|
295
|
+
return o && e ? a ? d("span", null, [e, Q(" "), d("span", null, [a])]) : e : void 0;
|
|
296
296
|
}
|
|
297
297
|
const V = $();
|
|
298
298
|
function O(o, e = "default", a) {
|
|
@@ -370,14 +370,14 @@ const me = k({
|
|
|
370
370
|
return d(L, q({
|
|
371
371
|
span: 24
|
|
372
372
|
}, e), {
|
|
373
|
-
default: () => [d(
|
|
373
|
+
default: () => [d(Z, c(S), v(h = N()) ? h : {
|
|
374
374
|
default: () => [h]
|
|
375
375
|
})]
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
return I &&
|
|
378
|
+
return I && z(d(L, r, v(o = y()) ? o : {
|
|
379
379
|
default: () => [o]
|
|
380
|
-
}), [[
|
|
380
|
+
}), [[X, b]]);
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
383
|
});
|