@aplus-frontend/ui 0.5.22 → 0.5.24

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.
Files changed (31) hide show
  1. package/es/src/ap-form/ap-form.vue.d.ts +2 -2
  2. package/es/src/ap-form/ap-form.vue2.mjs +124 -124
  3. package/es/src/ap-form/drawer-form/index.vue.d.ts +5 -5
  4. package/es/src/ap-form/interface.d.ts +3 -2
  5. package/es/src/ap-form/modal-form/index.vue.d.ts +5 -5
  6. package/es/src/ap-form/search-form/index.vue.d.ts +5 -5
  7. package/es/src/ap-grid/editable/form-item.vue.mjs +65 -61
  8. package/es/src/ap-grid/editable/index.vue.mjs +86 -81
  9. package/es/src/ap-grid/editable/interface.d.ts +1 -1
  10. package/es/src/ap-grid/index.vue.mjs +22 -22
  11. package/es/src/ap-grid/interface.d.ts +4 -0
  12. package/es/src/ap-grid/utils/table.d.ts +1 -1
  13. package/es/src/ap-grid/utils/table.mjs +42 -41
  14. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +108 -102
  15. package/es/src/work-order-modal/work-order-modal.vue.d.ts +3 -3
  16. package/lib/src/ap-form/ap-form.vue.d.ts +2 -2
  17. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  18. package/lib/src/ap-form/drawer-form/index.vue.d.ts +5 -5
  19. package/lib/src/ap-form/interface.d.ts +3 -2
  20. package/lib/src/ap-form/modal-form/index.vue.d.ts +5 -5
  21. package/lib/src/ap-form/search-form/index.vue.d.ts +5 -5
  22. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  23. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  24. package/lib/src/ap-grid/editable/interface.d.ts +1 -1
  25. package/lib/src/ap-grid/index.vue.js +1 -1
  26. package/lib/src/ap-grid/interface.d.ts +4 -0
  27. package/lib/src/ap-grid/utils/table.d.ts +1 -1
  28. package/lib/src/ap-grid/utils/table.js +1 -1
  29. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  30. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +3 -3
  31. package/package.json +6 -6
@@ -1,4 +1,4 @@
1
- import { ApFormProps, WatchFunc, ApFormInternalInstance } from './interface';
1
+ import { ApFormProps, UpdateModelOptimizeFn, WatchFunc, ApFormInternalInstance } from './interface';
2
2
  import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
3
3
  import { Recordable } from '../type';
4
4
  import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
@@ -655,7 +655,7 @@ declare function __VLS_template(): {
655
655
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
656
656
  declare const __VLS_component: DefineComponent<ApFormProps, {
657
657
  setFieldsValue: (fields: Partial<any>) => void;
658
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
658
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
659
659
  resetFields: () => Promise<void>;
660
660
  clearValidate: (name?: NamePath) => void;
661
661
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1,14 +1,14 @@
1
- import { defineComponent as J, reactive as Q, ref as O, unref as h, nextTick as X, toRaw as j, watch as Y, onWatcherCleanup as Z, computed as ee, createBlock as te, openBlock as re, mergeProps as le, withCtx as oe, renderSlot as ie } from "vue";
2
- import { Form as ne } from "@aplus-frontend/antdv";
3
- import { useProvideForm as se } from "./context.mjs";
4
- import { isArray as f, cloneDeep as ae, isFunction as R, isPlainObject as _, omit as ue } from "lodash-unified";
1
+ import { defineComponent as Q, reactive as X, ref as j, unref as p, nextTick as Y, toRaw as x, watch as Z, onWatcherCleanup as z, computed as ee, createBlock as te, openBlock as re, mergeProps as le, withCtx as oe, renderSlot as se } from "vue";
2
+ import { Form as ie } from "@aplus-frontend/antdv";
3
+ import { useProvideForm as ne } from "./context.mjs";
4
+ import { isArray as f, cloneDeep as ae, isFunction as _, isPlainObject as B, omit as ue } from "lodash-unified";
5
5
  import { useUrlSearchParams as ce } from "@vueuse/core";
6
6
  import { INTERNAL_FORM_INSTANCE_MARK as fe } from "./constant.mjs";
7
- import { getRouteType as de, isDef as T } from "../utils/index.mjs";
8
- import Fe from "./utils/set.mjs";
9
- import { genParams as B, setToParams as x } from "./utils/params.mjs";
10
- import { useInjectFormProvider as ge } from "./provider/context.mjs";
11
- const Re = /* @__PURE__ */ J({
7
+ import { getRouteType as de, isDef as V } from "../utils/index.mjs";
8
+ import ge from "./utils/set.mjs";
9
+ import { genParams as M, setToParams as E } from "./utils/params.mjs";
10
+ import { useInjectFormProvider as Fe } from "./provider/context.mjs";
11
+ const Re = /* @__PURE__ */ Q({
12
12
  __name: "ap-form",
13
13
  props: {
14
14
  layout: { default: "horizontal" },
@@ -38,197 +38,197 @@ const Re = /* @__PURE__ */ J({
38
38
  syncToUrl: { type: [Boolean, Function], default: !1 },
39
39
  syncToUrlPriority: { type: Boolean }
40
40
  },
41
- setup(E, { expose: A }) {
42
- function C(e, t) {
43
- return f(t) ? t.reduce((r, i) => r == null ? void 0 : r[i], e) : e == null ? void 0 : e[t];
41
+ setup(A, { expose: C }) {
42
+ function N(e, t) {
43
+ return f(t) ? t.reduce((r, o) => r == null ? void 0 : r[o], e) : e == null ? void 0 : e[t];
44
44
  }
45
- const o = E;
46
- function V(e, t, r = !0) {
47
- var n;
45
+ const l = A;
46
+ function v(e, t, r = !0, o) {
47
+ var s;
48
48
  if (f(e)) {
49
- let l = s;
50
- for (let u = 0; u < e.length - 1; u++)
51
- e[u] in l || (l[e[u]] = {}), l = l[e[u]];
52
- l[e[e.length - 1]] = t;
49
+ let a = n;
50
+ for (let d = 0; d < e.length - 1; d++)
51
+ e[d] in a || (a[e[d]] = {}), a = a[e[d]];
52
+ o ? o(a, e[e.length - 1]) : a[e[e.length - 1]] = t;
53
53
  } else
54
- s[e] = t;
54
+ o ? o(n, e) : n[e] = t;
55
55
  let i = f(e) ? e[0] : e;
56
56
  if (r) {
57
- const l = { [i]: s[i] };
58
- p.triggerFormChange(o.name, l), (n = o.onValuesChange) == null || n.call(o, l, s, e);
57
+ const a = { [i]: n[i] };
58
+ y.triggerFormChange(l.name, a), (s = l.onValuesChange) == null || s.call(l, a, n, e);
59
59
  }
60
- y();
60
+ T();
61
61
  }
62
- const a = O(), v = ce(de()), p = ge(), I = O(
63
- o.syncToUrl ? B(o.syncToUrl, v, "get") : {}
62
+ const u = j(), I = ce(de()), y = Fe(), P = j(
63
+ l.syncToUrl ? M(l.syncToUrl, I, "get") : {}
64
64
  );
65
- let m = ae(M()), d = {};
66
- const s = Q(M());
65
+ let m = ae(b()), g = {};
66
+ const n = X(b());
67
67
  let F = [];
68
- function M() {
69
- const e = o.initialValues || {};
70
- return o.syncToUrlPriority ? {
68
+ function b() {
69
+ const e = l.initialValues || {};
70
+ return l.syncToUrlPriority ? {
71
71
  ...e,
72
- ...h(I)
72
+ ...p(P)
73
73
  } : {
74
- ...h(I),
74
+ ...p(P),
75
75
  ...e
76
76
  };
77
77
  }
78
- function N(e) {
78
+ function S(e) {
79
79
  var r;
80
- const t = g(e, d);
81
- p.triggerFormFinish(o.name, e), o.syncToUrl && x(v, B(o.syncToUrl, t, "set")), (r = o.onFinish) == null || r.call(o, t);
80
+ const t = h(e, g);
81
+ y.triggerFormFinish(l.name, e), l.syncToUrl && E(I, M(l.syncToUrl, t, "set")), (r = l.onFinish) == null || r.call(l, t);
82
82
  }
83
- const S = async () => {
83
+ const W = async () => {
84
84
  var e;
85
- (e = a.value) == null || e.resetFields(), await X(() => {
86
- Object.keys(s).forEach((t) => delete s[t]), Object.assign(s, m), y(), o.syncToUrl && x(
87
- v,
88
- B(
89
- o.syncToUrl,
90
- g(m, d),
85
+ (e = u.value) == null || e.resetFields(), await Y(() => {
86
+ Object.keys(n).forEach((t) => delete n[t]), Object.assign(n, m), T(), l.syncToUrl && E(
87
+ I,
88
+ M(
89
+ l.syncToUrl,
90
+ h(m, g),
91
91
  "set"
92
92
  )
93
93
  );
94
94
  });
95
- }, W = (e) => {
95
+ }, q = (e) => {
96
96
  var t;
97
- (t = a.value) == null || t.clearValidate(e);
98
- }, q = (e, t) => {
97
+ (t = u.value) == null || t.clearValidate(e);
98
+ }, D = (e, t) => {
99
99
  var r;
100
- return (r = a.value) == null ? void 0 : r.validateFields(e, t);
101
- }, z = async (e, t) => {
102
- var i;
103
- const r = await ((i = a.value) == null ? void 0 : i.validateFields(
100
+ return (r = u.value) == null ? void 0 : r.validateFields(e, t);
101
+ }, L = async (e, t) => {
102
+ var o;
103
+ const r = await ((o = u.value) == null ? void 0 : o.validateFields(
104
104
  e,
105
105
  t
106
106
  ));
107
- return g(r, d);
108
- }, D = (e) => {
107
+ return h(r, g);
108
+ }, k = (e) => {
109
109
  var t;
110
- return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
111
- }, L = (e) => {
110
+ return (t = u.value) == null ? void 0 : t.getFieldsValue(e);
111
+ }, K = (e) => {
112
112
  var r;
113
- const t = (r = a.value) == null ? void 0 : r.getFieldsValue(e);
114
- return g(t, d);
115
- }, k = (e, t) => {
113
+ const t = (r = u.value) == null ? void 0 : r.getFieldsValue(e);
114
+ return h(t, g);
115
+ }, $ = (e, t) => {
116
116
  var r;
117
- return (r = a.value) == null ? void 0 : r.validate(e, t);
118
- }, K = (e, t = {}) => {
117
+ return (r = u.value) == null ? void 0 : r.validate(e, t);
118
+ }, G = (e, t = {}) => {
119
119
  var r;
120
- (r = a.value) == null || r.scrollToField(e, t);
121
- }, $ = (e) => {
122
- Object.assign(s, e), y();
123
- }, P = (e, t, r = !0) => {
124
- V(e, t, r), y();
120
+ (r = u.value) == null || r.scrollToField(e, t);
121
+ }, H = (e) => {
122
+ Object.assign(n, e), T();
123
+ }, U = (e, t, r = !0, o) => {
124
+ v(e, t, r, o), T();
125
125
  };
126
- function U(e, t) {
127
- return t || e(j(s)), F.push(e), () => {
126
+ function R(e, t) {
127
+ return t || e(x(n)), F.push(e), () => {
128
128
  F = F.filter((r) => r !== e);
129
129
  };
130
130
  }
131
- function b({ initialValue: e, name: t, transform: r }) {
132
- if (T(e) && T(t)) {
133
- const i = C(h(I), t);
134
- if (!T(i) || !o.syncToUrlPriority)
135
- if (V(t, e, !1), f(t)) {
136
- let n = m;
137
- for (let l = 0; l < t.length - 1; l++)
138
- T(n[t[l]]) || (n[t[l]] = {}), n = n[t[l]];
139
- n[t[t.length - 1]] = e;
131
+ function w({ initialValue: e, name: t, transform: r }) {
132
+ if (V(e) && V(t)) {
133
+ const o = N(p(P), t);
134
+ if (!V(o) || !l.syncToUrlPriority)
135
+ if (v(t, e, !1), f(t)) {
136
+ let i = m;
137
+ for (let s = 0; s < t.length - 1; s++)
138
+ V(i[t[s]]) || (i[t[s]] = {}), i = i[t[s]];
139
+ i[t[t.length - 1]] = e;
140
140
  } else
141
141
  m[t] = e;
142
142
  }
143
- r && (d = Fe(
144
- d,
143
+ r && (g = ge(
144
+ g,
145
145
  [t].flat(1),
146
146
  r,
147
147
  !0
148
148
  ));
149
149
  }
150
- function G(e) {
150
+ function J(e) {
151
151
  if (e !== fe) {
152
152
  console.warn("getInternalInstance should only used at internal");
153
153
  return;
154
154
  }
155
155
  return {
156
- registerField: b,
157
- registerWatch: U,
158
- setFieldValue: P
156
+ registerField: w,
157
+ registerWatch: R,
158
+ setFieldValue: U
159
159
  };
160
160
  }
161
- function y() {
161
+ function T() {
162
162
  if (F.length) {
163
- const e = j(s);
163
+ const e = x(n);
164
164
  F.forEach((t) => {
165
165
  t(e);
166
166
  });
167
167
  }
168
168
  }
169
- function g(e, t) {
169
+ function h(e, t) {
170
170
  if (e == null)
171
171
  return;
172
172
  let r = f(e) ? [] : {};
173
- return Object.keys(e).forEach((i) => {
174
- const n = e[i], l = t == null ? void 0 : t[i], u = R(l) ? l : l == null ? void 0 : l.transformer, H = R(l) ? !0 : l == null ? void 0 : l.flat;
175
- if (R(u)) {
176
- const c = u(n);
177
- H ? f(c) && f(r) ? r = [...r, ...c] : _(c) && _(r) ? r = {
173
+ return Object.keys(e).forEach((o) => {
174
+ const i = e[o], s = t == null ? void 0 : t[o], a = _(s) ? s : s == null ? void 0 : s.transformer, d = _(s) ? !0 : s == null ? void 0 : s.flat;
175
+ if (_(a)) {
176
+ const c = a(i);
177
+ d ? f(c) && f(r) ? r = [...r, ...c] : B(c) && B(r) ? r = {
178
178
  ...r,
179
179
  ...c
180
- } : r[i] = c : r[i] = c;
181
- } else if (_(n) || f(n)) {
182
- const c = g(
183
- n,
184
- l
180
+ } : r[o] = c : r[o] = c;
181
+ } else if (B(i) || f(i)) {
182
+ const c = h(
183
+ i,
184
+ s
185
185
  );
186
- r[i] = c;
186
+ r[o] = c;
187
187
  } else
188
- r[i] = n;
188
+ r[o] = i;
189
189
  }), r;
190
190
  }
191
- const w = {
192
- resetFields: S,
193
- clearValidate: W,
194
- validateFields: q,
195
- getFieldsValue: D,
196
- validate: k,
197
- scrollToField: K,
198
- setFieldsValue: $,
199
- setFieldValue: P,
200
- registerWatch: U,
201
- validateFieldsReturnTransformed: z,
202
- getFieldsValueTransformed: L,
203
- getInternalInstance: G
191
+ const O = {
192
+ resetFields: W,
193
+ clearValidate: q,
194
+ validateFields: D,
195
+ getFieldsValue: k,
196
+ validate: $,
197
+ scrollToField: G,
198
+ setFieldsValue: H,
199
+ setFieldValue: U,
200
+ registerWatch: R,
201
+ validateFieldsReturnTransformed: L,
202
+ getFieldsValueTransformed: K,
203
+ getInternalInstance: J
204
204
  };
205
- return Y(
206
- () => o.name,
205
+ return Z(
206
+ () => l.name,
207
207
  (e) => {
208
- e && (p.registerForm(e, w), Z(() => {
209
- p.unregisterForm(o.name);
208
+ e && (y.registerForm(e, O), z(() => {
209
+ y.unregisterForm(l.name);
210
210
  }));
211
211
  },
212
212
  {
213
213
  immediate: !0
214
214
  }
215
- ), se({
216
- model: ee(() => s),
217
- updateModel: V,
215
+ ), ne({
216
+ model: ee(() => n),
217
+ updateModel: v,
218
218
  internalInstance: {
219
- registerWatch: U,
220
- registerField: b,
221
- setFieldValue: P
219
+ registerWatch: R,
220
+ registerField: w,
221
+ setFieldValue: U
222
222
  }
223
- }), A(w), (e, t) => (re(), te(h(ne), le({
223
+ }), C(O), (e, t) => (re(), te(p(ie), le({
224
224
  ref_key: "formRef",
225
- ref: a
226
- }, h(ue)(o, ["initialValues", "onValuesChange", "onFinish"]), {
227
- model: s,
228
- onFinish: N
225
+ ref: u
226
+ }, p(ue)(l, ["initialValues", "onValuesChange", "onFinish"]), {
227
+ model: n,
228
+ onFinish: S
229
229
  }), {
230
230
  default: oe(() => [
231
- ie(e.$slots, "default")
231
+ se(e.$slots, "default")
232
232
  ]),
233
233
  _: 3
234
234
  }, 16, ["model"]));
@@ -9,7 +9,7 @@ import { Options } from '../../../node_modules/scroll-into-view-if-needed';
9
9
  import { Recordable } from '../../type';
10
10
  import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
11
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
12
- import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
12
+ import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
13
13
  import { OnCleanup } from '@vue/reactivity';
14
14
  import { PushState } from '@aplus-frontend/antdv/es/drawer';
15
15
  import { MouseEventHandler, KeyboardEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
@@ -771,7 +771,7 @@ declare function __VLS_template(): {
771
771
  $el: any;
772
772
  $options: ComponentOptionsBase<Readonly< ApFormProps> & Readonly<{}>, {
773
773
  setFieldsValue: (fields: Partial<any>) => void;
774
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
774
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
775
775
  resetFields: () => Promise<void>;
776
776
  clearValidate: (name?: NamePath) => void;
777
777
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -820,7 +820,7 @@ declare function __VLS_template(): {
820
820
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
821
821
  }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
822
822
  setFieldsValue: (fields: Partial<any>) => void;
823
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
823
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
824
824
  resetFields: () => Promise<void>;
825
825
  clearValidate: (name?: NamePath) => void;
826
826
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1713,7 +1713,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
1713
1713
  $el: any;
1714
1714
  $options: ComponentOptionsBase<Readonly< ApFormProps> & Readonly<{}>, {
1715
1715
  setFieldsValue: (fields: Partial<any>) => void;
1716
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
1716
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1717
1717
  resetFields: () => Promise<void>;
1718
1718
  clearValidate: (name?: NamePath) => void;
1719
1719
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1762,7 +1762,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
1762
1762
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
1763
1763
  }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
1764
1764
  setFieldsValue: (fields: Partial<any>) => void;
1765
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
1765
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1766
1766
  resetFields: () => Promise<void>;
1767
1767
  clearValidate: (name?: NamePath) => void;
1768
1768
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -58,9 +58,10 @@ export type ApFormProps = Omit<FormProps, 'model' | 'onValuesChange'> & {
58
58
  syncToUrlPriority?: boolean;
59
59
  };
60
60
  export type WatchFunc = (values?: Recordable) => void;
61
+ export type UpdateModelOptimizeFn = (currentModelValue: any, name: string | number) => void;
61
62
  export type ApFormExpose<ModelType = any> = {
62
63
  setFieldsValue: (fields: Partial<ModelType>) => void;
63
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
64
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
64
65
  resetFields: () => Promise<void>;
65
66
  clearValidate: (name?: NamePath) => void;
66
67
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
@@ -117,7 +118,7 @@ export type ApFormInternalInstance = {
117
118
  * @param triggerChange
118
119
  * @returns
119
120
  */
120
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
121
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
121
122
  };
122
123
  export type ApFormItemExpose = FormItemExpose & {
123
124
  /**
@@ -9,7 +9,7 @@ import { RuleObject } from '@aplus-frontend/antdv/es/form';
9
9
  import { Options } from '../../../node_modules/scroll-into-view-if-needed';
10
10
  import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
11
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
12
- import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
12
+ import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
13
13
  import { OnCleanup } from '@vue/reactivity';
14
14
  import { LegacyButtonType, ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
15
15
  import { MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
@@ -771,7 +771,7 @@ declare function __VLS_template(): {
771
771
  $el: any;
772
772
  $options: ComponentOptionsBase<Readonly< ApFormProps> & Readonly<{}>, {
773
773
  setFieldsValue: (fields: Partial<any>) => void;
774
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
774
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
775
775
  resetFields: () => Promise<void>;
776
776
  clearValidate: (name?: NamePath) => void;
777
777
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -820,7 +820,7 @@ declare function __VLS_template(): {
820
820
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
821
821
  }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
822
822
  setFieldsValue: (fields: Partial<any>) => void;
823
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
823
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
824
824
  resetFields: () => Promise<void>;
825
825
  clearValidate: (name?: NamePath) => void;
826
826
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1901,7 +1901,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
1901
1901
  $el: any;
1902
1902
  $options: ComponentOptionsBase<Readonly< ApFormProps> & Readonly<{}>, {
1903
1903
  setFieldsValue: (fields: Partial<any>) => void;
1904
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
1904
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1905
1905
  resetFields: () => Promise<void>;
1906
1906
  clearValidate: (name?: NamePath) => void;
1907
1907
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1950,7 +1950,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
1950
1950
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
1951
1951
  }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
1952
1952
  setFieldsValue: (fields: Partial<any>) => void;
1953
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
1953
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1954
1954
  resetFields: () => Promise<void>;
1955
1955
  clearValidate: (name?: NamePath) => void;
1956
1956
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -9,7 +9,7 @@ import { Options } from '../../../node_modules/scroll-into-view-if-needed';
9
9
  import { Recordable } from '../../type';
10
10
  import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
11
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
12
- import { ApFormProps, ApFormInternalInstance, WatchFunc } from '..';
12
+ import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '..';
13
13
  import { OnCleanup } from '@vue/reactivity';
14
14
  declare function __VLS_template(): {
15
15
  attrs: Partial<{}>;
@@ -769,7 +769,7 @@ declare function __VLS_template(): {
769
769
  $el: any;
770
770
  $options: ComponentOptionsBase<Readonly< ApFormProps> & Readonly<{}>, {
771
771
  setFieldsValue: (fields: Partial<any>) => void;
772
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
772
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
773
773
  resetFields: () => Promise<void>;
774
774
  clearValidate: (name?: NamePath) => void;
775
775
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -818,7 +818,7 @@ declare function __VLS_template(): {
818
818
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
819
819
  }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
820
820
  setFieldsValue: (fields: Partial<any>) => void;
821
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
821
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
822
822
  resetFields: () => Promise<void>;
823
823
  clearValidate: (name?: NamePath) => void;
824
824
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1606,7 +1606,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
1606
1606
  $el: any;
1607
1607
  $options: ComponentOptionsBase<Readonly< ApFormProps> & Readonly<{}>, {
1608
1608
  setFieldsValue: (fields: Partial<any>) => void;
1609
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
1609
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1610
1610
  resetFields: () => Promise<void>;
1611
1611
  clearValidate: (name?: NamePath) => void;
1612
1612
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1655,7 +1655,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
1655
1655
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
1656
1656
  }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
1657
1657
  setFieldsValue: (fields: Partial<any>) => void;
1658
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
1658
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1659
1659
  resetFields: () => Promise<void>;
1660
1660
  clearValidate: (name?: NamePath) => void;
1661
1661
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;