@silver-formily/vue 2.2.1 → 2.3.1
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/README.en.md +10 -16
- package/README.md +10 -16
- package/esm/components/ArrayField.d.ts +36 -36
- package/esm/components/ExpressionScope.d.ts +1 -1
- package/esm/components/ExpressionScope.mjs +1 -1
- package/esm/components/Field.d.ts +36 -36
- package/esm/components/FormConsumer.d.ts +1 -1
- package/esm/components/FormConsumer.mjs +1 -1
- package/esm/components/FormConsumer.mjs.map +1 -1
- package/esm/components/FormProvider.d.ts +1 -1
- package/esm/components/ObjectField.d.ts +20 -20
- package/esm/components/ReactiveField.d.ts +1 -1
- package/esm/components/ReactiveField.mjs +1 -1
- package/esm/components/ReactiveField.mjs.map +1 -1
- package/esm/components/RecursionField.d.ts +13 -13
- package/esm/components/RecursionField.mjs +6 -6
- package/esm/components/SchemaField.d.ts +1101 -1099
- package/esm/components/SchemaField.mjs +1 -1
- package/esm/components/SchemaField.mjs.map +1 -1
- package/esm/components/VoidField.d.ts +24 -24
- package/esm/global.d.d.ts +1 -0
- package/esm/hooks/useFieldSchema.d.ts +1 -1
- package/esm/shared/connect.d.ts +2 -6
- package/esm/shared/connect.mjs +1 -1
- package/esm/shared/connect.mjs.map +1 -1
- package/esm/utils/fieldProps.d.ts +16 -16
- package/esm/utils/getRawComponent.d.ts +2 -2
- package/esm/utils/recursionFieldProps.d.ts +12 -12
- package/esm/utils/schemaFieldProps.d.ts +74 -74
- package/package.json +24 -32
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Schema as S } from "@formily/json-schema";
|
|
2
2
|
import { lazyMerge as E, isValid as x, isFn as w } from "@formily/shared";
|
|
3
|
-
import { defineComponent as A, inject as j, computed as B,
|
|
3
|
+
import { defineComponent as A, inject as j, computed as B, shallowRef as C, watch as M, provide as V, markRaw as $, h as u, Fragment as z } from "vue";
|
|
4
4
|
import { useField as I } from "../hooks/useField.mjs";
|
|
5
5
|
import { SchemaOptionsSymbol as K, SchemaExpressionScopeSymbol as q, SchemaSymbol as D } from "../shared/context.mjs";
|
|
6
6
|
import "@formily/core";
|
|
7
|
-
import "@formily/reactive-vue";
|
|
7
|
+
import "@silver-formily/reactive-vue";
|
|
8
8
|
import { recursionFieldProps as G } from "../utils/recursionFieldProps.mjs";
|
|
9
9
|
import H from "./ArrayField.mjs";
|
|
10
10
|
import J from "./Field.mjs";
|
|
@@ -35,7 +35,7 @@ const Q = A({
|
|
|
35
35
|
const c = I(), i = j(K), s = j(q);
|
|
36
36
|
if (!i || !s)
|
|
37
37
|
throw new Error("RecursionField must be used under SchemaField.");
|
|
38
|
-
const y = (r) =>
|
|
38
|
+
const y = (r) => $(S.isSchemaInstance(r) ? r : new S(r)), t = B(() => y(e.schema)), f = (r) => r?.toFieldProps?.({
|
|
39
39
|
...i.value,
|
|
40
40
|
get scope() {
|
|
41
41
|
return E(
|
|
@@ -44,12 +44,12 @@ const Q = A({
|
|
|
44
44
|
s.value
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
}), p =
|
|
48
|
-
|
|
47
|
+
}), p = C(f(t.value));
|
|
48
|
+
M([t, i], () => {
|
|
49
49
|
p.value = f(t.value);
|
|
50
50
|
});
|
|
51
51
|
const P = () => e.onlyRenderProperties ? e.basePath ?? c?.value?.address.concat(e.name) : e.basePath ?? c?.value?.address;
|
|
52
|
-
return
|
|
52
|
+
return V(D, t), () => {
|
|
53
53
|
const r = P(), v = p.value, d = (R = !1) => {
|
|
54
54
|
if (e.onlyRenderSelf)
|
|
55
55
|
return {};
|