@king-one/form-antdv 0.0.10 → 0.0.12
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/CHANGELOG.md +8 -0
- package/dist/es/src/components/ArrayCard/array-card.vue2.mjs +128 -0
- package/dist/es/src/components/ArrayCard/index.mjs +11 -0
- package/dist/es/src/components/ArrayTable/array-table.vue2.mjs +108 -0
- package/dist/es/src/components/ArrayTable/index.mjs +11 -0
- package/dist/es/src/components/DateRange/index.mjs +10 -0
- package/dist/es/src/components/FormArea/index.mjs +9 -0
- package/dist/es/src/components/Input/index.mjs +10 -0
- package/dist/es/src/components/InputNumber/index.mjs +10 -0
- package/dist/es/src/components/Select/index.mjs +13 -0
- package/dist/es/src/components/Textarea/index.mjs +10 -0
- package/dist/es/{packages/form-antdv/src → src}/index.mjs +5 -3
- package/dist/es/src/internal.mjs +10 -0
- package/dist/lib/src/components/ArrayCard/array-card.vue2.js +1 -0
- package/dist/lib/src/components/ArrayCard/index.js +1 -0
- package/dist/lib/src/components/ArrayTable/array-table.vue2.js +1 -0
- package/dist/lib/src/components/ArrayTable/index.js +1 -0
- package/dist/lib/src/components/DateRange/index.js +1 -0
- package/dist/lib/src/components/FormArea/index.js +1 -0
- package/dist/lib/src/components/Input/index.js +1 -0
- package/dist/lib/src/components/InputNumber/index.js +1 -0
- package/dist/lib/src/components/Select/index.js +1 -0
- package/dist/lib/src/components/Textarea/index.js +1 -0
- package/dist/lib/src/index.js +1 -0
- package/dist/lib/src/internal.js +1 -0
- package/dist/theme-chalk/form-antdv.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/types/src/components/ArrayCard/index.d.ts +2 -2
- package/dist/types/src/components/ArrayTable/index.d.ts +2 -2
- package/dist/types/src/components/DateRange/index.d.ts +2 -2
- package/dist/types/src/components/FormArea/index.d.ts +2 -2
- package/dist/types/src/components/Input/index.d.ts +2 -2
- package/dist/types/src/components/InputNumber/index.d.ts +2 -2
- package/dist/types/src/components/Select/index.d.ts +2 -2
- package/dist/types/src/components/Textarea/index.d.ts +7 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/internal.d.ts +1 -1
- package/package.json +2 -2
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/index.mjs +0 -4
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/contexts.mjs +0 -15
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/destructor.mjs +0 -72
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/index.mjs +0 -317
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/matcher.mjs +0 -83
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/parser.mjs +0 -232
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/shared.mjs +0 -62
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/tokenizer.mjs +0 -192
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/tokens.mjs +0 -140
- package/dist/es/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/types.mjs +0 -18
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/index.mjs +0 -47
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/array.mjs +0 -124
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/checkers.mjs +0 -43
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/delay.mjs +0 -10
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/file.mjs +0 -10
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/img.mjs +0 -20
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/install.mjs +0 -19
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/number.mjs +0 -18
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/uid.mjs +0 -11
- package/dist/es/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/validate.mjs +0 -6
- package/dist/es/node_modules/.pnpm/async-validator@4.2.5/node_modules/async-validator/dist-web/index.mjs +0 -648
- package/dist/es/packages/form-antdv/src/components/ArrayCard/array-card.vue2.mjs +0 -122
- package/dist/es/packages/form-antdv/src/components/ArrayCard/index.mjs +0 -13
- package/dist/es/packages/form-antdv/src/components/ArrayTable/array-table.vue2.mjs +0 -112
- package/dist/es/packages/form-antdv/src/components/ArrayTable/index.mjs +0 -13
- package/dist/es/packages/form-antdv/src/components/DateRange/index.mjs +0 -12
- package/dist/es/packages/form-antdv/src/components/FormArea/index.mjs +0 -11
- package/dist/es/packages/form-antdv/src/components/Input/index.mjs +0 -12
- package/dist/es/packages/form-antdv/src/components/InputNumber/index.mjs +0 -12
- package/dist/es/packages/form-antdv/src/components/Select/index.mjs +0 -15
- package/dist/es/packages/form-antdv/src/internal.mjs +0 -2
- package/dist/es/packages/form-render/src/components/FormProvider.vue.mjs +0 -4
- package/dist/es/packages/form-render/src/components/FormProvider.vue2.mjs +0 -28
- package/dist/es/packages/form-render/src/components/SchemaField.mjs +0 -40
- package/dist/es/packages/form-render/src/components/propsType.mjs +0 -33
- package/dist/es/packages/form-render/src/components/widget/ArrayField.mjs +0 -40
- package/dist/es/packages/form-render/src/components/widget/ErrorField.mjs +0 -14
- package/dist/es/packages/form-render/src/components/widget/Field.mjs +0 -43
- package/dist/es/packages/form-render/src/components/widget/FormItem.mjs +0 -48
- package/dist/es/packages/form-render/src/components/widget/ObjectField.mjs +0 -54
- package/dist/es/packages/form-render/src/components/widget/RecursionField.mjs +0 -31
- package/dist/es/packages/form-render/src/components/widget/index.mjs +0 -8
- package/dist/es/packages/form-render/src/context/field.mjs +0 -12
- package/dist/es/packages/form-render/src/context/form.mjs +0 -12
- package/dist/es/packages/form-render/src/context/index.mjs +0 -8
- package/dist/es/packages/form-render/src/core/ArrayField.mjs +0 -22
- package/dist/es/packages/form-render/src/core/Base.mjs +0 -162
- package/dist/es/packages/form-render/src/core/Event.mjs +0 -59
- package/dist/es/packages/form-render/src/core/Field.mjs +0 -17
- package/dist/es/packages/form-render/src/core/Form.mjs +0 -103
- package/dist/es/packages/form-render/src/core/Heart.mjs +0 -25
- package/dist/es/packages/form-render/src/core/ObjectField.mjs +0 -13
- package/dist/es/packages/form-render/src/core/index.mjs +0 -7
- package/dist/es/packages/form-render/src/effects/LifeCycle.mjs +0 -25
- package/dist/es/packages/form-render/src/effects/contants.mjs +0 -10
- package/dist/es/packages/form-render/src/effects/effect.enum.mjs +0 -5
- package/dist/es/packages/form-render/src/effects/effective.mjs +0 -25
- package/dist/es/packages/form-render/src/effects/index.mjs +0 -16
- package/dist/es/packages/form-render/src/effects/onEffects.mjs +0 -22
- package/dist/es/packages/form-render/src/hooks/index.mjs +0 -9
- package/dist/es/packages/form-render/src/hooks/use-event-hook.mjs +0 -31
- package/dist/es/packages/form-render/src/hooks/use-namespace/index.mjs +0 -49
- package/dist/es/packages/form-render/src/index.mjs +0 -21
- package/dist/es/packages/form-render/src/internal.mjs +0 -7
- package/dist/es/packages/form-render/src/schema/index.mjs +0 -5
- package/dist/es/packages/form-render/src/schema/makeProxy.mjs +0 -46
- package/dist/es/packages/form-render/src/utils/connect.mjs +0 -12
- package/dist/es/packages/form-render/src/utils/index.mjs +0 -7
- package/dist/es/packages/form-render/src/utils/mapProps.mjs +0 -27
- package/dist/es/packages/form-render/src/utils/schema.mjs +0 -26
- package/dist/es/packages/form-render/src/utils/style.mjs +0 -13
- package/dist/es/packages/form-render/src/utils/transformComponent.mjs +0 -20
- package/dist/es/packages/form-render/theme-chalk/index.css +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/index.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/contexts.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/destructor.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/index.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/matcher.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/parser.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/shared.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/tokenizer.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/tokens.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_path@1.0.4/node_modules/@king-one/path/dist/es/src/types.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/index.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/array.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/checkers.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/delay.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/file.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/img.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/install.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/number.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/uid.js +0 -1
- package/dist/lib/node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/validate.js +0 -1
- package/dist/lib/node_modules/.pnpm/async-validator@4.2.5/node_modules/async-validator/dist-web/index.js +0 -12
- package/dist/lib/packages/form-antdv/src/components/ArrayCard/array-card.vue2.js +0 -1
- package/dist/lib/packages/form-antdv/src/components/ArrayCard/index.js +0 -1
- package/dist/lib/packages/form-antdv/src/components/ArrayTable/array-table.vue2.js +0 -1
- package/dist/lib/packages/form-antdv/src/components/ArrayTable/index.js +0 -1
- package/dist/lib/packages/form-antdv/src/components/DateRange/index.js +0 -1
- package/dist/lib/packages/form-antdv/src/components/FormArea/index.js +0 -1
- package/dist/lib/packages/form-antdv/src/components/Input/index.js +0 -1
- package/dist/lib/packages/form-antdv/src/components/InputNumber/index.js +0 -1
- package/dist/lib/packages/form-antdv/src/components/Select/index.js +0 -1
- package/dist/lib/packages/form-antdv/src/index.js +0 -1
- package/dist/lib/packages/form-antdv/src/internal.js +0 -1
- package/dist/lib/packages/form-render/src/components/FormProvider.vue.js +0 -1
- package/dist/lib/packages/form-render/src/components/FormProvider.vue2.js +0 -1
- package/dist/lib/packages/form-render/src/components/SchemaField.js +0 -1
- package/dist/lib/packages/form-render/src/components/propsType.js +0 -1
- package/dist/lib/packages/form-render/src/components/widget/ArrayField.js +0 -1
- package/dist/lib/packages/form-render/src/components/widget/ErrorField.js +0 -1
- package/dist/lib/packages/form-render/src/components/widget/Field.js +0 -1
- package/dist/lib/packages/form-render/src/components/widget/FormItem.js +0 -1
- package/dist/lib/packages/form-render/src/components/widget/ObjectField.js +0 -1
- package/dist/lib/packages/form-render/src/components/widget/RecursionField.js +0 -1
- package/dist/lib/packages/form-render/src/components/widget/index.js +0 -1
- package/dist/lib/packages/form-render/src/context/field.js +0 -1
- package/dist/lib/packages/form-render/src/context/form.js +0 -1
- package/dist/lib/packages/form-render/src/context/index.js +0 -1
- package/dist/lib/packages/form-render/src/core/ArrayField.js +0 -1
- package/dist/lib/packages/form-render/src/core/Base.js +0 -5
- package/dist/lib/packages/form-render/src/core/Event.js +0 -1
- package/dist/lib/packages/form-render/src/core/Field.js +0 -1
- package/dist/lib/packages/form-render/src/core/Form.js +0 -1
- package/dist/lib/packages/form-render/src/core/Heart.js +0 -1
- package/dist/lib/packages/form-render/src/core/ObjectField.js +0 -1
- package/dist/lib/packages/form-render/src/core/index.js +0 -1
- package/dist/lib/packages/form-render/src/effects/LifeCycle.js +0 -1
- package/dist/lib/packages/form-render/src/effects/contants.js +0 -1
- package/dist/lib/packages/form-render/src/effects/effect.enum.js +0 -1
- package/dist/lib/packages/form-render/src/effects/effective.js +0 -1
- package/dist/lib/packages/form-render/src/effects/index.js +0 -1
- package/dist/lib/packages/form-render/src/effects/onEffects.js +0 -1
- package/dist/lib/packages/form-render/src/hooks/index.js +0 -1
- package/dist/lib/packages/form-render/src/hooks/use-event-hook.js +0 -1
- package/dist/lib/packages/form-render/src/hooks/use-namespace/index.js +0 -1
- package/dist/lib/packages/form-render/src/index.js +0 -1
- package/dist/lib/packages/form-render/src/internal.js +0 -1
- package/dist/lib/packages/form-render/src/schema/index.js +0 -1
- package/dist/lib/packages/form-render/src/schema/makeProxy.js +0 -1
- package/dist/lib/packages/form-render/src/utils/connect.js +0 -1
- package/dist/lib/packages/form-render/src/utils/index.js +0 -1
- package/dist/lib/packages/form-render/src/utils/mapProps.js +0 -1
- package/dist/lib/packages/form-render/src/utils/schema.js +0 -1
- package/dist/lib/packages/form-render/src/utils/style.js +0 -1
- package/dist/lib/packages/form-render/src/utils/transformComponent.js +0 -1
- package/dist/lib/packages/form-render/theme-chalk/index.css +0 -1
- /package/dist/es/{packages/form-antdv/index.mjs → index.mjs} +0 -0
- /package/dist/es/{packages/form-antdv/src → src}/components/ArrayCard/array-card.vue.mjs +0 -0
- /package/dist/es/{packages/form-antdv/src → src}/components/ArrayTable/array-table.vue.mjs +0 -0
- /package/dist/es/{packages/form-antdv/src → src}/components/FormArea/form-area.vue.mjs +0 -0
- /package/dist/es/{packages/form-antdv/src → src}/components/FormArea/form-area.vue2.mjs +0 -0
- /package/dist/es/{packages/form-antdv/src → src}/hooks/index.mjs +0 -0
- /package/dist/es/{packages/form-antdv/src → src}/hooks/use-namespace/index.mjs +0 -0
- /package/dist/es/{packages/form-antdv/src → src}/style/index.mjs +0 -0
- /package/dist/lib/{packages/form-antdv/index.js → index.js} +0 -0
- /package/dist/lib/{packages/form-antdv/src → src}/components/ArrayCard/array-card.vue.js +0 -0
- /package/dist/lib/{packages/form-antdv/src → src}/components/ArrayTable/array-table.vue.js +0 -0
- /package/dist/lib/{packages/form-antdv/src → src}/components/FormArea/form-area.vue.js +0 -0
- /package/dist/lib/{packages/form-antdv/src → src}/components/FormArea/form-area.vue2.js +0 -0
- /package/dist/lib/{packages/form-antdv/src → src}/hooks/index.js +0 -0
- /package/dist/lib/{packages/form-antdv/src → src}/hooks/use-namespace/index.js +0 -0
- /package/dist/lib/{packages/form-antdv/src → src}/style/index.js +0 -0
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { defineComponent as w, mergeModels as B, useModel as E, computed as h, toRaw as N, openBlock as a, createElementBlock as p, normalizeClass as F, unref as r, createBlock as v, withCtx as o, createElementVNode as s, toDisplayString as f, createVNode as g, Fragment as k, renderList as C, createTextVNode as M } from "vue";
|
|
2
|
-
import { Card as b, Empty as S, Button as V } from "ant-design-vue";
|
|
3
|
-
import "../../internal.mjs";
|
|
4
|
-
import { useNamespace as j } from "../../hooks/use-namespace/index.mjs";
|
|
5
|
-
import { useInjectFieldContext as A } from "../../../../form-render/src/context/field.mjs";
|
|
6
|
-
import I from "../../../../form-render/src/components/widget/RecursionField.mjs";
|
|
7
|
-
const q = /* @__PURE__ */ w({
|
|
8
|
-
__name: "array-card",
|
|
9
|
-
props: /* @__PURE__ */ B({
|
|
10
|
-
title: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: "默认标题"
|
|
13
|
-
}
|
|
14
|
-
}, {
|
|
15
|
-
value: {},
|
|
16
|
-
valueModifiers: {}
|
|
17
|
-
}),
|
|
18
|
-
emits: ["update:value"],
|
|
19
|
-
setup(i) {
|
|
20
|
-
const _ = j("ArrayCard"), e = A(), n = E(i, "value"), y = h(() => {
|
|
21
|
-
var t;
|
|
22
|
-
return ((t = e == null ? void 0 : e.path) == null ? void 0 : t.toString()) || "";
|
|
23
|
-
}), m = h(() => (e == null ? void 0 : e.schema.items.properties) || {});
|
|
24
|
-
function x() {
|
|
25
|
-
if (n.value) {
|
|
26
|
-
const t = {};
|
|
27
|
-
Object.keys(m.value).forEach((l) => {
|
|
28
|
-
const u = m.value[l].type || "string";
|
|
29
|
-
t[l] = u === "number" ? 0 : "";
|
|
30
|
-
}), n.value = [...N(n.value || []), t];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return (t, l) => {
|
|
34
|
-
var u;
|
|
35
|
-
return a(), p(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
class: F(r(_).b())
|
|
39
|
-
},
|
|
40
|
-
[
|
|
41
|
-
(u = n.value) != null && u.length ? (a(!0), p(
|
|
42
|
-
k,
|
|
43
|
-
{ key: 1 },
|
|
44
|
-
C(n.value, (R, c) => (a(), v(
|
|
45
|
-
r(b),
|
|
46
|
-
{
|
|
47
|
-
key: c,
|
|
48
|
-
style: { "margin-bottom": "12px" }
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
title: o(() => [
|
|
52
|
-
s("div", null, [
|
|
53
|
-
s(
|
|
54
|
-
"span",
|
|
55
|
-
null,
|
|
56
|
-
"#" + f(c + 1) + " " + f(i.title),
|
|
57
|
-
1
|
|
58
|
-
/* TEXT */
|
|
59
|
-
)
|
|
60
|
-
])
|
|
61
|
-
]),
|
|
62
|
-
default: o(() => [
|
|
63
|
-
(a(!0), p(
|
|
64
|
-
k,
|
|
65
|
-
null,
|
|
66
|
-
C(m.value, (d, $) => (a(), v(r(I), {
|
|
67
|
-
key: `${y.value}.${$}.${d.name}`,
|
|
68
|
-
schema: d,
|
|
69
|
-
name: d.name,
|
|
70
|
-
"base-path": `${y.value}.${c}`
|
|
71
|
-
}, null, 8, ["schema", "name", "base-path"]))),
|
|
72
|
-
128
|
|
73
|
-
/* KEYED_FRAGMENT */
|
|
74
|
-
))
|
|
75
|
-
]),
|
|
76
|
-
_: 2
|
|
77
|
-
/* DYNAMIC */
|
|
78
|
-
},
|
|
79
|
-
1024
|
|
80
|
-
/* DYNAMIC_SLOTS */
|
|
81
|
-
))),
|
|
82
|
-
128
|
|
83
|
-
/* KEYED_FRAGMENT */
|
|
84
|
-
)) : (a(), v(r(b), { key: 0 }, {
|
|
85
|
-
title: o(() => [
|
|
86
|
-
s("div", null, [
|
|
87
|
-
s(
|
|
88
|
-
"span",
|
|
89
|
-
null,
|
|
90
|
-
f(i.title),
|
|
91
|
-
1
|
|
92
|
-
/* TEXT */
|
|
93
|
-
)
|
|
94
|
-
])
|
|
95
|
-
]),
|
|
96
|
-
default: o(() => [
|
|
97
|
-
g(r(S), { description: "暂无数据" })
|
|
98
|
-
]),
|
|
99
|
-
_: 1
|
|
100
|
-
/* STABLE */
|
|
101
|
-
})),
|
|
102
|
-
g(r(V), {
|
|
103
|
-
type: "dashed",
|
|
104
|
-
style: { "margin-top": "10px", width: "100%" },
|
|
105
|
-
onClick: x
|
|
106
|
-
}, {
|
|
107
|
-
default: o(() => l[0] || (l[0] = [
|
|
108
|
-
M(" 添加 ")
|
|
109
|
-
])),
|
|
110
|
-
_: 1,
|
|
111
|
-
__: [0]
|
|
112
|
-
})
|
|
113
|
-
],
|
|
114
|
-
2
|
|
115
|
-
/* CLASS */
|
|
116
|
-
);
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
export {
|
|
121
|
-
q as default
|
|
122
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "../../internal.mjs";
|
|
2
|
-
import "./array-card.vue.mjs";
|
|
3
|
-
import { transformComponent as r } from "../../../../form-render/src/utils/transformComponent.mjs";
|
|
4
|
-
import o from "./array-card.vue2.mjs";
|
|
5
|
-
import { connect as m } from "../../../../form-render/src/utils/connect.mjs";
|
|
6
|
-
import { mapProps as t } from "../../../../form-render/src/utils/mapProps.mjs";
|
|
7
|
-
const a = r(o, {
|
|
8
|
-
change: "update:value"
|
|
9
|
-
}), s = m(a, t());
|
|
10
|
-
export {
|
|
11
|
-
s as ArrayCard,
|
|
12
|
-
a as TransformArrayCard
|
|
13
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, mergeModels as y, computed as d, useModel as w, toRaw as m, openBlock as u, createElementBlock as c, normalizeClass as B, unref as n, createVNode as i, withCtx as o, Fragment as T, renderList as $, createBlock as F, createTextVNode as p } from "vue";
|
|
2
|
-
import { Table as M, TableColumn as f, Button as v } from "ant-design-vue";
|
|
3
|
-
import "../../internal.mjs";
|
|
4
|
-
import { useInjectFieldContext as N } from "../../../../form-render/src/context/field.mjs";
|
|
5
|
-
import { useNamespace as V } from "../../hooks/use-namespace/index.mjs";
|
|
6
|
-
import z from "../../../../form-render/src/components/widget/RecursionField.mjs";
|
|
7
|
-
const I = /* @__PURE__ */ C({
|
|
8
|
-
__name: "array-table",
|
|
9
|
-
props: /* @__PURE__ */ y({
|
|
10
|
-
title: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: "默认标题"
|
|
13
|
-
}
|
|
14
|
-
}, {
|
|
15
|
-
value: {},
|
|
16
|
-
valueModifiers: {}
|
|
17
|
-
}),
|
|
18
|
-
emits: ["update:value"],
|
|
19
|
-
setup(_) {
|
|
20
|
-
const l = N(), h = V("ArrayTable"), x = d(() => {
|
|
21
|
-
var r;
|
|
22
|
-
return ((r = l == null ? void 0 : l.path) == null ? void 0 : r.toString()) || "";
|
|
23
|
-
}), e = w(_, "value"), b = d(() => (l == null ? void 0 : l.schema.items.properties) || {});
|
|
24
|
-
function g() {
|
|
25
|
-
e.value && (e.value = [...m(e.value || []), {}]);
|
|
26
|
-
}
|
|
27
|
-
function k(r) {
|
|
28
|
-
if (e.value) {
|
|
29
|
-
const t = m(e.value);
|
|
30
|
-
t.splice(r, 1), e.value = t;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return (r, t) => (u(), c(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
class: B(n(h).b())
|
|
37
|
-
},
|
|
38
|
-
[
|
|
39
|
-
i(n(M), {
|
|
40
|
-
"data-source": e.value,
|
|
41
|
-
pagination: !1,
|
|
42
|
-
bordered: "",
|
|
43
|
-
size: "middle"
|
|
44
|
-
}, {
|
|
45
|
-
default: o(() => [
|
|
46
|
-
(u(!0), c(
|
|
47
|
-
T,
|
|
48
|
-
null,
|
|
49
|
-
$(b.value, (a) => (u(), F(n(f), {
|
|
50
|
-
key: `${a.name}`,
|
|
51
|
-
align: "center",
|
|
52
|
-
title: a.title,
|
|
53
|
-
"data-index": a.name
|
|
54
|
-
}, {
|
|
55
|
-
default: o(({ index: s }) => [
|
|
56
|
-
i(n(z), {
|
|
57
|
-
schema: a,
|
|
58
|
-
name: a.name,
|
|
59
|
-
"base-path": `${x.value}.${s}`
|
|
60
|
-
}, null, 8, ["schema", "name", "base-path"])
|
|
61
|
-
]),
|
|
62
|
-
_: 2
|
|
63
|
-
/* DYNAMIC */
|
|
64
|
-
}, 1032, ["title", "data-index"]))),
|
|
65
|
-
128
|
|
66
|
-
/* KEYED_FRAGMENT */
|
|
67
|
-
)),
|
|
68
|
-
i(n(f), {
|
|
69
|
-
title: "操作",
|
|
70
|
-
"data-index": "action",
|
|
71
|
-
align: "center",
|
|
72
|
-
width: "100px"
|
|
73
|
-
}, {
|
|
74
|
-
default: o(({ index: a }) => [
|
|
75
|
-
i(n(v), {
|
|
76
|
-
type: "link",
|
|
77
|
-
onClick: (s) => k(a)
|
|
78
|
-
}, {
|
|
79
|
-
default: o(() => t[0] || (t[0] = [
|
|
80
|
-
p(" 删除 ")
|
|
81
|
-
])),
|
|
82
|
-
_: 2,
|
|
83
|
-
__: [0]
|
|
84
|
-
}, 1032, ["onClick"])
|
|
85
|
-
]),
|
|
86
|
-
_: 1
|
|
87
|
-
/* STABLE */
|
|
88
|
-
})
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
/* STABLE */
|
|
92
|
-
}, 8, ["data-source"]),
|
|
93
|
-
i(n(v), {
|
|
94
|
-
type: "dashed",
|
|
95
|
-
style: { "margin-top": "10px", width: "100%" },
|
|
96
|
-
onClick: g
|
|
97
|
-
}, {
|
|
98
|
-
default: o(() => t[1] || (t[1] = [
|
|
99
|
-
p(" 添加 ")
|
|
100
|
-
])),
|
|
101
|
-
_: 1,
|
|
102
|
-
__: [1]
|
|
103
|
-
})
|
|
104
|
-
],
|
|
105
|
-
2
|
|
106
|
-
/* CLASS */
|
|
107
|
-
));
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
export {
|
|
111
|
-
I as default
|
|
112
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "../../internal.mjs";
|
|
2
|
-
import "./array-table.vue.mjs";
|
|
3
|
-
import { transformComponent as r } from "../../../../form-render/src/utils/transformComponent.mjs";
|
|
4
|
-
import o from "./array-table.vue2.mjs";
|
|
5
|
-
import { connect as m } from "../../../../form-render/src/utils/connect.mjs";
|
|
6
|
-
import { mapProps as t } from "../../../../form-render/src/utils/mapProps.mjs";
|
|
7
|
-
const a = r(o, {
|
|
8
|
-
change: "update:value"
|
|
9
|
-
}), s = m(a, t());
|
|
10
|
-
export {
|
|
11
|
-
s as ArrayTable,
|
|
12
|
-
a as TransformArrayTable
|
|
13
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "../../internal.mjs";
|
|
2
|
-
import { RangePicker as o } from "ant-design-vue";
|
|
3
|
-
import { transformComponent as r } from "../../../../form-render/src/utils/transformComponent.mjs";
|
|
4
|
-
import { connect as t } from "../../../../form-render/src/utils/connect.mjs";
|
|
5
|
-
import { mapProps as m } from "../../../../form-render/src/utils/mapProps.mjs";
|
|
6
|
-
const e = r(o, {
|
|
7
|
-
change: "update:value"
|
|
8
|
-
}), f = t(e, m());
|
|
9
|
-
export {
|
|
10
|
-
f as DateRange,
|
|
11
|
-
e as TransformDatePicker
|
|
12
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "../../internal.mjs";
|
|
2
|
-
import "./form-area.vue.mjs";
|
|
3
|
-
import { transformComponent as o } from "../../../../form-render/src/utils/transformComponent.mjs";
|
|
4
|
-
import r from "./form-area.vue2.mjs";
|
|
5
|
-
import { connect as m } from "../../../../form-render/src/utils/connect.mjs";
|
|
6
|
-
import { mapProps as t } from "../../../../form-render/src/utils/mapProps.mjs";
|
|
7
|
-
const p = o(r, {}), e = m(p, t());
|
|
8
|
-
export {
|
|
9
|
-
e as FormArea,
|
|
10
|
-
p as TransformFormArea
|
|
11
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Input as o } from "ant-design-vue";
|
|
2
|
-
import "../../internal.mjs";
|
|
3
|
-
import { transformComponent as t } from "../../../../form-render/src/utils/transformComponent.mjs";
|
|
4
|
-
import { connect as r } from "../../../../form-render/src/utils/connect.mjs";
|
|
5
|
-
import { mapProps as p } from "../../../../form-render/src/utils/mapProps.mjs";
|
|
6
|
-
const m = t(o, {
|
|
7
|
-
change: "update:value"
|
|
8
|
-
}), u = r(m, p());
|
|
9
|
-
export {
|
|
10
|
-
u as Input,
|
|
11
|
-
m as TransformInput
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { InputNumber as o } from "ant-design-vue";
|
|
2
|
-
import "../../internal.mjs";
|
|
3
|
-
import { transformComponent as r } from "../../../../form-render/src/utils/transformComponent.mjs";
|
|
4
|
-
import { connect as m } from "../../../../form-render/src/utils/connect.mjs";
|
|
5
|
-
import { mapProps as t } from "../../../../form-render/src/utils/mapProps.mjs";
|
|
6
|
-
const p = r(o, {
|
|
7
|
-
change: "update:value"
|
|
8
|
-
}), s = m(p, t());
|
|
9
|
-
export {
|
|
10
|
-
s as InputNumber,
|
|
11
|
-
p as TransformInput
|
|
12
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Select as r } from "ant-design-vue";
|
|
2
|
-
import "../../internal.mjs";
|
|
3
|
-
import { transformComponent as m } from "../../../../form-render/src/utils/transformComponent.mjs";
|
|
4
|
-
import { connect as e } from "../../../../form-render/src/utils/connect.mjs";
|
|
5
|
-
import { mapProps as n } from "../../../../form-render/src/utils/mapProps.mjs";
|
|
6
|
-
const p = m(r, {
|
|
7
|
-
change: "update:value"
|
|
8
|
-
}), f = e(p, n({}, (t, o) => ({
|
|
9
|
-
...t,
|
|
10
|
-
options: o == null ? void 0 : o.enum
|
|
11
|
-
})));
|
|
12
|
-
export {
|
|
13
|
-
f as Select,
|
|
14
|
-
p as TransformSelect
|
|
15
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, useSlots as l, onUnmounted as d, openBlock as p, createElementBlock as a, renderSlot as f } from "vue";
|
|
2
|
-
import { useProvideFromContext as u } from "../context/form.mjs";
|
|
3
|
-
import { FormProviderProps as v } from "./propsType.mjs";
|
|
4
|
-
/* empty css */
|
|
5
|
-
const _ = { class: "k-render-form-provider" }, k = /* @__PURE__ */ i({
|
|
6
|
-
__name: "FormProvider",
|
|
7
|
-
props: v,
|
|
8
|
-
setup(s) {
|
|
9
|
-
var c;
|
|
10
|
-
const t = s, e = ["SchemaField"], r = l();
|
|
11
|
-
return (((c = r.default) == null ? void 0 : c.call(r)) || []).forEach((o) => {
|
|
12
|
-
var m;
|
|
13
|
-
const n = (m = o.type) == null ? void 0 : m.name;
|
|
14
|
-
if (!n) {
|
|
15
|
-
console.warn(`FormProvider 组件内只能包含 ${e.join(", ")} 组件`);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
typeof o.type == "object" && !e.includes(n) && console.warn(`FormProvider 组件内只能包含 ${e.join(", ")} 组件`);
|
|
19
|
-
}), d(() => {
|
|
20
|
-
t.form.event.clearAll();
|
|
21
|
-
}), u(t.form), (o, n) => (p(), a("div", _, [
|
|
22
|
-
f(o.$slots, "default")
|
|
23
|
-
]));
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
export {
|
|
27
|
-
k as default
|
|
28
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, ref as n, toRaw as c, watch as l, createVNode as s } from "vue";
|
|
2
|
-
import "../internal.mjs";
|
|
3
|
-
import "../../../../node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/index.mjs";
|
|
4
|
-
import "../context/index.mjs";
|
|
5
|
-
import { SchemaFieldProps as d } from "./propsType.mjs";
|
|
6
|
-
import h from "./widget/RecursionField.mjs";
|
|
7
|
-
import { useInjectFormContext as u } from "../context/form.mjs";
|
|
8
|
-
import { formatSchema as f } from "../utils/schema.mjs";
|
|
9
|
-
import { delay as p } from "../../../../node_modules/.pnpm/@king-one_utils@1.0.14/node_modules/@king-one/utils/src/delay.mjs";
|
|
10
|
-
const z = /* @__PURE__ */ i({
|
|
11
|
-
name: "SchemaField",
|
|
12
|
-
props: d,
|
|
13
|
-
setup(r) {
|
|
14
|
-
const o = n(!1);
|
|
15
|
-
let a = null;
|
|
16
|
-
const t = u(), m = async () => {
|
|
17
|
-
try {
|
|
18
|
-
const e = c(r.schema);
|
|
19
|
-
if (!e || !Object.keys(e).length)
|
|
20
|
-
return;
|
|
21
|
-
a = await f(e), o.value = !0, t.event.trigger("FormMount");
|
|
22
|
-
} catch (e) {
|
|
23
|
-
console.error("[SchemaField] Schema initialization failed:", e);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
return t.event.on("FormDestroy", () => {
|
|
27
|
-
o.value = !1;
|
|
28
|
-
}), l(() => r.schema, async () => {
|
|
29
|
-
console.log("SchemaField watch triggered"), t.mounted && (t.destroy(), await p(100)), m();
|
|
30
|
-
}, {
|
|
31
|
-
deep: !0,
|
|
32
|
-
immediate: !0
|
|
33
|
-
}), () => o.value ? s(h, {
|
|
34
|
-
schema: a
|
|
35
|
-
}, null, 8, ["schema"]) : null;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
export {
|
|
39
|
-
z as default
|
|
40
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const e = (r) => r, t = {
|
|
2
|
-
form: {
|
|
3
|
-
type: e(Object),
|
|
4
|
-
required: !0
|
|
5
|
-
}
|
|
6
|
-
}, n = {
|
|
7
|
-
schema: {
|
|
8
|
-
type: e(Object)
|
|
9
|
-
}
|
|
10
|
-
}, o = {
|
|
11
|
-
schema: {
|
|
12
|
-
type: e(Object),
|
|
13
|
-
required: !0
|
|
14
|
-
},
|
|
15
|
-
name: e([String, Number]),
|
|
16
|
-
basePath: e([String, Number, RegExp, Function])
|
|
17
|
-
}, c = {
|
|
18
|
-
schema: {
|
|
19
|
-
type: e(Object),
|
|
20
|
-
required: !0
|
|
21
|
-
},
|
|
22
|
-
name: {
|
|
23
|
-
type: e([String, Number])
|
|
24
|
-
},
|
|
25
|
-
basePath: e([String, Number, RegExp, Function])
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
c as BaseFieldProps,
|
|
29
|
-
t as FormProviderProps,
|
|
30
|
-
o as RecursionFieldProps,
|
|
31
|
-
n as SchemaFieldProps,
|
|
32
|
-
e as definePropType
|
|
33
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { isVNode as s, defineComponent as d, createVNode as c } from "vue";
|
|
2
|
-
import { BaseFieldProps as u } from "../propsType.mjs";
|
|
3
|
-
import "../../context/index.mjs";
|
|
4
|
-
import { useInjectFormContext as m } from "../../context/form.mjs";
|
|
5
|
-
import { useProvideFieldContext as f } from "../../context/field.mjs";
|
|
6
|
-
function p(e) {
|
|
7
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
|
|
8
|
-
}
|
|
9
|
-
const j = /* @__PURE__ */ d({
|
|
10
|
-
name: "ArrayField",
|
|
11
|
-
props: u,
|
|
12
|
-
setup(e) {
|
|
13
|
-
const o = m(), t = o == null ? void 0 : o.createArrayField(e.schema, e.name, e.basePath);
|
|
14
|
-
f(t);
|
|
15
|
-
const a = () => {
|
|
16
|
-
if (t.component) {
|
|
17
|
-
const r = t.component;
|
|
18
|
-
return c(r, {
|
|
19
|
-
onChange: (l) => {
|
|
20
|
-
t.change(l);
|
|
21
|
-
}
|
|
22
|
-
}, null, 16);
|
|
23
|
-
}
|
|
24
|
-
return null;
|
|
25
|
-
}, i = (r) => {
|
|
26
|
-
if (t.decorator) {
|
|
27
|
-
const n = t.decorator;
|
|
28
|
-
return c(n, null, p(r) ? r : {
|
|
29
|
-
default: () => [r],
|
|
30
|
-
_: 2
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return r;
|
|
34
|
-
};
|
|
35
|
-
return () => i(a());
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
export {
|
|
39
|
-
j as default
|
|
40
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { defineComponent as e, createVNode as r, createTextVNode as o } from "vue";
|
|
2
|
-
const u = /* @__PURE__ */ e({
|
|
3
|
-
name: "ErrorField",
|
|
4
|
-
setup() {
|
|
5
|
-
return () => r("div", {
|
|
6
|
-
style: {
|
|
7
|
-
color: "red"
|
|
8
|
-
}
|
|
9
|
-
}, [o("该组件未定义")]);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
export {
|
|
13
|
-
u as default
|
|
14
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { isVNode as u, defineComponent as s, createVNode as c } from "vue";
|
|
2
|
-
import { BaseFieldProps as d } from "../propsType.mjs";
|
|
3
|
-
import "../../context/index.mjs";
|
|
4
|
-
import { useInjectFormContext as m } from "../../context/form.mjs";
|
|
5
|
-
import { useProvideFieldContext as f } from "../../context/field.mjs";
|
|
6
|
-
function p(e) {
|
|
7
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !u(e);
|
|
8
|
-
}
|
|
9
|
-
const g = /* @__PURE__ */ s({
|
|
10
|
-
name: "KField",
|
|
11
|
-
props: d,
|
|
12
|
-
setup(e) {
|
|
13
|
-
const r = m(), t = r == null ? void 0 : r.createField(e.schema, e.name, e.basePath);
|
|
14
|
-
f(t);
|
|
15
|
-
const i = () => {
|
|
16
|
-
if (t.component) {
|
|
17
|
-
const o = t.component;
|
|
18
|
-
return c(o, {
|
|
19
|
-
onChange: (a) => {
|
|
20
|
-
t.change(a);
|
|
21
|
-
},
|
|
22
|
-
onBlur: () => {
|
|
23
|
-
t.blur();
|
|
24
|
-
}
|
|
25
|
-
}, null, 16);
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
}, l = (o) => {
|
|
29
|
-
if (t.decorator) {
|
|
30
|
-
const n = t.decorator;
|
|
31
|
-
return c(n, null, p(o) ? o : {
|
|
32
|
-
default: () => [o],
|
|
33
|
-
_: 2
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
return o;
|
|
37
|
-
};
|
|
38
|
-
return () => l(i());
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
export {
|
|
42
|
-
g as default
|
|
43
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { defineComponent as b, computed as t, createVNode as o, createTextVNode as x, Transition as F } from "vue";
|
|
2
|
-
import "../../internal.mjs";
|
|
3
|
-
import "../../context/index.mjs";
|
|
4
|
-
import { useNamespace as g } from "../../hooks/use-namespace/index.mjs";
|
|
5
|
-
import { useInjectFieldContext as C } from "../../context/field.mjs";
|
|
6
|
-
import { useInjectFormContext as I } from "../../context/form.mjs";
|
|
7
|
-
import { addUnit as N } from "../../utils/style.mjs";
|
|
8
|
-
const V = /* @__PURE__ */ b({
|
|
9
|
-
name: "KItem",
|
|
10
|
-
setup(T, {
|
|
11
|
-
slots: a
|
|
12
|
-
}) {
|
|
13
|
-
const {
|
|
14
|
-
b: i,
|
|
15
|
-
e: r,
|
|
16
|
-
em: l
|
|
17
|
-
} = g("item"), u = t(() => [i()]), e = C(), p = (e == null ? void 0 : e.schema["x-decorator-props"]) || {}, n = I(), c = n == null ? void 0 : n.schema, d = t(() => {
|
|
18
|
-
if (c)
|
|
19
|
-
return {
|
|
20
|
-
width: N(c.labelWidth),
|
|
21
|
-
textAlign: c.labelPosition
|
|
22
|
-
};
|
|
23
|
-
}), v = t(() => {
|
|
24
|
-
if (e)
|
|
25
|
-
return e.schema.title;
|
|
26
|
-
}), s = t(() => e == null ? void 0 : e.validateReactive.status), f = t(() => e == null ? void 0 : e.validateReactive.message), h = t(() => s.value === "error" ? [r("content"), r("error")] : [r("content")]);
|
|
27
|
-
return () => {
|
|
28
|
-
var m;
|
|
29
|
-
return o("div", {
|
|
30
|
-
class: u.value
|
|
31
|
-
}, [p.hideTitle ? null : o("label", {
|
|
32
|
-
class: r("label"),
|
|
33
|
-
style: d.value
|
|
34
|
-
}, [v.value, x(":")], 6), o("div", {
|
|
35
|
-
class: h.value
|
|
36
|
-
}, [(m = a.default) == null ? void 0 : m.call(a), o(F, {
|
|
37
|
-
name: "king-form-zoom-in-top"
|
|
38
|
-
}, {
|
|
39
|
-
default: () => [s.value === "error" && o("div", {
|
|
40
|
-
class: [l("content", "error")]
|
|
41
|
-
}, [f.value], 2)]
|
|
42
|
-
})], 2)], 2);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
export {
|
|
47
|
-
V as default
|
|
48
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { isVNode as f, defineComponent as p, toRefs as h, createVNode as n, Fragment as i } from "vue";
|
|
2
|
-
import "../../internal.mjs";
|
|
3
|
-
import { BaseFieldProps as b } from "../propsType.mjs";
|
|
4
|
-
import "../../context/index.mjs";
|
|
5
|
-
import F from "./RecursionField.mjs";
|
|
6
|
-
import { useInjectFormContext as j } from "../../context/form.mjs";
|
|
7
|
-
import { useProvideFieldContext as C } from "../../context/field.mjs";
|
|
8
|
-
import { getSchemaProperties as P } from "../../utils/schema.mjs";
|
|
9
|
-
function g(e) {
|
|
10
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !f(e);
|
|
11
|
-
}
|
|
12
|
-
const B = /* @__PURE__ */ p({
|
|
13
|
-
name: "ObjectField",
|
|
14
|
-
props: b,
|
|
15
|
-
setup(e) {
|
|
16
|
-
const {
|
|
17
|
-
schema: a
|
|
18
|
-
} = h(e), c = j();
|
|
19
|
-
let t = null;
|
|
20
|
-
a.value["x-component"] && (t = c == null ? void 0 : c.createObjectField(e.schema, e.name, e.basePath), C(t));
|
|
21
|
-
const s = () => {
|
|
22
|
-
const l = P(a.value);
|
|
23
|
-
return n(i, null, [l.map((o, r) => n(F, {
|
|
24
|
-
key: `${r}-${o.key}`,
|
|
25
|
-
schema: o.schema,
|
|
26
|
-
name: o.key,
|
|
27
|
-
basePath: e.name
|
|
28
|
-
}, null, 8, ["schema", "name", "basePath"]))]);
|
|
29
|
-
}, u = () => t ? ((r) => {
|
|
30
|
-
if (t.decorator) {
|
|
31
|
-
const m = t.decorator;
|
|
32
|
-
return n(m, null, g(r) ? r : {
|
|
33
|
-
default: () => [r],
|
|
34
|
-
_: 2
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
return r;
|
|
38
|
-
})((() => {
|
|
39
|
-
if (t.component) {
|
|
40
|
-
const r = t.component;
|
|
41
|
-
return n(r, {
|
|
42
|
-
onChange: (d) => {
|
|
43
|
-
t.change(d);
|
|
44
|
-
}
|
|
45
|
-
}, null, 16);
|
|
46
|
-
}
|
|
47
|
-
return null;
|
|
48
|
-
})()) : null;
|
|
49
|
-
return () => n(i, null, [a.value["x-component"] ? u() : s()]);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
export {
|
|
53
|
-
B as default
|
|
54
|
-
};
|