@vunk/form 2.19.20 → 2.19.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/components/ai-provider/index.cjs +1 -0
  2. package/components/ai-provider/index.d.ts +7 -0
  3. package/components/ai-provider/index.mjs +61 -0
  4. package/components/ai-provider/src/ctx.d.ts +8 -0
  5. package/components/ai-provider/src/index.vue.d.ts +23 -0
  6. package/components/ai-provider/src/types.d.ts +56 -0
  7. package/components/ai-provider/src/use.d.ts +3 -0
  8. package/components/api-tables-select/index.cjs +1 -1
  9. package/components/api-tables-select/index.mjs +1 -1
  10. package/components/api-tables-select/src/ctx.d.ts +57 -57
  11. package/components/api-tables-select/src/index.vue.d.ts +46 -419
  12. package/components/button/index.cjs +1 -1
  13. package/components/button/index.mjs +12 -12
  14. package/components/button/src/ctx.d.ts +7 -2
  15. package/components/button/src/index.vue.d.ts +36 -14
  16. package/components/card-input-collection/index.cjs +1 -1
  17. package/components/card-input-collection/index.mjs +136 -141
  18. package/components/card-input-collection/src/core.vue.d.ts +18 -7
  19. package/components/card-input-collection/src/ctx.d.ts +7 -2
  20. package/components/card-input-collection/src/index.vue.d.ts +18 -7
  21. package/components/cascader/index.cjs +1 -1
  22. package/components/cascader/index.mjs +38 -39
  23. package/components/cascader/src/ctx.d.ts +8 -3
  24. package/components/cascader/src/index.vue.d.ts +19 -8
  25. package/components/checkbox/src/ctx.d.ts +8 -3
  26. package/components/checkbox/src/index.vue.d.ts +43 -21
  27. package/components/{cloneDeep-DE0l40hv.mjs → cloneDeep-2YeQ7w2t.mjs} +10 -10
  28. package/components/cloneDeep-Btpy0oPF.js +1 -0
  29. package/components/collapse/index.cjs +1 -1
  30. package/components/collapse/index.mjs +19 -22
  31. package/components/collapse-item/index.cjs +1 -1
  32. package/components/collapse-item/index.mjs +21 -21
  33. package/components/collapse-item/src/index.vue.d.ts +2 -2
  34. package/components/color-picker/index.cjs +1 -1
  35. package/components/color-picker/index.mjs +26 -27
  36. package/components/color-picker/src/ctx.d.ts +7 -2
  37. package/components/color-picker/src/index.vue.d.ts +17 -6
  38. package/components/{style.css → components.css} +1 -1
  39. package/components/date-picker/index.cjs +1 -1
  40. package/components/date-picker/index.mjs +40 -41
  41. package/components/date-picker/src/ctx.d.ts +8 -3
  42. package/components/date-picker/src/index.vue.d.ts +17 -6
  43. package/components/date-picker-range/index.cjs +1 -1
  44. package/components/date-picker-range/index.mjs +17 -17
  45. package/components/date-picker-range/src/ctx.d.ts +14 -9
  46. package/components/date-picker-range/src/index.vue.d.ts +48 -26
  47. package/components/dialog/index.cjs +1 -1
  48. package/components/dialog/index.mjs +41 -52
  49. package/components/dialog/src/ctx.d.ts +1 -1
  50. package/components/dialog/src/index.vue.d.ts +1 -1
  51. package/components/dialog-input-collection/index.cjs +1 -1
  52. package/components/dialog-input-collection/index.mjs +124 -122
  53. package/components/dialog-input-collection/src/ctx.d.ts +7 -2
  54. package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -1
  55. package/components/dialog-input-collection/src/index.vue.d.ts +17 -6
  56. package/components/download-plus/index.cjs +1 -1
  57. package/components/download-plus/index.mjs +193 -202
  58. package/components/download-plus/src/ctx.d.ts +7 -2
  59. package/components/download-plus/src/index.vue.d.ts +32 -10
  60. package/components/editable-text/index.cjs +1 -1
  61. package/components/editable-text/index.mjs +72 -75
  62. package/components/editable-text/src/ctx.d.ts +7 -2
  63. package/components/editable-text/src/index.vue.d.ts +18 -7
  64. package/components/el-slider/index.cjs +1 -1
  65. package/components/el-slider/index.mjs +230 -233
  66. package/components/el-slider/src/composables/index.cjs +1 -1
  67. package/components/el-slider/src/composables/index.mjs +1 -1
  68. package/components/el-slider/src/slider-core.vue.d.ts +3 -3
  69. package/components/esri-input-geojson/index.cjs +1 -5
  70. package/components/esri-input-geojson/index.mjs +59 -68
  71. package/components/esri-input-geojson/src/append.vue.d.ts +2 -2
  72. package/components/esri-input-geojson/src/ctx.d.ts +9 -4
  73. package/components/esri-input-geojson/src/index.vue.d.ts +65 -30
  74. package/components/fieldset/src/index.vue.d.ts +1 -1
  75. package/components/form/index.cjs +1 -1
  76. package/components/form/index.mjs +96 -101
  77. package/components/form/src/ctx.d.ts +2 -2
  78. package/components/form/src/index.vue.d.ts +4 -4
  79. package/components/form/src/use.d.ts +2 -2
  80. package/components/form-item/index.cjs +1 -1
  81. package/components/form-item/index.mjs +179 -107
  82. package/components/form-item/src/core.vue.d.ts +7 -3
  83. package/components/form-item/src/ctx.d.ts +7 -1
  84. package/components/form-item/src/index.vue.d.ts +13 -2
  85. package/components/form-item/src/use.d.ts +11 -0
  86. package/components/form-item-renderer/index.cjs +1 -1
  87. package/components/form-item-renderer/index.d.ts +1 -0
  88. package/components/form-item-renderer/index.mjs +85 -78
  89. package/components/form-item-renderer/src/use.d.ts +3 -0
  90. package/components/forms-provider/index.cjs +1 -1
  91. package/components/forms-provider/index.mjs +18 -21
  92. package/components/index-BIo_4rr_.mjs +18620 -0
  93. package/components/index-Bc7UifHG.js +1 -0
  94. package/components/index-D0D9ABpH.js +108 -0
  95. package/components/{index-CeHbpfCD.mjs → index-DCNYT7Wv.mjs} +0 -1
  96. package/components/information-collection/index.cjs +1 -1
  97. package/components/information-collection/index.mjs +32 -38
  98. package/components/information-collection/src/ctx.d.ts +7 -2
  99. package/components/information-collection/src/index.vue.d.ts +17 -6
  100. package/components/information-tag/index.cjs +1 -1
  101. package/components/information-tag/index.mjs +9 -12
  102. package/components/information-tag/src/index.vue.d.ts +1 -1
  103. package/components/input/index.cjs +1 -1
  104. package/components/input/index.mjs +27 -27
  105. package/components/input/src/ctx.d.ts +9 -4
  106. package/components/input/src/index.vue.d.ts +35 -13
  107. package/components/input-array/index.cjs +1 -1
  108. package/components/input-array/index.mjs +71 -74
  109. package/components/input-array/src/ctx.d.ts +7 -2
  110. package/components/input-array/src/index.vue.d.ts +18 -7
  111. package/components/input-collection/index.cjs +1 -1
  112. package/components/input-collection/index.mjs +121 -126
  113. package/components/input-collection/src/core.vue.d.ts +17 -6
  114. package/components/input-collection/src/ctx.d.ts +7 -2
  115. package/components/input-collection/src/index.vue.d.ts +17 -6
  116. package/components/input-file/src/index.vue.d.ts +19 -8
  117. package/components/input-link/index.cjs +1 -1
  118. package/components/input-link/index.mjs +1 -1
  119. package/components/input-link/src/ctx.d.ts +7 -2
  120. package/components/input-link/src/index.vue.d.ts +54 -21
  121. package/components/input-number/index.cjs +1 -1
  122. package/components/input-number/index.mjs +30 -33
  123. package/components/input-number/src/ctx.d.ts +8 -3
  124. package/components/input-number/src/index.vue.d.ts +33 -11
  125. package/components/input-tag/index.cjs +1 -1
  126. package/components/input-tag/index.mjs +24 -24
  127. package/components/input-tag/src/ctx.d.ts +9 -4
  128. package/components/input-tag/src/index.vue.d.ts +33 -11
  129. package/components/monaco-editor/src/ctx.d.ts +8 -3
  130. package/components/monaco-editor/src/index.vue.d.ts +38 -16
  131. package/components/radio/src/ctx.d.ts +7 -2
  132. package/components/radio/src/index.vue.d.ts +40 -18
  133. package/components/radio/src/wraper.vue.d.ts +22 -11
  134. package/components/renderer-data/index.cjs +1 -1
  135. package/components/renderer-data/index.mjs +14 -17
  136. package/components/select/index.cjs +1 -1
  137. package/components/select/index.mjs +167 -131
  138. package/components/select/src/core.vue.d.ts +96 -69
  139. package/components/select/src/ctx.d.ts +9 -4
  140. package/components/select/src/index.vue.d.ts +53 -42
  141. package/components/slider/index.cjs +1 -1
  142. package/components/slider/index.mjs +30 -31
  143. package/components/slider/src/ctx.d.ts +7 -2
  144. package/components/slider/src/index.vue.d.ts +18 -7
  145. package/components/switch/src/ctx.d.ts +7 -2
  146. package/components/switch/src/index.vue.d.ts +18 -7
  147. package/components/tables-select/index.cjs +1 -1
  148. package/components/tables-select/index.mjs +4 -4
  149. package/components/tables-select/src/ctx.d.ts +68 -68
  150. package/components/tables-select/src/index.vue.d.ts +52 -420
  151. package/components/template-instances-provider/index.cjs +1 -1
  152. package/components/template-instances-provider/index.mjs +11 -17
  153. package/components/templates-default/src/index.vue.d.ts +404 -185
  154. package/components/templates-esri/src/index.vue.d.ts +65 -30
  155. package/components/templates-variant/src/index.vue.d.ts +48 -26
  156. package/components/time-picker/index.cjs +1 -1
  157. package/components/time-picker/index.mjs +38 -39
  158. package/components/time-picker/src/ctx.d.ts +8 -3
  159. package/components/time-picker/src/index.vue.d.ts +17 -6
  160. package/components/upload/index.cjs +1 -1
  161. package/components/upload/index.mjs +244 -253
  162. package/components/upload/src/ctx.d.ts +8 -3
  163. package/components/upload/src/file.vue.d.ts +3 -3
  164. package/components/upload/src/index.vue.d.ts +37 -15
  165. package/components/upload/src/wraper.vue.d.ts +19 -8
  166. package/components/upload-plus/index.cjs +7 -15
  167. package/components/upload-plus/index.mjs +1879 -1897
  168. package/components/upload-plus/src/ctx.d.ts +7 -2
  169. package/components/upload-plus/src/index.vue.d.ts +18 -7
  170. package/components/use-watch-C3iIa2DX.js +1 -0
  171. package/components/use-watch-Dp64x0si.mjs +411 -0
  172. package/components/van-cascader/src/ctx.d.ts +7 -2
  173. package/components/van-cascader/src/index.vue.d.ts +19 -8
  174. package/components/var-datetime-picker/src/ctx.d.ts +7 -2
  175. package/components/var-datetime-picker/src/index.vue.d.ts +30 -8
  176. package/components/vditor/src/ctx.d.ts +7 -2
  177. package/components/vditor/src/index.vue.d.ts +41 -19
  178. package/composables/element-plus/index.cjs +1 -1
  179. package/composables/element-plus/index.mjs +10 -10
  180. package/composables/form-mitt/index.mjs +1 -1
  181. package/composables/index.cjs +1 -1
  182. package/composables/index.mjs +53 -53
  183. package/index.css +1 -1
  184. package/locale/index.cjs +1 -1
  185. package/locale/index.mjs +8 -5
  186. package/locale/lang/ar.d.ts +1 -0
  187. package/locale/lang/en.d.ts +1 -0
  188. package/locale/lang/zh-cn.d.ts +1 -0
  189. package/package.json +9 -1
  190. package/shared/element-plus/ctx.d.ts +16 -16
  191. package/shared/types/source/index.d.ts +5 -0
  192. package/shared/upload/index.cjs +1 -1
  193. package/shared/upload/index.mjs +166 -165
  194. package/components/cloneDeep-DaYwfXwD.js +0 -1
  195. package/components/index-BBriTmQP.js +0 -1
  196. package/components/use-watch-Bfrz9pv_.js +0 -1
  197. 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 p, openBlock as m, 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";
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: e }) {
33
- const s = L(t), a = R(e, ["click"]), c = f.createBindProps(t), r = v("elFormRef", null);
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: (n) => {
39
- if (!r || !t.validate) return e("click", n);
40
- r.value.validate().then((o) => {
41
- o && e("click", n);
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, e, s, a, c, r) {
48
- const i = p("ElButton"), n = p("VkfFormItem");
49
- return m(), u(n, V(h(t.formBindProps)), {
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, (o, d) => ({
59
+ j(t.buttonSlots, (r, d) => ({
60
60
  name: d,
61
61
  fn: l((k) => [
62
- (m(), u(I(o == null ? void 0 : o(k))))
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" | "text", unknown>;
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
- labelPosition: "left" | "right" | "top" | "start" | "end";
235
- formItemSize: "default" | "small" | "large";
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: "left" | "right" | "top" | "start" | "end";
417
- formItemSize: "default" | "small" | "large";
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?: "" | "default" | "small" | "large" | (() => "" | "default" | "small" | "large") | undefined;
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" | "text" | (() => "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text") | undefined;
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"),N=require("@vunk/form/composables"),n=require("element-plus"),s=require("@vunk/core"),q=require("@vunk/form/components/templates-default"),w=require("@vunk/form/components/template-instances-provider"),T=require("@vunk/form/components/fieldset"),I=require("@vunk/form/components/form-item-renderer"),E=require("@vunk/form/components/renderer-data"),A=require("@vunk/form/composables/element-plus"),v=require("@vunk/shared/function"),F=require("../index-BBriTmQP.js"),f=require("../cloneDeep-DaYwfXwD.js"),b={...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:()=>({})}},P={"update:modelValue":null},j={key:0,class:"vkf-card-input-collection-options"},O={class:"vkf-card-input-collection-card__footer"},$=e.defineComponent({inheritAttrs:!1,__name:"core",props:b,emits:P,setup(c,{emit:m}){const l=c,u=m,g=y._VkfFormItemCtx.createBindProps(l),d=N.useComputedReadonly(l),{tr:p}=A.useLocale(),i=e.computed(()=>{if(!l.prop||l.prop.length===0)return l.modelValue;const t={};return s.ensetData(t,{k:l.prop,v:l.modelValue}),t});function V(t){const o=f.cloneDeep(l.modelValue),a=v.isCallable(l.defaultItemValue)?l.defaultItemValue():l.defaultItemValue;o.splice(t+1,0,f.cloneDeep(a)),u("update:modelValue",o)}function h(t){const o=f.cloneDeep(l.modelValue);o.splice(t,1),u("update:modelValue",o)}const D=t=>{const o=f.cloneDeep(i.value);s.ensetData(o,t),u("update:modelValue",s.getValue(o,l.prop))};function S(t){return l.columns.map(o=>{var C;const a=[l.prop??[],t].flat(),k=[a,o.prop].flat(),r={readonly:d.value,...o,prop:k};Reflect.deleteProperty(r,"createTemplateProps"),v.isCallable(o.templateProps)&&(r.templateProps=()=>o.templateProps(s.getValue(i.value,a)));const _=((C=o.createTemplateProps)==null?void 0:C.call(o,{$index:t,row:s.getValue(i.value,a)},r))??{};return Object.assign(r,_),r})}return(t,o)=>(e.openBlock(),e.createBlock(e.unref(w.VkfTemplateInstancesProvider),null,{placeholder:e.withCtx(()=>[e.createVNode(e.unref(q.VkfTemplatesDefault))]),default:e.withCtx(()=>[e.createVNode(e.unref(y.VkfFormItem),e.mergeProps({class:"vkf-card-input-collection"},{...e.unref(g),...t.$attrs}),e.createSlots({default:e.withCtx(()=>{var a;return[!e.unref(d)&&t.splicable&&!t.labelActions&&t.topSplicable?(e.openBlock(),e.createElementBlock("div",j,[e.createVNode(e.unref(n.ElButton),{type:"primary",onClick:o[1]||(o[1]=k=>V(-1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)("vkf.common.add","添加")),1)]),_:1})])):e.createCommentVNode("",!0),(a=t.modelValue)!=null&&a.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(E.VkfRendererData),{data:i.value,onSetData:D},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.modelValue,(k,r)=>(e.openBlock(),e.createBlock(e.unref(n.ElCard),e.mergeProps({key:r,class:"vkf-card-input-collection-card"},{ref_for:!0},t.cardProps),e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(T.VkfFieldset),e.mergeProps({ref_for:!0},t.fieldsetProps),{default:e.withCtx(()=>[e.createVNode(e.unref(I.VkfFormItemRenderer),{source:S(r)},null,8,["source"])]),_:2},1040)]),_:2},[!e.unref(d)&&t.splicable?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",O,[e.renderSlot(t.$slots,"footerActions",{index:r}),e.createVNode(e.unref(n.ElButton),{type:"primary",onClick:()=>V(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)("vkf.common.add","添加")),1)]),_:1},8,["onClick"]),e.createVNode(e.unref(n.ElButton),{type:"danger",disabled:t.modelValue.length<=1&&l.keepLast,onClick:()=>h(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)("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(d)&&t.splicable&&t.topSplicable?(e.openBlock(),e.createBlock(e.unref(n.ElButton),{key:0,size:"small",icon:e.unref(F.plus_default),onClick:o[0]||(o[0]=a=>V(-1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)("vkf.common.add","添加")),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1040)]),_:3}))}}),B=e.defineComponent({name:"VkfCardInputCollection",props:b,emits:P,setup(c,{slots:m,emit:l}){return()=>e.h($,{...c,"onUpdate:modelValue":u=>l("update:modelValue",u)},{...c.slots,...m})}}),R=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfCardInputCollection=B;exports.__VkfCardInputCollection=R;exports.default=B;
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 I, computed as z, openBlock as s, createBlock as y, unref as o, withCtx as a, createVNode as p, mergeProps as _, createSlots as A, createElementBlock as h, createTextVNode as u, toDisplayString as c, createCommentVNode as g, Fragment as M, renderList as U, createElementVNode as q, renderSlot as D, h as G } from "vue";
2
- import { _VkfFormItemCtx as O, VkfFormItem as H } from "@vunk/form/components/form-item";
3
- import { useComputedReadonly as J } from "@vunk/form/composables";
4
- import { ElButton as V, ElEmpty as K, ElCard as Q } from "element-plus";
5
- import { ensetData as F, getValue as B } from "@vunk/core";
6
- import { VkfTemplatesDefault as W } from "@vunk/form/components/templates-default";
7
- import { VkfTemplateInstancesProvider as X } from "@vunk/form/components/template-instances-provider";
8
- import { VkfFieldset as Y } from "@vunk/form/components/fieldset";
9
- import { VkfFormItemRenderer as Z } from "@vunk/form/components/form-item-renderer";
10
- import { VkfRendererData as x } from "@vunk/form/components/renderer-data";
11
- import { useLocale as ee } from "@vunk/form/composables/element-plus";
12
- import { isCallable as j } from "@vunk/shared/function";
13
- import { p as te } from "../index-CeHbpfCD.mjs";
14
- import { c as v } from "../cloneDeep-DE0l40hv.mjs";
15
- const T = {
16
- ...O.props,
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
- }, oe = {
82
+ }, te = {
83
83
  key: 0,
84
84
  class: "vkf-card-input-collection-options"
85
- }, le = { class: "vkf-card-input-collection-card__footer" }, ae = /* @__PURE__ */ I({
85
+ }, oe = { class: "vkf-card-input-collection-card__footer" }, le = /* @__PURE__ */ F({
86
86
  inheritAttrs: !1,
87
87
  __name: "core",
88
- props: T,
89
- emits: $,
90
- setup(i, { emit: b }) {
91
- const l = i, d = b, E = O.createBindProps(l), m = J(l), { tr: f } = ee(), k = z(() => {
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 F(e, {
95
+ return h(e, {
96
96
  k: l.prop,
97
97
  v: l.modelValue
98
98
  }), e;
99
99
  });
100
- function C(e) {
101
- const t = v(l.modelValue), n = j(l.defaultItemValue) ? l.defaultItemValue() : l.defaultItemValue;
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
- v(n)
105
+ b(r)
106
106
  ), d("update:modelValue", t);
107
107
  }
108
- function L(e) {
109
- const t = v(l.modelValue);
108
+ function E(e) {
109
+ const t = b(l.modelValue);
110
110
  t.splice(e, 1), d("update:modelValue", t);
111
111
  }
112
- const N = (e) => {
113
- const t = v(k.value);
114
- F(t, e), d("update:modelValue", B(t, l.prop));
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 R(e) {
116
+ function N(e) {
117
117
  return l.columns.map((t) => {
118
- var S;
119
- const n = [
118
+ const r = [
120
119
  l.prop ?? [],
121
120
  e
122
- ].flat(), P = [n, t.prop].flat(), r = {
123
- readonly: m.value,
121
+ ].flat(), p = [r, t.prop].flat(), u = {
122
+ readonly: f.value,
124
123
  ...t,
125
- prop: P
124
+ prop: p
126
125
  };
127
- Reflect.deleteProperty(r, "createTemplateProps"), j(t.templateProps) && (r.templateProps = () => t.templateProps(
128
- B(k.value, n)
126
+ Reflect.deleteProperty(u, "createTemplateProps"), D(t.templateProps) && (u.templateProps = () => t.templateProps(
127
+ B(y.value, r)
129
128
  ));
130
- const w = ((S = t.createTemplateProps) == null ? void 0 : S.call(
131
- t,
129
+ const R = t.createTemplateProps?.(
132
130
  {
133
131
  $index: e,
134
- row: B(k.value, n)
132
+ row: B(y.value, r)
135
133
  },
136
- r
137
- )) ?? {};
138
- return Object.assign(r, w), r;
134
+ u
135
+ ) ?? {};
136
+ return Object.assign(u, R), u;
139
137
  });
140
138
  }
141
- return (e, t) => (s(), y(o(X), null, {
139
+ return (e, t) => (s(), V(o(W), null, {
142
140
  placeholder: a(() => [
143
- p(o(W))
141
+ n(o(Q))
144
142
  ]),
145
143
  default: a(() => [
146
- p(o(H), _({ class: "vkf-card-input-collection" }, {
147
- ...o(E),
144
+ n(o(G), _({ class: "vkf-card-input-collection" }, {
145
+ ...o($),
148
146
  ...e.$attrs
149
- }), A({
150
- default: a(() => {
151
- var n;
152
- return [
153
- !o(m) && e.splicable && !e.labelActions && e.topSplicable ? (s(), h("div", oe, [
154
- p(o(V), {
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
- (s(!0), h(M, null, U(e.modelValue, (P, r) => (s(), y(o(Q), _({
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
- _: 3
225
- }, 8, ["data"])
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
- D(e.$slots, "labelActions"),
234
- !o(m) && e.splicable && e.topSplicable ? (s(), y(o(V), {
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(te),
238
- onClick: t[0] || (t[0] = (n) => C(-1))
232
+ icon: o(ee),
233
+ onClick: t[0] || (t[0] = (r) => P(-1))
239
234
  }, {
240
235
  default: a(() => [
241
- u(c(o(f)("vkf.common.add", "添加")), 1)
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
- }), be = I({
248
+ }), ve = F({
254
249
  name: "VkfCardInputCollection",
255
- props: T,
256
- emits: $,
257
- setup(i, { slots: b, emit: l }) {
258
- return () => G(ae, {
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
- ...b
258
+ ...C
264
259
  });
265
260
  }
266
- }), Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
261
+ }), be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
267
262
  __proto__: null
268
263
  }, Symbol.toStringTag, { value: "Module" }));
269
264
  export {
270
- be as VkfCardInputCollection,
271
- Ce as __VkfCardInputCollection,
272
- be as default
265
+ ve as VkfCardInputCollection,
266
+ be as __VkfCardInputCollection,
267
+ ve as default
273
268
  };