vft 0.0.442 → 0.0.443
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/carousel/use-carousel.js +1 -1
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/super-form/component-map.js +25 -25
- package/es/components/super-form/super-form-item.vue2.js +184 -184
- package/es/components/super-form/use/helper.js +34 -34
- package/es/components/super-form/use/use-auto-focus.js +4 -4
- package/es/components/super-form/use/use-form-events.js +56 -56
- package/es/components/table/table.vue.d.ts +1 -1
- package/es/components/table/table.vue2.js +18 -18
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +28 -28
- package/es/utils/form-register.js +44 -44
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/use-auto-focus.cjs +1 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/table/table.vue.d.ts +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/form-register.cjs +1 -1
- package/lib/utils/form-register.d.ts +28 -28
- package/package.json +4 -4
- package/web-types.json +1 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { isNumber as
|
|
2
|
-
import { isInput as
|
|
3
|
-
import { FormCompEnum as
|
|
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
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
].includes(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
].includes(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
].includes(
|
|
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
|
|
38
|
-
return
|
|
37
|
+
function k(r, i) {
|
|
38
|
+
return r && u(r) && i && n(i) ? `${i}` : i;
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
l as createPlaceholderMessage,
|
|
42
|
+
k as handleInputNumberValue
|
|
43
43
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FormCompEnum as
|
|
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
|
|
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
|
-
|
|
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 !==
|
|
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
|
|
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
|
|
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,
|
|
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:
|
|
16
|
+
model: v,
|
|
17
17
|
values: {
|
|
18
|
-
...
|
|
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:
|
|
23
|
+
model: v,
|
|
24
24
|
values: {
|
|
25
|
-
...
|
|
25
|
+
...v
|
|
26
26
|
},
|
|
27
27
|
schema: p
|
|
28
28
|
})), h && c;
|
|
29
29
|
}
|
|
30
|
-
function pt(p,
|
|
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((
|
|
40
|
-
X(c,
|
|
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,
|
|
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((
|
|
55
|
-
X(c,
|
|
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
|
|
60
|
+
function Ot({
|
|
61
61
|
emit: p,
|
|
62
|
-
getProps:
|
|
62
|
+
getProps: v,
|
|
63
63
|
formModel: o,
|
|
64
64
|
getSchema: f,
|
|
65
65
|
defaultValueRef: h,
|
|
66
66
|
formElRef: c,
|
|
67
|
-
schemaRef:
|
|
68
|
-
handleFormValues:
|
|
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(
|
|
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 =
|
|
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
|
|
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 (
|
|
97
|
+
if (I || G) {
|
|
98
98
|
const d = G || b;
|
|
99
99
|
if (M(i))
|
|
100
100
|
if (Array.isArray(d)) {
|
|
101
|
-
const
|
|
101
|
+
const F = [];
|
|
102
102
|
for (const E of d)
|
|
103
|
-
|
|
104
|
-
n(o)[i] =
|
|
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
|
|
114
|
-
H(
|
|
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] =
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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),
|
|
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),
|
|
148
|
+
a !== -1 && r.splice(a + 1, 0, ...l), g(t), y.value = r;
|
|
149
149
|
}
|
|
150
|
-
async function
|
|
150
|
+
async function k(t) {
|
|
151
151
|
let e = [];
|
|
152
|
-
if (
|
|
153
|
-
(r) => r.type === j.
|
|
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
|
-
|
|
160
|
+
y.value = e;
|
|
161
161
|
}
|
|
162
162
|
async function N(t) {
|
|
163
163
|
let e = [];
|
|
164
|
-
if (
|
|
165
|
-
(l) => l.type === j.
|
|
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
|
-
}),
|
|
182
|
+
}), g(a, r), y.value = at(a, "field");
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
if (
|
|
184
|
+
function g(t, e, s = !0) {
|
|
185
|
+
if (V(e) && e?.length === 0)
|
|
186
186
|
return;
|
|
187
187
|
let r = [];
|
|
188
|
-
|
|
189
|
-
const a = {}, l =
|
|
188
|
+
m(t) && r.push(t), V(t) && (r = [...t]);
|
|
189
|
+
const a = {}, l = C();
|
|
190
190
|
r.forEach((i) => {
|
|
191
|
-
i.type !== j.
|
|
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
|
|
194
|
+
function C(t = !1) {
|
|
195
195
|
if (!n(c)) return {};
|
|
196
|
-
const s =
|
|
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
|
|
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(
|
|
227
|
+
const { autoCleanErrorMessage: e, watchDataIsChange: s } = n(v);
|
|
228
228
|
t && t.preventDefault(), e && await D();
|
|
229
|
-
const { submitFunc: r, beforeSubmitFunc: a } = n(
|
|
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 =
|
|
238
|
+
const u = C();
|
|
239
239
|
if (s) {
|
|
240
|
-
const b = ft(T.value, u),
|
|
241
|
-
p("submit", u, !b,
|
|
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:
|
|
255
|
+
getFieldsValue: C,
|
|
256
256
|
updateSchema: N,
|
|
257
|
-
resetSchema:
|
|
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:
|
|
263
|
+
getFieldValue: R,
|
|
264
264
|
setFormItemError: tt
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
267
|
export {
|
|
268
|
-
|
|
268
|
+
Ot as useFormEvents
|
|
269
269
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
|
25
|
-
import { usePagination as
|
|
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:
|
|
394
|
-
emit:
|
|
393
|
+
expose: O,
|
|
394
|
+
emit: V
|
|
395
395
|
}) {
|
|
396
|
-
const l =
|
|
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
|
-
} =
|
|
399
|
+
} = ze(t), {
|
|
400
400
|
getPaginationInfo: i,
|
|
401
401
|
setPagination: u,
|
|
402
402
|
getCurrentPage: I
|
|
403
|
-
} =
|
|
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:
|
|
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
|
-
...
|
|
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
|
-
}),
|
|
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",
|
|
602
|
+
l("register", z);
|
|
603
603
|
const Q = {
|
|
604
604
|
field: "_filterTableData",
|
|
605
605
|
label: "",
|
|
606
|
-
type: pe.
|
|
607
|
-
componentProps: (
|
|
606
|
+
type: pe.Search,
|
|
607
|
+
componentProps: () => ({
|
|
608
608
|
onChange: (a) => {
|
|
609
|
-
|
|
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")),
|
|
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
|
|
638
|
+
return O({
|
|
639
639
|
table: b,
|
|
640
640
|
pageRef: C,
|
|
641
|
-
...
|
|
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:
|
|
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)])]),
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
export declare const FormCompEnum: {
|
|
3
|
-
readonly
|
|
3
|
+
readonly AutoComplete: "autocomplete";
|
|
4
4
|
readonly Cascader: "cascader";
|
|
5
5
|
readonly ColorPicker: "colorPicker";
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
6
|
+
readonly Input: "input";
|
|
7
|
+
readonly InputNumber: "input-number";
|
|
8
|
+
readonly InputNumberStep: "input-number-step";
|
|
9
|
+
readonly InputTag: "input-tag";
|
|
10
|
+
readonly Password: "password";
|
|
11
|
+
readonly Textarea: "textarea";
|
|
12
12
|
readonly Slider: "slider";
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
13
|
+
readonly Divider: "divider";
|
|
14
|
+
readonly Select: "select";
|
|
15
|
+
readonly Search: "search";
|
|
16
|
+
readonly Radio: "radio";
|
|
17
|
+
readonly RadioSingle: "radio_single";
|
|
18
|
+
readonly RadioButton: "radio-button";
|
|
19
|
+
readonly Checkbox: "checkbox";
|
|
20
|
+
readonly CheckboxSingle: "checkbox_single";
|
|
21
|
+
readonly CheckboxButton: "checkbox-button";
|
|
22
|
+
readonly Switch: "switch";
|
|
23
23
|
readonly Upload: "upload";
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
24
|
+
readonly TimePicker: "time-picker";
|
|
25
|
+
readonly TimeRangePicker: "time-picker";
|
|
26
|
+
readonly YearPicker: "year";
|
|
27
|
+
readonly MonthPicker: "month";
|
|
28
|
+
readonly DatePicker: "date";
|
|
29
|
+
readonly DatesPicker: "dates";
|
|
30
|
+
readonly DateTimePicker: "datetime";
|
|
31
|
+
readonly WeekPicker: "week";
|
|
32
|
+
readonly DateTimeRangePicker: "datetimerange";
|
|
33
|
+
readonly DateRangePicker: "daterange";
|
|
34
|
+
readonly MonthRangePicker: "monthrange";
|
|
35
35
|
};
|
|
36
36
|
export type FormCompEnumType = (typeof FormCompEnum)[keyof typeof FormCompEnum];
|
|
37
37
|
export declare function registerComponent(compName: FormCompEnumType | string, component: Component): void;
|