@vunk/form 2.18.2 → 2.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/components/_plugin-vue_export-helper.cjs +1 -11
  2. package/components/api-tables-select/index.cjs +1 -467
  3. package/components/api-tables-select/index.mjs +56 -413
  4. package/components/api-tables-select/src/ctx.d.ts +147 -173
  5. package/components/api-tables-select/src/index.vue.d.ts +390 -983
  6. package/components/button/index.cjs +1 -112
  7. package/components/button/index.mjs +56 -85
  8. package/components/button/src/ctx.d.ts +28 -113
  9. package/components/button/src/index.vue.d.ts +314 -621
  10. package/components/card-input-collection/index.cjs +1 -370
  11. package/components/card-input-collection/index.mjs +175 -277
  12. package/components/card-input-collection/src/core.vue.d.ts +57 -950
  13. package/components/card-input-collection/src/ctx.d.ts +19 -49
  14. package/components/card-input-collection/src/index.vue.d.ts +49 -112
  15. package/components/cascader/index.cjs +1 -150
  16. package/components/cascader/index.mjs +88 -116
  17. package/components/cascader/src/ctx.d.ts +148 -207
  18. package/components/cascader/src/index.vue.d.ts +335 -525
  19. package/components/cascader/src/use.d.ts +1 -1
  20. package/components/checkbox/index.cjs +1 -152
  21. package/components/checkbox/index.mjs +75 -119
  22. package/components/checkbox/src/ctx.d.ts +46 -69
  23. package/components/checkbox/src/index.vue.d.ts +445 -1012
  24. package/components/cloneDeep.cjs +1 -2106
  25. package/components/color-picker/index.cjs +1 -80
  26. package/components/color-picker/index.mjs +46 -69
  27. package/components/color-picker/src/ctx.d.ts +138 -107
  28. package/components/color-picker/src/index.vue.d.ts +305 -255
  29. package/components/date-picker/index.cjs +1 -119
  30. package/components/date-picker/index.mjs +63 -97
  31. package/components/date-picker/src/ctx.d.ts +131 -206
  32. package/components/date-picker/src/index.vue.d.ts +287 -1359
  33. package/components/date-picker/src/types.d.ts +7 -7
  34. package/components/date-picker-range/index.cjs +1 -177
  35. package/components/date-picker-range/index.mjs +62 -113
  36. package/components/date-picker-range/src/ctx.d.ts +139 -207
  37. package/components/date-picker-range/src/index.vue.d.ts +896 -450
  38. package/components/debounce.cjs +1 -0
  39. package/components/dialog/index.cjs +1 -126
  40. package/components/dialog/index.mjs +65 -99
  41. package/components/dialog/src/ctx.d.ts +17 -108
  42. package/components/dialog/src/index.vue.d.ts +77 -1070
  43. package/components/dialog-input-collection/index.cjs +1 -624
  44. package/components/dialog-input-collection/index.mjs +276 -498
  45. package/components/dialog-input-collection/src/ctx.d.ts +20 -50
  46. package/components/dialog-input-collection/src/dialog-form.vue.d.ts +28 -6366
  47. package/components/dialog-input-collection/src/index.vue.d.ts +66 -7629
  48. package/components/dialog-input-collection/src/layout.vue.d.ts +16 -72
  49. package/components/download-plus/index.cjs +1 -456
  50. package/components/download-plus/index.mjs +214 -358
  51. package/components/download-plus/src/ctx.d.ts +20 -50
  52. package/components/download-plus/src/index.vue.d.ts +434 -1171
  53. package/components/editable-text/index.cjs +1 -295
  54. package/components/editable-text/index.mjs +113 -239
  55. package/components/editable-text/src/ctx.d.ts +20 -50
  56. package/components/editable-text/src/index.vue.d.ts +62 -3257
  57. package/components/el-slider/index.cjs +1 -0
  58. package/components/el-slider/index.d.ts +5 -0
  59. package/components/el-slider/index.mjs +475 -0
  60. package/components/el-slider/src/button.d.ts +36 -0
  61. package/components/el-slider/src/button.vue.d.ts +42 -0
  62. package/components/el-slider/src/composables/index.cjs +1 -0
  63. package/components/el-slider/src/composables/index.d.ts +6 -0
  64. package/components/el-slider/src/composables/index.mjs +9 -0
  65. package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
  66. package/components/el-slider/src/composables/use-marks.d.ts +7 -0
  67. package/components/el-slider/src/composables/use-slide.d.ts +23 -0
  68. package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
  69. package/components/el-slider/src/composables/use-stops.d.ts +8 -0
  70. package/components/el-slider/src/composables/use-watch.d.ts +4 -0
  71. package/components/el-slider/src/constants.d.ts +14 -0
  72. package/components/el-slider/src/marker.d.ts +37 -0
  73. package/components/el-slider/src/slider-core.vue.d.ts +219 -0
  74. package/components/el-slider/src/slider.d.ts +175 -0
  75. package/components/esri-input-geojson/index.cjs +2 -1604
  76. package/components/esri-input-geojson/index.mjs +666 -1289
  77. package/components/esri-input-geojson/src/append.vue.d.ts +225 -1084
  78. package/components/esri-input-geojson/src/const.d.ts +1 -1
  79. package/components/esri-input-geojson/src/ctx.d.ts +62 -158
  80. package/components/esri-input-geojson/src/default-view.vue.d.ts +12 -132
  81. package/components/esri-input-geojson/src/index.vue.d.ts +1470 -789
  82. package/components/esri-input-geojson/src/viewer.vue.d.ts +424 -287
  83. package/components/fieldset/index.cjs +1 -110
  84. package/components/fieldset/index.mjs +62 -77
  85. package/components/fieldset/src/ctx.d.ts +4 -4
  86. package/components/fieldset/src/index.vue.d.ts +10 -9
  87. package/components/form/index.cjs +1 -248
  88. package/components/form/index.mjs +107 -161
  89. package/components/form/src/ctx.d.ts +15 -64
  90. package/components/form/src/index.vue.d.ts +360 -2416
  91. package/components/form-item/index.cjs +1 -294
  92. package/components/form-item/index.mjs +139 -229
  93. package/components/form-item/src/core.vue.d.ts +33 -1853
  94. package/components/form-item/src/ctx.d.ts +17 -47
  95. package/components/form-item/src/index.vue.d.ts +41 -103
  96. package/components/form-item-renderer/index.cjs +1 -193
  97. package/components/form-item-renderer/index.mjs +102 -162
  98. package/components/form-item-renderer/src/core.vue.d.ts +12 -11
  99. package/components/form-item-renderer/src/ctx.d.ts +3 -3
  100. package/components/form-item-renderer/src/index.vue.d.ts +25 -73
  101. package/components/form-item-renderer-template/index.cjs +1 -47
  102. package/components/form-item-renderer-template/index.mjs +19 -33
  103. package/components/form-item-renderer-template/src/index.vue.d.ts +4 -3
  104. package/components/forms-provider/index.cjs +1 -99
  105. package/components/forms-provider/index.mjs +44 -73
  106. package/components/forms-provider/src/core.d.ts +3 -2
  107. package/components/forms-provider/src/index.vue.d.ts +5 -2
  108. package/components/forms-provider/src/segment.vue.d.ts +12 -8
  109. package/components/forms-provider/src/view.vue.d.ts +17 -3
  110. package/components/index.cjs +1 -399
  111. package/components/index2.cjs +1 -17
  112. package/components/information/index.cjs +1 -65
  113. package/components/information/index.mjs +28 -38
  114. package/components/information/src/ctx.d.ts +2 -2
  115. package/components/information/src/index.vue.d.ts +7 -6
  116. package/components/information-collection/index.cjs +1 -81
  117. package/components/information-collection/index.mjs +44 -48
  118. package/components/information-collection/src/ctx.d.ts +20 -50
  119. package/components/information-collection/src/index.vue.d.ts +49 -112
  120. package/components/information-renderer/index.cjs +1 -16
  121. package/components/information-renderer/index.mjs +9 -10
  122. package/components/information-tag/index.cjs +1 -101
  123. package/components/information-tag/index.mjs +44 -54
  124. package/components/information-tag/src/ctx.d.ts +5 -19
  125. package/components/information-tag/src/index.vue.d.ts +24 -51
  126. package/components/information-templates-default/index.cjs +1 -101
  127. package/components/information-templates-default/index.mjs +63 -73
  128. package/components/information-templates-default/src/index.vue.d.ts +2 -1
  129. package/components/input/index.cjs +1 -115
  130. package/components/input/index.mjs +60 -83
  131. package/components/input/src/ctx.d.ts +50 -151
  132. package/components/input/src/index.vue.d.ts +389 -947
  133. package/components/input-array/index.cjs +1 -310
  134. package/components/input-array/index.mjs +114 -244
  135. package/components/input-array/src/ctx.d.ts +19 -49
  136. package/components/input-array/src/form-template.vue.d.ts +2 -901
  137. package/components/input-array/src/index.vue.d.ts +45 -731
  138. package/components/input-collection/index.cjs +1 -452
  139. package/components/input-collection/index.mjs +195 -355
  140. package/components/input-collection/src/core.vue.d.ts +59 -1019
  141. package/components/input-collection/src/ctx.d.ts +19 -49
  142. package/components/input-collection/src/index.vue.d.ts +47 -110
  143. package/components/input-file/index.cjs +1 -142
  144. package/components/input-file/index.mjs +68 -100
  145. package/components/input-file/src/ctx.d.ts +8 -29
  146. package/components/input-file/src/index.vue.d.ts +447 -76
  147. package/components/input-file/src/template.vue.d.ts +2 -124
  148. package/components/input-link/index.cjs +1 -167
  149. package/components/input-link/index.mjs +60 -83
  150. package/components/input-link/src/ctx.d.ts +48 -135
  151. package/components/input-link/src/index.vue.d.ts +835 -312
  152. package/components/input-number/index.cjs +1 -119
  153. package/components/input-number/index.mjs +73 -87
  154. package/components/input-number/src/ctx.d.ts +38 -131
  155. package/components/input-number/src/index.vue.d.ts +321 -682
  156. package/components/input-tag/index.cjs +1 -100
  157. package/components/input-tag/index.mjs +51 -78
  158. package/components/input-tag/src/ctx.d.ts +41 -143
  159. package/components/input-tag/src/index.vue.d.ts +322 -775
  160. package/components/isObject.cjs +1 -165
  161. package/components/monaco-editor/index.cjs +1 -83
  162. package/components/monaco-editor/index.mjs +40 -59
  163. package/components/monaco-editor/src/ctx.d.ts +19 -44
  164. package/components/monaco-editor/src/index.vue.d.ts +212 -111
  165. package/components/radio/index.cjs +1 -267
  166. package/components/radio/index.mjs +110 -209
  167. package/components/radio/src/ctx.d.ts +27 -91
  168. package/components/radio/src/index.vue.d.ts +299 -1279
  169. package/components/radio/src/option.vue.d.ts +28 -878
  170. package/components/radio/src/wraper.vue.d.ts +67 -198
  171. package/components/renderer-data/index.cjs +1 -41
  172. package/components/renderer-data/index.mjs +19 -26
  173. package/components/renderer-data/src/ctx.d.ts +1 -1
  174. package/components/renderer-data/src/index.vue.d.ts +5 -4
  175. package/components/select/index.cjs +1 -311
  176. package/components/select/index.mjs +156 -214
  177. package/components/select/src/core.vue.d.ts +446 -1028
  178. package/components/select/src/ctx.d.ts +60 -215
  179. package/components/select/src/index.vue.d.ts +318 -593
  180. package/components/select/src/options.vue.d.ts +4 -3
  181. package/components/slider/index.cjs +1 -88
  182. package/components/slider/index.mjs +41 -70
  183. package/components/slider/src/ctx.d.ts +63 -174
  184. package/components/slider/src/index.vue.d.ts +154 -419
  185. package/components/style.css +1 -0
  186. package/components/switch/index.cjs +1 -88
  187. package/components/switch/index.mjs +37 -69
  188. package/components/switch/src/ctx.d.ts +30 -109
  189. package/components/switch/src/index.vue.d.ts +90 -697
  190. package/components/switch/src/types.d.ts +2 -2
  191. package/components/tables-select/index.cjs +1 -263
  192. package/components/tables-select/index.mjs +101 -172
  193. package/components/tables-select/src/ctx.d.ts +68 -99
  194. package/components/tables-select/src/index.vue.d.ts +233 -4988
  195. package/components/template-instances-provider/index.cjs +1 -31
  196. package/components/template-instances-provider/index.mjs +18 -22
  197. package/components/template-instances-provider/src/index.vue.d.ts +5 -4
  198. package/components/templates-default/index.cjs +1 -235
  199. package/components/templates-default/index.mjs +152 -211
  200. package/components/templates-default/src/ctx.d.ts +2 -2
  201. package/components/templates-default/src/index.vue.d.ts +7337 -145
  202. package/components/templates-element-plus/index.cjs +1 -112
  203. package/components/templates-element-plus/index.mjs +49 -91
  204. package/components/templates-element-plus/src/ctx.d.ts +1 -1
  205. package/components/templates-element-plus/src/index.vue.d.ts +59 -251
  206. package/components/templates-esri/index.cjs +1 -65
  207. package/components/templates-esri/index.mjs +29 -39
  208. package/components/templates-esri/src/ctx.d.ts +1 -1
  209. package/components/templates-esri/src/index.vue.d.ts +2184 -25
  210. package/components/templates-layout/index.cjs +1 -137
  211. package/components/templates-layout/index.mjs +78 -116
  212. package/components/templates-layout/src/ctx.d.ts +1 -1
  213. package/components/templates-layout/src/index.vue.d.ts +73 -404
  214. package/components/templates-variant/index.cjs +1 -70
  215. package/components/templates-variant/index.mjs +33 -43
  216. package/components/templates-variant/src/ctx.d.ts +1 -1
  217. package/components/templates-variant/src/index.vue.d.ts +1272 -25
  218. package/components/time-picker/index.cjs +1 -104
  219. package/components/time-picker/index.mjs +57 -87
  220. package/components/time-picker/src/ctx.d.ts +130 -212
  221. package/components/time-picker/src/index.vue.d.ts +283 -1371
  222. package/components/upload/index.cjs +1 -663
  223. package/components/upload/index.mjs +343 -537
  224. package/components/upload/src/ctx.d.ts +106 -191
  225. package/components/upload/src/file.vue.d.ts +168 -745
  226. package/components/upload/src/index.vue.d.ts +647 -1888
  227. package/components/upload/src/types.d.ts +1 -1
  228. package/components/upload/src/wraper.vue.d.ts +233 -407
  229. package/components/upload-plus/index.cjs +21 -18673
  230. package/components/upload-plus/index.mjs +4566 -18366
  231. package/components/upload-plus/src/api.d.ts +1 -1
  232. package/components/upload-plus/src/ctx.d.ts +21 -51
  233. package/components/upload-plus/src/index.vue.d.ts +53 -1657
  234. package/components/use-watch.cjs +1 -0
  235. package/components/van-cascader/index.cjs +1 -125
  236. package/components/van-cascader/index.mjs +51 -96
  237. package/components/van-cascader/src/ctx.d.ts +143 -203
  238. package/components/van-cascader/src/index.vue.d.ts +332 -988
  239. package/components/var-datetime-picker/index.cjs +1 -333
  240. package/components/var-datetime-picker/index.mjs +173 -254
  241. package/components/var-datetime-picker/src/ctx.d.ts +18 -48
  242. package/components/var-datetime-picker/src/index.vue.d.ts +628 -1090
  243. package/components/vditor/index.cjs +1 -86
  244. package/components/vditor/index.mjs +40 -66
  245. package/components/vditor/src/ctx.d.ts +15 -45
  246. package/components/vditor/src/index.vue.d.ts +195 -120
  247. package/composables/element-plus/index.cjs +1 -23
  248. package/composables/element-plus/index.mjs +14 -18
  249. package/composables/index.cjs +1 -161
  250. package/composables/index.d.ts +1 -0
  251. package/composables/index.mjs +100 -135
  252. package/composables/useForm.d.ts +2 -2
  253. package/composables/useRtl.d.ts +18 -0
  254. package/composables/useTemplateInstances.d.ts +3 -3
  255. package/index.css +1 -562
  256. package/index.d.ts +0 -3
  257. package/index.esm.js +23 -48
  258. package/locale/index.cjs +1 -102
  259. package/locale/index.mjs +34 -34
  260. package/locale/lang/index.cjs +1 -2
  261. package/locale/lang/index.d.ts +1 -0
  262. package/package.json +14 -85
  263. package/shared/const/index.cjs +1 -59
  264. package/shared/const/index.d.ts +1 -1
  265. package/shared/const/index.mjs +18 -20
  266. package/shared/element-plus/ctx.d.ts +40 -37
  267. package/shared/element-plus/index.cjs +1 -211
  268. package/shared/element-plus/index.mjs +93 -161
  269. package/shared/element-plus/instances.d.ts +224 -321
  270. package/shared/form/index.cjs +1 -33
  271. package/shared/form/index.mjs +23 -25
  272. package/shared/helper/index.cjs +1 -11
  273. package/shared/helper/index.mjs +7 -8
  274. package/shared/index.cjs +1 -8
  275. package/shared/index.mjs +5 -1
  276. package/shared/infer-prop/index.cjs +1 -36
  277. package/shared/infer-prop/index.mjs +22 -28
  278. package/shared/progress-it/index.cjs +1 -42
  279. package/shared/progress-it/index.mjs +15 -31
  280. package/shared/rules/index.cjs +1 -56
  281. package/shared/rules/index.mjs +19 -18
  282. package/shared/types/form/index.cjs +1 -2
  283. package/shared/types/index.cjs +1 -2
  284. package/shared/types/source/index.cjs +1 -2
  285. package/shared/types/source-manager/index.cjs +1 -2
  286. package/shared/upload/index.cjs +1 -774
  287. package/shared/upload/index.mjs +180 -764
  288. package/component.d.ts +0 -3
  289. package/components/_plugin-vue_export-helper.mjs +0 -9
  290. package/components/card-input-collection/index.css +0 -21
  291. package/components/cascader/index.css +0 -9
  292. package/components/checkbox/index.css +0 -30
  293. package/components/cloneDeep.mjs +0 -2104
  294. package/components/date-picker-range/index.css +0 -18
  295. package/components/dialog-input-collection/index.css +0 -21
  296. package/components/download-plus/index.css +0 -68
  297. package/components/editable-text/index.css +0 -9
  298. package/components/esri-input-geojson/index.css +0 -32
  299. package/components/fieldset/index.css +0 -5
  300. package/components/form-item/index.css +0 -35
  301. package/components/index.mjs +0 -378
  302. package/components/index2.mjs +0 -14
  303. package/components/information-tag/index.css +0 -6
  304. package/components/information-templates-default/index.css +0 -16
  305. package/components/input-array/index.css +0 -14
  306. package/components/input-collection/index.css +0 -20
  307. package/components/input-link/index.css +0 -4
  308. package/components/input-number/index.css +0 -13
  309. package/components/isObject.mjs +0 -158
  310. package/components/monaco-editor/index.css +0 -4
  311. package/components/radio/index.css +0 -40
  312. package/components/select/index.css +0 -15
  313. package/components/switch/index.css +0 -10
  314. package/components/tables-select/index.css +0 -3
  315. package/components/templates-layout/index.css +0 -3
  316. package/components/upload/index.css +0 -34
  317. package/components/upload-plus/index.css +0 -84
  318. package/components/van-cascader/index.css +0 -6
  319. package/components/var-datetime-picker/index.css +0 -17
  320. package/defaults.d.ts +0 -5
@@ -1,28 +1,25 @@
1
- import { defineComponent, watch, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, createTextVNode, toDisplayString, mergeProps, computed, Fragment, reactive, createElementBlock, normalizeProps, guardReactiveProps, createSlots, createCommentVNode, createElementVNode } from 'vue';
2
- import { p as plus_default, e as edit_default, d as delete_default } from '../index.mjs';
3
- import { setData, ensetData, getValue } from '@vunk/core';
4
- import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
5
- import { VkfInformationData, VkfInformationTemplates, VkfInformationRenderer } from '@vunk/form/components/information-renderer';
6
- import { useComputedReadonly } from '@vunk/form/composables';
7
- import { useLocale } from '@vunk/form/composables/element-plus';
8
- import { VkAvatar } from '@vunk/plus/components/avatar';
9
- import { VkTableColumns } from '@vunk/plus/components/table-columns';
10
- import { CRUD } from '@vunk/shared/enum';
11
- import { isCallable } from '@vunk/shared/function';
12
- import { ElDialog, ElButton, ElPopconfirm, ElTable } from 'element-plus';
13
- import { useModelComputed, useDeferred } from '@vunk/core/composables';
14
- import { VkfForm } from '@vunk/form/components/form';
15
- import { validateCatch } from '@vunk/form/shared/form';
16
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
17
- import { VkfInformationTemplatesDefault } from '@vunk/form/components/information-templates-default';
18
- import { VkfRendererData } from '@vunk/form/components/renderer-data';
19
- import { VkfTemplateInstancesProvider } from '@vunk/form/components/template-instances-provider';
20
- import { VkfTemplatesDefault } from '@vunk/form/components/templates-default';
21
- import { c as cloneDeep } from '../cloneDeep.mjs';
22
- import '../isObject.mjs';
23
-
24
- const props = {
25
- ..._VkfFormItemCtx.props,
1
+ import { defineComponent as A, watch as Q, resolveComponent as W, openBlock as D, createBlock as S, unref as a, withCtx as r, createVNode as l, mergeProps as X, createTextVNode as I, toDisplayString as P, renderSlot as h, computed as b, Fragment as j, reactive as Y, createElementBlock as _, normalizeProps as Z, guardReactiveProps as x, createSlots as ee, createCommentVNode as O, createElementVNode as R } from "vue";
2
+ import { p as $, e as w, d as te } from "../index.cjs";
3
+ import { setData as ae, ensetData as z, getValue as oe } from "@vunk/core";
4
+ import { _VkfFormItemCtx as U, VkfFormItem as le } from "@vunk/form/components/form-item";
5
+ import { VkfInformationTemplates as re, VkfInformationData as ne, VkfInformationRenderer as ie } from "@vunk/form/components/information-renderer";
6
+ import { useComputedReadonly as de } from "@vunk/form/composables";
7
+ import { useLocale as M } from "@vunk/form/composables/element-plus";
8
+ import { VkAvatar as se } from "@vunk/plus/components/avatar";
9
+ import { VkTableColumns as pe } from "@vunk/plus/components/table-columns";
10
+ import { CRUD as g } from "@vunk/shared/enum";
11
+ import { isCallable as N } from "@vunk/shared/function";
12
+ import { ElDialog as me, ElButton as k, ElPopconfirm as ue, ElTable as fe } from "element-plus";
13
+ import { useModelComputed as ce, useDeferred as ve } from "@vunk/core/composables";
14
+ import { VkfForm as ye } from "@vunk/form/components/form";
15
+ import { validateCatch as Ve } from "@vunk/form/shared/form";
16
+ import { VkfInformationTemplatesDefault as be } from "@vunk/form/components/information-templates-default";
17
+ import { VkfRendererData as ge } from "@vunk/form/components/renderer-data";
18
+ import { VkfTemplateInstancesProvider as ke } from "@vunk/form/components/template-instances-provider";
19
+ import { VkfTemplatesDefault as Ce } from "@vunk/form/components/templates-default";
20
+ import { c as C } from "../cloneDeep.cjs";
21
+ const De = {
22
+ ...U.props,
26
23
  columns: {
27
24
  type: Array,
28
25
  default: () => []
@@ -43,14 +40,14 @@ const props = {
43
40
  */
44
41
  splicable: {
45
42
  type: Boolean,
46
- default: true
43
+ default: !0
47
44
  },
48
45
  /**
49
46
  * @description 开启 form-item 的 label 上的操作区域, 在labelPosition为top时生效
50
47
  */
51
48
  labelActions: {
52
49
  type: Boolean,
53
- default: false
50
+ default: !1
54
51
  },
55
52
  /**
56
53
  * @description 添加记录时的默认值
@@ -77,13 +74,10 @@ const props = {
77
74
  type: Object,
78
75
  default: void 0
79
76
  }
80
- };
81
- const emits = {
77
+ }, Pe = {
82
78
  "update:modelValue": null,
83
79
  "update:formdata": null
84
- };
85
-
86
- var _sfc_main$2 = /* @__PURE__ */ defineComponent({
80
+ }, Ie = /* @__PURE__ */ A({
87
81
  __name: "dialog-form",
88
82
  props: {
89
83
  title: {
@@ -96,11 +90,11 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
96
90
  },
97
91
  openReset: {
98
92
  type: Boolean,
99
- default: true
93
+ default: !0
100
94
  },
101
95
  visible: {
102
96
  type: Boolean,
103
- default: false
97
+ default: !1
104
98
  },
105
99
  formItems: {
106
100
  type: Array,
@@ -112,105 +106,73 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
112
106
  },
113
107
  validateCatch: {
114
108
  type: Function,
115
- default: validateCatch
109
+ default: Ve
116
110
  },
117
111
  formdata: null
118
112
  },
119
113
  emits: ["update:modelValue", "update:visible", "change", "update:formdata"],
120
- setup(__props, { expose: __expose, emit: __emit }) {
121
- __expose();
122
- const props = __props;
123
- const emit = __emit;
124
- const { tr } = useLocale();
125
- const formData = useModelComputed({
114
+ setup(m, { emit: f }) {
115
+ const t = m, s = f, { tr: u } = M(), c = ce({
126
116
  key: "formdata",
127
117
  default: {}
128
- }, props, emit);
129
- const formDef = useDeferred();
130
- formDef.promise.then((form) => {
131
- props.dialogFormProps.elRef?.(form);
118
+ }, t, s), y = ve();
119
+ y.promise.then((i) => {
120
+ var d, v;
121
+ (v = (d = t.dialogFormProps).elRef) == null || v.call(d, i);
122
+ }), Q(() => t.visible, (i) => {
123
+ t.openReset && i && (c.value = { ...t.modelValue }, setTimeout(() => {
124
+ var d;
125
+ (d = y.value) == null || d.clearValidate();
126
+ }));
132
127
  });
133
- watch(() => props.visible, (v) => {
134
- if (props.openReset && v) {
135
- formData.value = { ...props.modelValue };
136
- setTimeout(() => {
137
- formDef.value?.clearValidate();
138
- });
139
- }
140
- });
141
- function handleSubmit() {
142
- formDef.value?.validate().then(() => {
143
- emit("update:modelValue", formData.value);
144
- emit("change", formData.value);
145
- emit("update:visible", false);
146
- }).catch(props.validateCatch);
128
+ function T() {
129
+ var i;
130
+ (i = y.value) == null || i.validate().then(() => {
131
+ s("update:modelValue", c.value), s("change", c.value), s("update:visible", !1);
132
+ }).catch(t.validateCatch);
147
133
  }
148
- const __returned__ = { props, emit, tr, formData, formDef, handleSubmit, get setData() {
149
- return setData;
150
- }, get VkfForm() {
151
- return VkfForm;
152
- }, get ElDialog() {
153
- return ElDialog;
154
- } };
155
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
156
- return __returned__;
157
- }
158
- });
159
-
160
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
161
- const _component_ElButton = resolveComponent("ElButton");
162
- return openBlock(), createBlock($setup["ElDialog"], {
163
- "model-value": $props.visible,
164
- "append-to-body": "",
165
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:visible", $event))
166
- }, {
167
- header: withCtx(() => [
168
- renderSlot(_ctx.$slots, "header")
169
- ]),
170
- footer: withCtx(() => [
171
- createVNode(_component_ElButton, {
172
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:visible", false))
134
+ return (i, d) => {
135
+ const v = W("ElButton");
136
+ return D(), S(a(me), {
137
+ "model-value": m.visible,
138
+ "append-to-body": "",
139
+ "onUpdate:modelValue": d[2] || (d[2] = (V) => i.$emit("update:visible", V))
173
140
  }, {
174
- default: withCtx(() => [
175
- createTextVNode(
176
- toDisplayString($setup.tr("el.messagebox.cancel", "\u53D6\u6D88")),
177
- 1
178
- /* TEXT */
179
- )
141
+ header: r(() => [
142
+ h(i.$slots, "header")
180
143
  ]),
181
- _: 1
182
- /* STABLE */
183
- }),
184
- createVNode(_component_ElButton, {
185
- type: "primary",
186
- onClick: $setup.handleSubmit
187
- }, {
188
- default: withCtx(() => [
189
- createTextVNode(
190
- toDisplayString($setup.tr("el.messagebox.confirm", "\u786E\u5B9A")),
191
- 1
192
- /* TEXT */
193
- )
144
+ footer: r(() => [
145
+ l(v, {
146
+ onClick: d[1] || (d[1] = (V) => i.$emit("update:visible", !1))
147
+ }, {
148
+ default: r(() => [
149
+ I(P(a(u)("el.messagebox.cancel", "取消")), 1)
150
+ ]),
151
+ _: 1
152
+ }),
153
+ l(v, {
154
+ type: "primary",
155
+ onClick: T
156
+ }, {
157
+ default: r(() => [
158
+ I(P(a(u)("el.messagebox.confirm", "确定")), 1)
159
+ ]),
160
+ _: 1
161
+ })
194
162
  ]),
195
- _: 1
196
- /* STABLE */
197
- })
198
- ]),
199
- default: withCtx(() => [
200
- createVNode($setup["VkfForm"], mergeProps($props.dialogFormProps, {
201
- "el-ref": $setup.formDef.resolve,
202
- "form-items": $props.formItems,
203
- data: $setup.formData,
204
- onSetData: _cache[0] || (_cache[0] = ($event) => $setup.setData($setup.formData, $event))
205
- }), null, 16, ["el-ref", "form-items", "data"])
206
- ]),
207
- _: 3
208
- /* FORWARDED */
209
- }, 8, ["model-value"]);
210
- }
211
- var DialogForm = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/dialog-input-collection/src/dialog-form.vue"]]);
212
-
213
- var _sfc_main$1 = /* @__PURE__ */ defineComponent({
163
+ default: r(() => [
164
+ l(a(ye), X(m.dialogFormProps, {
165
+ "el-ref": a(y).resolve,
166
+ "form-items": m.formItems,
167
+ data: a(c),
168
+ onSetData: d[0] || (d[0] = (V) => a(ae)(a(c), V))
169
+ }), null, 16, ["el-ref", "form-items", "data"])
170
+ ]),
171
+ _: 3
172
+ }, 8, ["model-value"]);
173
+ };
174
+ }
175
+ }), he = /* @__PURE__ */ A({
214
176
  __name: "layout",
215
177
  props: {
216
178
  data: {
@@ -219,400 +181,216 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
219
181
  }
220
182
  },
221
183
  emits: ["setData"],
222
- setup(__props, { expose: __expose }) {
223
- __expose();
224
- const __returned__ = { get VkfInformationData() {
225
- return VkfInformationData;
226
- }, get VkfInformationTemplates() {
227
- return VkfInformationTemplates;
228
- }, get VkfInformationTemplatesDefault() {
229
- return VkfInformationTemplatesDefault;
230
- }, get VkfRendererData() {
231
- return VkfRendererData;
232
- }, get VkfTemplateInstancesProvider() {
233
- return VkfTemplateInstancesProvider;
234
- }, get VkfTemplatesDefault() {
235
- return VkfTemplatesDefault;
236
- } };
237
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
238
- return __returned__;
184
+ setup(m) {
185
+ return (f, t) => (D(), S(a(ke), null, {
186
+ placeholder: r(() => [
187
+ l(a(Ce))
188
+ ]),
189
+ default: r(() => [
190
+ l(a(re), null, {
191
+ placeholder: r(() => [
192
+ l(a(be))
193
+ ]),
194
+ default: r(() => [
195
+ l(a(ge), {
196
+ data: m.data,
197
+ onSetData: t[1] || (t[1] = (s) => f.$emit("setData", s))
198
+ }, {
199
+ default: r(() => [
200
+ l(a(ne), {
201
+ data: m.data,
202
+ onSetData: t[0] || (t[0] = (s) => f.$emit("setData", s))
203
+ }, {
204
+ default: r(() => [
205
+ h(f.$slots, "default")
206
+ ]),
207
+ _: 3
208
+ }, 8, ["data"])
209
+ ]),
210
+ _: 3
211
+ }, 8, ["data"])
212
+ ]),
213
+ _: 3
214
+ })
215
+ ]),
216
+ _: 3
217
+ }));
239
218
  }
240
- });
241
-
242
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
243
- return openBlock(), createBlock($setup["VkfTemplateInstancesProvider"], null, {
244
- placeholder: withCtx(() => [
245
- createVNode($setup["VkfTemplatesDefault"])
246
- ]),
247
- default: withCtx(() => [
248
- createVNode($setup["VkfInformationTemplates"], null, {
249
- placeholder: withCtx(() => [
250
- createVNode($setup["VkfInformationTemplatesDefault"])
251
- ]),
252
- default: withCtx(() => [
253
- createVNode($setup["VkfRendererData"], {
254
- data: $props.data,
255
- onSetData: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("setData", $event))
256
- }, {
257
- default: withCtx(() => [
258
- createVNode($setup["VkfInformationData"], {
259
- data: $props.data,
260
- onSetData: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("setData", $event))
261
- }, {
262
- default: withCtx(() => [
263
- renderSlot(_ctx.$slots, "default")
264
- ]),
265
- _: 3
266
- /* FORWARDED */
267
- }, 8, ["data"])
268
- ]),
269
- _: 3
270
- /* FORWARDED */
271
- }, 8, ["data"])
272
- ]),
273
- _: 3
274
- /* FORWARDED */
275
- })
276
- ]),
277
- _: 3
278
- /* FORWARDED */
279
- });
280
- }
281
- var TemplatesLayout = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/dialog-input-collection/src/layout.vue"]]);
282
-
283
- var _sfc_main = /* @__PURE__ */defineComponent({
284
- ...{
285
- name: "VkfDialogInputCollection",
286
- inheritAttrs: false
287
- },
219
+ }), Te = {
220
+ key: 0,
221
+ class: "vkf-dialog-input-collection-options"
222
+ }, Be = {
223
+ class: "vkf-dialog-input-collection__dialog-header"
224
+ }, Fe = {
225
+ class: "vkf-dialog-input-collection__dialog-title"
226
+ }, Xe = /* @__PURE__ */ A({
227
+ name: "VkfDialogInputCollection",
228
+ inheritAttrs: !1,
288
229
  __name: "index",
289
- props: props,
290
- emits,
291
- setup(__props, {
292
- expose: __expose,
293
- emit: __emit
230
+ props: De,
231
+ emits: Pe,
232
+ setup(m, {
233
+ emit: f
294
234
  }) {
295
- __expose();
296
- const props = __props;
297
- const emit = __emit;
298
- const {
299
- tr
300
- } = useLocale();
301
- const ElTable$1 = ElTable;
302
- const hasColAdd = computed(() => {
303
- return props.modules.includes("operations:add");
304
- });
305
- const formItemBindProps = _VkfFormItemCtx.createBindProps(props);
306
- const readonly = useComputedReadonly(props);
307
- const formData = computed(() => {
308
- if (!props.prop || props.prop.length === 0) {
309
- return props.modelValue;
310
- }
311
- const data = {};
312
- ensetData(data, {
313
- k: props.prop,
314
- v: props.modelValue
315
- });
316
- return data;
317
- });
318
- const fullColumns = computed(() => {
319
- return props.columns.map(column => {
320
- const tableColProp = Array.isArray(column.prop) ? column.prop.join(".") : column.prop;
321
- return {
322
- ...column,
323
- prop: tableColProp,
324
- slots: e => {
325
- const prop = [props.prop ?? [], e.$index, column.prop].flat();
326
- const formItemProps = {
327
- prop,
328
- readonly: readonly.value,
329
- templateType: column.templateType,
330
- templateProps: column.templateProps
331
- };
332
- if (isCallable(column.templateProps)) {
333
- formItemProps.templateProps = () => {
334
- return column.templateProps(e.row);
335
- };
336
- }
337
- return createVNode(VkfInformationRenderer, {
338
- "source": [{
339
- ...formItemProps,
340
- ...column.createTemplateProps?.(e, formItemProps)
341
- }]
342
- }, null);
343
- }
344
- };
345
- });
346
- });
347
- const buttonsColumn = computed(() => ({
348
- label: tr("vkf.common.operations", "\u64CD\u4F5C"),
235
+ const t = m, s = f, {
236
+ tr: u
237
+ } = M(), c = fe, y = b(() => t.modules.includes("operations:add")), T = U.createBindProps(t), i = de(t), d = b(() => {
238
+ if (!t.prop || t.prop.length === 0)
239
+ return t.modelValue;
240
+ const e = {};
241
+ return z(e, {
242
+ k: t.prop,
243
+ v: t.modelValue
244
+ }), e;
245
+ }), v = b(() => t.columns.map((e) => {
246
+ const o = Array.isArray(e.prop) ? e.prop.join(".") : e.prop;
247
+ return {
248
+ ...e,
249
+ prop: o,
250
+ slots: (p) => {
251
+ var E;
252
+ const F = {
253
+ prop: [t.prop ?? [], p.$index, e.prop].flat(),
254
+ readonly: i.value,
255
+ templateType: e.templateType,
256
+ templateProps: e.templateProps
257
+ };
258
+ return N(e.templateProps) && (F.templateProps = () => e.templateProps(p.row)), l(ie, {
259
+ source: [{
260
+ ...F,
261
+ ...(E = e.createTemplateProps) == null ? void 0 : E.call(e, p, F)
262
+ }]
263
+ }, null);
264
+ }
265
+ };
266
+ })), V = b(() => ({
267
+ label: u("vkf.common.operations", "操作"),
349
268
  align: "center",
350
269
  width: "85",
351
- hidden: readonly.value || !props.splicable,
270
+ hidden: i.value || !t.splicable,
352
271
  className: "vk-input-collection__buttons",
353
272
  slots: ({
354
- $index
355
- }) => createVNode(Fragment, null, [hasColAdd.value && createVNode(ElButton, {
356
- "size": "small",
357
- "icon": plus_default,
358
- "type": "primary",
359
- "link": true,
360
- "onClick": () => handlePlus($index)
361
- }, null), createVNode(ElButton, {
362
- "size": "small",
363
- "icon": edit_default,
364
- "type": "primary",
365
- "link": true,
366
- "onClick": () => handleEdit($index)
367
- }, null), createVNode(ElPopconfirm, {
368
- "title": tr("vkf.dialogInputCollection.deleteConfirm", "\u786E\u5B9A\u5220\u9664\u5417\uFF1F"),
369
- "onConfirm": () => handleMinus($index),
370
- "confirmButtonText": tr("vkf.common.delete", "\u5220\u9664"),
371
- "cancelButtonText": tr("el.popconfirm.cancelButtonText", "\u53D6\u6D88")
273
+ $index: e
274
+ }) => l(j, null, [y.value && l(k, {
275
+ size: "small",
276
+ icon: $,
277
+ type: "primary",
278
+ link: !0,
279
+ onClick: () => B(e)
280
+ }, null), l(k, {
281
+ size: "small",
282
+ icon: w,
283
+ type: "primary",
284
+ link: !0,
285
+ onClick: () => H(e)
286
+ }, null), l(ue, {
287
+ title: u("vkf.dialogInputCollection.deleteConfirm", "确定删除吗?"),
288
+ onConfirm: () => G(e),
289
+ confirmButtonText: u("vkf.common.delete", "删除"),
290
+ cancelButtonText: u("el.popconfirm.cancelButtonText", "取消")
372
291
  }, {
373
- reference: () => createVNode(ElButton, {
374
- "size": "small",
375
- "icon": delete_default,
376
- "type": "danger",
377
- "link": true
292
+ reference: () => l(k, {
293
+ size: "small",
294
+ icon: te,
295
+ type: "danger",
296
+ link: !0
378
297
  }, null)
379
298
  })])
380
- }));
381
- const allColumns = computed(() => {
382
- const data = [...fullColumns.value, buttonsColumn.value];
383
- return data;
384
- });
385
- const cuState = reactive({
386
- type: CRUD.create,
299
+ })), L = b(() => [...v.value, V.value]), n = Y({
300
+ type: g.create,
387
301
  index: 0,
388
302
  // 新增时,表示在哪条点击的 +
389
303
  data: {},
390
- dialogVisible: false
391
- });
392
- const cuFormItems = computed(() => {
393
- return props.columns.map(c => {
394
- return {
395
- label: c.label,
396
- readonly: readonly.value,
397
- prop: c.prop,
398
- templateType: c.templateType,
399
- templateProps: c.templateProps
400
- };
401
- });
402
- });
403
- function handleMinus(index) {
404
- const data = cloneDeep(props.modelValue);
405
- data.splice(index, 1);
406
- emit("update:modelValue", data);
304
+ dialogVisible: !1
305
+ }), q = b(() => t.columns.map((e) => ({
306
+ label: e.label,
307
+ readonly: i.value,
308
+ prop: e.prop,
309
+ templateType: e.templateType,
310
+ templateProps: e.templateProps
311
+ })));
312
+ function G(e) {
313
+ const o = C(t.modelValue);
314
+ o.splice(e, 1), s("update:modelValue", o);
407
315
  }
408
- function handlePlus(index) {
409
- const defaultItemValue = isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
410
- cuState.index = index;
411
- cuState.data = cloneDeep(defaultItemValue);
412
- cuState.type = CRUD.create;
413
- cuState.dialogVisible = true;
316
+ function B(e) {
317
+ const o = N(t.defaultItemValue) ? t.defaultItemValue() : t.defaultItemValue;
318
+ n.index = e, n.data = C(o), n.type = g.create, n.dialogVisible = !0;
414
319
  }
415
- function handleEdit(index) {
416
- const data = props.modelValue[index];
417
- cuState.index = index;
418
- cuState.data = cloneDeep(data);
419
- cuState.type = CRUD.update;
420
- cuState.dialogVisible = true;
320
+ function H(e) {
321
+ const o = t.modelValue[e];
322
+ n.index = e, n.data = C(o), n.type = g.update, n.dialogVisible = !0;
421
323
  }
422
- function handleDialogFormChange(data) {
423
- const newData = cloneDeep(props.modelValue);
424
- if (cuState.type === CRUD.create) {
425
- newData.splice(cuState.index + 1, 0, data);
426
- } else if (cuState.type === CRUD.update) {
427
- newData[cuState.index] = data;
428
- }
429
- emit("update:modelValue", newData);
324
+ function J(e) {
325
+ const o = C(t.modelValue);
326
+ n.type === g.create ? o.splice(n.index + 1, 0, e) : n.type === g.update && (o[n.index] = e), s("update:modelValue", o);
430
327
  }
431
- const handleFormSetData = e => {
432
- console.warn("\u8868\u5355\u9879\u6B63\u5728\u76F4\u63A5\u4FEE\u6539 Data, \u8FD9\u5728 dialog-input-collection \u53EF\u80FD\u662F\u4E00\u4E2A\u610F\u5916\u64CD\u4F5C", e);
433
- const data = cloneDeep(formData.value);
434
- ensetData(data, e);
435
- emit("update:modelValue", getValue(data, props.prop));
436
- };
437
- const __returned__ = {
438
- props,
439
- emit,
440
- tr,
441
- ElTable: ElTable$1,
442
- hasColAdd,
443
- formItemBindProps,
444
- readonly,
445
- formData,
446
- fullColumns,
447
- buttonsColumn,
448
- allColumns,
449
- cuState,
450
- cuFormItems,
451
- handleMinus,
452
- handlePlus,
453
- handleEdit,
454
- handleDialogFormChange,
455
- handleFormSetData,
456
- get Edit() {
457
- return edit_default;
458
- },
459
- get Plus() {
460
- return plus_default;
461
- },
462
- get VkfFormItem() {
463
- return VkfFormItem;
464
- },
465
- get VkAvatar() {
466
- return VkAvatar;
467
- },
468
- get VkTableColumns() {
469
- return VkTableColumns;
470
- },
471
- get CRUD() {
472
- return CRUD;
473
- },
474
- get ElButton() {
475
- return ElButton;
476
- },
477
- DialogForm,
478
- TemplatesLayout
328
+ const K = (e) => {
329
+ console.warn("表单项正在直接修改 Data, 这在 dialog-input-collection 可能是一个意外操作", e);
330
+ const o = C(d.value);
331
+ z(o, e), s("update:modelValue", oe(o, t.prop));
479
332
  };
480
- Object.defineProperty(__returned__, "__isScriptSetup", {
481
- enumerable: false,
482
- value: true
483
- });
484
- return __returned__;
485
- }
486
- });
487
-
488
- const _hoisted_1 = {
489
- key: 0,
490
- class: "vkf-dialog-input-collection-options"
491
- };
492
- const _hoisted_2 = { class: "vkf-dialog-input-collection__dialog-header" };
493
- const _hoisted_3 = { class: "vkf-dialog-input-collection__dialog-title" };
494
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
495
- return openBlock(), createElementBlock(
496
- Fragment,
497
- null,
498
- [
499
- createVNode($setup["TemplatesLayout"], {
500
- data: $setup.formData,
501
- onSetData: $setup.handleFormSetData
333
+ return (e, o) => (D(), _(j, null, [l(he, {
334
+ data: d.value,
335
+ onSetData: K
336
+ }, {
337
+ default: r(() => [l(a(le), Z(x({
338
+ ...a(T),
339
+ ...e.$attrs
340
+ })), ee({
341
+ default: r(() => [!a(i) && e.splicable && !e.labelActions ? (D(), _("div", Te, [l(a(k), {
342
+ type: "primary",
343
+ onClick: o[1] || (o[1] = (p) => B(-1))
344
+ }, {
345
+ default: r(() => [I(P(a(u)("vkf.common.add", "添加")), 1)]),
346
+ _: 1
347
+ })])) : O("", !0), l(a(c), {
348
+ data: e.modelValue,
349
+ class: "vkf-dialog-input-collection-table"
350
+ }, {
351
+ default: r(() => [l(a(pe), {
352
+ source: L.value
353
+ }, null, 8, ["source"])]),
354
+ _: 1
355
+ }, 8, ["data"])]),
356
+ _: 2
357
+ }, [e.labelActions ? {
358
+ name: "labelActions",
359
+ fn: r(() => [h(e.$slots, "labelActions"), !a(i) && e.splicable ? (D(), S(a(k), {
360
+ key: 0,
361
+ size: "small",
362
+ icon: a($),
363
+ onClick: o[0] || (o[0] = (p) => B(-1))
364
+ }, {
365
+ default: r(() => [I(P(a(u)("vkf.common.add", "添加")), 1)]),
366
+ _: 1
367
+ }, 8, ["icon"])) : O("", !0)]),
368
+ key: "0"
369
+ } : void 0]), 1040), l(Ie, {
370
+ visible: n.dialogVisible,
371
+ "onUpdate:visible": o[2] || (o[2] = (p) => n.dialogVisible = p),
372
+ modelValue: n.data,
373
+ "onUpdate:modelValue": o[3] || (o[3] = (p) => n.data = p),
374
+ formdata: e.formdata,
375
+ "form-items": q.value,
376
+ "dialog-form-props": e.dialogFormProps,
377
+ "validate-catch": e.validateCatch,
378
+ "onUpdate:formdata": o[4] || (o[4] = (p) => e.$emit("update:formdata", p)),
379
+ onChange: J
502
380
  }, {
503
- default: withCtx(() => [
504
- createVNode(
505
- $setup["VkfFormItem"],
506
- normalizeProps(guardReactiveProps({
507
- ...$setup.formItemBindProps,
508
- ..._ctx.$attrs
509
- })),
510
- createSlots({
511
- default: withCtx(() => [
512
- !$setup.readonly && _ctx.splicable && !_ctx.labelActions ? (openBlock(), createElementBlock("div", _hoisted_1, [
513
- createVNode($setup["ElButton"], {
514
- type: "primary",
515
- onClick: _cache[1] || (_cache[1] = ($event) => $setup.handlePlus(-1))
516
- }, {
517
- default: withCtx(() => [
518
- createTextVNode(
519
- toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
520
- 1
521
- /* TEXT */
522
- )
523
- ]),
524
- _: 1
525
- /* STABLE */
526
- })
527
- ])) : createCommentVNode("v-if", true),
528
- createVNode($setup["ElTable"], {
529
- data: _ctx.modelValue,
530
- class: "vkf-dialog-input-collection-table"
531
- }, {
532
- default: withCtx(() => [
533
- createVNode($setup["VkTableColumns"], { source: $setup.allColumns }, null, 8, ["source"])
534
- ]),
535
- _: 1
536
- /* STABLE */
537
- }, 8, ["data"])
538
- ]),
539
- _: 2
540
- /* DYNAMIC */
541
- }, [
542
- _ctx.labelActions ? {
543
- name: "labelActions",
544
- fn: withCtx(() => [
545
- renderSlot(_ctx.$slots, "labelActions"),
546
- !$setup.readonly && _ctx.splicable ? (openBlock(), createBlock($setup["ElButton"], {
547
- key: 0,
548
- size: "small",
549
- icon: $setup.Plus,
550
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.handlePlus(-1))
551
- }, {
552
- default: withCtx(() => [
553
- createTextVNode(
554
- toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
555
- 1
556
- /* TEXT */
557
- )
558
- ]),
559
- _: 1
560
- /* STABLE */
561
- }, 8, ["icon"])) : createCommentVNode("v-if", true)
562
- ]),
563
- key: "0"
564
- } : void 0
565
- ]),
566
- 1040
567
- /* FULL_PROPS, DYNAMIC_SLOTS */
568
- ),
569
- createVNode($setup["DialogForm"], {
570
- visible: $setup.cuState.dialogVisible,
571
- "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => $setup.cuState.dialogVisible = $event),
572
- modelValue: $setup.cuState.data,
573
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.cuState.data = $event),
574
- formdata: _ctx.formdata,
575
- "form-items": $setup.cuFormItems,
576
- "dialog-form-props": _ctx.dialogFormProps,
577
- "validate-catch": _ctx.validateCatch,
578
- "onUpdate:formdata": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("update:formdata", $event)),
579
- onChange: $setup.handleDialogFormChange
580
- }, {
581
- header: withCtx(() => [
582
- createElementVNode("div", _hoisted_2, [
583
- createVNode($setup["VkAvatar"], {
584
- icon: $setup.cuState.type === $setup.CRUD.create ? $setup.Plus : $setup.Edit
585
- }, null, 8, ["icon"]),
586
- createElementVNode(
587
- "span",
588
- _hoisted_3,
589
- toDisplayString($setup.props.label),
590
- 1
591
- /* TEXT */
592
- )
593
- ])
594
- ]),
595
- _: 1
596
- /* STABLE */
597
- }, 8, ["visible", "modelValue", "formdata", "form-items", "dialog-form-props", "validate-catch"])
598
- ]),
599
- _: 3
600
- /* FORWARDED */
601
- }, 8, ["data"]),
602
- renderSlot(_ctx.$slots, "default")
603
- ],
604
- 64
605
- /* STABLE_FRAGMENT */
606
- );
607
- }
608
- var VkfDialogInputCollection = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/dialog-input-collection/src/index.vue"]]);
609
-
610
- var types = /*#__PURE__*/Object.freeze({
381
+ header: r(() => [R("div", Be, [l(a(se), {
382
+ icon: n.type === a(g).create ? a($) : a(w)
383
+ }, null, 8, ["icon"]), R("span", Fe, P(t.label), 1)])]),
384
+ _: 1
385
+ }, 8, ["visible", "modelValue", "formdata", "form-items", "dialog-form-props", "validate-catch"])]),
386
+ _: 3
387
+ }, 8, ["data"]), h(e.$slots, "default")], 64));
388
+ }
389
+ }), Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
611
390
  __proto__: null
612
- });
613
-
614
- VkfDialogInputCollection.install = (app) => {
615
- app.component(VkfDialogInputCollection.name || "VkfDialogInputCollection", VkfDialogInputCollection);
391
+ }, Symbol.toStringTag, { value: "Module" }));
392
+ export {
393
+ Xe as VkfDialogInputCollection,
394
+ Ye as __VkfDialogInputCollection,
395
+ Xe as default
616
396
  };
617
-
618
- export { VkfDialogInputCollection, types as __VkfDialogInputCollection, VkfDialogInputCollection as default };