@silver-formily/element-plus 2.3.0 → 3.0.0
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/esm/__builtins__/index.mjs +20 -19
- package/esm/__builtins__/shared/index.mjs +11 -10
- package/esm/__builtins__/shared/transform-component.d.ts +1 -1
- package/esm/__builtins__/shared/utils.d.ts +1 -0
- package/esm/__builtins__/shared/utils.mjs +22 -18
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/array-base/index.mjs +27 -27
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-base/symbols.mjs +1 -1
- package/esm/array-base/symbols.mjs.map +1 -1
- package/esm/array-base/utils.d.ts +0 -1
- package/esm/array-base/utils.mjs +27 -35
- package/esm/array-base/utils.mjs.map +1 -1
- package/esm/array-cards/index.mjs +1 -1
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-collapse/index.mjs +2 -5
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-items/index.mjs +1 -1
- package/esm/array-list-tabs/index.mjs +9 -9
- package/esm/array-table/index.mjs +7 -9
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-tabs/index.mjs +1 -2
- package/esm/array-tabs/index.mjs.map +1 -1
- package/esm/autocomplete/autocomplete.d.ts +16 -16
- package/esm/autocomplete/index.d.ts +8 -8
- package/esm/autocomplete/index.mjs +2 -2
- package/esm/autocomplete/index.mjs.map +1 -1
- package/esm/cascader/index.mjs +2 -2
- package/esm/checkbox/index.d.ts +27 -27
- package/esm/checkbox/index.mjs +7 -12
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/editable/editable.d.ts +14 -12
- package/esm/editable/index.d.ts +7 -6
- package/esm/editable/index.mjs +57 -61
- package/esm/editable/index.mjs.map +1 -1
- package/esm/env.d.d.ts +1 -0
- package/esm/form/form.mjs +5 -5
- package/esm/form-button-group/form-button-group.d.ts +9 -0
- package/esm/form-button-group/index.d.ts +15 -0
- package/esm/form-button-group/index.mjs +33 -25
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-collapse/index.mjs +1 -1
- package/esm/form-collapse/utils.mjs +0 -2
- package/esm/form-collapse/utils.mjs.map +1 -1
- package/esm/form-dialog/index.mjs +63 -70
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-drawer/index.mjs +62 -69
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-grid/form-grid.d.ts +2 -2
- package/esm/form-grid/hooks.d.ts +1 -2
- package/esm/form-grid/hooks.mjs +4 -11
- package/esm/form-grid/hooks.mjs.map +1 -1
- package/esm/form-grid/index.mjs +38 -35
- package/esm/form-grid/index.mjs.map +1 -1
- package/esm/form-item/index.d.ts +1 -0
- package/esm/form-item/index.mjs +102 -107
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/types.d.ts +12 -6
- package/esm/form-layout/form-layout.mjs +2 -2
- package/esm/form-layout/utils.mjs +24 -24
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/index.mjs +2 -2
- package/esm/form-step/utils.mjs +0 -3
- package/esm/form-step/utils.mjs.map +1 -1
- package/esm/form-tab/hooks.d.ts +2 -1
- package/esm/form-tab/hooks.mjs +13 -20
- package/esm/form-tab/hooks.mjs.map +1 -1
- package/esm/form-tab/index.mjs +38 -39
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.mjs +62 -58
- package/esm/index.mjs.map +1 -1
- package/esm/input/index.mjs +2 -2
- package/esm/input-number/index.d.ts +15 -15
- package/esm/input-tag/index.mjs +2 -2
- package/esm/mention/index.mjs +2 -2
- package/esm/pagination/pagination.mjs +1 -1
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/preview-text/index.mjs +33 -42
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/utils.mjs +1 -1
- package/esm/preview-text/utils.mjs.map +1 -1
- package/esm/query-form/default-components.d.ts +5 -0
- package/esm/query-form/default-components.mjs +47 -0
- package/esm/query-form/default-components.mjs.map +1 -0
- package/esm/query-form/hooks.d.ts +25 -0
- package/esm/query-form/hooks.mjs +29 -0
- package/esm/query-form/hooks.mjs.map +1 -0
- package/esm/query-form/index.d.ts +117 -0
- package/esm/query-form/index.mjs +331 -0
- package/esm/query-form/index.mjs.map +1 -0
- package/esm/query-form/query-form-light.d.ts +27 -0
- package/esm/query-form/query-form.d.ts +52 -0
- package/esm/query-form/types.d.ts +44 -0
- package/esm/query-form/types.mjs +2 -0
- package/esm/query-form/types.mjs.map +1 -0
- package/esm/query-form-item/index.d.ts +151 -0
- package/esm/query-form-item/index.mjs +181 -0
- package/esm/query-form-item/index.mjs.map +1 -0
- package/esm/query-form-item/query-form-item.d.ts +96 -0
- package/esm/query-form-item/types.d.ts +46 -0
- package/esm/query-form-item/types.mjs +2 -0
- package/esm/query-form-item/types.mjs.map +1 -0
- package/esm/radio/index.d.ts +18 -18
- package/esm/radio/index.mjs +7 -12
- package/esm/radio/index.mjs.map +1 -1
- package/esm/reset/index.mjs +2 -2
- package/esm/segmented/index.mjs +2 -2
- package/esm/select/index.d.ts +16 -16
- package/esm/select/index.mjs +1 -1
- package/esm/select-table/index.d.ts +6 -6
- package/esm/select-table/index.mjs +22 -24
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/select-table/select-table.d.ts +2 -2
- package/esm/shared/overlay-elements.mjs +14 -11
- package/esm/shared/overlay-elements.mjs.map +1 -1
- package/esm/styles/form-button-group/index.css +1 -1
- package/esm/styles/form-grid/index.css +1 -1
- package/esm/styles/form-item/index.css +1 -1
- package/esm/styles/query-form/index.css +1 -0
- package/esm/styles/query-form-item/index.css +1 -0
- package/esm/submit/index.mjs +3 -3
- package/esm/submit/index.mjs.map +1 -1
- package/esm/switch/index.d.ts +9 -9
- package/esm/time-select/index.d.ts +12 -12
- package/esm/transfer/index.d.ts +12 -12
- package/esm/tree/index.mjs +3 -3
- package/esm/tree/utils.mjs +0 -2
- package/esm/tree/utils.mjs.map +1 -1
- package/esm/tree-select/index.mjs +2 -2
- package/esm/upload/index.d.ts +12 -12
- package/esm/upload/index.mjs +3 -3
- package/esm/upload/upload.d.ts +24 -24
- package/esm/vendor/icon.mjs.map +1 -1
- package/esm/vendor/lodash.mjs +777 -663
- package/esm/vendor/lodash.mjs.map +1 -1
- package/esm/vendor/runtime.mjs +23 -29
- package/esm/vendor/runtime.mjs.map +1 -1
- package/esm/vendor/shared.esm-bundler.mjs +2 -7
- package/esm/vendor/shared.esm-bundler.mjs.map +1 -1
- package/esm/vendor/sizes.mjs.map +1 -1
- package/esm/vendor/types.mjs +5 -5
- package/esm/vendor/types.mjs.map +1 -1
- package/package.json +89 -115
- package/LICENSE +0 -21
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { defineComponent as Z, useSlots as ee, computed as d, onUnmounted as te, openBlock as l, createBlock as a, unref as o, mergeProps as f, withCtx as n, createElementVNode as fe, normalizeClass as G, renderSlot as x, resolveDynamicComponent as oe, createCommentVNode as h, ref as K, createVNode as W, normalizeStyle as M, normalizeProps as _, createTextVNode as b, toDisplayString as g } from "vue";
|
|
2
|
+
import { reaction as he, toJS as we, autorun as ye } from "@formily/reactive";
|
|
3
|
+
import { useForm as se, useFieldSchema as ne } from "@silver-formily/vue";
|
|
4
|
+
import { useQueryFormForm as le, useQueryFormSchemaField as ae } from "./hooks.mjs";
|
|
5
|
+
import { t as ve } from "../vendor/lodash.mjs";
|
|
6
|
+
import { _ as re } from "../form/form.mjs";
|
|
7
|
+
import { useCleanAttrs as ie, compatibleUnderlineProp as be, composeExport as ge } from "../__builtins__/shared/utils.mjs";
|
|
8
|
+
import { stylePrefix as ue } from "../__builtins__/configs/index.mjs";
|
|
9
|
+
import { ArrowUp as Fe, ArrowDown as _e } from "@element-plus/icons-vue";
|
|
10
|
+
import { Schema as X } from "@formily/json-schema";
|
|
11
|
+
import { createGrid as xe } from "@silver-formily/grid";
|
|
12
|
+
import { ElLink as Se, ElIcon as Re } from "element-plus";
|
|
13
|
+
import { FormButtonGroup as O } from "../form-button-group/index.mjs";
|
|
14
|
+
import { FormGrid as Y } from "../form-grid/index.mjs";
|
|
15
|
+
import { Reset as H } from "../reset/index.mjs";
|
|
16
|
+
import { Submit as J } from "../submit/index.mjs";
|
|
17
|
+
import '../styles/query-form/index.css';const ke = /* @__PURE__ */ Z({
|
|
18
|
+
name: "FQueryFormLight",
|
|
19
|
+
inheritAttrs: !1,
|
|
20
|
+
__name: "query-form-light",
|
|
21
|
+
props: {
|
|
22
|
+
schema: {},
|
|
23
|
+
schemaField: {},
|
|
24
|
+
components: { default: () => ({}) },
|
|
25
|
+
scope: {},
|
|
26
|
+
throttleWait: { default: 300 }
|
|
27
|
+
},
|
|
28
|
+
emits: ["autoSubmit", "autoSubmitFailed"],
|
|
29
|
+
setup(q, { emit: e }) {
|
|
30
|
+
const w = q, C = e, { props: r } = ie(["modelValue", "onUpdate:modelValue"]), D = ee(), L = se(), z = ne(), P = `${ue}-query-form-light`, { externalForm: N, activeForm: T } = le({
|
|
31
|
+
formProps: r,
|
|
32
|
+
fallbackForm: L
|
|
33
|
+
}), A = d(() => w.schema ?? z.value), Q = d(() => ({
|
|
34
|
+
fullness: !1,
|
|
35
|
+
...r.value,
|
|
36
|
+
form: N.value
|
|
37
|
+
}));
|
|
38
|
+
function $() {
|
|
39
|
+
T.value.submit((i) => (C("autoSubmit", i), r.value.onAutoSubmit?.(i))).catch((i) => {
|
|
40
|
+
C("autoSubmitFailed", i), r.value.onAutoSubmitFailed?.(i);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const E = ve(() => {
|
|
44
|
+
$();
|
|
45
|
+
}, w.throttleWait, {
|
|
46
|
+
leading: !1,
|
|
47
|
+
trailing: !0
|
|
48
|
+
}), V = he(() => {
|
|
49
|
+
const y = T.value;
|
|
50
|
+
if (y)
|
|
51
|
+
return we(y.values);
|
|
52
|
+
}, () => {
|
|
53
|
+
E();
|
|
54
|
+
});
|
|
55
|
+
te(() => {
|
|
56
|
+
V(), E.cancel();
|
|
57
|
+
});
|
|
58
|
+
const { hasDefaultSlot: S, schemaField: R } = ae({
|
|
59
|
+
slots: D,
|
|
60
|
+
schema: A,
|
|
61
|
+
schemaField: d(() => w.schemaField),
|
|
62
|
+
components: d(() => w.components)
|
|
63
|
+
});
|
|
64
|
+
return (y, i) => (l(), a(o(re), f(Q.value, { class: P }), {
|
|
65
|
+
default: n(() => [
|
|
66
|
+
fe("div", {
|
|
67
|
+
class: G(`${P}__content`)
|
|
68
|
+
}, [
|
|
69
|
+
o(S) ? x(y.$slots, "default", { key: 0 }) : o(R) ? (l(), a(oe(o(R)), {
|
|
70
|
+
key: 1,
|
|
71
|
+
schema: A.value
|
|
72
|
+
}, null, 8, ["schema"])) : h("", !0)
|
|
73
|
+
], 2)
|
|
74
|
+
]),
|
|
75
|
+
_: 3
|
|
76
|
+
}, 16));
|
|
77
|
+
}
|
|
78
|
+
}), F = 1, Ce = /* @__PURE__ */ Z({
|
|
79
|
+
name: "FQueryForm",
|
|
80
|
+
inheritAttrs: !1,
|
|
81
|
+
__name: "query-form",
|
|
82
|
+
props: {
|
|
83
|
+
schema: {},
|
|
84
|
+
schemaField: {},
|
|
85
|
+
components: { default: () => ({}) },
|
|
86
|
+
scope: {},
|
|
87
|
+
gridProps: { default: () => ({}) },
|
|
88
|
+
defaultExpanded: { type: Boolean, default: !1 },
|
|
89
|
+
showToggle: { type: Boolean, default: !0 },
|
|
90
|
+
actionsAtRowEnd: { type: Boolean, default: !1 },
|
|
91
|
+
visibleWhen: {},
|
|
92
|
+
submitText: { default: "查询" },
|
|
93
|
+
resetText: { default: "重置" },
|
|
94
|
+
expandText: { default: "展开" },
|
|
95
|
+
collapseText: { default: "收起" },
|
|
96
|
+
showSubmit: { type: Boolean, default: !0 },
|
|
97
|
+
showReset: { type: Boolean, default: !0 },
|
|
98
|
+
submitProps: {},
|
|
99
|
+
resetProps: {}
|
|
100
|
+
},
|
|
101
|
+
setup(q) {
|
|
102
|
+
const e = q, { props: w } = ie(["modelValue", "onUpdate:modelValue"]), C = ee(), r = `${ue}-query-form`, D = Y.GridColumn, L = ne(), z = se(), { externalForm: P, activeForm: N } = le({
|
|
103
|
+
formProps: w,
|
|
104
|
+
fallbackForm: z
|
|
105
|
+
}), T = d(() => ({
|
|
106
|
+
fullness: !0,
|
|
107
|
+
...w.value,
|
|
108
|
+
form: P.value
|
|
109
|
+
})), A = d(() => {
|
|
110
|
+
const t = e.schema ?? L.value;
|
|
111
|
+
return t ? (t instanceof X ? t : new X(t)).mapProperties((c, p) => ({
|
|
112
|
+
name: p,
|
|
113
|
+
schema: c
|
|
114
|
+
})) : [];
|
|
115
|
+
});
|
|
116
|
+
function Q(t) {
|
|
117
|
+
return N.value?.query(t).take();
|
|
118
|
+
}
|
|
119
|
+
function $(t, s, c) {
|
|
120
|
+
const p = t.index ?? 0, B = A.value[p], I = B?.schema, U = B?.name ?? I?.name;
|
|
121
|
+
return {
|
|
122
|
+
field: Q(U),
|
|
123
|
+
schema: I,
|
|
124
|
+
index: p,
|
|
125
|
+
node: t,
|
|
126
|
+
grid: s,
|
|
127
|
+
collapsed: c ?? s.maxRows !== 1 / 0,
|
|
128
|
+
breakpoint: s.breakpoint
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function E(t) {
|
|
132
|
+
if (!t.collapsed)
|
|
133
|
+
return !0;
|
|
134
|
+
const s = t.node.shadowRow ?? 0;
|
|
135
|
+
if (!(s < F + 1))
|
|
136
|
+
return !1;
|
|
137
|
+
if (!(R(t.grid) > F))
|
|
138
|
+
return !0;
|
|
139
|
+
const B = t.node.shadowColumn ?? 1, I = t.node.span ?? 1, U = B + I - 1;
|
|
140
|
+
return !(s === F && U === t.grid.columns);
|
|
141
|
+
}
|
|
142
|
+
function V(t) {
|
|
143
|
+
return (e.visibleWhen ? e.visibleWhen(t) : E(t)) !== !1;
|
|
144
|
+
}
|
|
145
|
+
function S(t, s) {
|
|
146
|
+
return "element" in t && t.element ? t.element.dataset.queryFormActions !== void 0 : t.index === s.childSize - 1;
|
|
147
|
+
}
|
|
148
|
+
function R(t) {
|
|
149
|
+
const s = (t.children ?? []).filter((c) => !S(c, t)).map((c) => c.shadowRow ?? 0);
|
|
150
|
+
return new Set(s).size;
|
|
151
|
+
}
|
|
152
|
+
const y = (t, s) => S(t, s) ? !0 : V($(t, s)), i = e.gridProps ?? {}, me = {
|
|
153
|
+
...i.minColumns === void 0 && i.maxColumns === void 0 ? { maxColumns: 4 } : {},
|
|
154
|
+
...i,
|
|
155
|
+
maxRows: e.defaultExpanded || !e.showToggle ? 1 / 0 : F,
|
|
156
|
+
shouldVisible: y
|
|
157
|
+
}, u = xe(me), v = K(u.maxRows === 1 / 0), m = K("complete-wrap");
|
|
158
|
+
function ce() {
|
|
159
|
+
if (!e.showToggle) {
|
|
160
|
+
m.value = "incomplete-wrap";
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (!e.visibleWhen) {
|
|
164
|
+
m.value = R(u) > F ? "collapsible" : "incomplete-wrap";
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if ((u.children ?? []).some((p) => S(p, u) ? !1 : !V($(p, u, !0)))) {
|
|
168
|
+
m.value = "collapsible";
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const c = u.shadowRows;
|
|
172
|
+
m.value = c < F + 1 ? "incomplete-wrap" : "complete-wrap";
|
|
173
|
+
}
|
|
174
|
+
const de = ye(() => {
|
|
175
|
+
v.value = u.maxRows === 1 / 0, ce();
|
|
176
|
+
});
|
|
177
|
+
te(de);
|
|
178
|
+
function k() {
|
|
179
|
+
e.showToggle && (u.maxRows = u.maxRows === 1 / 0 ? F : 1 / 0);
|
|
180
|
+
}
|
|
181
|
+
const { hasDefaultSlot: pe, schemaField: j } = ae({
|
|
182
|
+
slots: C,
|
|
183
|
+
schema: d(() => e.schema),
|
|
184
|
+
schemaField: d(() => e.schemaField),
|
|
185
|
+
components: d(() => e.components),
|
|
186
|
+
scope: d(() => e.scope)
|
|
187
|
+
});
|
|
188
|
+
return (t, s) => (l(), a(o(re), f(T.value, { class: r }), {
|
|
189
|
+
default: n(() => [
|
|
190
|
+
W(o(Y), { grid: o(u) }, {
|
|
191
|
+
default: n(() => [
|
|
192
|
+
o(pe) ? x(t.$slots, "default", { key: 0 }) : o(j) ? (l(), a(oe(o(j)), {
|
|
193
|
+
key: 1,
|
|
194
|
+
schema: e.schema
|
|
195
|
+
}, null, 8, ["schema"])) : h("", !0),
|
|
196
|
+
W(o(D), {
|
|
197
|
+
"grid-span": -1,
|
|
198
|
+
"data-query-form-actions": "",
|
|
199
|
+
class: G([
|
|
200
|
+
`${r}__actions`,
|
|
201
|
+
e.actionsAtRowEnd && `${r}__actions--row-end`
|
|
202
|
+
])
|
|
203
|
+
}, {
|
|
204
|
+
default: n(() => [
|
|
205
|
+
m.value === "incomplete-wrap" ? (l(), a(o(O), {
|
|
206
|
+
key: 0,
|
|
207
|
+
align: e.actionsAtRowEnd ? "right" : "left",
|
|
208
|
+
"align-form-item": "",
|
|
209
|
+
inline: "",
|
|
210
|
+
style: M(e.actionsAtRowEnd && { width: "100%" })
|
|
211
|
+
}, {
|
|
212
|
+
default: n(() => [
|
|
213
|
+
x(t.$slots, "actions", {
|
|
214
|
+
expanded: v.value,
|
|
215
|
+
toggle: k,
|
|
216
|
+
type: m.value
|
|
217
|
+
}, () => [
|
|
218
|
+
e.showSubmit ? (l(), a(o(J), _(f({ key: 0 }, e.submitProps)), {
|
|
219
|
+
default: n(() => [
|
|
220
|
+
b(g(e.submitText), 1)
|
|
221
|
+
]),
|
|
222
|
+
_: 1
|
|
223
|
+
}, 16)) : h("", !0),
|
|
224
|
+
e.showReset ? (l(), a(o(H), _(f({ key: 1 }, e.resetProps)), {
|
|
225
|
+
default: n(() => [
|
|
226
|
+
b(g(e.resetText), 1)
|
|
227
|
+
]),
|
|
228
|
+
_: 1
|
|
229
|
+
}, 16)) : h("", !0)
|
|
230
|
+
])
|
|
231
|
+
]),
|
|
232
|
+
_: 3
|
|
233
|
+
}, 8, ["align", "style"])) : m.value === "collapsible" && e.showToggle ? (l(), a(o(O), {
|
|
234
|
+
key: 1,
|
|
235
|
+
align: e.actionsAtRowEnd ? "right" : "left",
|
|
236
|
+
"align-form-item": "",
|
|
237
|
+
inline: "",
|
|
238
|
+
style: M(e.actionsAtRowEnd && { width: "100%" })
|
|
239
|
+
}, {
|
|
240
|
+
default: n(() => [
|
|
241
|
+
x(t.$slots, "actions", {
|
|
242
|
+
expanded: v.value,
|
|
243
|
+
toggle: k,
|
|
244
|
+
type: m.value
|
|
245
|
+
}, () => [
|
|
246
|
+
e.showSubmit ? (l(), a(o(J), _(f({ key: 0 }, e.submitProps)), {
|
|
247
|
+
default: n(() => [
|
|
248
|
+
b(g(e.submitText), 1)
|
|
249
|
+
]),
|
|
250
|
+
_: 1
|
|
251
|
+
}, 16)) : h("", !0),
|
|
252
|
+
e.showReset ? (l(), a(o(H), _(f({ key: 1 }, e.resetProps)), {
|
|
253
|
+
default: n(() => [
|
|
254
|
+
b(g(e.resetText), 1)
|
|
255
|
+
]),
|
|
256
|
+
_: 1
|
|
257
|
+
}, 16)) : h("", !0)
|
|
258
|
+
]),
|
|
259
|
+
x(t.$slots, "collapse", {
|
|
260
|
+
expanded: v.value,
|
|
261
|
+
toggle: k,
|
|
262
|
+
type: m.value
|
|
263
|
+
}, () => [
|
|
264
|
+
W(o(Se), {
|
|
265
|
+
type: "primary",
|
|
266
|
+
underline: o(be)(),
|
|
267
|
+
class: G(`${r}__collapse-link`),
|
|
268
|
+
onClick: k
|
|
269
|
+
}, {
|
|
270
|
+
default: n(() => [
|
|
271
|
+
b(g(v.value ? e.collapseText : e.expandText) + " ", 1),
|
|
272
|
+
W(o(Re), {
|
|
273
|
+
class: G(`${r}__collapse-icon`)
|
|
274
|
+
}, {
|
|
275
|
+
default: n(() => [
|
|
276
|
+
v.value ? (l(), a(o(Fe), { key: 0 })) : (l(), a(o(_e), { key: 1 }))
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
}, 8, ["class"])
|
|
280
|
+
]),
|
|
281
|
+
_: 1
|
|
282
|
+
}, 8, ["underline", "class"])
|
|
283
|
+
])
|
|
284
|
+
]),
|
|
285
|
+
_: 3
|
|
286
|
+
}, 8, ["align", "style"])) : (l(), a(o(O), {
|
|
287
|
+
key: 2,
|
|
288
|
+
align: "right",
|
|
289
|
+
inline: "",
|
|
290
|
+
style: { display: "flex", width: "100%" }
|
|
291
|
+
}, {
|
|
292
|
+
default: n(() => [
|
|
293
|
+
x(t.$slots, "actions", {
|
|
294
|
+
expanded: v.value,
|
|
295
|
+
toggle: k,
|
|
296
|
+
type: m.value
|
|
297
|
+
}, () => [
|
|
298
|
+
e.showSubmit ? (l(), a(o(J), _(f({ key: 0 }, e.submitProps)), {
|
|
299
|
+
default: n(() => [
|
|
300
|
+
b(g(e.submitText), 1)
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}, 16)) : h("", !0),
|
|
304
|
+
e.showReset ? (l(), a(o(H), _(f({ key: 1 }, e.resetProps)), {
|
|
305
|
+
default: n(() => [
|
|
306
|
+
b(g(e.resetText), 1)
|
|
307
|
+
]),
|
|
308
|
+
_: 1
|
|
309
|
+
}, 16)) : h("", !0)
|
|
310
|
+
])
|
|
311
|
+
]),
|
|
312
|
+
_: 3
|
|
313
|
+
}))
|
|
314
|
+
]),
|
|
315
|
+
_: 3
|
|
316
|
+
}, 8, ["class"])
|
|
317
|
+
]),
|
|
318
|
+
_: 3
|
|
319
|
+
}, 8, ["grid"])
|
|
320
|
+
]),
|
|
321
|
+
_: 3
|
|
322
|
+
}, 16));
|
|
323
|
+
}
|
|
324
|
+
}), Oe = ge(Ce, {
|
|
325
|
+
Light: ke
|
|
326
|
+
});
|
|
327
|
+
export {
|
|
328
|
+
Oe as QueryForm,
|
|
329
|
+
Oe as default
|
|
330
|
+
};
|
|
331
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/query-form/query-form-light.vue","../../src/query-form/query-form.vue","../../src/query-form/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { Form } from '@formily/core'\r\nimport type { IQueryFormLightProps } from './types'\r\nimport { reaction, toJS } from '@formily/reactive'\r\nimport { useFieldSchema, useForm } from '@silver-formily/vue'\r\nimport { throttle } from 'lodash-es'\r\nimport { computed, onUnmounted, useSlots } from 'vue'\r\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\r\nimport { Form as FForm } from '../form'\r\nimport { useQueryFormForm, useQueryFormSchemaField } from './hooks'\r\n\r\ndefineOptions({\r\n name: 'FQueryFormLight',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = withDefaults(defineProps<IQueryFormLightProps>(), {\r\n components: () => ({}),\r\n throttleWait: 300,\r\n})\r\nconst emit = defineEmits<{\r\n (e: 'autoSubmit', values: Form['values']): void\r\n (e: 'autoSubmitFailed', error: any): void\r\n}>()\r\n\r\nconst { props: formProps } = useCleanAttrs(['modelValue', 'onUpdate:modelValue'])\r\nconst slots = useSlots()\r\nconst formRef = useForm()\r\nconst fieldSchemaRef = useFieldSchema()\r\nconst prefixCls = `${stylePrefix}-query-form-light`\r\n\r\nconst { externalForm, activeForm } = useQueryFormForm({\r\n formProps,\r\n fallbackForm: formRef,\r\n})\r\nconst resolvedSchema = computed(() => props.schema ?? fieldSchemaRef.value)\r\n\r\nconst innerFormProps = computed(() => ({\r\n fullness: false,\r\n ...formProps.value,\r\n form: externalForm.value,\r\n}))\r\n\r\nfunction submitByChange() {\r\n const form = activeForm.value\r\n form\r\n .submit((values) => {\r\n emit('autoSubmit', values)\r\n return formProps.value.onAutoSubmit?.(values)\r\n })\r\n .catch((error) => {\r\n emit('autoSubmitFailed', error)\r\n formProps.value.onAutoSubmitFailed?.(error)\r\n })\r\n}\r\n\r\nconst triggerSubmit = throttle(() => {\r\n submitByChange()\r\n}, props.throttleWait, {\r\n leading: false,\r\n trailing: true,\r\n})\r\n\r\nconst dispose = reaction(() => {\r\n const form = activeForm.value\r\n if (!form)\r\n return\r\n return toJS(form.values)\r\n}, () => {\r\n triggerSubmit()\r\n})\r\n\r\nonUnmounted(() => {\r\n dispose()\r\n triggerSubmit.cancel()\r\n})\r\n\r\nconst { hasDefaultSlot, schemaField } = useQueryFormSchemaField({\r\n slots,\r\n schema: resolvedSchema,\r\n schemaField: computed(() => props.schemaField),\r\n components: computed(() => props.components),\r\n})\r\n</script>\r\n\r\n<template>\r\n <FForm v-bind=\"innerFormProps\" :class=\"prefixCls\">\r\n <div :class=\"`${prefixCls}__content`\">\r\n <slot v-if=\"hasDefaultSlot\" />\r\n <component\r\n :is=\"schemaField\"\r\n v-else-if=\"schemaField\"\r\n :schema=\"resolvedSchema\"\r\n />\r\n </div>\r\n </FForm>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport type { ISchema } from '@formily/json-schema'\nimport type { Grid, GridNode, IGridOptions } from '@silver-formily/grid'\nimport type { IQueryFormProps, SchemaEntry } from './types'\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\nimport { Schema } from '@formily/json-schema'\nimport { autorun } from '@formily/reactive'\nimport { createGrid } from '@silver-formily/grid'\nimport { useFieldSchema, useForm } from '@silver-formily/vue'\nimport { ElIcon, ElLink } from 'element-plus'\nimport { computed, onUnmounted, ref, useSlots } from 'vue'\nimport { compatibleUnderlineProp, stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { Form } from '../form'\nimport { FormButtonGroup } from '../form-button-group'\nimport { FormGrid } from '../form-grid'\nimport { Reset } from '../reset'\nimport { Submit } from '../submit'\nimport { useQueryFormForm, useQueryFormSchemaField } from './hooks'\n\r\ndefineOptions({\r\n name: 'FQueryForm',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = withDefaults(defineProps<IQueryFormProps>(), {\r\n components: () => ({}),\r\n gridProps: () => ({}),\r\n defaultExpanded: false,\r\n showToggle: true,\r\n actionsAtRowEnd: false,\r\n submitText: '查询',\r\n resetText: '重置',\r\n expandText: '展开',\r\n collapseText: '收起',\r\n showSubmit: true,\r\n showReset: true,\r\n})\r\n\r\nconst { props: formProps } = useCleanAttrs(['modelValue', 'onUpdate:modelValue'])\r\nconst slots = useSlots()\r\nconst prefixCls = `${stylePrefix}-query-form`\r\nconst FormGridColumn = FormGrid.GridColumn\r\n\r\nconst COLLAPSED_ROWS = 1\r\nconst fieldSchemaRef = useFieldSchema()\r\nconst formRef = useForm()\r\nconst { externalForm, activeForm } = useQueryFormForm({\r\n formProps,\r\n fallbackForm: formRef,\r\n})\r\nconst innerFormProps = computed(() => ({\r\n fullness: true,\r\n ...formProps.value,\r\n form: externalForm.value,\r\n}))\r\n\r\nconst schemaList = computed<SchemaEntry[]>(() => {\r\n const rawSchema = props.schema ?? fieldSchemaRef.value\r\n /* istanbul ignore next -- @preserve defensive: schema can be temporarily absent in external field-schema lifecycle */\r\n if (!rawSchema)\r\n return []\r\n const schema = rawSchema instanceof Schema ? rawSchema : new Schema(rawSchema)\r\n return schema.mapProperties((childSchema: ISchema, name: string | number) => ({\r\n name,\r\n schema: childSchema,\r\n }))\r\n})\r\n\r\nfunction resolveField(name?: string | number) {\r\n return activeForm.value?.query(name).take()\r\n}\r\n\r\nfunction createVisibleContext(\r\n node: GridNode,\r\n grid: Grid<HTMLElement>,\r\n collapsedOverride?: boolean,\r\n) {\r\n const index = node.index ?? 0\r\n const entry = schemaList.value[index]\r\n const schema = entry?.schema\r\n const name = entry?.name ?? schema?.name\r\n return {\r\n field: resolveField(name),\r\n schema,\r\n index,\r\n node,\r\n grid,\r\n collapsed: collapsedOverride ?? grid.maxRows !== Infinity,\r\n breakpoint: grid.breakpoint,\r\n }\r\n}\r\n\r\nfunction defaultVisibleWhen(context: ReturnType<typeof createVisibleContext>) {\r\n if (!context.collapsed)\r\n return true\r\n\r\n const shadowRow = context.node.shadowRow ?? 0\r\n const withinRows = shadowRow < COLLAPSED_ROWS + 1\r\n if (!withinRows)\r\n return false\r\n\r\n const isCollapsible = getFieldRowCount(context.grid) > COLLAPSED_ROWS\r\n if (!isCollapsible)\r\n return true\r\n const shadowColumn = context.node.shadowColumn ?? 1\r\n const span = context.node.span ?? 1\r\n const endColumn = shadowColumn + span - 1\r\n if (shadowRow === COLLAPSED_ROWS && endColumn === context.grid.columns)\r\n return false\r\n\r\n return true\r\n}\r\n\r\nfunction resolveVisibleWhen(context: ReturnType<typeof createVisibleContext>) {\r\n const visible = props.visibleWhen\r\n ? props.visibleWhen(context)\r\n : defaultVisibleWhen(context)\r\n return visible !== false\r\n}\r\n\r\nfunction isActionsNode(node: GridNode, grid: Grid<HTMLElement>) {\r\n if ('element' in node && node.element) {\r\n return node.element.dataset.queryFormActions !== undefined\r\n }\r\n return node.index === grid.childSize - 1\r\n}\r\n\r\nfunction getFieldRowCount(grid: Grid<HTMLElement>) {\r\n const rows = (grid.children ?? [])\r\n .filter(node => !isActionsNode(node, grid))\r\n .map(node => node.shadowRow ?? 0)\r\n return new Set(rows).size\r\n}\r\n\r\nconst defaultShouldVisible: IGridOptions['shouldVisible'] = (node, grid) => {\r\n if (isActionsNode(node, grid))\r\n return true\r\n return resolveVisibleWhen(createVisibleContext(node, grid))\r\n}\r\n\r\nconst restGridProps = props.gridProps ?? {}\r\nconst defaultGridProps: Partial<IGridOptions> = restGridProps.minColumns === undefined && restGridProps.maxColumns === undefined\r\n ? { maxColumns: 4 }\r\n : {}\r\n\r\nconst gridOptions: IGridOptions = {\n ...defaultGridProps,\n ...restGridProps,\n maxRows: (props.defaultExpanded || !props.showToggle) ? Infinity : COLLAPSED_ROWS,\n shouldVisible: defaultShouldVisible,\n}\n\nconst grid = createGrid(gridOptions)\n\r\nconst expanded = ref(grid.maxRows === Infinity)\r\nconst gridType = ref<'incomplete-wrap' | 'collapsible' | 'complete-wrap'>('complete-wrap')\r\n\r\nfunction updateType() {\r\n if (!props.showToggle) {\r\n gridType.value = 'incomplete-wrap'\r\n return\r\n }\r\n\r\n if (!props.visibleWhen) {\r\n gridType.value = getFieldRowCount(grid) > COLLAPSED_ROWS\r\n ? 'collapsible'\r\n : 'incomplete-wrap'\r\n return\r\n }\r\n\r\n const nodes = grid.children ?? []\r\n const hasHiddenInCollapsed = nodes.some((node) => {\r\n if (isActionsNode(node, grid))\r\n return false\r\n return !resolveVisibleWhen(createVisibleContext(node, grid, true))\r\n })\r\n /* istanbul ignore next -- @preserve layout branch depends on runtime grid measurement in browser */\r\n if (hasHiddenInCollapsed) {\r\n gridType.value = 'collapsible'\r\n return\r\n }\r\n const realRows = grid.shadowRows\r\n gridType.value = realRows < COLLAPSED_ROWS + 1 ? 'incomplete-wrap' : 'complete-wrap'\r\n}\r\n\r\nconst dispose = autorun(() => {\r\n expanded.value = grid.maxRows === Infinity\r\n updateType()\r\n})\r\n\r\nonUnmounted(dispose)\r\n\r\nfunction toggle() {\r\n if (!props.showToggle)\r\n return\r\n grid.maxRows = grid.maxRows === Infinity ? COLLAPSED_ROWS : Infinity\r\n}\r\n\r\nconst { hasDefaultSlot, schemaField } = useQueryFormSchemaField({\r\n slots,\r\n schema: computed(() => props.schema),\r\n schemaField: computed(() => props.schemaField),\r\n components: computed(() => props.components),\r\n scope: computed(() => props.scope),\r\n})\r\n</script>\r\n\r\n<template>\r\n <Form v-bind=\"innerFormProps\" :class=\"prefixCls\">\r\n <FormGrid :grid=\"grid\">\r\n <slot v-if=\"hasDefaultSlot\" />\r\n <component\r\n :is=\"schemaField\"\r\n v-else-if=\"schemaField\"\r\n :schema=\"props.schema\"\r\n />\r\n <FormGridColumn\r\n :grid-span=\"-1\"\r\n data-query-form-actions\r\n :class=\"[\r\n `${prefixCls}__actions`,\r\n props.actionsAtRowEnd && `${prefixCls}__actions--row-end`,\r\n ]\"\r\n >\r\n <template v-if=\"gridType === 'incomplete-wrap'\">\r\n <FormButtonGroup\r\n :align=\"props.actionsAtRowEnd ? 'right' : 'left'\"\r\n align-form-item\r\n inline\r\n :style=\"props.actionsAtRowEnd && { width: '100%' }\"\r\n >\r\n <slot\r\n name=\"actions\"\r\n :expanded=\"expanded\"\r\n :toggle=\"toggle\"\r\n :type=\"gridType\"\r\n >\r\n <Submit v-if=\"props.showSubmit\" v-bind=\"props.submitProps\">\r\n {{ props.submitText }}\r\n </Submit>\r\n <Reset v-if=\"props.showReset\" v-bind=\"props.resetProps\">\r\n {{ props.resetText }}\r\n </Reset>\r\n </slot>\r\n </FormButtonGroup>\r\n </template>\r\n <template v-else-if=\"gridType === 'collapsible' && props.showToggle\">\r\n <FormButtonGroup\r\n :align=\"props.actionsAtRowEnd ? 'right' : 'left'\"\r\n align-form-item\r\n inline\r\n :style=\"props.actionsAtRowEnd && { width: '100%' }\"\r\n >\r\n <slot\r\n name=\"actions\"\r\n :expanded=\"expanded\"\r\n :toggle=\"toggle\"\r\n :type=\"gridType\"\r\n >\r\n <Submit v-if=\"props.showSubmit\" v-bind=\"props.submitProps\">\r\n {{ props.submitText }}\r\n </Submit>\r\n <Reset v-if=\"props.showReset\" v-bind=\"props.resetProps\">\r\n {{ props.resetText }}\r\n </Reset>\r\n </slot>\r\n <slot\r\n name=\"collapse\"\r\n :expanded=\"expanded\"\r\n :toggle=\"toggle\"\r\n :type=\"gridType\"\r\n >\r\n <ElLink\r\n type=\"primary\"\r\n :underline=\"compatibleUnderlineProp()\"\r\n :class=\"`${prefixCls}__collapse-link`\"\r\n @click=\"toggle\"\r\n >\r\n {{ expanded ? props.collapseText : props.expandText }}\r\n <ElIcon :class=\"`${prefixCls}__collapse-icon`\">\r\n <ArrowUp v-if=\"expanded\" />\r\n <ArrowDown v-else />\r\n </ElIcon>\r\n </ElLink>\r\n </slot>\r\n </FormButtonGroup>\r\n </template>\r\n <template v-else>\r\n <FormButtonGroup\r\n align=\"right\"\r\n inline\r\n style=\"display: flex; width: 100%;\"\r\n >\r\n <slot\r\n name=\"actions\"\r\n :expanded=\"expanded\"\r\n :toggle=\"toggle\"\r\n :type=\"gridType\"\r\n >\r\n <Submit v-if=\"props.showSubmit\" v-bind=\"props.submitProps\">\r\n {{ props.submitText }}\r\n </Submit>\r\n <Reset v-if=\"props.showReset\" v-bind=\"props.resetProps\">\r\n {{ props.resetText }}\r\n </Reset>\r\n </slot>\r\n </FormButtonGroup>\r\n </template>\r\n </FormGridColumn>\r\n </FormGrid>\r\n </Form>\r\n</template>\r\n","import { composeExport } from '../__builtins__/shared'\r\nimport QueryFormLightInner from './query-form-light.vue'\r\nimport QueryFormInner from './query-form.vue'\r\nimport './style.scss'\r\n\r\nexport type { IQueryFormLightProps, IQueryFormProps, QueryFormVisible, QueryFormVisibleContext } from './types'\r\n\r\nexport const QueryForm = composeExport(QueryFormInner, {\r\n Light: QueryFormLightInner,\r\n})\r\n\r\nexport default QueryForm\r\n"],"names":["props","__props","emit","__emit","formProps","useCleanAttrs","slots","useSlots","formRef","useForm","fieldSchemaRef","useFieldSchema","prefixCls","stylePrefix","externalForm","activeForm","useQueryFormForm","resolvedSchema","computed","innerFormProps","submitByChange","values","error","triggerSubmit","throttle","dispose","reaction","form","toJS","onUnmounted","hasDefaultSlot","schemaField","useQueryFormSchemaField","_openBlock","_createBlock","_unref","_mergeProps","_createElementVNode","_renderSlot","_ctx","_resolveDynamicComponent","COLLAPSED_ROWS","FormGridColumn","FormGrid","schemaList","rawSchema","Schema","childSchema","name","resolveField","createVisibleContext","node","grid","collapsedOverride","index","entry","schema","defaultVisibleWhen","context","shadowRow","getFieldRowCount","shadowColumn","span","endColumn","resolveVisibleWhen","isActionsNode","rows","defaultShouldVisible","restGridProps","gridOptions","createGrid","expanded","ref","gridType","updateType","realRows","autorun","toggle","_createVNode","_normalizeClass","FormButtonGroup","_normalizeStyle","Submit","_normalizeProps","_createTextVNode","_toDisplayString","Reset","ElLink","compatibleUnderlineProp","ElIcon","ArrowUp","ArrowDown","QueryForm","composeExport","QueryFormInner","QueryFormLightInner"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,UAAMA,IAAQC,GAIRC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AAA;;;sBAERA,EAAM,kBAAnBkC,EAEQC,EAAAmD,CAAA,GAAAH,EAAA/C,EAAA,EAAA,KAAA,EAAA,GAF8BpC,EAAM,UAAU,CAAA,GAAA;AAAA,mCACpD,MAAqB;AAAA,0BAAlBoF,EAAAC,EAAArF,EAAM,SAAS,GAAA,CAAA;AAAA,wBAAA;;;;;;;;;;;;;;;;;ICxSrB4F,KAAYC,GAAcC,IAAgB;AAAA,EACrD,OAAOC;AACT,CAAC;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IQueryFormLightProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: any;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<IQueryFormLightProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
|
+
autoSubmit: (values: any) => any;
|
|
13
|
+
autoSubmitFailed: (error: any) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<IQueryFormLightProps> & Readonly<{
|
|
15
|
+
onAutoSubmit?: (values: any) => any;
|
|
16
|
+
onAutoSubmitFailed?: (error: any) => any;
|
|
17
|
+
}>, {
|
|
18
|
+
components: Record<string, import('vue').Component>;
|
|
19
|
+
throttleWait: number;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IGridOptions } from '../../../grid/src';
|
|
2
|
+
import { IQueryFormProps } from './types';
|
|
3
|
+
declare function toggle(): void;
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
actions?(_: {
|
|
9
|
+
expanded: boolean;
|
|
10
|
+
toggle: typeof toggle;
|
|
11
|
+
type: "incomplete-wrap";
|
|
12
|
+
}): any;
|
|
13
|
+
actions?(_: {
|
|
14
|
+
expanded: boolean;
|
|
15
|
+
toggle: typeof toggle;
|
|
16
|
+
type: "collapsible";
|
|
17
|
+
}): any;
|
|
18
|
+
actions?(_: {
|
|
19
|
+
expanded: boolean;
|
|
20
|
+
toggle: typeof toggle;
|
|
21
|
+
type: "collapsible" | "complete-wrap";
|
|
22
|
+
}): any;
|
|
23
|
+
collapse?(_: {
|
|
24
|
+
expanded: boolean;
|
|
25
|
+
toggle: typeof toggle;
|
|
26
|
+
type: "collapsible";
|
|
27
|
+
}): any;
|
|
28
|
+
};
|
|
29
|
+
refs: {};
|
|
30
|
+
rootEl: any;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
33
|
+
declare const __VLS_component: import('vue').DefineComponent<IQueryFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IQueryFormProps> & Readonly<{}>, {
|
|
34
|
+
components: Record<string, import('vue').Component>;
|
|
35
|
+
gridProps: Omit<IGridOptions, "shouldVisible" | "maxRows">;
|
|
36
|
+
defaultExpanded: boolean;
|
|
37
|
+
showToggle: boolean;
|
|
38
|
+
actionsAtRowEnd: boolean;
|
|
39
|
+
submitText: string;
|
|
40
|
+
resetText: string;
|
|
41
|
+
expandText: string;
|
|
42
|
+
collapseText: string;
|
|
43
|
+
showSubmit: boolean;
|
|
44
|
+
showReset: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { GeneralField } from '@formily/core';
|
|
2
|
+
import { ISchema } from '@formily/json-schema';
|
|
3
|
+
import { Grid, GridNode, IGridOptions } from '../../../grid/src';
|
|
4
|
+
import { Component } from 'vue';
|
|
5
|
+
export interface QueryFormVisibleContext {
|
|
6
|
+
field?: GeneralField;
|
|
7
|
+
schema?: ISchema;
|
|
8
|
+
index: number;
|
|
9
|
+
node: GridNode;
|
|
10
|
+
grid: Grid<HTMLElement>;
|
|
11
|
+
collapsed: boolean;
|
|
12
|
+
breakpoint: number;
|
|
13
|
+
}
|
|
14
|
+
export type QueryFormVisible = (context: QueryFormVisibleContext) => boolean;
|
|
15
|
+
export interface IQueryFormProps {
|
|
16
|
+
schema?: ISchema;
|
|
17
|
+
schemaField?: Component;
|
|
18
|
+
components?: Record<string, Component>;
|
|
19
|
+
scope?: Record<string, any>;
|
|
20
|
+
gridProps?: Omit<IGridOptions, 'shouldVisible' | 'maxRows'>;
|
|
21
|
+
defaultExpanded?: boolean;
|
|
22
|
+
showToggle?: boolean;
|
|
23
|
+
actionsAtRowEnd?: boolean;
|
|
24
|
+
visibleWhen?: QueryFormVisible;
|
|
25
|
+
submitText?: string;
|
|
26
|
+
resetText?: string;
|
|
27
|
+
expandText?: string;
|
|
28
|
+
collapseText?: string;
|
|
29
|
+
showSubmit?: boolean;
|
|
30
|
+
showReset?: boolean;
|
|
31
|
+
submitProps?: Record<string, any>;
|
|
32
|
+
resetProps?: Record<string, any>;
|
|
33
|
+
}
|
|
34
|
+
export interface IQueryFormLightProps {
|
|
35
|
+
schema?: ISchema;
|
|
36
|
+
schemaField?: Component;
|
|
37
|
+
components?: Record<string, Component>;
|
|
38
|
+
scope?: Record<string, any>;
|
|
39
|
+
throttleWait?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface SchemaEntry {
|
|
42
|
+
name?: string | number;
|
|
43
|
+
schema: ISchema;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
export type { IQueryFormItemProps, QueryFormItemMode, QueryFormItemPagination, QueryFormItemPaginationMap, QueryFormItemPaginationProps, QueryFormItemQueryProps, QueryFormItemRequest, QueryFormItemRequestResultObject, QueryFormItemRequestSuccessPayload, } from './types';
|
|
2
|
+
export declare const QueryFormItem: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
+
mode: {
|
|
5
|
+
type: import('vue').PropType<import('./types').QueryFormItemMode>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
request: import('vue').PropType<import('./types').QueryFormItemRequest>;
|
|
9
|
+
clearOnDataChange: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
querySchema: import('vue').PropType<import('@formily/json-schema').ISchema>;
|
|
14
|
+
queryFormProps: {
|
|
15
|
+
type: import('vue').PropType<import('./types').QueryFormItemQueryProps>;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
18
|
+
pagination: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
paginationProps: {
|
|
23
|
+
type: import('vue').PropType<import('./types').QueryFormItemPaginationProps>;
|
|
24
|
+
default: () => {};
|
|
25
|
+
};
|
|
26
|
+
paginationMap: {
|
|
27
|
+
type: import('vue').PropType<import('./types').QueryFormItemPaginationMap>;
|
|
28
|
+
default: () => {};
|
|
29
|
+
};
|
|
30
|
+
immediate: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
}>> & Readonly<{
|
|
35
|
+
onRequestSuccess?: (payload: import('./types').QueryFormItemRequestSuccessPayload) => any;
|
|
36
|
+
onRequestFailed?: (error: any) => any;
|
|
37
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
38
|
+
requestSuccess: (payload: import('./types').QueryFormItemRequestSuccessPayload) => any;
|
|
39
|
+
requestFailed: (error: any) => any;
|
|
40
|
+
}, import('vue').PublicProps, {
|
|
41
|
+
mode: import('./types').QueryFormItemMode;
|
|
42
|
+
immediate: boolean;
|
|
43
|
+
pagination: boolean;
|
|
44
|
+
paginationProps: Partial<import('element-plus').PaginationProps>;
|
|
45
|
+
clearOnDataChange: boolean;
|
|
46
|
+
queryFormProps: import('./types').QueryFormItemQueryProps;
|
|
47
|
+
paginationMap: import('./types').QueryFormItemPaginationMap;
|
|
48
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
49
|
+
P: {};
|
|
50
|
+
B: {};
|
|
51
|
+
D: {};
|
|
52
|
+
C: {};
|
|
53
|
+
M: {};
|
|
54
|
+
Defaults: {};
|
|
55
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
56
|
+
mode: {
|
|
57
|
+
type: import('vue').PropType<import('./types').QueryFormItemMode>;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
request: import('vue').PropType<import('./types').QueryFormItemRequest>;
|
|
61
|
+
clearOnDataChange: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
querySchema: import('vue').PropType<import('@formily/json-schema').ISchema>;
|
|
66
|
+
queryFormProps: {
|
|
67
|
+
type: import('vue').PropType<import('./types').QueryFormItemQueryProps>;
|
|
68
|
+
default: () => {};
|
|
69
|
+
};
|
|
70
|
+
pagination: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
paginationProps: {
|
|
75
|
+
type: import('vue').PropType<import('./types').QueryFormItemPaginationProps>;
|
|
76
|
+
default: () => {};
|
|
77
|
+
};
|
|
78
|
+
paginationMap: {
|
|
79
|
+
type: import('vue').PropType<import('./types').QueryFormItemPaginationMap>;
|
|
80
|
+
default: () => {};
|
|
81
|
+
};
|
|
82
|
+
immediate: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
}>> & Readonly<{
|
|
87
|
+
onRequestSuccess?: (payload: import('./types').QueryFormItemRequestSuccessPayload) => any;
|
|
88
|
+
onRequestFailed?: (error: any) => any;
|
|
89
|
+
}>, {}, {}, {}, {}, {
|
|
90
|
+
mode: import('./types').QueryFormItemMode;
|
|
91
|
+
immediate: boolean;
|
|
92
|
+
pagination: boolean;
|
|
93
|
+
paginationProps: Partial<import('element-plus').PaginationProps>;
|
|
94
|
+
clearOnDataChange: boolean;
|
|
95
|
+
queryFormProps: import('./types').QueryFormItemQueryProps;
|
|
96
|
+
paginationMap: import('./types').QueryFormItemPaginationMap;
|
|
97
|
+
}>;
|
|
98
|
+
__isFragment?: never;
|
|
99
|
+
__isTeleport?: never;
|
|
100
|
+
__isSuspense?: never;
|
|
101
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
102
|
+
mode: {
|
|
103
|
+
type: import('vue').PropType<import('./types').QueryFormItemMode>;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
request: import('vue').PropType<import('./types').QueryFormItemRequest>;
|
|
107
|
+
clearOnDataChange: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
111
|
+
querySchema: import('vue').PropType<import('@formily/json-schema').ISchema>;
|
|
112
|
+
queryFormProps: {
|
|
113
|
+
type: import('vue').PropType<import('./types').QueryFormItemQueryProps>;
|
|
114
|
+
default: () => {};
|
|
115
|
+
};
|
|
116
|
+
pagination: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
default: boolean;
|
|
119
|
+
};
|
|
120
|
+
paginationProps: {
|
|
121
|
+
type: import('vue').PropType<import('./types').QueryFormItemPaginationProps>;
|
|
122
|
+
default: () => {};
|
|
123
|
+
};
|
|
124
|
+
paginationMap: {
|
|
125
|
+
type: import('vue').PropType<import('./types').QueryFormItemPaginationMap>;
|
|
126
|
+
default: () => {};
|
|
127
|
+
};
|
|
128
|
+
immediate: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: boolean;
|
|
131
|
+
};
|
|
132
|
+
}>> & Readonly<{
|
|
133
|
+
onRequestSuccess?: (payload: import('./types').QueryFormItemRequestSuccessPayload) => any;
|
|
134
|
+
onRequestFailed?: (error: any) => any;
|
|
135
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
136
|
+
requestSuccess: (payload: import('./types').QueryFormItemRequestSuccessPayload) => any;
|
|
137
|
+
requestFailed: (error: any) => any;
|
|
138
|
+
}, string, {
|
|
139
|
+
mode: import('./types').QueryFormItemMode;
|
|
140
|
+
immediate: boolean;
|
|
141
|
+
pagination: boolean;
|
|
142
|
+
paginationProps: Partial<import('element-plus').PaginationProps>;
|
|
143
|
+
clearOnDataChange: boolean;
|
|
144
|
+
queryFormProps: import('./types').QueryFormItemQueryProps;
|
|
145
|
+
paginationMap: import('./types').QueryFormItemPaginationMap;
|
|
146
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
147
|
+
$slots: {
|
|
148
|
+
default?(_: {}): any;
|
|
149
|
+
};
|
|
150
|
+
});
|
|
151
|
+
export default QueryFormItem;
|