@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,6 +1,6 @@
|
|
|
1
1
|
import { _VkfFormItemCtx as f, VkfFormItem as B } from "@vunk/form/components/form-item";
|
|
2
2
|
import { buttonProps as _, buttonEmits as b, ElButton as C } from "element-plus";
|
|
3
|
-
import { defineComponent as P, inject as v, resolveComponent as
|
|
3
|
+
import { defineComponent as P, inject as v, resolveComponent as m, openBlock as p, createBlock as u, normalizeProps as V, guardReactiveProps as h, withCtx as l, createVNode as y, mergeProps as S, toHandlers as E, createSlots as g, renderSlot as F, createTextVNode as O, toDisplayString as $, renderList as j, resolveDynamicComponent as I } from "vue";
|
|
4
4
|
import { createButtonBindProps as L, createButtonOnEmits as R } from "@vunk/form/shared/element-plus";
|
|
5
5
|
import { validateCatch as z } from "@vunk/form/shared/form";
|
|
6
6
|
import { _ as D } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
@@ -29,24 +29,24 @@ const N = {
|
|
|
29
29
|
},
|
|
30
30
|
props: N,
|
|
31
31
|
emits: T,
|
|
32
|
-
setup(t, { emit:
|
|
33
|
-
const s = L(t), a = R(
|
|
32
|
+
setup(t, { emit: o }) {
|
|
33
|
+
const s = L(t), a = R(o, ["click"]), c = f.createBindProps(t), n = v("elFormRef", null);
|
|
34
34
|
return {
|
|
35
35
|
formBindProps: c,
|
|
36
36
|
coreBindProps: s,
|
|
37
37
|
coreOnEmits: a,
|
|
38
|
-
handleClick: (
|
|
39
|
-
if (!
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
handleClick: (e) => {
|
|
39
|
+
if (!n || !t.validate) return o("click", e);
|
|
40
|
+
n.value.validate().then((r) => {
|
|
41
|
+
r && o("click", e);
|
|
42
42
|
}).catch(z);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function H(t,
|
|
48
|
-
const i =
|
|
49
|
-
return
|
|
47
|
+
function H(t, o, s, a, c, n) {
|
|
48
|
+
const i = m("ElButton"), e = m("VkfFormItem");
|
|
49
|
+
return p(), u(e, V(h(t.formBindProps)), {
|
|
50
50
|
default: l(() => [
|
|
51
51
|
y(i, S(t.coreBindProps, E(t.coreOnEmits), { onClick: t.handleClick }), g({
|
|
52
52
|
default: l(() => [
|
|
@@ -56,10 +56,10 @@ function H(t, e, s, a, c, r) {
|
|
|
56
56
|
]),
|
|
57
57
|
_: 2
|
|
58
58
|
}, [
|
|
59
|
-
j(t.buttonSlots, (
|
|
59
|
+
j(t.buttonSlots, (r, d) => ({
|
|
60
60
|
name: d,
|
|
61
61
|
fn: l((k) => [
|
|
62
|
-
(
|
|
62
|
+
(p(), u(I(r?.(k))))
|
|
63
63
|
])
|
|
64
64
|
}))
|
|
65
65
|
]), 1040, ["onClick"])
|
|
@@ -43,6 +43,8 @@ export declare const props: {
|
|
|
43
43
|
autoInsertSpace: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
44
44
|
tag: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, "button", boolean>;
|
|
45
45
|
required: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
46
|
+
error: StringConstructor;
|
|
47
|
+
prop: null;
|
|
46
48
|
labelPosition: {
|
|
47
49
|
type: PropType<"left" | "right" | "top" | "start" | "end">;
|
|
48
50
|
default: undefined;
|
|
@@ -80,12 +82,16 @@ export declare const props: {
|
|
|
80
82
|
type: BooleanConstructor;
|
|
81
83
|
default: boolean;
|
|
82
84
|
};
|
|
83
|
-
prop: null;
|
|
84
85
|
defaultModelValue: null;
|
|
85
86
|
labelTipProps: {
|
|
86
87
|
type: PropType<import("element-plus").UseTooltipProps>;
|
|
87
88
|
default: () => {};
|
|
88
89
|
};
|
|
90
|
+
ai: {
|
|
91
|
+
type: PropType<import("../../ai-provider").AiConfig>;
|
|
92
|
+
default: undefined;
|
|
93
|
+
};
|
|
94
|
+
aiOutput: null;
|
|
89
95
|
label: StringConstructor;
|
|
90
96
|
labelWidth: {
|
|
91
97
|
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
@@ -99,7 +105,6 @@ export declare const props: {
|
|
|
99
105
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
100
106
|
__epPropKey: true;
|
|
101
107
|
};
|
|
102
|
-
error: StringConstructor;
|
|
103
108
|
validateStatus: {
|
|
104
109
|
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
105
110
|
readonly required: false;
|
|
@@ -44,6 +44,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
44
44
|
autoInsertSpace: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
45
45
|
tag: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, "button", boolean>;
|
|
46
46
|
required: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
47
|
+
error: StringConstructor;
|
|
48
|
+
prop: null;
|
|
47
49
|
labelPosition: {
|
|
48
50
|
type: import("vue").PropType<"left" | "right" | "top" | "start" | "end">;
|
|
49
51
|
default: undefined;
|
|
@@ -81,12 +83,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
83
|
type: BooleanConstructor;
|
|
82
84
|
default: boolean;
|
|
83
85
|
};
|
|
84
|
-
prop: null;
|
|
85
86
|
defaultModelValue: null;
|
|
86
87
|
labelTipProps: {
|
|
87
88
|
type: import("vue").PropType<import("element-plus").UseTooltipProps>;
|
|
88
89
|
default: () => {};
|
|
89
90
|
};
|
|
91
|
+
ai: {
|
|
92
|
+
type: import("vue").PropType<import("../../ai-provider").AiConfig>;
|
|
93
|
+
default: undefined;
|
|
94
|
+
};
|
|
95
|
+
aiOutput: null;
|
|
90
96
|
label: StringConstructor;
|
|
91
97
|
labelWidth: {
|
|
92
98
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
@@ -100,7 +106,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
100
106
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
101
107
|
__epPropKey: true;
|
|
102
108
|
};
|
|
103
|
-
error: StringConstructor;
|
|
104
109
|
validateStatus: {
|
|
105
110
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
106
111
|
readonly required: false;
|
|
@@ -160,6 +165,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
160
165
|
autoInsertSpace: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
161
166
|
tag: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, "button", boolean>;
|
|
162
167
|
required: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
168
|
+
error: StringConstructor;
|
|
169
|
+
prop: null;
|
|
163
170
|
labelPosition: {
|
|
164
171
|
type: import("vue").PropType<"left" | "right" | "top" | "start" | "end">;
|
|
165
172
|
default: undefined;
|
|
@@ -197,12 +204,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
197
204
|
type: BooleanConstructor;
|
|
198
205
|
default: boolean;
|
|
199
206
|
};
|
|
200
|
-
prop: null;
|
|
201
207
|
defaultModelValue: null;
|
|
202
208
|
labelTipProps: {
|
|
203
209
|
type: import("vue").PropType<import("element-plus").UseTooltipProps>;
|
|
204
210
|
default: () => {};
|
|
205
211
|
};
|
|
212
|
+
ai: {
|
|
213
|
+
type: import("vue").PropType<import("../../ai-provider").AiConfig>;
|
|
214
|
+
default: undefined;
|
|
215
|
+
};
|
|
216
|
+
aiOutput: null;
|
|
206
217
|
label: StringConstructor;
|
|
207
218
|
labelWidth: {
|
|
208
219
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
@@ -216,7 +227,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
216
227
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
217
228
|
__epPropKey: true;
|
|
218
229
|
};
|
|
219
|
-
error: StringConstructor;
|
|
220
230
|
validateStatus: {
|
|
221
231
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
222
232
|
readonly required: false;
|
|
@@ -229,10 +239,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
229
239
|
}>> & Readonly<{
|
|
230
240
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
231
241
|
}>, {
|
|
232
|
-
type: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger"
|
|
242
|
+
type: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
243
|
+
validate: boolean;
|
|
244
|
+
link: boolean;
|
|
233
245
|
required: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
234
|
-
|
|
235
|
-
|
|
246
|
+
text: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
247
|
+
labelPosition: "start" | "left" | "right" | "top" | "end";
|
|
248
|
+
formItemSize: "small" | "default" | "large";
|
|
236
249
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
237
250
|
inline: boolean;
|
|
238
251
|
readonly: boolean;
|
|
@@ -240,12 +253,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
240
253
|
labelTip: string;
|
|
241
254
|
information: boolean;
|
|
242
255
|
labelTipProps: import("element-plus").UseTooltipProps;
|
|
256
|
+
ai: import("../../ai-provider").AiConfig;
|
|
243
257
|
inlineMessage: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
244
258
|
showMessage: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
245
259
|
disabled: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
246
260
|
autofocus: boolean;
|
|
247
|
-
text: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
248
|
-
link: boolean;
|
|
249
261
|
loading: boolean;
|
|
250
262
|
tag: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | null)[], unknown, unknown>;
|
|
251
263
|
dark: boolean;
|
|
@@ -259,7 +271,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
259
271
|
autoInsertSpace: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
260
272
|
buttonSlots: import("./types").ButtonSlots;
|
|
261
273
|
buttonLabel: string;
|
|
262
|
-
validate: boolean;
|
|
263
274
|
}, {}, {
|
|
264
275
|
VkfFormItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<Omit<{
|
|
265
276
|
labelPosition: {
|
|
@@ -305,6 +316,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
305
316
|
type: import("vue").PropType<import("element-plus").UseTooltipProps>;
|
|
306
317
|
default: () => {};
|
|
307
318
|
};
|
|
319
|
+
ai: {
|
|
320
|
+
type: import("vue").PropType<import("../../ai-provider").AiConfig>;
|
|
321
|
+
default: undefined;
|
|
322
|
+
};
|
|
323
|
+
aiOutput: null;
|
|
308
324
|
label: StringConstructor;
|
|
309
325
|
labelWidth: {
|
|
310
326
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
@@ -381,6 +397,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
381
397
|
type: import("vue").PropType<import("element-plus").UseTooltipProps>;
|
|
382
398
|
default: () => {};
|
|
383
399
|
};
|
|
400
|
+
ai: {
|
|
401
|
+
type: import("vue").PropType<import("../../ai-provider").AiConfig>;
|
|
402
|
+
default: undefined;
|
|
403
|
+
};
|
|
404
|
+
aiOutput: null;
|
|
384
405
|
label: StringConstructor;
|
|
385
406
|
labelWidth: {
|
|
386
407
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
@@ -413,8 +434,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
413
434
|
};
|
|
414
435
|
}, "size">>> & Readonly<{}>, {
|
|
415
436
|
required: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
416
|
-
labelPosition: "
|
|
417
|
-
formItemSize: "
|
|
437
|
+
labelPosition: "start" | "left" | "right" | "top" | "end";
|
|
438
|
+
formItemSize: "small" | "default" | "large";
|
|
418
439
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
419
440
|
inline: boolean;
|
|
420
441
|
readonly: boolean;
|
|
@@ -422,6 +443,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
422
443
|
labelTip: string;
|
|
423
444
|
information: boolean;
|
|
424
445
|
labelTipProps: import("element-plus").UseTooltipProps;
|
|
446
|
+
ai: import("../../ai-provider").AiConfig;
|
|
425
447
|
inlineMessage: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
426
448
|
showMessage: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
427
449
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -508,9 +530,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
508
530
|
};
|
|
509
531
|
}) & import("vue").ObjectPlugin & {
|
|
510
532
|
setPropsDefaults: (defaults: {
|
|
511
|
-
readonly size?: "" | "
|
|
533
|
+
readonly size?: "" | "small" | "default" | "large" | (() => "" | "small" | "default" | "large") | undefined;
|
|
512
534
|
readonly disabled?: boolean | (() => boolean) | undefined;
|
|
513
|
-
readonly type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger" |
|
|
535
|
+
readonly type?: "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger" | (() => "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger") | undefined;
|
|
514
536
|
readonly icon?: string | import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
515
537
|
new (...args: any[]): any;
|
|
516
538
|
__isFragment?: never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("@vunk/form/components/form-item"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("@vunk/form/components/form-item"),_=require("@vunk/form/composables"),n=require("element-plus"),c=require("@vunk/core"),N=require("@vunk/form/components/templates-default"),I=require("@vunk/form/components/template-instances-provider"),q=require("@vunk/form/components/fieldset"),w=require("@vunk/form/components/form-item-renderer"),T=require("@vunk/form/components/renderer-data"),E=require("@vunk/form/composables/element-plus"),C=require("@vunk/shared/function"),A=require("../index-Bc7UifHG.js"),m=require("../cloneDeep-Btpy0oPF.js"),v={...y._VkfFormItemCtx.props,columns:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},readonly:{type:Boolean,default:void 0},splicable:{type:Boolean,default:!0},slots:{type:Object,default:()=>({})},labelActions:{type:Boolean,default:!1},defaultItemValue:{type:[Object,Function],default:()=>({})},keepLast:{type:Boolean,default:!1},topSplicable:{type:Boolean,default:!0},cardProps:{type:Object,default:()=>({})},fieldsetProps:{type:Object,default:()=>({})}},b={"update:modelValue":null},F={key:0,class:"vkf-card-input-collection-options"},j={class:"vkf-card-input-collection-card__footer"},O=e.defineComponent({inheritAttrs:!1,__name:"core",props:v,emits:b,setup(d,{emit:V}){const l=d,u=V,B=y._VkfFormItemCtx.createBindProps(l),p=_.useComputedReadonly(l),{tr:i}=E.useLocale(),f=e.computed(()=>{if(!l.prop||l.prop.length===0)return l.modelValue;const t={};return c.ensetData(t,{k:l.prop,v:l.modelValue}),t});function k(t){const o=m.cloneDeep(l.modelValue),r=C.isCallable(l.defaultItemValue)?l.defaultItemValue():l.defaultItemValue;o.splice(t+1,0,m.cloneDeep(r)),u("update:modelValue",o)}function g(t){const o=m.cloneDeep(l.modelValue);o.splice(t,1),u("update:modelValue",o)}const h=t=>{const o=m.cloneDeep(f.value);c.ensetData(o,t),u("update:modelValue",c.getValue(o,l.prop))};function D(t){return l.columns.map(o=>{const r=[l.prop??[],t].flat(),a=[r,o.prop].flat(),s={readonly:p.value,...o,prop:a};Reflect.deleteProperty(s,"createTemplateProps"),C.isCallable(o.templateProps)&&(s.templateProps=()=>o.templateProps(c.getValue(f.value,r)));const S=o.createTemplateProps?.({$index:t,row:c.getValue(f.value,r)},s)??{};return Object.assign(s,S),s})}return(t,o)=>(e.openBlock(),e.createBlock(e.unref(I.VkfTemplateInstancesProvider),null,{placeholder:e.withCtx(()=>[e.createVNode(e.unref(N.VkfTemplatesDefault))]),default:e.withCtx(()=>[e.createVNode(e.unref(y.VkfFormItem),e.mergeProps({class:"vkf-card-input-collection"},{...e.unref(B),...t.$attrs}),e.createSlots({default:e.withCtx(()=>[!e.unref(p)&&t.splicable&&!t.labelActions&&t.topSplicable?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(e.unref(n.ElButton),{type:"primary",onClick:o[1]||(o[1]=r=>k(-1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("vkf.common.add","添加")),1)]),_:1})])):e.createCommentVNode("",!0),t.modelValue?.length?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n.ElEmpty),{key:1,class:"vkf-card-input-collection-empty"},{image:e.withCtx(()=>[...o[2]||(o[2]=[e.createTextVNode(e.toDisplayString(""),-1)])]),_:1})),e.createVNode(e.unref(T.VkfRendererData),{data:f.value,onSetData:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.modelValue,(r,a)=>(e.openBlock(),e.createBlock(e.unref(n.ElCard),e.mergeProps({key:a,class:"vkf-card-input-collection-card"},{ref_for:!0},t.cardProps),e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(q.VkfFieldset),e.mergeProps({ref_for:!0},t.fieldsetProps),{default:e.withCtx(()=>[e.createVNode(e.unref(w.VkfFormItemRenderer),{source:D(a)},null,8,["source"])]),_:2},1040)]),_:2},[!e.unref(p)&&t.splicable?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",j,[e.renderSlot(t.$slots,"footerActions",{index:a}),e.createVNode(e.unref(n.ElButton),{type:"primary",onClick:()=>k(a)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("vkf.common.add","添加")),1)]),_:1},8,["onClick"]),e.createVNode(e.unref(n.ElButton),{type:"danger",disabled:t.modelValue.length<=1&&l.keepLast,onClick:()=>g(a)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("vkf.common.delete","删除")),1)]),_:1},8,["disabled","onClick"])])]),key:"0"}:void 0]),1040))),128))]),_:3},8,["data"])]),_:2},[t.labelActions?{name:"labelActions",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"labelActions"),!e.unref(p)&&t.splicable&&t.topSplicable?(e.openBlock(),e.createBlock(e.unref(n.ElButton),{key:0,size:"small",icon:e.unref(A.plus_default),onClick:o[0]||(o[0]=r=>k(-1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("vkf.common.add","添加")),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1040)]),_:3}))}}),P=e.defineComponent({name:"VkfCardInputCollection",props:v,emits:b,setup(d,{slots:V,emit:l}){return()=>e.h(O,{...d,"onUpdate:modelValue":u=>l("update:modelValue",u)},{...d.slots,...V})}}),$=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfCardInputCollection=P;exports.__VkfCardInputCollection=$;exports.default=P;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _VkfFormItemCtx as
|
|
3
|
-
import { useComputedReadonly as
|
|
4
|
-
import { ElButton as
|
|
5
|
-
import { ensetData as
|
|
6
|
-
import { VkfTemplatesDefault as
|
|
7
|
-
import { VkfTemplateInstancesProvider as
|
|
8
|
-
import { VkfFieldset as
|
|
9
|
-
import { VkfFormItemRenderer as
|
|
10
|
-
import { VkfRendererData as
|
|
11
|
-
import { useLocale as
|
|
12
|
-
import { isCallable as
|
|
13
|
-
import { p as
|
|
14
|
-
import { c as
|
|
15
|
-
const
|
|
16
|
-
...
|
|
1
|
+
import { defineComponent as F, computed as w, openBlock as s, createBlock as V, unref as o, withCtx as a, createVNode as n, mergeProps as _, createSlots as I, createElementBlock as S, createTextVNode as m, toDisplayString as c, createCommentVNode as g, Fragment as z, renderList as M, createElementVNode as U, renderSlot as A, h as q } from "vue";
|
|
2
|
+
import { _VkfFormItemCtx as j, VkfFormItem as G } from "@vunk/form/components/form-item";
|
|
3
|
+
import { useComputedReadonly as H } from "@vunk/form/composables";
|
|
4
|
+
import { ElButton as v, ElEmpty as J, ElCard as K } from "element-plus";
|
|
5
|
+
import { ensetData as h, getValue as B } from "@vunk/core";
|
|
6
|
+
import { VkfTemplatesDefault as Q } from "@vunk/form/components/templates-default";
|
|
7
|
+
import { VkfTemplateInstancesProvider as W } from "@vunk/form/components/template-instances-provider";
|
|
8
|
+
import { VkfFieldset as X } from "@vunk/form/components/fieldset";
|
|
9
|
+
import { VkfFormItemRenderer as Y } from "@vunk/form/components/form-item-renderer";
|
|
10
|
+
import { VkfRendererData as Z } from "@vunk/form/components/renderer-data";
|
|
11
|
+
import { useLocale as x } from "@vunk/form/composables/element-plus";
|
|
12
|
+
import { isCallable as D } from "@vunk/shared/function";
|
|
13
|
+
import { p as ee } from "../index-DCNYT7Wv.mjs";
|
|
14
|
+
import { c as b } from "../cloneDeep-2YeQ7w2t.mjs";
|
|
15
|
+
const O = {
|
|
16
|
+
...j.props,
|
|
17
17
|
columns: {
|
|
18
18
|
type: Array,
|
|
19
19
|
default: () => []
|
|
@@ -77,168 +77,163 @@ const T = {
|
|
|
77
77
|
type: Object,
|
|
78
78
|
default: () => ({})
|
|
79
79
|
}
|
|
80
|
-
},
|
|
80
|
+
}, T = {
|
|
81
81
|
"update:modelValue": null
|
|
82
|
-
},
|
|
82
|
+
}, te = {
|
|
83
83
|
key: 0,
|
|
84
84
|
class: "vkf-card-input-collection-options"
|
|
85
|
-
},
|
|
85
|
+
}, oe = { class: "vkf-card-input-collection-card__footer" }, le = /* @__PURE__ */ F({
|
|
86
86
|
inheritAttrs: !1,
|
|
87
87
|
__name: "core",
|
|
88
|
-
props:
|
|
89
|
-
emits:
|
|
90
|
-
setup(i, { emit:
|
|
91
|
-
const l = i, d =
|
|
88
|
+
props: O,
|
|
89
|
+
emits: T,
|
|
90
|
+
setup(i, { emit: C }) {
|
|
91
|
+
const l = i, d = C, $ = j.createBindProps(l), f = H(l), { tr: k } = x(), y = w(() => {
|
|
92
92
|
if (!l.prop || l.prop.length === 0)
|
|
93
93
|
return l.modelValue;
|
|
94
94
|
const e = {};
|
|
95
|
-
return
|
|
95
|
+
return h(e, {
|
|
96
96
|
k: l.prop,
|
|
97
97
|
v: l.modelValue
|
|
98
98
|
}), e;
|
|
99
99
|
});
|
|
100
|
-
function
|
|
101
|
-
const t =
|
|
100
|
+
function P(e) {
|
|
101
|
+
const t = b(l.modelValue), r = D(l.defaultItemValue) ? l.defaultItemValue() : l.defaultItemValue;
|
|
102
102
|
t.splice(
|
|
103
103
|
e + 1,
|
|
104
104
|
0,
|
|
105
|
-
|
|
105
|
+
b(r)
|
|
106
106
|
), d("update:modelValue", t);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
const t =
|
|
108
|
+
function E(e) {
|
|
109
|
+
const t = b(l.modelValue);
|
|
110
110
|
t.splice(e, 1), d("update:modelValue", t);
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
const t =
|
|
114
|
-
|
|
112
|
+
const L = (e) => {
|
|
113
|
+
const t = b(y.value);
|
|
114
|
+
h(t, e), d("update:modelValue", B(t, l.prop));
|
|
115
115
|
};
|
|
116
|
-
function
|
|
116
|
+
function N(e) {
|
|
117
117
|
return l.columns.map((t) => {
|
|
118
|
-
|
|
119
|
-
const n = [
|
|
118
|
+
const r = [
|
|
120
119
|
l.prop ?? [],
|
|
121
120
|
e
|
|
122
|
-
].flat(),
|
|
123
|
-
readonly:
|
|
121
|
+
].flat(), p = [r, t.prop].flat(), u = {
|
|
122
|
+
readonly: f.value,
|
|
124
123
|
...t,
|
|
125
|
-
prop:
|
|
124
|
+
prop: p
|
|
126
125
|
};
|
|
127
|
-
Reflect.deleteProperty(
|
|
128
|
-
B(
|
|
126
|
+
Reflect.deleteProperty(u, "createTemplateProps"), D(t.templateProps) && (u.templateProps = () => t.templateProps(
|
|
127
|
+
B(y.value, r)
|
|
129
128
|
));
|
|
130
|
-
const
|
|
131
|
-
t,
|
|
129
|
+
const R = t.createTemplateProps?.(
|
|
132
130
|
{
|
|
133
131
|
$index: e,
|
|
134
|
-
row: B(
|
|
132
|
+
row: B(y.value, r)
|
|
135
133
|
},
|
|
136
|
-
|
|
137
|
-
)
|
|
138
|
-
return Object.assign(
|
|
134
|
+
u
|
|
135
|
+
) ?? {};
|
|
136
|
+
return Object.assign(u, R), u;
|
|
139
137
|
});
|
|
140
138
|
}
|
|
141
|
-
return (e, t) => (s(),
|
|
139
|
+
return (e, t) => (s(), V(o(W), null, {
|
|
142
140
|
placeholder: a(() => [
|
|
143
|
-
|
|
141
|
+
n(o(Q))
|
|
144
142
|
]),
|
|
145
143
|
default: a(() => [
|
|
146
|
-
|
|
147
|
-
...o(
|
|
144
|
+
n(o(G), _({ class: "vkf-card-input-collection" }, {
|
|
145
|
+
...o($),
|
|
148
146
|
...e.$attrs
|
|
149
|
-
}),
|
|
150
|
-
default: a(() =>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
type: "primary",
|
|
156
|
-
onClick: t[1] || (t[1] = (P) => C(-1))
|
|
157
|
-
}, {
|
|
158
|
-
default: a(() => [
|
|
159
|
-
u(c(o(f)("vkf.common.add", "添加")), 1)
|
|
160
|
-
]),
|
|
161
|
-
_: 1
|
|
162
|
-
})
|
|
163
|
-
])) : g("", !0),
|
|
164
|
-
(n = e.modelValue) != null && n.length ? g("", !0) : (s(), y(o(K), {
|
|
165
|
-
key: 1,
|
|
166
|
-
class: "vkf-card-input-collection-empty"
|
|
167
|
-
}, {
|
|
168
|
-
image: a(() => [...t[2] || (t[2] = [
|
|
169
|
-
u(c(""), -1)
|
|
170
|
-
])]),
|
|
171
|
-
_: 1
|
|
172
|
-
})),
|
|
173
|
-
p(o(x), {
|
|
174
|
-
data: k.value,
|
|
175
|
-
onSetData: N
|
|
147
|
+
}), I({
|
|
148
|
+
default: a(() => [
|
|
149
|
+
!o(f) && e.splicable && !e.labelActions && e.topSplicable ? (s(), S("div", te, [
|
|
150
|
+
n(o(v), {
|
|
151
|
+
type: "primary",
|
|
152
|
+
onClick: t[1] || (t[1] = (r) => P(-1))
|
|
176
153
|
}, {
|
|
177
154
|
default: a(() => [
|
|
178
|
-
(
|
|
179
|
-
key: r,
|
|
180
|
-
class: "vkf-card-input-collection-card"
|
|
181
|
-
}, { ref_for: !0 }, e.cardProps), A({
|
|
182
|
-
default: a(() => [
|
|
183
|
-
p(o(Y), _({ ref_for: !0 }, e.fieldsetProps), {
|
|
184
|
-
default: a(() => [
|
|
185
|
-
p(o(Z), {
|
|
186
|
-
source: R(r)
|
|
187
|
-
}, null, 8, ["source"])
|
|
188
|
-
]),
|
|
189
|
-
_: 2
|
|
190
|
-
}, 1040)
|
|
191
|
-
]),
|
|
192
|
-
_: 2
|
|
193
|
-
}, [
|
|
194
|
-
!o(m) && e.splicable ? {
|
|
195
|
-
name: "footer",
|
|
196
|
-
fn: a(() => [
|
|
197
|
-
q("div", le, [
|
|
198
|
-
D(e.$slots, "footerActions", { index: r }),
|
|
199
|
-
p(o(V), {
|
|
200
|
-
type: "primary",
|
|
201
|
-
onClick: () => C(r)
|
|
202
|
-
}, {
|
|
203
|
-
default: a(() => [
|
|
204
|
-
u(c(o(f)("vkf.common.add", "添加")), 1)
|
|
205
|
-
]),
|
|
206
|
-
_: 1
|
|
207
|
-
}, 8, ["onClick"]),
|
|
208
|
-
p(o(V), {
|
|
209
|
-
type: "danger",
|
|
210
|
-
disabled: e.modelValue.length <= 1 && l.keepLast,
|
|
211
|
-
onClick: () => L(r)
|
|
212
|
-
}, {
|
|
213
|
-
default: a(() => [
|
|
214
|
-
u(c(o(f)("vkf.common.delete", "删除")), 1)
|
|
215
|
-
]),
|
|
216
|
-
_: 1
|
|
217
|
-
}, 8, ["disabled", "onClick"])
|
|
218
|
-
])
|
|
219
|
-
]),
|
|
220
|
-
key: "0"
|
|
221
|
-
} : void 0
|
|
222
|
-
]), 1040))), 128))
|
|
155
|
+
m(c(o(k)("vkf.common.add", "添加")), 1)
|
|
223
156
|
]),
|
|
224
|
-
_:
|
|
225
|
-
}
|
|
226
|
-
]
|
|
227
|
-
|
|
157
|
+
_: 1
|
|
158
|
+
})
|
|
159
|
+
])) : g("", !0),
|
|
160
|
+
e.modelValue?.length ? g("", !0) : (s(), V(o(J), {
|
|
161
|
+
key: 1,
|
|
162
|
+
class: "vkf-card-input-collection-empty"
|
|
163
|
+
}, {
|
|
164
|
+
image: a(() => [...t[2] || (t[2] = [
|
|
165
|
+
m(c(""), -1)
|
|
166
|
+
])]),
|
|
167
|
+
_: 1
|
|
168
|
+
})),
|
|
169
|
+
n(o(Z), {
|
|
170
|
+
data: y.value,
|
|
171
|
+
onSetData: L
|
|
172
|
+
}, {
|
|
173
|
+
default: a(() => [
|
|
174
|
+
(s(!0), S(z, null, M(e.modelValue, (r, p) => (s(), V(o(K), _({
|
|
175
|
+
key: p,
|
|
176
|
+
class: "vkf-card-input-collection-card"
|
|
177
|
+
}, { ref_for: !0 }, e.cardProps), I({
|
|
178
|
+
default: a(() => [
|
|
179
|
+
n(o(X), _({ ref_for: !0 }, e.fieldsetProps), {
|
|
180
|
+
default: a(() => [
|
|
181
|
+
n(o(Y), {
|
|
182
|
+
source: N(p)
|
|
183
|
+
}, null, 8, ["source"])
|
|
184
|
+
]),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1040)
|
|
187
|
+
]),
|
|
188
|
+
_: 2
|
|
189
|
+
}, [
|
|
190
|
+
!o(f) && e.splicable ? {
|
|
191
|
+
name: "footer",
|
|
192
|
+
fn: a(() => [
|
|
193
|
+
U("div", oe, [
|
|
194
|
+
A(e.$slots, "footerActions", { index: p }),
|
|
195
|
+
n(o(v), {
|
|
196
|
+
type: "primary",
|
|
197
|
+
onClick: () => P(p)
|
|
198
|
+
}, {
|
|
199
|
+
default: a(() => [
|
|
200
|
+
m(c(o(k)("vkf.common.add", "添加")), 1)
|
|
201
|
+
]),
|
|
202
|
+
_: 1
|
|
203
|
+
}, 8, ["onClick"]),
|
|
204
|
+
n(o(v), {
|
|
205
|
+
type: "danger",
|
|
206
|
+
disabled: e.modelValue.length <= 1 && l.keepLast,
|
|
207
|
+
onClick: () => E(p)
|
|
208
|
+
}, {
|
|
209
|
+
default: a(() => [
|
|
210
|
+
m(c(o(k)("vkf.common.delete", "删除")), 1)
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
}, 8, ["disabled", "onClick"])
|
|
214
|
+
])
|
|
215
|
+
]),
|
|
216
|
+
key: "0"
|
|
217
|
+
} : void 0
|
|
218
|
+
]), 1040))), 128))
|
|
219
|
+
]),
|
|
220
|
+
_: 3
|
|
221
|
+
}, 8, ["data"])
|
|
222
|
+
]),
|
|
228
223
|
_: 2
|
|
229
224
|
}, [
|
|
230
225
|
e.labelActions ? {
|
|
231
226
|
name: "labelActions",
|
|
232
227
|
fn: a(() => [
|
|
233
|
-
|
|
234
|
-
!o(
|
|
228
|
+
A(e.$slots, "labelActions"),
|
|
229
|
+
!o(f) && e.splicable && e.topSplicable ? (s(), V(o(v), {
|
|
235
230
|
key: 0,
|
|
236
231
|
size: "small",
|
|
237
|
-
icon: o(
|
|
238
|
-
onClick: t[0] || (t[0] = (
|
|
232
|
+
icon: o(ee),
|
|
233
|
+
onClick: t[0] || (t[0] = (r) => P(-1))
|
|
239
234
|
}, {
|
|
240
235
|
default: a(() => [
|
|
241
|
-
|
|
236
|
+
m(c(o(k)("vkf.common.add", "添加")), 1)
|
|
242
237
|
]),
|
|
243
238
|
_: 1
|
|
244
239
|
}, 8, ["icon"])) : g("", !0)
|
|
@@ -250,24 +245,24 @@ const T = {
|
|
|
250
245
|
_: 3
|
|
251
246
|
}));
|
|
252
247
|
}
|
|
253
|
-
}),
|
|
248
|
+
}), ve = F({
|
|
254
249
|
name: "VkfCardInputCollection",
|
|
255
|
-
props:
|
|
256
|
-
emits:
|
|
257
|
-
setup(i, { slots:
|
|
258
|
-
return () =>
|
|
250
|
+
props: O,
|
|
251
|
+
emits: T,
|
|
252
|
+
setup(i, { slots: C, emit: l }) {
|
|
253
|
+
return () => q(le, {
|
|
259
254
|
...i,
|
|
260
255
|
"onUpdate:modelValue": (d) => l("update:modelValue", d)
|
|
261
256
|
}, {
|
|
262
257
|
...i.slots,
|
|
263
|
-
...
|
|
258
|
+
...C
|
|
264
259
|
});
|
|
265
260
|
}
|
|
266
|
-
}),
|
|
261
|
+
}), be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
267
262
|
__proto__: null
|
|
268
263
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
269
264
|
export {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
265
|
+
ve as VkfCardInputCollection,
|
|
266
|
+
be as __VkfCardInputCollection,
|
|
267
|
+
ve as default
|
|
273
268
|
};
|