@aplus-frontend/ui 0.6.0-beta.19 → 0.6.0-beta.20

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 (39) hide show
  1. package/es/src/ap-form/ap-form.vue2.mjs +78 -67
  2. package/es/src/business/ap-keep-alive/hook.d.ts +1 -1
  3. package/es/src/business/ap-keep-alive/hook.mjs +13 -11
  4. package/es/src/business/ap-keep-alive/index.d.ts +6 -0
  5. package/es/src/business/ap-keep-alive/interface.d.ts +1 -0
  6. package/es/src/business/ap-keep-alive/interface.mjs +6 -6
  7. package/es/src/business/ap-keep-alive/keep-alive.d.ts +3 -0
  8. package/es/src/business/ap-keep-alive/keep-alive.mjs +55 -55
  9. package/es/src/business/ap-keep-alive/keeper/index.mjs +1 -0
  10. package/es/src/business/ap-view/ap-view.vue2.mjs +109 -101
  11. package/es/src/tests/mock-resize-observer.d.ts +2 -0
  12. package/es/src/tests/utils.d.ts +8 -0
  13. package/es/src/version.d.ts +1 -1
  14. package/es/src/version.mjs +1 -1
  15. package/es/src/work-order-modal/createWorkOrder.d.ts +2 -1
  16. package/es/src/work-order-modal/createWorkOrder.mjs +19 -15
  17. package/es/src/work-order-modal/interfaces.d.ts +4 -0
  18. package/es/src/work-order-modal/work-order-modal.vue.mjs +120 -105
  19. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  20. package/lib/src/business/ap-keep-alive/hook.d.ts +1 -1
  21. package/lib/src/business/ap-keep-alive/hook.js +1 -1
  22. package/lib/src/business/ap-keep-alive/index.d.ts +6 -0
  23. package/lib/src/business/ap-keep-alive/interface.d.ts +1 -0
  24. package/lib/src/business/ap-keep-alive/interface.js +1 -1
  25. package/lib/src/business/ap-keep-alive/keep-alive.d.ts +3 -0
  26. package/lib/src/business/ap-keep-alive/keep-alive.js +1 -1
  27. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  28. package/lib/src/tests/mock-resize-observer.d.ts +2 -0
  29. package/lib/src/tests/utils.d.ts +8 -0
  30. package/lib/src/version.d.ts +1 -1
  31. package/lib/src/version.js +1 -1
  32. package/lib/src/work-order-modal/createWorkOrder.d.ts +2 -1
  33. package/lib/src/work-order-modal/createWorkOrder.js +1 -1
  34. package/lib/src/work-order-modal/interfaces.d.ts +4 -0
  35. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  36. package/package.json +1 -1
  37. package/theme/index.css +1 -1
  38. package/theme/text/index.css +1 -1
  39. package/theme/text/index.less +1 -1
@@ -1,12 +1,12 @@
1
- import { defineComponent as Q, reactive as X, ref as A, unref as p, nextTick as Y, toRaw as _, 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 ne } from "@aplus-frontend/antdv";
1
+ import { defineComponent as Q, reactive as X, ref as E, unref as m, nextTick as Y, toRaw as B, watch as Z, onWatcherCleanup as z, computed as ee, createBlock as te, openBlock as re, mergeProps as oe, withCtx as le, renderSlot as ne } from "vue";
2
+ import { Form as se } from "@aplus-frontend/antdv";
3
3
  import { useProvideForm as ie } from "./context.mjs";
4
- import { isArray as f, cloneDeep as ae, isFunction as B, isPlainObject as M, omit as ue } from "lodash-unified";
4
+ import { isArray as f, cloneDeep as ae, isFunction as M, isPlainObject as _, 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
7
  import { getRouteType as de, isDef as V } from "../utils/index.mjs";
8
8
  import ge from "./utils/set.mjs";
9
- import { genParams as b, setToParams as E } from "./utils/params.mjs";
9
+ import { genParams as b, setToParams as x } from "./utils/params.mjs";
10
10
  import { useInjectFormProvider as Fe } from "./provider/context.mjs";
11
11
  const Re = /* @__PURE__ */ Q({
12
12
  name: "ApForm",
@@ -41,54 +41,54 @@ const Re = /* @__PURE__ */ Q({
41
41
  },
42
42
  setup(C, { expose: N }) {
43
43
  function S(e, t) {
44
- return f(t) ? t.reduce((r, o) => r == null ? void 0 : r[o], e) : e == null ? void 0 : e[t];
44
+ return f(t) ? t.reduce((r, l) => r == null ? void 0 : r[l], e) : e == null ? void 0 : e[t];
45
45
  }
46
- const l = C;
47
- function v(e, t, r = !0, o) {
48
- var s;
46
+ const o = C;
47
+ function v(e, t, r = !0, l) {
48
+ var n;
49
49
  if (f(e)) {
50
- let a = n;
50
+ let a = s;
51
51
  for (let d = 0; d < e.length - 1; d++)
52
52
  e[d] in a || (a[e[d]] = {}), a = a[e[d]];
53
- o ? o(a, e[e.length - 1]) : a[e[e.length - 1]] = t;
53
+ l ? l(a, e[e.length - 1]) : a[e[e.length - 1]] = t;
54
54
  } else
55
- o ? o(n, e) : n[e] = t;
55
+ l ? l(s, e) : s[e] = t;
56
56
  let i = f(e) ? e[0] : e;
57
57
  if (r) {
58
- const a = { [i]: n[i] };
59
- y.triggerFormChange(l.name, a), (s = l.onValuesChange) == null || s.call(l, a, n, e);
58
+ const a = { [i]: s[i] };
59
+ p.triggerFormChange(o.name, a), (n = o.onValuesChange) == null || n.call(o, a, s, e);
60
60
  }
61
61
  T();
62
62
  }
63
- const u = A(), I = ce(de()), y = Fe(), P = A(
64
- l.syncToUrl ? b(l.syncToUrl, I, "get") : {}
63
+ const u = E(), U = ce(de()), p = Fe(), P = E(
64
+ o.syncToUrl ? b(o.syncToUrl, U, "get") : {}
65
65
  );
66
- let m = ae(w()), g = {};
67
- const n = X(w());
66
+ let y = ae(w()), g = {};
67
+ const s = X(w());
68
68
  let F = [];
69
69
  function w() {
70
- const e = l.initialValues || {};
71
- return l.syncToUrlPriority ? {
70
+ const e = o.initialValues || {};
71
+ return o.syncToUrlPriority ? {
72
72
  ...e,
73
- ...p(P)
73
+ ...m(P)
74
74
  } : {
75
- ...p(P),
75
+ ...m(P),
76
76
  ...e
77
77
  };
78
78
  }
79
79
  function W(e) {
80
80
  var r;
81
81
  const t = h(e, g);
82
- y.triggerFormFinish(l.name, e), l.syncToUrl && E(I, b(l.syncToUrl, t, "set")), (r = l.onFinish) == null || r.call(l, t);
82
+ p.triggerFormFinish(o.name, e), o.syncToUrl && x(U, b(o.syncToUrl, t, "set")), (r = o.onFinish) == null || r.call(o, t);
83
83
  }
84
84
  const q = async () => {
85
85
  var e;
86
86
  (e = u.value) == null || e.resetFields(), await Y(() => {
87
- Object.keys(n).forEach((t) => delete n[t]), Object.assign(n, m), T(), l.syncToUrl && E(
88
- I,
87
+ Object.keys(s).forEach((t) => delete s[t]), Object.assign(s, y), T(), o.syncToUrl && x(
88
+ U,
89
89
  b(
90
- l.syncToUrl,
91
- h(m, g),
90
+ o.syncToUrl,
91
+ h(y, g),
92
92
  "set"
93
93
  )
94
94
  );
@@ -100,15 +100,15 @@ const Re = /* @__PURE__ */ Q({
100
100
  var r;
101
101
  return (r = u.value) == null ? void 0 : r.validateFields(e, t);
102
102
  }, K = async (e, t) => {
103
- var o;
104
- const r = await ((o = u.value) == null ? void 0 : o.validateFields(
103
+ var l;
104
+ const r = await ((l = u.value) == null ? void 0 : l.validateFields(
105
105
  e,
106
106
  t
107
107
  ));
108
108
  return h(r, g);
109
109
  }, O = (e) => {
110
110
  var t;
111
- return e === !0 ? _(n) : (t = u.value) == null ? void 0 : t.getFieldsValue(e);
111
+ return e === !0 ? B(s) : (t = u.value) == null ? void 0 : t.getFieldsValue(e);
112
112
  }, L = (e) => {
113
113
  const t = O(e);
114
114
  return h(t, g);
@@ -119,26 +119,26 @@ const Re = /* @__PURE__ */ Q({
119
119
  var r;
120
120
  (r = u.value) == null || r.scrollToField(e, t);
121
121
  }, H = (e) => {
122
- Object.assign(n, e), T();
123
- }, U = (e, t, r = !0, o) => {
124
- v(e, t, r, o), T();
122
+ Object.assign(s, e), T();
123
+ }, I = (e, t, r = !0, l) => {
124
+ v(e, t, r, l), T();
125
125
  };
126
126
  function R(e, t) {
127
- return t || e(_(n)), F.push(e), () => {
127
+ return t || e(B(s)), F.push(e), () => {
128
128
  F = F.filter((r) => r !== e);
129
129
  };
130
130
  }
131
131
  function j({ initialValue: e, name: t, transform: r }) {
132
132
  if (V(e) && V(t)) {
133
- const o = S(p(P), t);
134
- if (!V(o) || !l.syncToUrlPriority)
133
+ const l = S(m(P), t);
134
+ if (!V(l) || !o.syncToUrlPriority)
135
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]];
136
+ let i = y;
137
+ for (let n = 0; n < t.length - 1; n++)
138
+ V(i[t[n]]) || (i[t[n]] = {}), i = i[t[n]];
139
139
  i[t[t.length - 1]] = e;
140
140
  } else
141
- m[t] = e;
141
+ y[t] = e;
142
142
  }
143
143
  r && (g = ge(
144
144
  g,
@@ -155,12 +155,12 @@ const Re = /* @__PURE__ */ Q({
155
155
  return {
156
156
  registerField: j,
157
157
  registerWatch: R,
158
- setFieldValue: U
158
+ setFieldValue: I
159
159
  };
160
160
  }
161
161
  function T() {
162
162
  if (F.length) {
163
- const e = _(n);
163
+ const e = B(s);
164
164
  F.forEach((t) => {
165
165
  t(e);
166
166
  });
@@ -170,25 +170,25 @@ const Re = /* @__PURE__ */ Q({
170
170
  if (e == null)
171
171
  return;
172
172
  let r = f(e) ? [] : {};
173
- return Object.keys(e).forEach((o) => {
174
- const i = e[o], s = t == null ? void 0 : t[o], a = B(s) ? s : s == null ? void 0 : s.transformer, d = B(s) ? !0 : s == null ? void 0 : s.flat;
175
- if (B(a)) {
173
+ return Object.keys(e).forEach((l) => {
174
+ const i = e[l], n = t == null ? void 0 : t[l], a = M(n) ? n : n == null ? void 0 : n.transformer, d = M(n) ? !0 : n == null ? void 0 : n.flat;
175
+ if (M(a)) {
176
176
  const c = a(i);
177
- d ? f(c) && f(r) ? r = [...r, ...c] : M(c) && M(r) ? r = {
177
+ d ? f(c) && f(r) ? r = [...r, ...c] : _(c) && _(r) ? r = {
178
178
  ...r,
179
179
  ...c
180
- } : r[o] = c : r[o] = c;
181
- } else if (M(i) || f(i)) {
180
+ } : r[l] = c : r[l] = c;
181
+ } else if (_(i) || f(i)) {
182
182
  const c = h(
183
183
  i,
184
- s
184
+ n
185
185
  );
186
- r[o] = c;
186
+ r[l] = c;
187
187
  } else
188
- r[o] = i;
188
+ r[l] = i;
189
189
  }), r;
190
190
  }
191
- const x = {
191
+ const A = {
192
192
  resetFields: q,
193
193
  clearValidate: D,
194
194
  validateFields: k,
@@ -196,42 +196,53 @@ const Re = /* @__PURE__ */ Q({
196
196
  validate: $,
197
197
  scrollToField: G,
198
198
  setFieldsValue: H,
199
- setFieldValue: U,
199
+ setFieldValue: I,
200
200
  registerWatch: R,
201
201
  validateFieldsReturnTransformed: K,
202
202
  getFieldsValueTransformed: L,
203
203
  getInternalInstance: J
204
204
  };
205
205
  return Z(
206
- () => l.name,
206
+ () => o.name,
207
207
  (e) => {
208
- e && (y.registerForm(e, x), z(() => {
209
- y.unregisterForm(l.name);
208
+ e && (p.registerForm(e, A), z(() => {
209
+ p.unregisterForm(o.name);
210
210
  }));
211
211
  },
212
212
  {
213
213
  immediate: !0
214
214
  }
215
215
  ), ie({
216
- model: ee(() => n),
216
+ model: ee(() => s),
217
217
  updateModel: v,
218
218
  internalInstance: {
219
219
  registerWatch: R,
220
220
  registerField: j,
221
- setFieldValue: U
221
+ setFieldValue: I
222
222
  }
223
- }), N(x), (e, t) => (re(), te(p(ne), le({
224
- ref_key: "formRef",
225
- ref: u
226
- }, p(ue)(l, ["initialValues", "onValuesChange", "onFinish"]), {
227
- model: n,
228
- onFinish: W
229
- }), {
230
- default: oe(() => [
231
- se(e.$slots, "default")
223
+ }), N(A), (e, t) => (re(), te(m(se), oe(
224
+ {
225
+ ref_key: "formRef",
226
+ ref: u
227
+ },
228
+ m(ue)(o, [
229
+ "initialValues",
230
+ "onValuesChange",
231
+ "onFinish",
232
+ "syncToUrl",
233
+ "syncToUrlPriority"
234
+ ]),
235
+ {
236
+ model: s,
237
+ "data-form-name": e.name,
238
+ onFinish: W
239
+ }
240
+ ), {
241
+ default: le(() => [
242
+ ne(e.$slots, "default")
232
243
  ]),
233
244
  _: 3
234
- }, 16, ["model"]));
245
+ }, 16, ["model", "data-form-name"]));
235
246
  }
236
247
  });
237
248
  export {
@@ -3,7 +3,7 @@ import { CacheInterface, PropertyKeyType } from './interface';
3
3
  type DataModel = {
4
4
  getter: (key?: string) => Promise<any>;
5
5
  setter: (key: string, data: any) => Promise<any>;
6
- has: (key: string) => Promise<any>;
6
+ has: (key?: string) => Promise<any>;
7
7
  };
8
8
  export declare const useApKeepAliveProvide: (cache: CacheInterface, currentModuleKey: Ref<PropertyKeyType>) => void;
9
9
  export declare const useApKeepAliveInject: () => DataModel;
@@ -1,23 +1,25 @@
1
- import { provide as o, nextTick as i, inject as v } from "vue";
2
- const a = Symbol("ApKeepAliveProvideKey"), c = (n, r) => {
3
- o(a, {
1
+ import { provide as v, nextTick as i, inject as o } from "vue";
2
+ const a = Symbol("ApKeepAliveProvideKey"), f = (s, r) => {
3
+ v(a, {
4
4
  getter: async (e) => {
5
5
  await i();
6
- const t = n.get(r.value);
6
+ const t = s.get(r.value);
7
7
  return t ? e ? t == null ? void 0 : t.get(e) : Object.fromEntries(t) : {};
8
8
  },
9
9
  setter: async (e, t) => {
10
10
  await i();
11
- let s = n.get(r.value);
12
- return s || (s = /* @__PURE__ */ new Map(), n.set(r.value, s)), s == null ? void 0 : s.set(e, t);
11
+ let n = s.get(r.value);
12
+ return n || (n = /* @__PURE__ */ new Map(), s.set(r.value, n)), n == null ? void 0 : n.set(e, t);
13
13
  },
14
14
  has: async (e) => {
15
- await i();
16
- const t = n.get(r.value);
17
- return !!(t != null && t.has(e));
15
+ if (await i(), e) {
16
+ const t = s.get(r.value);
17
+ return !!(t != null && t.has(e));
18
+ }
19
+ return s.has(r.value);
18
20
  }
19
21
  });
20
- }, l = () => v(a, {
22
+ }, l = () => o(a, {
21
23
  getter: async () => {
22
24
  },
23
25
  setter: async () => {
@@ -27,5 +29,5 @@ const a = Symbol("ApKeepAliveProvideKey"), c = (n, r) => {
27
29
  });
28
30
  export {
29
31
  l as useApKeepAliveInject,
30
- c as useApKeepAliveProvide
32
+ f as useApKeepAliveProvide
31
33
  };
@@ -14,6 +14,7 @@ declare const ApKeepAlive: {
14
14
  };
15
15
  max: {
16
16
  type: PropType<number>;
17
+ default: number;
17
18
  };
18
19
  exclude: {
19
20
  type: PropType<MatchPattern>;
@@ -28,6 +29,7 @@ declare const ApKeepAlive: {
28
29
  }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
29
30
  [key: string]: any;
30
31
  }>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
32
+ max: number;
31
33
  debug: boolean;
32
34
  stopTags: string[];
33
35
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
@@ -47,6 +49,7 @@ declare const ApKeepAlive: {
47
49
  };
48
50
  max: {
49
51
  type: PropType<number>;
52
+ default: number;
50
53
  };
51
54
  exclude: {
52
55
  type: PropType<MatchPattern>;
@@ -61,6 +64,7 @@ declare const ApKeepAlive: {
61
64
  }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
62
65
  [key: string]: any;
63
66
  }>[] | undefined, {}, {}, {}, {
67
+ max: number;
64
68
  debug: boolean;
65
69
  stopTags: string[];
66
70
  }>;
@@ -77,6 +81,7 @@ declare const ApKeepAlive: {
77
81
  };
78
82
  max: {
79
83
  type: PropType<number>;
84
+ default: number;
80
85
  };
81
86
  exclude: {
82
87
  type: PropType<MatchPattern>;
@@ -91,6 +96,7 @@ declare const ApKeepAlive: {
91
96
  }>> & Readonly<{}>, () => VNode<RendererNode, RendererElement, {
92
97
  [key: string]: any;
93
98
  }>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
99
+ max: number;
94
100
  debug: boolean;
95
101
  stopTags: string[];
96
102
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
@@ -20,6 +20,7 @@ export declare const ApKeepAliveProps: () => {
20
20
  };
21
21
  max: {
22
22
  type: PropType<number>;
23
+ default: number;
23
24
  };
24
25
  exclude: {
25
26
  type: PropType<MatchPattern>;
@@ -4,10 +4,11 @@ const e = () => ({
4
4
  },
5
5
  debug: {
6
6
  type: Boolean,
7
- default: !0
7
+ default: !1
8
8
  },
9
9
  max: {
10
- type: Number
10
+ type: Number,
11
+ default: 30
11
12
  },
12
13
  exclude: {
13
14
  type: Array
@@ -30,10 +31,7 @@ const e = () => ({
30
31
  "APagination",
31
32
  "ApTablePagination",
32
33
  "ApView",
33
- "ApFormItem",
34
- "AFormItem",
35
34
  "ApTitle",
36
- "ap-button",
37
35
  "span",
38
36
  "svg",
39
37
  "iframe",
@@ -44,8 +42,10 @@ const e = () => ({
44
42
  "ApGrid",
45
43
  "ApBatchActionGroup",
46
44
  "ApBatchAction",
47
- "EditableGrid"
45
+ "EditableGrid",
48
46
  //todo EditableGridFormItem 改名
47
+ // 'ApFormItem',
48
+ "AFormItem"
49
49
  // 'AForm', 不能忽略,有嵌套情况
50
50
  ];
51
51
  export {
@@ -10,6 +10,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
10
10
  };
11
11
  max: {
12
12
  type: PropType<number>;
13
+ default: number;
13
14
  };
14
15
  exclude: {
15
16
  type: PropType<MatchPattern>;
@@ -33,6 +34,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
33
34
  };
34
35
  max: {
35
36
  type: PropType<number>;
37
+ default: number;
36
38
  };
37
39
  exclude: {
38
40
  type: PropType<MatchPattern>;
@@ -45,6 +47,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
45
47
  default: () => never[];
46
48
  };
47
49
  }>> & Readonly<{}>, {
50
+ max: number;
48
51
  debug: boolean;
49
52
  stopTags: string[];
50
53
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -6,74 +6,74 @@ import { LruCacher as C } from "./cacher/lru-cacher.mjs";
6
6
  import { forceStopTags as R, ApKeepAliveProps as _ } from "./interface.mjs";
7
7
  import { throttle as S } from "lodash-unified";
8
8
  import { useApKeepAliveProvide as $ } from "./hook.mjs";
9
- const c = console, s = "|", te = j({
9
+ const c = console, a = "|", te = j({
10
10
  name: "ApKeepAlive",
11
11
  inheritAttrs: !1,
12
12
  props: _(),
13
- setup(r, { slots: h }) {
14
- const g = M(), v = (e) => !(r.include && (!e || !D(r.include, e)) || r.exclude && e && D(r.exclude, e)), d = r.store || new C(r.max || 50), u = E("");
13
+ setup(o, { slots: h }) {
14
+ const g = M(), v = (e) => !(o.include && (!e || !D(o.include, e)) || o.exclude && e && D(o.exclude, e)), d = o.store || new C(o.max), u = E("");
15
15
  let m = "";
16
- const k = /* @__PURE__ */ new Set([...R, ...r.stopTags]), N = (e, o = "") => {
16
+ const k = /* @__PURE__ */ new Set([...R, ...o.stopTags]), p = (e, n = "") => {
17
17
  var f;
18
18
  const t = [];
19
19
  if (!e) return t;
20
- const { VnodeName: i, vnodeSubPath: a } = T(
20
+ const { VnodeName: i, vnodeSubPath: s } = T(
21
21
  e,
22
22
  u.value
23
23
  );
24
- a && (o += s + a);
24
+ s && (n += a + s);
25
25
  const l = I[i];
26
26
  if (l) {
27
- const n = l.get(e);
28
- !W(n) && t.push([o, n]);
27
+ const r = l.get(e);
28
+ !W(r) && t.push([n, r]);
29
29
  }
30
30
  if (k.has(i))
31
- return r.debug && c.log("[ stop-VnodeName ] >", i, o), t;
31
+ return o.debug && c.log("[ stop-VnodeName ] >", i, n), t;
32
32
  if (e.children)
33
33
  if (Array.isArray(e.children))
34
- e.children.forEach((n) => {
35
- n = b(n), n && t.push(...N(n, o));
34
+ e.children.forEach((r) => {
35
+ r = b(r), r && t.push(...p(r, n));
36
36
  });
37
37
  else {
38
- const n = K(e.children);
39
- n && t.push(...N(n, o));
38
+ const r = K(e.children);
39
+ r && t.push(...p(r, n));
40
40
  }
41
- return (f = e.component) != null && f.subTree && t.push(...N(e.component.subTree, o)), t;
42
- }, V = async (e, o, t = "") => {
41
+ return (f = e.component) != null && f.subTree && t.push(...p(e.component.subTree, n)), t;
42
+ }, N = async (e, n, t = "") => {
43
43
  var f;
44
- if (!e || !o || (o == null ? void 0 : o.size) < 1) return;
45
- const { VnodeName: i, vnodeSubPath: a } = T(
44
+ if (!e || !n || (n == null ? void 0 : n.size) < 1) return;
45
+ const { VnodeName: i, vnodeSubPath: s } = T(
46
46
  e,
47
47
  u.value
48
48
  );
49
- a && (t += s + a);
49
+ s && (t += a + s);
50
50
  const l = I[i];
51
51
  if (l) {
52
- r.debug && c.log("[ vnkeeper ] >", i, e.key);
53
- const n = t.split(s).slice(-1).join(s), U = o.get(n);
52
+ o.debug && c.log("[ vnkeeper ] >", i, e.key);
53
+ const r = t.split(a).slice(-1).join(a), U = n.get(r);
54
54
  await l.set(e, U);
55
55
  }
56
56
  if (k.has(i)) {
57
- r.debug && c.log("[ stop VnodeName ] >", i, t);
57
+ o.debug && c.log("[ stop VnodeName ] >", i, t);
58
58
  return;
59
59
  }
60
60
  if (e.children)
61
61
  if (Array.isArray(e.children))
62
- e.children.forEach((n) => {
63
- n = b(n), n && V(n, o, t);
62
+ e.children.forEach((r) => {
63
+ r = b(r), r && N(r, n, t);
64
64
  });
65
65
  else {
66
- const n = K(e.children);
67
- n && V(n, o, t);
66
+ const r = K(e.children);
67
+ r && N(r, n, t);
68
68
  }
69
- (f = e.component) != null && f.subTree && V(e.component.subTree, o, t);
70
- }, y = S(() => {
69
+ (f = e.component) != null && f.subTree && N(e.component.subTree, n, t);
70
+ }, V = S(() => {
71
71
  B(() => {
72
- const e = w(g), o = x(e), t = b(o);
72
+ const e = w(g), n = x(e), t = b(n);
73
73
  if (!t || typeof t.type == "string" || (typeof t.type == "object" && "name" in t.type && (m = t.type.name || ""), u.value = t.key || m || "", !v(m)) || !u.value)
74
74
  return;
75
75
  const i = d.get(u.value);
76
- V(t, i), c.log(
76
+ N(t, i), c.log(
77
77
  "resetDataInVNode",
78
78
  g.vnode.key,
79
79
  u.value,
@@ -84,25 +84,25 @@ const c = console, s = "|", te = j({
84
84
  trailing: !1
85
85
  });
86
86
  z(() => {
87
- if (r.debug) {
88
- r.debug && c.log("[ onMounted ] >", r.exclude), A(() => {
89
- y();
87
+ if (o.debug) {
88
+ c.log("[ onMounted ] >", o.exclude), A(() => {
89
+ V();
90
90
  });
91
91
  return;
92
92
  }
93
- y();
93
+ V();
94
94
  }), F(() => {
95
- if (r.debug) {
96
- r.debug && c.log("[ onUpdated ] >", r.exclude), A(() => {
97
- y();
95
+ if (o.debug) {
96
+ c.log("[ onUpdated ] >", o.exclude), A(() => {
97
+ V();
98
98
  });
99
99
  return;
100
100
  }
101
- y();
101
+ V();
102
102
  });
103
- const p = S(() => {
103
+ const y = S(() => {
104
104
  B(() => {
105
- const e = w(g), o = x(e), t = b(o);
105
+ const e = w(g), n = x(e), t = b(n);
106
106
  if (!t) return;
107
107
  if (!u.value) {
108
108
  c.warn(
@@ -111,13 +111,13 @@ const c = console, s = "|", te = j({
111
111
  return;
112
112
  }
113
113
  if (!v(m)) return;
114
- let i = N(t);
115
- i = i.map((l) => [l[0].split(s).slice(-1).join(s), l[1]]);
116
- const a = i.map((l) => l[0]);
117
- a.length > new Set(a).size && c.warn(
114
+ let i = p(t);
115
+ i = i.map((l) => [l[0].split(a).slice(-1).join(a), l[1]]);
116
+ const s = i.map((l) => l[0]);
117
+ s.length > new Set(s).size && c.warn(
118
118
  "需要缓存的路径重复请合理设置组件key,保证在当前ApKeepAlive模块下唯一",
119
- a
120
- ), d.set(u.value, new Map(i)), r.debug && c.log(
119
+ s
120
+ ), d.set(u.value, new Map(i)), o.debug && c.log(
121
121
  "[ loadDataInVNode ] >",
122
122
  g.vnode.key,
123
123
  u.value,
@@ -128,21 +128,21 @@ const c = console, s = "|", te = j({
128
128
  trailing: !1
129
129
  });
130
130
  return L(() => {
131
- if (r.debug) {
132
- A(() => {
133
- p();
134
- }), r.debug && c.log("[ onBeforeUnmount ] >");
131
+ if (o.debug) {
132
+ c.log("[ onBeforeUnmount ] >"), A(() => {
133
+ y();
134
+ });
135
135
  return;
136
136
  }
137
- p();
137
+ y();
138
138
  }), O(() => {
139
- if (r.debug) {
140
- A(() => {
141
- p();
142
- }), r.debug && c.log("[ onBeforeUpdate ] >");
139
+ if (o.debug) {
140
+ c.log("[ onBeforeUpdate ] >"), A(() => {
141
+ y();
142
+ });
143
143
  return;
144
144
  }
145
- p();
145
+ y();
146
146
  }), $(d, u), () => {
147
147
  var e;
148
148
  return (e = h.default) == null ? void 0 : e.call(h);
@@ -21,6 +21,7 @@ const w = {
21
21
  ApRadioGroup: a,
22
22
  EditableGrid: f,
23
23
  ASteps: d
24
+ // AFormItem: formItemKeeper
24
25
  };
25
26
  export {
26
27
  w as default