@aplus-frontend/ui 7.10.5 → 7.11.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/es/index.mjs +93 -91
- package/es/src/ag-grid/editable/form-item.vue.mjs +75 -63
- package/es/src/ag-grid/editable/index.vue.mjs +80 -72
- package/es/src/ag-grid/editable/interface.d.ts +2 -1
- package/es/src/ag-grid/editable/utils.d.ts +7 -0
- package/es/src/ag-grid/editable/utils.mjs +32 -17
- package/es/src/ap-form/ap-form.vue2.mjs +144 -153
- package/es/src/ap-form/utils/transform.d.ts +6 -0
- package/es/src/ap-form/utils/transform.mjs +30 -0
- package/es/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +147 -110
- package/es/src/business/ap-appendix/interface.d.ts +4 -0
- package/es/src/business/ap-appendix/style/index.mjs +56 -34
- package/es/src/business/ap-attachment/ApAttachment.mjs +112 -89
- package/es/src/business/ap-attachment/style/index.mjs +21 -7
- package/es/src/business/ap-file-preview/ap-file-preview.vue.d.ts +4 -0
- package/es/src/business/ap-file-preview/ap-file-preview.vue.mjs +4 -0
- package/es/src/business/ap-file-preview/ap-file-preview.vue2.mjs +103 -0
- package/es/src/business/ap-file-preview/components/error-result/index.vue.d.ts +6 -0
- package/es/src/business/ap-file-preview/components/error-result/index.vue.mjs +4 -0
- package/es/src/business/ap-file-preview/components/error-result/index.vue2.mjs +40 -0
- package/es/src/business/ap-file-preview/icons/not-exist-icon.vue.d.ts +3 -0
- package/es/src/business/ap-file-preview/icons/not-exist-icon.vue.mjs +20 -0
- package/es/src/business/ap-file-preview/icons/not-preview-icon.vue.d.ts +3 -0
- package/es/src/business/ap-file-preview/icons/not-preview-icon.vue.mjs +20 -0
- package/es/src/business/ap-file-preview/index.d.ts +7 -0
- package/es/src/business/ap-file-preview/index.mjs +8 -0
- package/es/src/business/ap-file-preview/interface.d.ts +43 -0
- package/es/src/business/ap-file-preview/style/index.d.ts +5 -0
- package/es/src/business/ap-file-preview/style/index.mjs +46 -0
- package/es/src/business/ap-file-preview/utils/create-file-preview-modal.d.ts +2 -0
- package/es/src/business/ap-file-preview/utils/create-file-preview-modal.mjs +18 -0
- package/es/src/business/ap-file-preview/utils/default-parser-plugin.d.ts +4 -0
- package/es/src/business/ap-file-preview/utils/default-parser-plugin.mjs +48 -0
- package/es/src/business/ap-image/ApImage.vue2.mjs +16 -16
- package/es/src/business/ap-upload/apUpload.vue.d.ts +1 -1
- package/es/src/business/ap-upload/apUploadTypes.d.ts +2 -2
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +94 -82
- package/es/src/business/ap-upload/style/multiple-file.mjs +6 -3
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +16 -14
- package/es/src/config-provider/config-provider-props.d.ts +6 -0
- package/es/src/config-provider/config-provider-props.mjs +6 -2
- package/es/src/config-provider/config-provider.d.ts +17 -1
- package/es/src/config-provider/config-provider.mjs +24 -23
- package/es/src/config-provider/hooks/use-global-config.d.ts +7 -0
- package/es/src/config-provider/index.d.ts +31 -3
- package/es/src/index.mjs +74 -72
- package/es/src/locale/lang/en.mjs +5 -0
- package/es/src/locale/lang/zh-cn.mjs +5 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/editable/interface.d.ts +2 -1
- package/lib/src/ag-grid/editable/utils.d.ts +7 -0
- package/lib/src/ag-grid/editable/utils.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/utils/transform.d.ts +6 -0
- package/lib/src/ap-form/utils/transform.js +1 -0
- package/lib/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-appendix/interface.d.ts +4 -0
- package/lib/src/business/ap-appendix/style/index.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-file-preview/ap-file-preview.vue.d.ts +4 -0
- package/lib/src/business/ap-file-preview/ap-file-preview.vue.js +1 -0
- package/lib/src/business/ap-file-preview/ap-file-preview.vue2.js +1 -0
- package/lib/src/business/ap-file-preview/components/error-result/index.vue.d.ts +6 -0
- package/lib/src/business/ap-file-preview/components/error-result/index.vue.js +1 -0
- package/lib/src/business/ap-file-preview/components/error-result/index.vue2.js +1 -0
- package/lib/src/business/ap-file-preview/icons/not-exist-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-file-preview/icons/not-exist-icon.vue.js +1 -0
- package/lib/src/business/ap-file-preview/icons/not-preview-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-file-preview/icons/not-preview-icon.vue.js +1 -0
- package/lib/src/business/ap-file-preview/index.d.ts +7 -0
- package/lib/src/business/ap-file-preview/index.js +1 -0
- package/lib/src/business/ap-file-preview/interface.d.ts +43 -0
- package/lib/src/business/ap-file-preview/style/index.d.ts +5 -0
- package/lib/src/business/ap-file-preview/style/index.js +1 -0
- package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.d.ts +2 -0
- package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.js +1 -0
- package/lib/src/business/ap-file-preview/utils/default-parser-plugin.d.ts +4 -0
- package/lib/src/business/ap-file-preview/utils/default-parser-plugin.js +1 -0
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-upload/apUpload.vue.d.ts +1 -1
- package/lib/src/business/ap-upload/apUploadTypes.d.ts +2 -2
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/style/multiple-file.js +1 -1
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +6 -0
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +17 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +7 -0
- package/lib/src/config-provider/index.d.ts +31 -3
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useUrlSearchParams as
|
|
4
|
-
import { isArray as
|
|
5
|
-
import { useDevWarning as
|
|
6
|
-
import { getRouteType as
|
|
7
|
-
import { INTERNAL_FORM_INSTANCE_MARK as
|
|
8
|
-
import { useProvideForm as
|
|
9
|
-
import { useInjectFormProvider as
|
|
10
|
-
import { getModelValue as
|
|
11
|
-
import { genParams as
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
|
|
1
|
+
import { defineComponent as Y, reactive as Z, shallowRef as z, ref as ee, unref as g, nextTick as te, toRaw as U, watch as re, onWatcherCleanup as oe, computed as ne, createBlock as ie, openBlock as le, mergeProps as ae, withCtx as se, renderSlot as ue } from "vue";
|
|
2
|
+
import { Form as fe } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useUrlSearchParams as ce } from "@vueuse/core";
|
|
4
|
+
import { isArray as P, cloneDeep as b, isEqual as de, omit as ge } from "lodash-unified";
|
|
5
|
+
import { useDevWarning as pe } from "../utils/warning.mjs";
|
|
6
|
+
import { getRouteType as me } from "../utils/index.mjs";
|
|
7
|
+
import { INTERNAL_FORM_INSTANCE_MARK as E } from "./constant.mjs";
|
|
8
|
+
import { useProvideForm as he } from "./context.mjs";
|
|
9
|
+
import { useInjectFormProvider as Fe } from "./provider/context.mjs";
|
|
10
|
+
import { getModelValue as x } from "./utils/get.mjs";
|
|
11
|
+
import { genParams as R, setToParams as O } from "./utils/params.mjs";
|
|
12
|
+
import ye from "./utils/set.mjs";
|
|
13
|
+
import { transformValues as h } from "./utils/transform.mjs";
|
|
14
|
+
import { isDef as F } from "../utils/is.mjs";
|
|
15
|
+
const Ee = /* @__PURE__ */ Y({
|
|
15
16
|
name: "ApForm",
|
|
16
17
|
__name: "ap-form",
|
|
17
18
|
props: {
|
|
@@ -43,193 +44,183 @@ const xe = /* @__PURE__ */ te({
|
|
|
43
44
|
syncToUrl: { type: [Boolean, Function], default: !1 },
|
|
44
45
|
syncToUrlPriority: { type: Boolean }
|
|
45
46
|
},
|
|
46
|
-
setup(
|
|
47
|
-
const
|
|
48
|
-
function
|
|
49
|
-
if (
|
|
50
|
-
let
|
|
51
|
-
for (let
|
|
52
|
-
e[
|
|
53
|
-
|
|
47
|
+
setup(W, { expose: j }) {
|
|
48
|
+
const r = W;
|
|
49
|
+
function y(e, t, o = !0, i) {
|
|
50
|
+
if (P(e)) {
|
|
51
|
+
let l = n;
|
|
52
|
+
for (let d = 0; d < e.length - 1; d++)
|
|
53
|
+
e[d] in l || (l[e[d]] = {}), l = l[e[d]];
|
|
54
|
+
i ? i(l, e[e.length - 1]) : l[e[e.length - 1]] = t;
|
|
54
55
|
} else
|
|
55
|
-
|
|
56
|
-
let
|
|
57
|
-
if (
|
|
58
|
-
const
|
|
59
|
-
|
|
56
|
+
i ? i(n, e) : n[e] = t;
|
|
57
|
+
let A = P(e) ? e[0] : e;
|
|
58
|
+
if (o) {
|
|
59
|
+
const l = { [A]: n[A] };
|
|
60
|
+
p.triggerFormChange(r.name, l), r.onValuesChange?.(l, n, e);
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
+
m();
|
|
62
63
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
64
|
+
const a = z(), T = ce(me()), p = Fe(), k = pe("ApForm"), V = ee(
|
|
65
|
+
r.syncToUrl ? R(r.syncToUrl, T, "get") : {}
|
|
65
66
|
);
|
|
66
|
-
let
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
function
|
|
70
|
-
const e =
|
|
71
|
-
return
|
|
67
|
+
let s = b(M()), u = {};
|
|
68
|
+
const n = Z(M());
|
|
69
|
+
let c = [];
|
|
70
|
+
function M() {
|
|
71
|
+
const e = r.initialValues || {};
|
|
72
|
+
return r.syncToUrlPriority ? {
|
|
72
73
|
...e,
|
|
73
|
-
...
|
|
74
|
+
...g(V)
|
|
74
75
|
} : {
|
|
75
|
-
...
|
|
76
|
+
...g(V),
|
|
76
77
|
...e
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
-
const t =
|
|
81
|
-
|
|
80
|
+
function N(e) {
|
|
81
|
+
const t = h(
|
|
82
|
+
e,
|
|
83
|
+
u,
|
|
84
|
+
f
|
|
85
|
+
);
|
|
86
|
+
p.triggerFormFinish(r.name, e), r.syncToUrl && O(T, R(r.syncToUrl, t, "set")), r.onFinish?.(t);
|
|
82
87
|
}
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
Object.keys(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
const S = async () => {
|
|
89
|
+
a.value?.resetFields(), await te(() => {
|
|
90
|
+
Object.keys(n).forEach((e) => delete n[e]), Object.assign(n, b(s)), m(), r.syncToUrl && O(
|
|
91
|
+
T,
|
|
92
|
+
R(
|
|
93
|
+
r.syncToUrl,
|
|
94
|
+
h(
|
|
95
|
+
s,
|
|
96
|
+
u,
|
|
97
|
+
f
|
|
98
|
+
),
|
|
90
99
|
"set"
|
|
91
100
|
)
|
|
92
101
|
);
|
|
93
102
|
});
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
const
|
|
103
|
+
}, q = (e) => {
|
|
104
|
+
a.value?.clearValidate(e);
|
|
105
|
+
}, D = (e, t) => a.value?.validateFields(e, t), K = async (e, t) => {
|
|
106
|
+
const o = await a.value?.validateFields(
|
|
98
107
|
e,
|
|
99
108
|
t
|
|
100
109
|
);
|
|
101
|
-
return
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
110
|
+
return h(
|
|
111
|
+
o,
|
|
112
|
+
u,
|
|
113
|
+
f
|
|
114
|
+
);
|
|
115
|
+
}, f = (e) => e === !0 ? U(n) : a.value?.getFieldsValue(e), L = (e) => {
|
|
116
|
+
const t = f(e);
|
|
117
|
+
return h(t, u, f);
|
|
118
|
+
}, $ = (e, t) => a.value?.validate(e, t), G = (e, t = {}) => {
|
|
119
|
+
a.value?.scrollToField(e, t);
|
|
120
|
+
}, H = (e) => {
|
|
121
|
+
Object.assign(n, e), m();
|
|
122
|
+
}, v = (e, t, o = !0, i) => {
|
|
123
|
+
y(e, t, o, i), m();
|
|
111
124
|
};
|
|
112
|
-
function
|
|
113
|
-
return e(
|
|
114
|
-
|
|
125
|
+
function C(e) {
|
|
126
|
+
return e(U(n)), c.push(e), () => {
|
|
127
|
+
c = c.filter((t) => t !== e);
|
|
115
128
|
};
|
|
116
129
|
}
|
|
117
|
-
function
|
|
118
|
-
if (
|
|
119
|
-
let
|
|
120
|
-
for (let
|
|
121
|
-
|
|
122
|
-
|
|
130
|
+
function I(e, t) {
|
|
131
|
+
if (P(e)) {
|
|
132
|
+
let o = s;
|
|
133
|
+
for (let i = 0; i < e.length - 1; i++)
|
|
134
|
+
F(o[e[i]]) || (o[e[i]] = {}), o = o[e[i]];
|
|
135
|
+
o[e[e.length - 1]] = t;
|
|
123
136
|
} else
|
|
124
|
-
|
|
137
|
+
s[e] = t;
|
|
125
138
|
}
|
|
126
|
-
function
|
|
127
|
-
if (!
|
|
139
|
+
function J(e, t) {
|
|
140
|
+
if (!F(e) || !F(t))
|
|
128
141
|
return;
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
142
|
+
const o = x(s, t);
|
|
143
|
+
if (de(o, e))
|
|
131
144
|
return;
|
|
132
|
-
const
|
|
133
|
-
|
|
145
|
+
const i = x(g(V), t);
|
|
146
|
+
F(i) && r.syncToUrlPriority || (y(t, e, !1), I(t, e));
|
|
134
147
|
}
|
|
135
|
-
function
|
|
136
|
-
t && (
|
|
137
|
-
|
|
148
|
+
function Q(e, t) {
|
|
149
|
+
t && (u = ye(
|
|
150
|
+
u,
|
|
138
151
|
[e].flat(1),
|
|
139
152
|
t,
|
|
140
153
|
!0
|
|
141
154
|
));
|
|
142
155
|
}
|
|
143
|
-
function
|
|
144
|
-
|
|
156
|
+
function B({ initialValue: e, name: t, transform: o }) {
|
|
157
|
+
J(e, t), Q(t, o);
|
|
145
158
|
}
|
|
146
|
-
function
|
|
147
|
-
return
|
|
159
|
+
function _() {
|
|
160
|
+
return s;
|
|
148
161
|
}
|
|
149
|
-
function
|
|
150
|
-
if (
|
|
151
|
-
e ===
|
|
162
|
+
function X(e) {
|
|
163
|
+
if (k(
|
|
164
|
+
e === E,
|
|
152
165
|
"usage",
|
|
153
166
|
"getInternalInstance should only used at internal"
|
|
154
|
-
), e ===
|
|
167
|
+
), e === E)
|
|
155
168
|
return {
|
|
156
|
-
registerField:
|
|
157
|
-
registerWatch:
|
|
158
|
-
setFieldValue:
|
|
159
|
-
getInitialValues:
|
|
160
|
-
updateInitialModel:
|
|
169
|
+
registerField: B,
|
|
170
|
+
registerWatch: C,
|
|
171
|
+
setFieldValue: v,
|
|
172
|
+
getInitialValues: _,
|
|
173
|
+
updateInitialModel: I
|
|
161
174
|
};
|
|
162
175
|
}
|
|
163
|
-
function
|
|
164
|
-
if (
|
|
165
|
-
const e =
|
|
166
|
-
|
|
176
|
+
function m() {
|
|
177
|
+
if (c.length) {
|
|
178
|
+
const e = U(n);
|
|
179
|
+
c.forEach((t) => {
|
|
167
180
|
t(e);
|
|
168
181
|
});
|
|
169
182
|
}
|
|
170
183
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const c = p(
|
|
185
|
-
a,
|
|
186
|
-
i
|
|
187
|
-
);
|
|
188
|
-
r[o] = c;
|
|
189
|
-
} else
|
|
190
|
-
r[o] = a;
|
|
191
|
-
}), r;
|
|
192
|
-
}
|
|
193
|
-
const O = {
|
|
194
|
-
resetFields: L,
|
|
195
|
-
clearValidate: $,
|
|
196
|
-
validateFields: k,
|
|
197
|
-
getFieldsValue: I,
|
|
198
|
-
validate: J,
|
|
199
|
-
scrollToField: Q,
|
|
200
|
-
setFieldsValue: X,
|
|
201
|
-
setFieldValue: U,
|
|
202
|
-
registerWatch: P,
|
|
203
|
-
validateFieldsReturnTransformed: G,
|
|
204
|
-
getFieldsValueTransformed: H,
|
|
205
|
-
getInternalInstance: z
|
|
184
|
+
const w = {
|
|
185
|
+
resetFields: S,
|
|
186
|
+
clearValidate: q,
|
|
187
|
+
validateFields: D,
|
|
188
|
+
getFieldsValue: f,
|
|
189
|
+
validate: $,
|
|
190
|
+
scrollToField: G,
|
|
191
|
+
setFieldsValue: H,
|
|
192
|
+
setFieldValue: v,
|
|
193
|
+
registerWatch: C,
|
|
194
|
+
validateFieldsReturnTransformed: K,
|
|
195
|
+
getFieldsValueTransformed: L,
|
|
196
|
+
getInternalInstance: X
|
|
206
197
|
};
|
|
207
|
-
return
|
|
208
|
-
() =>
|
|
198
|
+
return re(
|
|
199
|
+
() => r.name,
|
|
209
200
|
(e) => {
|
|
210
|
-
e && (
|
|
211
|
-
|
|
201
|
+
e && (p.registerForm(e, w), oe(() => {
|
|
202
|
+
p.unregisterForm(r.name);
|
|
212
203
|
}));
|
|
213
204
|
},
|
|
214
205
|
{
|
|
215
206
|
immediate: !0
|
|
216
207
|
}
|
|
217
|
-
),
|
|
218
|
-
model:
|
|
219
|
-
updateModel:
|
|
208
|
+
), he({
|
|
209
|
+
model: ne(() => n),
|
|
210
|
+
updateModel: y,
|
|
220
211
|
internalInstance: {
|
|
221
|
-
registerWatch:
|
|
222
|
-
registerField:
|
|
223
|
-
setFieldValue:
|
|
224
|
-
getInitialValues:
|
|
225
|
-
updateInitialModel:
|
|
212
|
+
registerWatch: C,
|
|
213
|
+
registerField: B,
|
|
214
|
+
setFieldValue: v,
|
|
215
|
+
getInitialValues: _,
|
|
216
|
+
updateInitialModel: I
|
|
226
217
|
}
|
|
227
|
-
}),
|
|
218
|
+
}), j(w), (e, t) => (le(), ie(g(fe), ae(
|
|
228
219
|
{
|
|
229
220
|
ref_key: "formRef",
|
|
230
|
-
ref:
|
|
221
|
+
ref: a
|
|
231
222
|
},
|
|
232
|
-
|
|
223
|
+
g(ge)(r, [
|
|
233
224
|
"initialValues",
|
|
234
225
|
"onValuesChange",
|
|
235
226
|
"onFinish",
|
|
@@ -237,18 +228,18 @@ const xe = /* @__PURE__ */ te({
|
|
|
237
228
|
"syncToUrlPriority"
|
|
238
229
|
]),
|
|
239
230
|
{
|
|
240
|
-
model:
|
|
231
|
+
model: n,
|
|
241
232
|
"data-form-name": e.name,
|
|
242
|
-
onFinish:
|
|
233
|
+
onFinish: N
|
|
243
234
|
}
|
|
244
235
|
), {
|
|
245
|
-
default:
|
|
246
|
-
|
|
236
|
+
default: se(() => [
|
|
237
|
+
ue(e.$slots, "default")
|
|
247
238
|
]),
|
|
248
239
|
_: 3
|
|
249
240
|
}, 16, ["model", "data-form-name"]));
|
|
250
241
|
}
|
|
251
242
|
});
|
|
252
243
|
export {
|
|
253
|
-
|
|
244
|
+
Ee as default
|
|
254
245
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApFormExpose, ApFormItemTransformType } from '../interface';
|
|
2
|
+
interface TransformFnMapType {
|
|
3
|
+
[key: string]: ApFormItemTransformType | TransformFnMapType;
|
|
4
|
+
}
|
|
5
|
+
export declare function transformValues(values: any, transformCachedConfig: TransformFnMapType, getFieldsValue?: ApFormExpose['getFieldsValue']): any;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { isArray as i, isFunction as e, isPlainObject as m } from "lodash-unified";
|
|
2
|
+
function p(f, l, c) {
|
|
3
|
+
if (f == null)
|
|
4
|
+
return;
|
|
5
|
+
let r = i(f) ? [] : {};
|
|
6
|
+
return Object.keys(f).forEach((n) => {
|
|
7
|
+
const s = f[n], o = l?.[n], a = e(o) ? o : o?.transformer, u = e(o) ? !0 : o?.flat;
|
|
8
|
+
if (e(a)) {
|
|
9
|
+
const t = a(
|
|
10
|
+
s,
|
|
11
|
+
c ? { getFieldsValue: c } : void 0
|
|
12
|
+
);
|
|
13
|
+
u ? i(t) && i(r) ? r = [...r, ...t] : m(t) && m(r) ? r = {
|
|
14
|
+
...r,
|
|
15
|
+
...t
|
|
16
|
+
} : r[n] = t : r[n] = t;
|
|
17
|
+
} else if (m(s) || i(s)) {
|
|
18
|
+
const t = p(
|
|
19
|
+
s,
|
|
20
|
+
o,
|
|
21
|
+
c
|
|
22
|
+
);
|
|
23
|
+
r[n] = t;
|
|
24
|
+
} else
|
|
25
|
+
r[n] = s;
|
|
26
|
+
}), r;
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
p as transformValues
|
|
30
|
+
};
|
|
@@ -20,8 +20,8 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
|
|
|
20
20
|
boxShadow: boolean;
|
|
21
21
|
bordered: boolean;
|
|
22
22
|
hoverable: boolean;
|
|
23
|
-
gutter: ApProCardGutter | ApProCardGutter[];
|
|
24
23
|
ghost: boolean;
|
|
24
|
+
gutter: ApProCardGutter | ApProCardGutter[];
|
|
25
25
|
collapsible: boolean;
|
|
26
26
|
headerBordered: boolean;
|
|
27
27
|
defaultCollapsed: boolean;
|