@vunk/form 2.19.19 → 2.19.21
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/components/ai-provider/index.cjs +1 -0
- package/components/ai-provider/index.d.ts +7 -0
- package/components/ai-provider/index.mjs +61 -0
- package/components/ai-provider/src/ctx.d.ts +8 -0
- package/components/ai-provider/src/index.vue.d.ts +23 -0
- package/components/ai-provider/src/types.d.ts +56 -0
- package/components/ai-provider/src/use.d.ts +3 -0
- package/components/api-tables-select/index.cjs +1 -1
- package/components/api-tables-select/index.mjs +1 -1
- package/components/api-tables-select/src/ctx.d.ts +57 -57
- package/components/api-tables-select/src/index.vue.d.ts +46 -419
- package/components/button/index.cjs +1 -1
- package/components/button/index.mjs +12 -12
- package/components/button/src/ctx.d.ts +7 -2
- package/components/button/src/index.vue.d.ts +36 -14
- package/components/card-input-collection/index.cjs +1 -1
- package/components/card-input-collection/index.mjs +136 -141
- package/components/card-input-collection/src/core.vue.d.ts +18 -7
- package/components/card-input-collection/src/ctx.d.ts +7 -2
- package/components/card-input-collection/src/index.vue.d.ts +18 -7
- package/components/cascader/index.cjs +1 -1
- package/components/cascader/index.mjs +38 -39
- package/components/cascader/src/ctx.d.ts +8 -3
- package/components/cascader/src/index.vue.d.ts +19 -8
- package/components/checkbox/src/ctx.d.ts +8 -3
- package/components/checkbox/src/index.vue.d.ts +43 -21
- package/components/{cloneDeep-DE0l40hv.mjs → cloneDeep-2YeQ7w2t.mjs} +10 -10
- package/components/cloneDeep-Btpy0oPF.js +1 -0
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.mjs +19 -22
- package/components/collapse-item/index.cjs +1 -1
- package/components/collapse-item/index.mjs +21 -21
- package/components/collapse-item/src/index.vue.d.ts +2 -2
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.mjs +26 -27
- package/components/color-picker/src/ctx.d.ts +7 -2
- package/components/color-picker/src/index.vue.d.ts +17 -6
- package/components/{style.css → components.css} +1 -1
- package/components/date-picker/index.cjs +1 -1
- package/components/date-picker/index.mjs +40 -41
- package/components/date-picker/src/ctx.d.ts +8 -3
- package/components/date-picker/src/index.vue.d.ts +17 -6
- package/components/date-picker-range/index.cjs +1 -1
- package/components/date-picker-range/index.mjs +17 -17
- package/components/date-picker-range/src/ctx.d.ts +14 -9
- package/components/date-picker-range/src/index.vue.d.ts +48 -26
- package/components/dialog/index.cjs +1 -1
- package/components/dialog/index.mjs +41 -52
- package/components/dialog/src/ctx.d.ts +1 -1
- package/components/dialog/src/index.vue.d.ts +1 -1
- package/components/dialog-input-collection/index.cjs +1 -1
- package/components/dialog-input-collection/index.mjs +124 -122
- package/components/dialog-input-collection/src/ctx.d.ts +7 -2
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -1
- package/components/dialog-input-collection/src/index.vue.d.ts +17 -6
- package/components/download-plus/index.cjs +1 -1
- package/components/download-plus/index.mjs +193 -202
- package/components/download-plus/src/ctx.d.ts +7 -2
- package/components/download-plus/src/index.vue.d.ts +32 -10
- package/components/editable-text/index.cjs +1 -1
- package/components/editable-text/index.mjs +72 -75
- package/components/editable-text/src/ctx.d.ts +7 -2
- package/components/editable-text/src/index.vue.d.ts +18 -7
- package/components/el-slider/index.cjs +1 -1
- package/components/el-slider/index.mjs +230 -233
- package/components/el-slider/src/composables/index.cjs +1 -1
- package/components/el-slider/src/composables/index.mjs +1 -1
- package/components/el-slider/src/slider-core.vue.d.ts +3 -3
- package/components/esri-input-geojson/index.cjs +1 -5
- package/components/esri-input-geojson/index.mjs +59 -68
- package/components/esri-input-geojson/src/append.vue.d.ts +2 -2
- package/components/esri-input-geojson/src/ctx.d.ts +9 -4
- package/components/esri-input-geojson/src/index.vue.d.ts +65 -30
- package/components/fieldset/src/index.vue.d.ts +1 -1
- package/components/form/index.cjs +1 -1
- package/components/form/index.mjs +96 -101
- package/components/form/src/ctx.d.ts +2 -2
- package/components/form/src/index.vue.d.ts +4 -4
- package/components/form/src/use.d.ts +2 -2
- package/components/form-item/index.cjs +1 -1
- package/components/form-item/index.mjs +179 -107
- package/components/form-item/src/core.vue.d.ts +7 -3
- package/components/form-item/src/ctx.d.ts +7 -1
- package/components/form-item/src/index.vue.d.ts +13 -2
- package/components/form-item/src/use.d.ts +11 -0
- package/components/form-item-renderer/index.cjs +1 -1
- package/components/form-item-renderer/index.d.ts +1 -0
- package/components/form-item-renderer/index.mjs +85 -78
- package/components/form-item-renderer/src/use.d.ts +3 -0
- package/components/forms-provider/index.cjs +1 -1
- package/components/forms-provider/index.mjs +18 -21
- package/components/index-BIo_4rr_.mjs +18620 -0
- package/components/index-Bc7UifHG.js +1 -0
- package/components/index-D0D9ABpH.js +108 -0
- package/components/{index-CeHbpfCD.mjs → index-DCNYT7Wv.mjs} +0 -1
- package/components/information-collection/index.cjs +1 -1
- package/components/information-collection/index.mjs +32 -38
- package/components/information-collection/src/ctx.d.ts +7 -2
- package/components/information-collection/src/index.vue.d.ts +17 -6
- package/components/information-tag/index.cjs +1 -1
- package/components/information-tag/index.mjs +9 -12
- package/components/information-tag/src/index.vue.d.ts +1 -1
- package/components/input/index.cjs +1 -1
- package/components/input/index.mjs +27 -27
- package/components/input/src/ctx.d.ts +9 -4
- package/components/input/src/index.vue.d.ts +35 -13
- package/components/input-array/index.cjs +1 -1
- package/components/input-array/index.mjs +71 -74
- package/components/input-array/src/ctx.d.ts +7 -2
- package/components/input-array/src/index.vue.d.ts +18 -7
- package/components/input-collection/index.cjs +1 -1
- package/components/input-collection/index.mjs +121 -126
- package/components/input-collection/src/core.vue.d.ts +17 -6
- package/components/input-collection/src/ctx.d.ts +7 -2
- package/components/input-collection/src/index.vue.d.ts +17 -6
- package/components/input-file/src/index.vue.d.ts +19 -8
- package/components/input-link/index.cjs +1 -1
- package/components/input-link/index.mjs +1 -1
- package/components/input-link/src/ctx.d.ts +7 -2
- package/components/input-link/src/index.vue.d.ts +54 -21
- package/components/input-number/index.cjs +1 -1
- package/components/input-number/index.mjs +30 -33
- package/components/input-number/src/ctx.d.ts +8 -3
- package/components/input-number/src/index.vue.d.ts +33 -11
- package/components/input-tag/index.cjs +1 -1
- package/components/input-tag/index.mjs +24 -24
- package/components/input-tag/src/ctx.d.ts +9 -4
- package/components/input-tag/src/index.vue.d.ts +33 -11
- package/components/monaco-editor/src/ctx.d.ts +8 -3
- package/components/monaco-editor/src/index.vue.d.ts +38 -16
- package/components/radio/src/ctx.d.ts +7 -2
- package/components/radio/src/index.vue.d.ts +40 -18
- package/components/radio/src/wraper.vue.d.ts +22 -11
- package/components/renderer-data/index.cjs +1 -1
- package/components/renderer-data/index.mjs +14 -17
- package/components/select/index.cjs +1 -1
- package/components/select/index.mjs +165 -112
- package/components/select/src/core.vue.d.ts +107 -70
- package/components/select/src/ctx.d.ts +16 -4
- package/components/select/src/index.vue.d.ts +62 -42
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.mjs +30 -31
- package/components/slider/src/ctx.d.ts +7 -2
- package/components/slider/src/index.vue.d.ts +18 -7
- package/components/switch/src/ctx.d.ts +7 -2
- package/components/switch/src/index.vue.d.ts +18 -7
- package/components/tables-select/index.cjs +1 -1
- package/components/tables-select/index.mjs +4 -4
- package/components/tables-select/src/ctx.d.ts +68 -68
- package/components/tables-select/src/index.vue.d.ts +52 -420
- package/components/template-instances-provider/index.cjs +1 -1
- package/components/template-instances-provider/index.mjs +11 -17
- package/components/templates-default/src/index.vue.d.ts +413 -185
- package/components/templates-esri/src/index.vue.d.ts +65 -30
- package/components/templates-variant/src/index.vue.d.ts +48 -26
- package/components/time-picker/index.cjs +1 -1
- package/components/time-picker/index.mjs +38 -39
- package/components/time-picker/src/ctx.d.ts +8 -3
- package/components/time-picker/src/index.vue.d.ts +17 -6
- package/components/upload/index.cjs +1 -1
- package/components/upload/index.mjs +244 -253
- package/components/upload/src/ctx.d.ts +8 -3
- package/components/upload/src/file.vue.d.ts +3 -3
- package/components/upload/src/index.vue.d.ts +37 -15
- package/components/upload/src/wraper.vue.d.ts +19 -8
- package/components/upload-plus/index.cjs +7 -15
- package/components/upload-plus/index.mjs +1879 -1897
- package/components/upload-plus/src/ctx.d.ts +7 -2
- package/components/upload-plus/src/index.vue.d.ts +18 -7
- package/components/use-watch-C3iIa2DX.js +1 -0
- package/components/use-watch-Dp64x0si.mjs +411 -0
- package/components/van-cascader/src/ctx.d.ts +7 -2
- package/components/van-cascader/src/index.vue.d.ts +19 -8
- package/components/var-datetime-picker/src/ctx.d.ts +7 -2
- package/components/var-datetime-picker/src/index.vue.d.ts +30 -8
- package/components/vditor/src/ctx.d.ts +7 -2
- package/components/vditor/src/index.vue.d.ts +41 -19
- package/composables/element-plus/index.cjs +1 -1
- package/composables/element-plus/index.mjs +10 -10
- package/composables/form-mitt/index.mjs +1 -1
- package/composables/index.cjs +1 -1
- package/composables/index.mjs +53 -53
- package/index.css +1 -1
- package/locale/index.cjs +1 -1
- package/locale/index.mjs +8 -5
- package/locale/lang/ar.d.ts +1 -0
- package/locale/lang/en.d.ts +1 -0
- package/locale/lang/zh-cn.d.ts +1 -0
- package/package.json +9 -1
- package/shared/element-plus/ctx.d.ts +16 -16
- package/shared/types/source/index.d.ts +5 -0
- package/shared/upload/index.cjs +1 -1
- package/shared/upload/index.mjs +166 -165
- package/components/cloneDeep-DaYwfXwD.js +0 -1
- package/components/index-BBriTmQP.js +0 -1
- package/components/use-watch-Bfrz9pv_.js +0 -1
- package/components/use-watch-t49wP7jy.mjs +0 -414
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VkfTemplateInstancesProvider as
|
|
3
|
-
import { genTemplateIfFunc as
|
|
4
|
-
import { useTemplateInstancesContext as
|
|
5
|
-
import { noop as
|
|
6
|
-
const
|
|
1
|
+
import { inject as g, provide as C, defineComponent as _, computed as K, h as O, nextTick as $, openBlock as z, createBlock as B, unref as E, withCtx as u, createVNode as M, normalizeProps as N, guardReactiveProps as q, renderSlot as v } from "vue";
|
|
2
|
+
import { VkfTemplateInstancesProvider as w } from "@vunk/form/components/template-instances-provider";
|
|
3
|
+
import { genTemplateIfFunc as G } from "@vunk/form/shared/form";
|
|
4
|
+
import { useTemplateInstancesContext as H, useRendererData as J } from "@vunk/form/composables";
|
|
5
|
+
import { noop as L, isCallable as S } from "@vunk/shared/function";
|
|
6
|
+
const h = {
|
|
7
7
|
source: {
|
|
8
8
|
type: Array,
|
|
9
9
|
default: () => []
|
|
@@ -17,99 +17,104 @@ const V = {
|
|
|
17
17
|
type: Array,
|
|
18
18
|
default: () => []
|
|
19
19
|
}
|
|
20
|
-
},
|
|
21
|
-
if (
|
|
22
|
-
return typeof
|
|
23
|
-
},
|
|
20
|
+
}, Q = (t) => {
|
|
21
|
+
if (t)
|
|
22
|
+
return typeof t == "function" ? t : typeof t == "string" ? new Function("value", "context", t) : L;
|
|
23
|
+
}, i = /* @__PURE__ */ Symbol("vkfAiSchemaKey");
|
|
24
|
+
function U(t) {
|
|
25
|
+
const o = g(i, null);
|
|
26
|
+
return o || (C(i, t), t);
|
|
27
|
+
}
|
|
28
|
+
function re() {
|
|
29
|
+
return g(i, null);
|
|
30
|
+
}
|
|
31
|
+
const V = _({
|
|
24
32
|
name: "VkfFormItemRenderer",
|
|
25
|
-
props:
|
|
26
|
-
setup(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
props: h,
|
|
34
|
+
setup(t, o) {
|
|
35
|
+
U(t.source);
|
|
36
|
+
const { templateInstances: n, getTemplateInstance: p } = H(), {
|
|
37
|
+
emitSetData: f,
|
|
38
|
+
data: a,
|
|
39
|
+
getDataValue: c
|
|
40
|
+
} = J(), b = (l) => O(V, {
|
|
32
41
|
templateInstances: n,
|
|
33
|
-
...
|
|
34
|
-
}), A = (
|
|
35
|
-
var P, T, I;
|
|
42
|
+
...l
|
|
43
|
+
}), A = (l, F = []) => l.reduce((m, e, R) => {
|
|
36
44
|
e.key = e.key ?? (Array.isArray(e.prop) ? e.prop.join() : e.prop);
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
e.templateType && !
|
|
45
|
+
const d = [...t.k, ...F, R], j = () => {
|
|
46
|
+
$(() => {
|
|
47
|
+
e.templateType && !p(e.templateType) && console.warn(
|
|
40
48
|
e.templateType,
|
|
41
49
|
"templateType不存在将跳过"
|
|
42
50
|
);
|
|
43
51
|
});
|
|
44
52
|
};
|
|
45
|
-
if (e.templateType &&
|
|
46
|
-
const
|
|
53
|
+
if (e.templateType && p(e.templateType)) {
|
|
54
|
+
const r = { ...e };
|
|
47
55
|
Object.assign(
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
r,
|
|
57
|
+
S(e.templateProps) ? e.templateProps(a?.value) : e.templateProps
|
|
50
58
|
);
|
|
51
|
-
const
|
|
52
|
-
|
|
59
|
+
const y = G(
|
|
60
|
+
r.templateIf
|
|
53
61
|
);
|
|
54
|
-
if (!(
|
|
55
|
-
const
|
|
56
|
-
Reflect.deleteProperty(
|
|
57
|
-
const
|
|
58
|
-
get: () => e.prop && (
|
|
59
|
-
set: (
|
|
62
|
+
if (!(a ? y(a.value) : !0)) return m;
|
|
63
|
+
const D = S(r.informationProps) ? r.informationProps(a?.value) : r.informationProps, P = Q(r.inputEffect);
|
|
64
|
+
Reflect.deleteProperty(r, "templateType"), Reflect.deleteProperty(r, "templateIf"), Reflect.deleteProperty(r, "templateProps"), Reflect.deleteProperty(r, "informationProps"), Reflect.deleteProperty(r, "inputEffect");
|
|
65
|
+
const x = d.join(",") + "-" + e.templateType + "-" + (e.prop || "no-prop"), T = K({
|
|
66
|
+
get: () => e.prop && c?.(e.prop),
|
|
67
|
+
set: (s) => f?.({
|
|
60
68
|
k: e.prop,
|
|
61
|
-
v:
|
|
69
|
+
v: s
|
|
62
70
|
})
|
|
63
|
-
}),
|
|
71
|
+
}), k = {
|
|
64
72
|
// for legacy
|
|
65
|
-
data:
|
|
73
|
+
data: r,
|
|
66
74
|
raw: e,
|
|
67
|
-
props:
|
|
68
|
-
k:
|
|
69
|
-
key:
|
|
70
|
-
value:
|
|
71
|
-
input: (
|
|
72
|
-
|
|
73
|
-
...
|
|
75
|
+
props: r,
|
|
76
|
+
k: d,
|
|
77
|
+
key: x,
|
|
78
|
+
value: T.value,
|
|
79
|
+
input: (s) => {
|
|
80
|
+
T.value = s, P?.(s, {
|
|
81
|
+
...k,
|
|
74
82
|
parentProp: [e.prop].flat(1 / 0).slice(0, -1)
|
|
75
83
|
});
|
|
76
84
|
},
|
|
77
|
-
informationProps:
|
|
78
|
-
templateIf:
|
|
79
|
-
Renderer:
|
|
80
|
-
getDataValue:
|
|
81
|
-
emitSetData:
|
|
82
|
-
inputEffect:
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
+
informationProps: D,
|
|
86
|
+
templateIf: y,
|
|
87
|
+
Renderer: b,
|
|
88
|
+
getDataValue: c,
|
|
89
|
+
emitSetData: f,
|
|
90
|
+
inputEffect: P
|
|
91
|
+
}, I = p(e.templateType)?.slots.default?.(k);
|
|
92
|
+
I && m.push(I);
|
|
85
93
|
} else
|
|
86
|
-
|
|
87
|
-
return
|
|
94
|
+
j();
|
|
95
|
+
return m;
|
|
88
96
|
}, []);
|
|
89
|
-
return () =>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
A(o.source)
|
|
94
|
-
];
|
|
95
|
-
};
|
|
97
|
+
return () => [
|
|
98
|
+
o.slots.default?.(),
|
|
99
|
+
A(t.source)
|
|
100
|
+
];
|
|
96
101
|
}
|
|
97
|
-
}),
|
|
102
|
+
}), oe = /* @__PURE__ */ _({
|
|
98
103
|
__name: "index",
|
|
99
|
-
props:
|
|
100
|
-
setup(
|
|
101
|
-
const
|
|
102
|
-
return (n,
|
|
103
|
-
placeholder:
|
|
104
|
-
|
|
104
|
+
props: h,
|
|
105
|
+
setup(t) {
|
|
106
|
+
const o = t;
|
|
107
|
+
return (n, p) => (z(), B(E(w), null, {
|
|
108
|
+
placeholder: u(() => [
|
|
109
|
+
v(n.$slots, "placeholder")
|
|
105
110
|
]),
|
|
106
|
-
default:
|
|
107
|
-
|
|
108
|
-
...
|
|
111
|
+
default: u(() => [
|
|
112
|
+
M(V, N(q({
|
|
113
|
+
...o,
|
|
109
114
|
...n.$attrs
|
|
110
115
|
})), {
|
|
111
|
-
default:
|
|
112
|
-
|
|
116
|
+
default: u(() => [
|
|
117
|
+
v(n.$slots, "default")
|
|
113
118
|
]),
|
|
114
119
|
_: 3
|
|
115
120
|
}, 16)
|
|
@@ -117,11 +122,13 @@ const V = {
|
|
|
117
122
|
_: 3
|
|
118
123
|
}));
|
|
119
124
|
}
|
|
120
|
-
}),
|
|
125
|
+
}), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
121
126
|
__proto__: null
|
|
122
127
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
123
128
|
export {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
oe as VkfFormItemRenderer,
|
|
130
|
+
ne as __VkfFormItemRenderer,
|
|
131
|
+
oe as default,
|
|
132
|
+
U as initAiSchema,
|
|
133
|
+
re as useAiSchema
|
|
127
134
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@vunk/core/components/segment-renderer"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@vunk/core/components/segment-renderer"),e=require("vue"),i=require("element-plus"),{SegmentRenderer:m,Segment:d,SegmentView:g,useSegmentRendererContext:u}=c.createSegmentRenderer("@vunk/form:provider");m.name="VkfFormsProvider";const f=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),_=e.defineComponent({name:"VkfFormsSegment",inheritAttrs:!1,__name:"segment",setup(a){function o(){try{return u()}catch{return null}}const s=o(),r=e.inject(i.formContextKey),n=async t=>r.validateField(void 0,t);return(t,l)=>e.unref(s)?(e.openBlock(),e.createBlock(e.unref(d),e.mergeProps({key:0,validate:n,form:e.unref(r)},t.$attrs),null,16,["form"])):e.renderSlot(t.$slots,"default",{key:1})}}),p=e.defineComponent({__name:"view",setup(a,{expose:o}){const s=u(),r=e.computed(()=>s.items.map(t=>t.attrs));async function n(){return Promise.all(r.value.map(t=>t.validate?.()))}return o({forms:r,validate:n}),(t,l)=>e.renderSlot(t.$slots,"default",{forms:r.value,validate:n})}});exports.VkfFormsProvider=m;exports.VkfFormsSegment=_;exports.VkfFormsView=p;exports.__VkfFormsProvider=f;exports.default=m;
|
|
@@ -1,53 +1,50 @@
|
|
|
1
|
-
import { createSegmentRenderer as
|
|
2
|
-
import { defineComponent as
|
|
1
|
+
import { createSegmentRenderer as l } from "@vunk/core/components/segment-renderer";
|
|
2
|
+
import { defineComponent as m, inject as u, unref as s, openBlock as d, createBlock as p, mergeProps as _, renderSlot as a, computed as g } from "vue";
|
|
3
3
|
import { formContextKey as v } from "element-plus";
|
|
4
4
|
const {
|
|
5
5
|
SegmentRenderer: k,
|
|
6
6
|
Segment: S,
|
|
7
7
|
SegmentView: C,
|
|
8
|
-
useSegmentRendererContext:
|
|
9
|
-
} =
|
|
8
|
+
useSegmentRendererContext: c
|
|
9
|
+
} = l("@vunk/form:provider");
|
|
10
10
|
k.name = "VkfFormsProvider";
|
|
11
11
|
const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12
12
|
__proto__: null
|
|
13
|
-
}, Symbol.toStringTag, { value: "Module" })), P = /* @__PURE__ */
|
|
13
|
+
}, Symbol.toStringTag, { value: "Module" })), P = /* @__PURE__ */ m({
|
|
14
14
|
name: "VkfFormsSegment",
|
|
15
15
|
inheritAttrs: !1,
|
|
16
16
|
__name: "segment",
|
|
17
|
-
setup(
|
|
18
|
-
function
|
|
17
|
+
setup(f) {
|
|
18
|
+
function n() {
|
|
19
19
|
try {
|
|
20
|
-
return
|
|
20
|
+
return c();
|
|
21
21
|
} catch {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const o = n(), t = u(v), r = async (e) => t.validateField(
|
|
26
26
|
void 0,
|
|
27
27
|
e
|
|
28
28
|
);
|
|
29
|
-
return (e,
|
|
29
|
+
return (e, i) => s(o) ? (d(), p(s(S), _({
|
|
30
30
|
key: 0,
|
|
31
31
|
validate: r,
|
|
32
|
-
form:
|
|
33
|
-
}, e.$attrs), null, 16, ["form"])) :
|
|
32
|
+
form: s(t)
|
|
33
|
+
}, e.$attrs), null, 16, ["form"])) : a(e.$slots, "default", { key: 1 });
|
|
34
34
|
}
|
|
35
|
-
}), R = /* @__PURE__ */
|
|
35
|
+
}), R = /* @__PURE__ */ m({
|
|
36
36
|
__name: "view",
|
|
37
|
-
setup(
|
|
38
|
-
const
|
|
37
|
+
setup(f, { expose: n }) {
|
|
38
|
+
const o = c(), t = g(() => o.items.map((e) => e.attrs));
|
|
39
39
|
async function r() {
|
|
40
40
|
return Promise.all(
|
|
41
|
-
t.value.map((e) =>
|
|
42
|
-
var n;
|
|
43
|
-
return (n = e.validate) == null ? void 0 : n.call(e);
|
|
44
|
-
})
|
|
41
|
+
t.value.map((e) => e.validate?.())
|
|
45
42
|
);
|
|
46
43
|
}
|
|
47
|
-
return
|
|
44
|
+
return n({
|
|
48
45
|
forms: t,
|
|
49
46
|
validate: r
|
|
50
|
-
}), (e,
|
|
47
|
+
}), (e, i) => a(e.$slots, "default", {
|
|
51
48
|
forms: t.value,
|
|
52
49
|
validate: r
|
|
53
50
|
});
|