@aplus-frontend/ui 0.5.23 → 0.5.25

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 (227) hide show
  1. package/es/src/ap-action/group/index.vue.mjs +3 -3
  2. package/es/src/ap-action/item/index.vue2.mjs +5 -5
  3. package/es/src/ap-action/item-dropdown/index.vue.mjs +7 -7
  4. package/es/src/ap-action/item-modal/index.vue.mjs +2 -2
  5. package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
  6. package/es/src/ap-button/ap-action-button.vue.mjs +2 -2
  7. package/es/src/ap-button/ap-button.vue.mjs +2 -2
  8. package/es/src/ap-button/ap-confirm-button.vue.mjs +2 -2
  9. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +4 -4
  10. package/es/src/ap-descriptions/help-message/index.vue2.mjs +4 -4
  11. package/es/src/ap-download/ap-download.vue.mjs +1 -1
  12. package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
  13. package/es/src/ap-field/date/index.vue.mjs +4 -4
  14. package/es/src/ap-field/date-range/index.vue.mjs +8 -8
  15. package/es/src/ap-field/index.mjs +36 -36
  16. package/es/src/ap-field/number/index.vue.mjs +8 -8
  17. package/es/src/ap-field/radio/index.vue.mjs +1 -1
  18. package/es/src/ap-field/rate/index.vue.mjs +2 -2
  19. package/es/src/ap-field/segmented/index.vue.mjs +1 -1
  20. package/es/src/ap-field/select/index.vue.mjs +2 -2
  21. package/es/src/ap-field/select/use-select-options.d.ts +2 -2
  22. package/es/src/ap-field/slider/index.vue.mjs +4 -4
  23. package/es/src/ap-field/switch/index.vue.mjs +3 -3
  24. package/es/src/ap-field/text/index.vue2.mjs +2 -2
  25. package/es/src/ap-field/text/password.vue.mjs +2 -2
  26. package/es/src/ap-field/text-area/index.vue.mjs +3 -3
  27. package/es/src/ap-field/tree-select/index.vue.mjs +3 -3
  28. package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
  29. package/es/src/ap-form/ap-form.vue.d.ts +4 -3
  30. package/es/src/ap-form/ap-form.vue2.mjs +124 -124
  31. package/es/src/ap-form/drawer-form/index.vue.d.ts +9 -8
  32. package/es/src/ap-form/drawer-form/index.vue.mjs +9 -9
  33. package/es/src/ap-form/interface.d.ts +3 -2
  34. package/es/src/ap-form/item/index.vue.mjs +7 -7
  35. package/es/src/ap-form/item-group/index.vue.mjs +3 -3
  36. package/es/src/ap-form/items/checkbox/index.vue.mjs +2 -2
  37. package/es/src/ap-form/items/date/index.vue.mjs +2 -2
  38. package/es/src/ap-form/items/date-range/index.vue.mjs +2 -2
  39. package/es/src/ap-form/items/number/index.vue.mjs +2 -2
  40. package/es/src/ap-form/items/radio/index.vue.mjs +2 -2
  41. package/es/src/ap-form/items/select/index.vue.d.ts +6 -6
  42. package/es/src/ap-form/items/select/index.vue.mjs +2 -2
  43. package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
  44. package/es/src/ap-form/items/text/group.vue2.mjs +2 -2
  45. package/es/src/ap-form/items/text/index.vue2.mjs +2 -2
  46. package/es/src/ap-form/items/text/password.vue.mjs +2 -2
  47. package/es/src/ap-form/items/text-area/index.vue.mjs +2 -2
  48. package/es/src/ap-form/items/tree-select/index.vue.mjs +2 -2
  49. package/es/src/ap-form/modal-form/index.vue.d.ts +9 -8
  50. package/es/src/ap-form/modal-form/index.vue.mjs +7 -7
  51. package/es/src/ap-form/render/item.vue.mjs +2 -2
  52. package/es/src/ap-form/search-form/index.vue.d.ts +9 -8
  53. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  54. package/es/src/ap-form/set/index.vue.mjs +1 -1
  55. package/es/src/ap-grid/editable/form-item.vue.d.ts +4 -2
  56. package/es/src/ap-grid/editable/form-item.vue.mjs +65 -61
  57. package/es/src/ap-grid/editable/index.vue.d.ts +4 -2
  58. package/es/src/ap-grid/editable/index.vue.mjs +86 -81
  59. package/es/src/ap-grid/hooks/use-inner-params.mjs +3 -3
  60. package/es/src/ap-grid/index.vue.d.ts +4 -2
  61. package/es/src/ap-grid/index.vue.mjs +25 -25
  62. package/es/src/ap-grid/interface.d.ts +4 -0
  63. package/es/src/ap-grid/utils/table.d.ts +1 -1
  64. package/es/src/ap-grid/utils/table.mjs +42 -41
  65. package/es/src/ap-info-layout/ApInfoLayout.vue.mjs +2 -2
  66. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +2 -2
  67. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.mjs +1 -1
  68. package/es/src/ap-list/index.vue.d.ts +4 -2
  69. package/es/src/ap-list/index.vue.mjs +4 -4
  70. package/es/src/ap-modal/utils/confirm.d.ts +1 -1
  71. package/es/src/ap-table/ap-table.vue.d.ts +4 -2
  72. package/es/src/ap-table/ap-table.vue2.mjs +13 -13
  73. package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +2 -2
  74. package/es/src/ap-table/components/index/index.vue2.mjs +2 -2
  75. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +3 -3
  76. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +3 -3
  77. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +1 -1
  78. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +1 -1
  79. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +1 -1
  80. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +11 -11
  81. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
  82. package/es/src/ap-table/components/status/index.vue2.mjs +2 -2
  83. package/es/src/ap-table/constants.d.ts +5 -5
  84. package/es/src/ap-table/constants.mjs +45 -45
  85. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  86. package/es/src/ap-table/hooks/use-table-column-state.mjs +3 -3
  87. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +108 -102
  88. package/es/src/ap-table/utils.d.ts +5 -5
  89. package/es/src/ap-tag/ap-tag-group.vue.mjs +8 -8
  90. package/es/src/ap-tag/ap-tag.vue.mjs +2 -2
  91. package/es/src/ap-upload/apUpload.vue.mjs +5 -5
  92. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  93. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +3 -3
  94. package/es/src/ap-upload/components/Picture.vue.d.ts +7 -2
  95. package/es/src/ap-upload/components/Picture.vue2.mjs +6 -6
  96. package/es/src/ap-upload/components/SingleFile.vue2.mjs +7 -7
  97. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +1 -1
  98. package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +2 -2
  99. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +2 -2
  100. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
  101. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +1 -1
  102. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  103. package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +1 -1
  104. package/es/src/business/ap-card/ApCard.vue2.mjs +7 -7
  105. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
  106. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -11
  107. package/es/src/business/ap-expand-alert/index.d.ts +6 -4
  108. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +9 -9
  109. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +5 -5
  110. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +4 -4
  111. package/es/src/business/ap-group-search/images/icon-down.vue.mjs +2 -2
  112. package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +2 -2
  113. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +2 -2
  114. package/es/src/business/ap-image/ApImage.vue2.mjs +1 -1
  115. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +2 -2
  116. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +1 -83
  117. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +34 -59
  118. package/es/src/business/ap-ladder/components/SimpleMode.vue.d.ts +3 -65
  119. package/es/src/business/ap-ladder/components/SimpleMode.vue2.mjs +34 -99
  120. package/es/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +3 -75
  121. package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +68 -195
  122. package/es/src/business/ap-ladder/index.d.ts +1 -235
  123. package/es/src/business/ap-ladder/interface.d.ts +4 -114
  124. package/es/src/business/ap-ladder/utils.d.ts +5 -0
  125. package/es/src/business/ap-ladder/utils.mjs +38 -3
  126. package/es/src/business/ap-product-info/ApProductInfo.d.ts +46 -0
  127. package/es/src/business/ap-product-info/constans.d.ts +23 -0
  128. package/es/src/business/ap-product-info/index.d.ts +1 -0
  129. package/es/src/business/ap-product-info/interface.d.ts +11 -0
  130. package/es/src/business/ap-select-layout/index.d.ts +4 -2
  131. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
  132. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +4 -4
  133. package/es/src/business/ap-status/ApStatus.vue2.mjs +8 -8
  134. package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +4 -4
  135. package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
  136. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
  137. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +14 -14
  138. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +3 -3
  139. package/es/src/business/ap-title/ApTitle.vue2.mjs +7 -7
  140. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +1 -1
  141. package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
  142. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
  143. package/es/src/business/batch-input-group/form-item.vue.mjs +2 -2
  144. package/es/src/business/batch-input-group/index.vue.mjs +1 -1
  145. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +2 -2
  146. package/es/src/check-card/index.vue2.mjs +3 -3
  147. package/es/src/config-provider/hooks/use-namespace.d.ts +1 -5
  148. package/es/src/editable-table/form-item.vue.d.ts +4 -2
  149. package/es/src/editable-table/form-item.vue.mjs +2 -2
  150. package/es/src/editable-table/index.vue.d.ts +4 -2
  151. package/es/src/editable-table/index.vue.mjs +2 -2
  152. package/es/src/full-screen/index.vue.mjs +3 -3
  153. package/es/src/hooks/useFullScreen.mjs +5 -5
  154. package/es/src/mask/index.vue.mjs +10 -10
  155. package/es/src/portal/index.vue.mjs +2 -2
  156. package/es/src/scroll-bar/index.vue.mjs +3 -3
  157. package/es/src/scroll-bar/internal.vue.mjs +2 -2
  158. package/es/src/scroll-view/index.vue.d.ts +5 -5
  159. package/es/src/scroll-view/index.vue.mjs +9 -9
  160. package/es/src/tests/wrapper.d.ts +4 -4
  161. package/es/src/text/group.vue.mjs +2 -2
  162. package/es/src/text/index.vue.mjs +4 -4
  163. package/es/src/work-order-modal/help-message.vue2.mjs +2 -2
  164. package/es/src/work-order-modal/work-order-modal.vue.d.ts +6 -5
  165. package/es/src/work-order-modal/work-order-modal.vue.mjs +2 -2
  166. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  167. package/lib/src/ap-field/index.js +1 -1
  168. package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
  169. package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
  170. package/lib/src/ap-form/ap-form.vue.d.ts +4 -3
  171. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  172. package/lib/src/ap-form/drawer-form/index.vue.d.ts +9 -8
  173. package/lib/src/ap-form/interface.d.ts +3 -2
  174. package/lib/src/ap-form/items/select/index.vue.d.ts +6 -6
  175. package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -8
  176. package/lib/src/ap-form/search-form/index.vue.d.ts +9 -8
  177. package/lib/src/ap-grid/editable/form-item.vue.d.ts +4 -2
  178. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  179. package/lib/src/ap-grid/editable/index.vue.d.ts +4 -2
  180. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  181. package/lib/src/ap-grid/index.vue.d.ts +4 -2
  182. package/lib/src/ap-grid/index.vue.js +1 -1
  183. package/lib/src/ap-grid/interface.d.ts +4 -0
  184. package/lib/src/ap-grid/utils/table.d.ts +1 -1
  185. package/lib/src/ap-grid/utils/table.js +1 -1
  186. package/lib/src/ap-list/index.vue.d.ts +4 -2
  187. package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
  188. package/lib/src/ap-table/ap-table.vue.d.ts +4 -2
  189. package/lib/src/ap-table/constants.d.ts +5 -5
  190. package/lib/src/ap-table/constants.js +1 -1
  191. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  192. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  193. package/lib/src/ap-table/utils.d.ts +5 -5
  194. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  195. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  196. package/lib/src/ap-upload/components/Picture.vue.d.ts +7 -2
  197. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  198. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
  199. package/lib/src/business/ap-expand-alert/index.d.ts +6 -4
  200. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +1 -83
  201. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
  202. package/lib/src/business/ap-ladder/components/SimpleMode.vue.d.ts +3 -65
  203. package/lib/src/business/ap-ladder/components/SimpleMode.vue2.js +1 -1
  204. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +3 -75
  205. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -1
  206. package/lib/src/business/ap-ladder/index.d.ts +1 -235
  207. package/lib/src/business/ap-ladder/interface.d.ts +4 -114
  208. package/lib/src/business/ap-ladder/utils.d.ts +5 -0
  209. package/lib/src/business/ap-ladder/utils.js +1 -1
  210. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +46 -0
  211. package/lib/src/business/ap-product-info/constans.d.ts +23 -0
  212. package/lib/src/business/ap-product-info/index.d.ts +1 -0
  213. package/lib/src/business/ap-product-info/interface.d.ts +11 -0
  214. package/lib/src/business/ap-select-layout/index.d.ts +4 -2
  215. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
  216. package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -5
  217. package/lib/src/editable-table/form-item.vue.d.ts +4 -2
  218. package/lib/src/editable-table/index.vue.d.ts +4 -2
  219. package/lib/src/scroll-view/index.vue.d.ts +5 -5
  220. package/lib/src/tests/wrapper.d.ts +4 -4
  221. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +6 -5
  222. package/package.json +3 -3
  223. package/theme/ap-grid/index.css +3 -0
  224. package/theme/ap-grid/index.less +3 -0
  225. package/theme/ap-ladder/ap-ladder.css +14 -5
  226. package/theme/ap-ladder/ap-ladder.less +16 -7
  227. package/theme/index.css +17 -5
@@ -1,4 +1,4 @@
1
- import { isVNode as E, defineComponent as F, useSlots as K, ref as U, computed as z, unref as o, createVNode as d, Fragment as S, createBlock as w, openBlock as C, resolveDynamicComponent as M, mergeProps as j, createSlots as q, renderList as O, withCtx as x, renderSlot as $, normalizeProps as H, guardReactiveProps as W } from "vue";
1
+ import { isVNode as E, defineComponent as F, useSlots as K, ref as U, computed as z, unref as o, createVNode as d, Fragment as S, openBlock as w, createBlock as C, resolveDynamicComponent as M, mergeProps as j, createSlots as q, renderList as O, withCtx as x, renderSlot as $, normalizeProps as H, guardReactiveProps as W } from "vue";
2
2
  import { Space as G, Tag as J, TreeSelect as Q, Spin as X } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { isArray as Y, omit as Z } from "lodash-unified";
@@ -220,9 +220,9 @@ const ie = /* @__PURE__ */ F({
220
220
  request: h,
221
221
  focus: P,
222
222
  blur: L
223
- }), (e, t) => e.mode === "read" ? (C(), w(M(I.value), {
223
+ }), (e, t) => e.mode === "read" ? (w(), C(M(I.value), {
224
224
  key: 0
225
- })) : (C(), w(o(Q), j({
225
+ })) : (w(), C(o(Q), j({
226
226
  key: 1
227
227
  }, o(Z)(a, ["onUpdate:value", "value", "treeData", "loadData"]), {
228
228
  ref_key: "treeSelectRef",
@@ -8,14 +8,14 @@ export declare const useRequest: (props: ApFieldTreeSelectProps) => {
8
8
  disabled?: boolean | undefined;
9
9
  checkable?: boolean | undefined;
10
10
  disableCheckbox?: boolean | undefined;
11
- children?: /*elided*/ any[] | undefined;
11
+ children?: any[] | undefined;
12
12
  } | {
13
13
  [x: string]: any;
14
14
  value?: RawValueType | undefined;
15
15
  title?: any;
16
16
  label?: any;
17
17
  key?: Key | undefined;
18
- children?: /*elided*/ any[] | undefined;
18
+ children?: any[] | undefined;
19
19
  disabled?: boolean | undefined;
20
20
  checkable?: boolean | undefined;
21
21
  disableCheckbox?: boolean | undefined;
@@ -24,14 +24,14 @@ export declare const useRequest: (props: ApFieldTreeSelectProps) => {
24
24
  disabled?: boolean | undefined;
25
25
  checkable?: boolean | undefined;
26
26
  disableCheckbox?: boolean | undefined;
27
- children?: /*elided*/ any[] | undefined;
27
+ children?: any[] | undefined;
28
28
  } | {
29
29
  [x: string]: any;
30
30
  value?: RawValueType | undefined;
31
31
  title?: any;
32
32
  label?: any;
33
33
  key?: Key | undefined;
34
- children?: /*elided*/ any[] | undefined;
34
+ children?: any[] | undefined;
35
35
  disabled?: boolean | undefined;
36
36
  checkable?: boolean | undefined;
37
37
  disableCheckbox?: boolean | undefined;
@@ -1,5 +1,5 @@
1
- import { ApFormProps, WatchFunc, ApFormInternalInstance } from './interface';
2
- import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
1
+ import { ApFormProps, UpdateModelOptimizeFn, WatchFunc, ApFormInternalInstance } from './interface';
2
+ import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, RuleObject, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
3
3
  import { Recordable } from '../type';
4
4
  import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
5
5
  import { VueTypeDef, VueTypeValidableDef } from '../../node_modules/vue-types';
@@ -7,6 +7,7 @@ import { ColSize } from '@aplus-frontend/antdv/es/grid';
7
7
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
8
8
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
9
9
  import { Options } from '../../node_modules/scroll-into-view-if-needed';
10
+ import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
10
11
  import { SizeType } from '@aplus-frontend/antdv/es/button';
11
12
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
12
13
  declare function __VLS_template(): {
@@ -655,7 +656,7 @@ declare function __VLS_template(): {
655
656
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
656
657
  declare const __VLS_component: DefineComponent<ApFormProps, {
657
658
  setFieldsValue: (fields: Partial<any>) => void;
658
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
659
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
659
660
  resetFields: () => Promise<void>;
660
661
  clearValidate: (name?: NamePath) => void;
661
662
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1,14 +1,14 @@
1
- import { defineComponent as J, reactive as Q, ref as O, unref as h, nextTick as X, toRaw as j, watch as Y, onWatcherCleanup as Z, computed as ee, createBlock as te, openBlock as re, mergeProps as le, withCtx as oe, renderSlot as ie } from "vue";
2
- import { Form as ne } from "@aplus-frontend/antdv";
3
- import { useProvideForm as se } from "./context.mjs";
4
- import { isArray as f, cloneDeep as ae, isFunction as R, isPlainObject as _, omit as ue } from "lodash-unified";
1
+ import { defineComponent as Q, ref as j, reactive as X, unref as p, nextTick as Y, toRaw as x, watch as Z, onWatcherCleanup as z, computed as ee, openBlock as te, createBlock as re, mergeProps as le, withCtx as oe, renderSlot as se } from "vue";
2
+ import { Form as ie } from "@aplus-frontend/antdv";
3
+ import { useProvideForm as ne } from "./context.mjs";
4
+ import { isArray as f, cloneDeep as ae, isFunction as _, isPlainObject as B, omit as ue } from "lodash-unified";
5
5
  import { useUrlSearchParams as ce } from "@vueuse/core";
6
6
  import { INTERNAL_FORM_INSTANCE_MARK as fe } from "./constant.mjs";
7
- import { getRouteType as de, isDef as T } from "../utils/index.mjs";
8
- import Fe from "./utils/set.mjs";
9
- import { genParams as B, setToParams as x } from "./utils/params.mjs";
10
- import { useInjectFormProvider as ge } from "./provider/context.mjs";
11
- const Re = /* @__PURE__ */ J({
7
+ import { getRouteType as de, isDef as V } from "../utils/index.mjs";
8
+ import ge from "./utils/set.mjs";
9
+ import { genParams as M, setToParams as E } from "./utils/params.mjs";
10
+ import { useInjectFormProvider as Fe } from "./provider/context.mjs";
11
+ const Re = /* @__PURE__ */ Q({
12
12
  __name: "ap-form",
13
13
  props: {
14
14
  layout: { default: "horizontal" },
@@ -38,197 +38,197 @@ const Re = /* @__PURE__ */ J({
38
38
  syncToUrl: { type: [Boolean, Function], default: !1 },
39
39
  syncToUrlPriority: { type: Boolean }
40
40
  },
41
- setup(E, { expose: A }) {
42
- function C(e, t) {
43
- return f(t) ? t.reduce((r, i) => r == null ? void 0 : r[i], e) : e == null ? void 0 : e[t];
41
+ setup(A, { expose: C }) {
42
+ function N(e, t) {
43
+ return f(t) ? t.reduce((r, o) => r == null ? void 0 : r[o], e) : e == null ? void 0 : e[t];
44
44
  }
45
- const o = E;
46
- function V(e, t, r = !0) {
47
- var n;
45
+ const l = A;
46
+ function v(e, t, r = !0, o) {
47
+ var s;
48
48
  if (f(e)) {
49
- let l = s;
50
- for (let u = 0; u < e.length - 1; u++)
51
- e[u] in l || (l[e[u]] = {}), l = l[e[u]];
52
- l[e[e.length - 1]] = t;
49
+ let a = n;
50
+ for (let d = 0; d < e.length - 1; d++)
51
+ e[d] in a || (a[e[d]] = {}), a = a[e[d]];
52
+ o ? o(a, e[e.length - 1]) : a[e[e.length - 1]] = t;
53
53
  } else
54
- s[e] = t;
54
+ o ? o(n, e) : n[e] = t;
55
55
  let i = f(e) ? e[0] : e;
56
56
  if (r) {
57
- const l = { [i]: s[i] };
58
- p.triggerFormChange(o.name, l), (n = o.onValuesChange) == null || n.call(o, l, s, e);
57
+ const a = { [i]: n[i] };
58
+ y.triggerFormChange(l.name, a), (s = l.onValuesChange) == null || s.call(l, a, n, e);
59
59
  }
60
- y();
60
+ T();
61
61
  }
62
- const a = O(), v = ce(de()), p = ge(), I = O(
63
- o.syncToUrl ? B(o.syncToUrl, v, "get") : {}
62
+ const u = j(), I = ce(de()), y = Fe(), P = j(
63
+ l.syncToUrl ? M(l.syncToUrl, I, "get") : {}
64
64
  );
65
- let m = ae(M()), d = {};
66
- const s = Q(M());
65
+ let m = ae(b()), g = {};
66
+ const n = X(b());
67
67
  let F = [];
68
- function M() {
69
- const e = o.initialValues || {};
70
- return o.syncToUrlPriority ? {
68
+ function b() {
69
+ const e = l.initialValues || {};
70
+ return l.syncToUrlPriority ? {
71
71
  ...e,
72
- ...h(I)
72
+ ...p(P)
73
73
  } : {
74
- ...h(I),
74
+ ...p(P),
75
75
  ...e
76
76
  };
77
77
  }
78
- function N(e) {
78
+ function S(e) {
79
79
  var r;
80
- const t = g(e, d);
81
- p.triggerFormFinish(o.name, e), o.syncToUrl && x(v, B(o.syncToUrl, t, "set")), (r = o.onFinish) == null || r.call(o, t);
80
+ const t = h(e, g);
81
+ y.triggerFormFinish(l.name, e), l.syncToUrl && E(I, M(l.syncToUrl, t, "set")), (r = l.onFinish) == null || r.call(l, t);
82
82
  }
83
- const S = async () => {
83
+ const W = async () => {
84
84
  var e;
85
- (e = a.value) == null || e.resetFields(), await X(() => {
86
- Object.keys(s).forEach((t) => delete s[t]), Object.assign(s, m), y(), o.syncToUrl && x(
87
- v,
88
- B(
89
- o.syncToUrl,
90
- g(m, d),
85
+ (e = u.value) == null || e.resetFields(), await Y(() => {
86
+ Object.keys(n).forEach((t) => delete n[t]), Object.assign(n, m), T(), l.syncToUrl && E(
87
+ I,
88
+ M(
89
+ l.syncToUrl,
90
+ h(m, g),
91
91
  "set"
92
92
  )
93
93
  );
94
94
  });
95
- }, W = (e) => {
95
+ }, q = (e) => {
96
96
  var t;
97
- (t = a.value) == null || t.clearValidate(e);
98
- }, q = (e, t) => {
97
+ (t = u.value) == null || t.clearValidate(e);
98
+ }, D = (e, t) => {
99
99
  var r;
100
- return (r = a.value) == null ? void 0 : r.validateFields(e, t);
101
- }, z = async (e, t) => {
102
- var i;
103
- const r = await ((i = a.value) == null ? void 0 : i.validateFields(
100
+ return (r = u.value) == null ? void 0 : r.validateFields(e, t);
101
+ }, L = async (e, t) => {
102
+ var o;
103
+ const r = await ((o = u.value) == null ? void 0 : o.validateFields(
104
104
  e,
105
105
  t
106
106
  ));
107
- return g(r, d);
108
- }, D = (e) => {
107
+ return h(r, g);
108
+ }, k = (e) => {
109
109
  var t;
110
- return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
111
- }, L = (e) => {
110
+ return (t = u.value) == null ? void 0 : t.getFieldsValue(e);
111
+ }, K = (e) => {
112
112
  var r;
113
- const t = (r = a.value) == null ? void 0 : r.getFieldsValue(e);
114
- return g(t, d);
115
- }, k = (e, t) => {
113
+ const t = (r = u.value) == null ? void 0 : r.getFieldsValue(e);
114
+ return h(t, g);
115
+ }, $ = (e, t) => {
116
116
  var r;
117
- return (r = a.value) == null ? void 0 : r.validate(e, t);
118
- }, K = (e, t = {}) => {
117
+ return (r = u.value) == null ? void 0 : r.validate(e, t);
118
+ }, G = (e, t = {}) => {
119
119
  var r;
120
- (r = a.value) == null || r.scrollToField(e, t);
121
- }, $ = (e) => {
122
- Object.assign(s, e), y();
123
- }, P = (e, t, r = !0) => {
124
- V(e, t, r), y();
120
+ (r = u.value) == null || r.scrollToField(e, t);
121
+ }, H = (e) => {
122
+ Object.assign(n, e), T();
123
+ }, U = (e, t, r = !0, o) => {
124
+ v(e, t, r, o), T();
125
125
  };
126
- function U(e, t) {
127
- return t || e(j(s)), F.push(e), () => {
126
+ function R(e, t) {
127
+ return t || e(x(n)), F.push(e), () => {
128
128
  F = F.filter((r) => r !== e);
129
129
  };
130
130
  }
131
- function b({ initialValue: e, name: t, transform: r }) {
132
- if (T(e) && T(t)) {
133
- const i = C(h(I), t);
134
- if (!T(i) || !o.syncToUrlPriority)
135
- if (V(t, e, !1), f(t)) {
136
- let n = m;
137
- for (let l = 0; l < t.length - 1; l++)
138
- T(n[t[l]]) || (n[t[l]] = {}), n = n[t[l]];
139
- n[t[t.length - 1]] = e;
131
+ function w({ initialValue: e, name: t, transform: r }) {
132
+ if (V(e) && V(t)) {
133
+ const o = N(p(P), t);
134
+ if (!V(o) || !l.syncToUrlPriority)
135
+ if (v(t, e, !1), f(t)) {
136
+ let i = m;
137
+ for (let s = 0; s < t.length - 1; s++)
138
+ V(i[t[s]]) || (i[t[s]] = {}), i = i[t[s]];
139
+ i[t[t.length - 1]] = e;
140
140
  } else
141
141
  m[t] = e;
142
142
  }
143
- r && (d = Fe(
144
- d,
143
+ r && (g = ge(
144
+ g,
145
145
  [t].flat(1),
146
146
  r,
147
147
  !0
148
148
  ));
149
149
  }
150
- function G(e) {
150
+ function J(e) {
151
151
  if (e !== fe) {
152
152
  console.warn("getInternalInstance should only used at internal");
153
153
  return;
154
154
  }
155
155
  return {
156
- registerField: b,
157
- registerWatch: U,
158
- setFieldValue: P
156
+ registerField: w,
157
+ registerWatch: R,
158
+ setFieldValue: U
159
159
  };
160
160
  }
161
- function y() {
161
+ function T() {
162
162
  if (F.length) {
163
- const e = j(s);
163
+ const e = x(n);
164
164
  F.forEach((t) => {
165
165
  t(e);
166
166
  });
167
167
  }
168
168
  }
169
- function g(e, t) {
169
+ function h(e, t) {
170
170
  if (e == null)
171
171
  return;
172
172
  let r = f(e) ? [] : {};
173
- return Object.keys(e).forEach((i) => {
174
- const n = e[i], l = t == null ? void 0 : t[i], u = R(l) ? l : l == null ? void 0 : l.transformer, H = R(l) ? !0 : l == null ? void 0 : l.flat;
175
- if (R(u)) {
176
- const c = u(n);
177
- H ? f(c) && f(r) ? r = [...r, ...c] : _(c) && _(r) ? r = {
173
+ return Object.keys(e).forEach((o) => {
174
+ const i = e[o], s = t == null ? void 0 : t[o], a = _(s) ? s : s == null ? void 0 : s.transformer, d = _(s) ? !0 : s == null ? void 0 : s.flat;
175
+ if (_(a)) {
176
+ const c = a(i);
177
+ d ? f(c) && f(r) ? r = [...r, ...c] : B(c) && B(r) ? r = {
178
178
  ...r,
179
179
  ...c
180
- } : r[i] = c : r[i] = c;
181
- } else if (_(n) || f(n)) {
182
- const c = g(
183
- n,
184
- l
180
+ } : r[o] = c : r[o] = c;
181
+ } else if (B(i) || f(i)) {
182
+ const c = h(
183
+ i,
184
+ s
185
185
  );
186
- r[i] = c;
186
+ r[o] = c;
187
187
  } else
188
- r[i] = n;
188
+ r[o] = i;
189
189
  }), r;
190
190
  }
191
- const w = {
192
- resetFields: S,
193
- clearValidate: W,
194
- validateFields: q,
195
- getFieldsValue: D,
196
- validate: k,
197
- scrollToField: K,
198
- setFieldsValue: $,
199
- setFieldValue: P,
200
- registerWatch: U,
201
- validateFieldsReturnTransformed: z,
202
- getFieldsValueTransformed: L,
203
- getInternalInstance: G
191
+ const O = {
192
+ resetFields: W,
193
+ clearValidate: q,
194
+ validateFields: D,
195
+ getFieldsValue: k,
196
+ validate: $,
197
+ scrollToField: G,
198
+ setFieldsValue: H,
199
+ setFieldValue: U,
200
+ registerWatch: R,
201
+ validateFieldsReturnTransformed: L,
202
+ getFieldsValueTransformed: K,
203
+ getInternalInstance: J
204
204
  };
205
- return Y(
206
- () => o.name,
205
+ return Z(
206
+ () => l.name,
207
207
  (e) => {
208
- e && (p.registerForm(e, w), Z(() => {
209
- p.unregisterForm(o.name);
208
+ e && (y.registerForm(e, O), z(() => {
209
+ y.unregisterForm(l.name);
210
210
  }));
211
211
  },
212
212
  {
213
213
  immediate: !0
214
214
  }
215
- ), se({
216
- model: ee(() => s),
217
- updateModel: V,
215
+ ), ne({
216
+ model: ee(() => n),
217
+ updateModel: v,
218
218
  internalInstance: {
219
- registerWatch: U,
220
- registerField: b,
221
- setFieldValue: P
219
+ registerWatch: R,
220
+ registerField: w,
221
+ setFieldValue: U
222
222
  }
223
- }), A(w), (e, t) => (re(), te(h(ne), le({
223
+ }), C(O), (e, t) => (te(), re(p(ie), le({
224
224
  ref_key: "formRef",
225
- ref: a
226
- }, h(ue)(o, ["initialValues", "onValuesChange", "onFinish"]), {
227
- model: s,
228
- onFinish: N
225
+ ref: u
226
+ }, p(ue)(l, ["initialValues", "onValuesChange", "onFinish"]), {
227
+ model: n,
228
+ onFinish: S
229
229
  }), {
230
230
  default: oe(() => [
231
- ie(e.$slots, "default")
231
+ se(e.$slots, "default")
232
232
  ]),
233
233
  _: 3
234
234
  }, 16, ["model"]));
@@ -1,6 +1,6 @@
1
1
  import { ApFormDrawerFormProps, CustomizeResizeType } from '../interface';
2
2
  import { VNode, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, CSSProperties } from 'vue';
3
- import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
3
+ import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, RuleObject } from '@aplus-frontend/antdv/es/form/interface';
4
4
  import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
5
5
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
6
6
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
@@ -8,8 +8,9 @@ import { RuleObject } from '@aplus-frontend/antdv/es/form';
8
8
  import { Options } from '../../../node_modules/scroll-into-view-if-needed';
9
9
  import { Recordable } from '../../type';
10
10
  import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
11
+ import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
11
12
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
12
- import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
13
+ import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
13
14
  import { OnCleanup } from '@vue/reactivity';
14
15
  import { PushState } from '@aplus-frontend/antdv/es/drawer';
15
16
  import { MouseEventHandler, KeyboardEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
@@ -117,7 +118,7 @@ declare function __VLS_template(): {
117
118
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
118
119
  readonly initialValues?: Recordable | undefined;
119
120
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
120
- readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
121
+ readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
121
122
  readonly syncToUrlPriority?: boolean | undefined;
122
123
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
123
124
  $attrs: {
@@ -771,7 +772,7 @@ declare function __VLS_template(): {
771
772
  $el: any;
772
773
  $options: ComponentOptionsBase<Readonly< ApFormProps> & Readonly<{}>, {
773
774
  setFieldsValue: (fields: Partial<any>) => void;
774
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
775
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
775
776
  resetFields: () => Promise<void>;
776
777
  clearValidate: (name?: NamePath) => void;
777
778
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -820,7 +821,7 @@ declare function __VLS_template(): {
820
821
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
821
822
  }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
822
823
  setFieldsValue: (fields: Partial<any>) => void;
823
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
824
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
824
825
  resetFields: () => Promise<void>;
825
826
  clearValidate: (name?: NamePath) => void;
826
827
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1059,7 +1060,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
1059
1060
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
1060
1061
  readonly initialValues?: Recordable | undefined;
1061
1062
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
1062
- readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
1063
+ readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
1063
1064
  readonly syncToUrlPriority?: boolean | undefined;
1064
1065
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1065
1066
  $attrs: {
@@ -1713,7 +1714,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
1713
1714
  $el: any;
1714
1715
  $options: ComponentOptionsBase<Readonly< ApFormProps> & Readonly<{}>, {
1715
1716
  setFieldsValue: (fields: Partial<any>) => void;
1716
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
1717
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1717
1718
  resetFields: () => Promise<void>;
1718
1719
  clearValidate: (name?: NamePath) => void;
1719
1720
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1762,7 +1763,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
1762
1763
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
1763
1764
  }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
1764
1765
  setFieldsValue: (fields: Partial<any>) => void;
1765
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
1766
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1766
1767
  resetFields: () => Promise<void>;
1767
1768
  clearValidate: (name?: NamePath) => void;
1768
1769
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1,4 +1,4 @@
1
- import { isVNode as K, defineComponent as Q, useSlots as Y, ref as v, computed as w, unref as l, watch as P, cloneVNode as Z, createVNode as d, mergeProps as b, createElementBlock as N, openBlock as y, Fragment as ee, createBlock as M, createCommentVNode as S, withCtx as g, renderSlot as _, withModifiers as te, normalizeClass as ie, resolveDynamicComponent as L, createTextVNode as ne, toDisplayString as oe } from "vue";
1
+ import { isVNode as K, defineComponent as Q, useSlots as Y, ref as v, computed as w, unref as l, watch as P, cloneVNode as Z, createVNode as d, mergeProps as b, openBlock as y, createElementBlock as N, Fragment as ee, withCtx as g, renderSlot as M, createTextVNode as te, toDisplayString as ie, createBlock as S, resolveDynamicComponent as _, normalizeClass as ne, withModifiers as oe, createCommentVNode as L } from "vue";
2
2
  import { Button as V, Flex as le, Space as ae, Drawer as se } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
@@ -274,23 +274,23 @@ const je = /* @__PURE__ */ Q({
274
274
  "onUpdate:open": H,
275
275
  onCancel: R
276
276
  }), {
277
- title: g(() => [_(e.$slots, "title", {}, () => [ne(oe(n.title), 1)])]),
278
- footer: g(() => [(y(), M(L(I.value)))]),
277
+ title: g(() => [M(e.$slots, "title", {}, () => [te(ie(n.title), 1)])]),
278
+ footer: g(() => [(y(), S(_(I.value)))]),
279
279
  default: g(() => [d(ve, b({
280
280
  ref_key: "formRef",
281
281
  ref: a
282
282
  }, l(ce)(n, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
283
- default: g(() => [_(e.$slots, "default")]),
283
+ default: g(() => [M(e.$slots, "default")]),
284
284
  _: 3
285
285
  }, 16), e.resize ? (y(), N("div", {
286
286
  key: 0,
287
- class: ie(q.value),
288
- onMousedown: te(A, ["stop", "prevent"])
289
- }, null, 34)) : S("", !0)]),
287
+ class: ne(q.value),
288
+ onMousedown: oe(A, ["stop", "prevent"])
289
+ }, null, 34)) : L("", !0)]),
290
290
  _: 3
291
- }, 16, ["open", "width"]), l(x) ? (y(), M(L(l(x)), {
291
+ }, 16, ["open", "width"]), l(x) ? (y(), S(_(l(x)), {
292
292
  key: 0
293
- })) : S("", !0)], 64));
293
+ })) : L("", !0)], 64));
294
294
  }
295
295
  });
296
296
  export {
@@ -58,9 +58,10 @@ export type ApFormProps = Omit<FormProps, 'model' | 'onValuesChange'> & {
58
58
  syncToUrlPriority?: boolean;
59
59
  };
60
60
  export type WatchFunc = (values?: Recordable) => void;
61
+ export type UpdateModelOptimizeFn = (currentModelValue: any, name: string | number) => void;
61
62
  export type ApFormExpose<ModelType = any> = {
62
63
  setFieldsValue: (fields: Partial<ModelType>) => void;
63
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
64
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
64
65
  resetFields: () => Promise<void>;
65
66
  clearValidate: (name?: NamePath) => void;
66
67
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
@@ -117,7 +118,7 @@ export type ApFormInternalInstance = {
117
118
  * @param triggerChange
118
119
  * @returns
119
120
  */
120
- setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
121
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
121
122
  };
122
123
  export type ApFormItemExpose = FormItemExpose & {
123
124
  /**
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, useSlots as $, ref as d, onMounted as j, computed as F, unref as l, watch as q, cloneVNode as E, createBlock as g, openBlock as h, mergeProps as K, createSlots as O, withCtx as i, createCommentVNode as Q, resolveDynamicComponent as U, renderList as G, createElementVNode as H, normalizeClass as J, createVNode as p, normalizeStyle as M, renderSlot as W, normalizeProps as X, guardReactiveProps as Y } from "vue";
1
+ import { defineComponent as D, useSlots as $, ref as d, onMounted as j, computed as F, unref as l, watch as q, cloneVNode as E, openBlock as g, createBlock as h, mergeProps as K, createSlots as O, withCtx as i, resolveDynamicComponent as Q, createCommentVNode as U, createElementVNode as G, normalizeClass as H, createVNode as p, normalizeStyle as J, renderList as M, renderSlot as W, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
2
  import { Form as Z, Tooltip as ee, TypographyText as oe } from "@aplus-frontend/antdv";
3
3
  import { useToken as le } from "@aplus-frontend/antdv/es/theme/internal";
4
4
  import { isFunction as B, cloneDeep as te, isArray as ae, omit as C } from "lodash-unified";
@@ -124,7 +124,7 @@ const Ce = /* @__PURE__ */ D({
124
124
  clearValidate: A,
125
125
  resetField: L,
126
126
  getFieldValue: R
127
- }), (e, t) => (h(), g(l(Z).Item, K({
127
+ }), (e, t) => (g(), h(l(Z).Item, K({
128
128
  ref_key: "formItemRef",
129
129
  ref: n
130
130
  }, l(C)(o, [...l(re), "tooltip", "label"]), {
@@ -136,22 +136,22 @@ const Ce = /* @__PURE__ */ D({
136
136
  colon: e.bordered ? !1 : o.colon
137
137
  }), O({
138
138
  default: i(() => [
139
- V.value ? (h(), g(U(V.value), { key: 0 })) : Q("", !0)
139
+ V.value ? (g(), h(Q(V.value), { key: 0 })) : U("", !0)
140
140
  ]),
141
141
  _: 2
142
142
  }, [
143
143
  o.tooltip ? {
144
144
  name: "tooltip",
145
145
  fn: i(({ class: a }) => [
146
- H("span", {
147
- class: J(a)
146
+ G("span", {
147
+ class: H(a)
148
148
  }, [
149
149
  p(l(ee), {
150
150
  title: o.tooltip
151
151
  }, {
152
152
  default: i(() => [
153
153
  p(l(ne), {
154
- style: M({ color: l(x).colorPrimary })
154
+ style: J({ color: l(x).colorPrimary })
155
155
  }, null, 8, ["style"])
156
156
  ]),
157
157
  _: 1
@@ -171,7 +171,7 @@ const Ce = /* @__PURE__ */ D({
171
171
  ]),
172
172
  key: "1"
173
173
  } : void 0,
174
- G(l(C)(r, "default"), (a, b) => ({
174
+ M(l(C)(r, "default"), (a, b) => ({
175
175
  name: b,
176
176
  fn: i((_) => [
177
177
  W(e.$slots, b, X(Y(_ || {})))
@@ -1,4 +1,4 @@
1
- import { isVNode as C, defineComponent as h, useSlots as w, onBeforeUpdate as k, shallowRef as _, watch as B, computed as P, unref as r, createVNode as R, mergeProps as u, createBlock as d, openBlock as s, withCtx as S, createElementBlock as b, Fragment as x, renderList as N, resolveDynamicComponent as j } from "vue";
1
+ import { isVNode as C, defineComponent as h, useSlots as w, onBeforeUpdate as k, watch as _, shallowRef as B, computed as P, unref as r, createVNode as R, mergeProps as u, openBlock as s, createBlock as d, withCtx as S, createElementBlock as b, Fragment as x, renderList as N, resolveDynamicComponent as j } from "vue";
2
2
  import { Col as v, Row as F } from "@aplus-frontend/antdv";
3
3
  import { pick as D, isBoolean as I, omit as O } from "lodash-unified";
4
4
  import { apFormItemColPropKeys as V } from "../constant.mjs";
@@ -33,10 +33,10 @@ const T = /* @__PURE__ */ h({
33
33
  } = G("ap-form-item-group"), i = t, a = w();
34
34
  k(() => {
35
35
  p.value = l(a.default());
36
- }), B(() => a.default(), (o) => {
36
+ }), _(() => a.default(), (o) => {
37
37
  p.value = l(o);
38
38
  });
39
- const p = _(l(a.default())), f = P(() => r(p).map((o, m) => {
39
+ const p = B(l(a.default())), f = P(() => r(p).map((o, m) => {
40
40
  const e = o.props, n = D(e, V), g = n != null && n.span ? {} : $(i.countPerRow), y = I(e.hidden) ? !!e.hidden : E(e.hidden);
41
41
  return {
42
42
  key: `${m}-${A(e.name)}`,