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