@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,15 +1,15 @@
1
- import { defineComponent as O, useSlots as P, toRef as H, ref as g, unref as r, watch as W, nextTick as G, createBlock as K, openBlock as M, mergeProps as y, withCtx as C, createVNode as U, createSlots as $, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
2
- import { ApForm as w } from "../../ap-form/index.mjs";
3
- import { isArray as Y, isNumber as d, cloneDeep as f, omit as Z } from "lodash-unified";
1
+ import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as f, watch as W, nextTick as G, openBlock as K, createBlock as U, mergeProps as g, withCtx as y, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
+ import { ApForm as C } from "../../ap-form/index.mjs";
3
+ import { isArray as Z, isUndefined as I, isNumber as m, cloneDeep as M, omit as ee } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
- import { isDef as m } from "../../utils/index.mjs";
6
- import { useGetEditableColumns as I } from "../hooks/use-editable-columns.mjs";
5
+ import { isDef as w } from "../../utils/index.mjs";
6
+ import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
7
7
  import "../index.vue2.mjs";
8
- import { useInjectForm as ee } from "../../ap-form/context.mjs";
9
- import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useGlobalConfig as ae } from "../../config-provider/hooks/use-global-config.mjs";
11
- import te from "../index.vue.mjs";
12
- const he = /* @__PURE__ */ O({
8
+ import { useInjectForm as ae } from "../../ap-form/context.mjs";
9
+ import { useNamespace as te } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
11
+ import ne from "../index.vue.mjs";
12
+ const ye = /* @__PURE__ */ P({
13
13
  name: "EditableGrid",
14
14
  __name: "form-item",
15
15
  props: {
@@ -154,105 +154,109 @@ const he = /* @__PURE__ */ O({
154
154
  setup(x, {
155
155
  expose: b
156
156
  }) {
157
- const R = P(), t = x, {
157
+ const R = A(), l = x, {
158
158
  b: B
159
- } = oe("editable-grid");
159
+ } = te("editable-grid");
160
160
  function S(e, o) {
161
- return Y(o) ? o.reduce((n, l) => n == null ? void 0 : n[l], e) : e == null ? void 0 : e[o];
161
+ return Z(o) ? o.reduce((n, t) => n == null ? void 0 : n[t], e) : e == null ? void 0 : e[o];
162
162
  }
163
163
  const {
164
164
  internalInstance: a,
165
165
  model: F
166
- } = ee(), i = H(t.name), u = g(S(r(F), i.value) || []), N = w.useWatch(i);
166
+ } = ae(), p = H(l.name), d = h(S(f(F), p.value) || []), N = C.useWatch(p);
167
167
  W(() => N.value, async (e) => {
168
168
  var o;
169
- await G(), u.value = e, (o = t.onChange) == null || o.call(t, e);
169
+ await G(), d.value = e, (o = l.onChange) == null || o.call(l, e);
170
170
  }, {
171
171
  deep: !0
172
172
  });
173
- const p = g(), v = ae("valueTypeMap"), D = I(t, v);
173
+ const c = h(), v = le("valueTypeMap"), D = oe(l, v);
174
174
  function L(e, o) {
175
175
  var s;
176
- const n = ((s = r(u)) == null ? void 0 : s.length) || 0;
177
- if (m(t.maxLength) && n >= t.maxLength)
176
+ const n = ((s = f(d)) == null ? void 0 : s.length) || 0;
177
+ if (w(l.maxLength) && n >= l.maxLength)
178
178
  return;
179
- const l = [...r(u) || []];
180
- m(o) ? l.splice(o, 0, {
179
+ const t = {
181
180
  ...e || {}
182
- }) : l.push({
183
- ...e || {}
184
- }), a == null || a.setFieldValue(t.name, l);
181
+ };
182
+ a == null || a.setFieldValue(l.name, t, !0, (u, r) => {
183
+ console.log("run add", u[r]), u[r] || (u[r] = [t]), I(o) ? u[r].push(t) : u[r].splice(o, 0, t);
184
+ });
185
185
  }
186
186
  function V(e, o = "suffix") {
187
- var h;
188
- const n = ((h = r(u)) == null ? void 0 : h.length) || 0, l = d(e) ? e : e.length;
189
- if (m(t.maxLength) && n + l > t.maxLength)
187
+ var u;
188
+ const n = ((u = f(d)) == null ? void 0 : u.length) || 0, t = m(e) ? e : e.length;
189
+ if (w(l.maxLength) && n + t > l.maxLength)
190
190
  return;
191
- const s = [...r(u) || []], c = d(e) ? new Array(e).fill(0).map(() => ({})) : f(e);
192
- o === "suffix" ? s.push(...c) : s.unshift(...c), a == null || a.setFieldValue(t.name, s);
191
+ const s = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
192
+ a == null || a.setFieldValue(l.name, s, !0, (r, i) => {
193
+ r[i] || (r[i] = [...s]), o === "suffix" ? r[i].push(...s) : r[i].unshift(...s);
194
+ });
193
195
  }
194
- function _(e) {
195
- let o = f(r(u) || []);
196
- const n = d(e) ? [e] : e;
197
- o = o.filter((l, s) => !n.includes(s)), a == null || a.setFieldValue(t.name, o);
196
+ function T(e) {
197
+ const o = new Set(m(e) ? [e] : e);
198
+ a == null || a.setFieldValue(l.name, void 0, !0, (n, t) => {
199
+ n[t] = n[t].filter((s, u) => !o.has(u));
200
+ });
198
201
  }
199
- function E() {
200
- return r(u);
202
+ function _() {
203
+ return f(d);
201
204
  }
202
- function T(e) {
205
+ function E(e) {
203
206
  var o;
204
- return (o = r(u)) == null ? void 0 : o[e];
207
+ return (o = f(d)) == null ? void 0 : o[e];
205
208
  }
206
209
  function k(e, o, n = !0) {
207
- const l = f(r(u));
208
- l[e] && (l[e] = {
209
- ...n ? l[e] : {},
210
- ...o
211
- }, a == null || a.setFieldValue(t.name, [...l]));
210
+ a == null || a.setFieldValue(l.name, null, !0, (t, s) => {
211
+ !t[s] || !t[s][e] || (t[s][e] = {
212
+ ...n ? t[s][e] : {},
213
+ ...o
214
+ });
215
+ });
212
216
  }
213
217
  function j(e) {
214
- a == null || a.setFieldValue(t.name, e);
218
+ a == null || a.setFieldValue(l.name, e);
215
219
  }
216
220
  function z(e) {
217
221
  var n;
218
- const o = e === "end" ? u.value.length - 1 : e;
219
- (n = p.value) == null || n.scrollToRow(o);
222
+ const o = e === "end" ? d.value.length - 1 : e;
223
+ (n = c.value) == null || n.scrollToRow(o);
220
224
  }
221
- function A() {
225
+ function O() {
222
226
  var e;
223
- (e = a == null ? void 0 : a.setFieldValue) == null || e.call(a, t.name, []);
227
+ (e = a == null ? void 0 : a.setFieldValue) == null || e.call(a, l.name, []);
224
228
  }
225
229
  return b({
226
230
  add: L,
227
- remove: _,
228
- getRowData: T,
229
- getRowsData: E,
231
+ remove: T,
232
+ getRowData: E,
233
+ getRowsData: _,
230
234
  setRowData: k,
231
235
  addMultiple: V,
232
236
  scrollTo: z,
233
237
  setTableData: j,
234
- clear: A
235
- }), (e, o) => (M(), K(r(w).FormItem, y(e.formItem, {
238
+ clear: O
239
+ }), (e, o) => (K(), U(f(C).FormItem, g(e.formItem, {
236
240
  name: e.name,
237
241
  label: e.label
238
242
  }), {
239
- default: C(() => [U(te, y(r(Z)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
243
+ default: y(() => [$(ne, g(f(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
240
244
  ref_key: "tableRef",
241
- ref: p,
242
- class: r(B)(),
243
- columns: r(D),
244
- "data-source": u.value,
245
+ ref: c,
246
+ class: f(B)(),
247
+ columns: f(D),
248
+ "data-source": d.value,
245
249
  "search-form": !1
246
- }), $({
250
+ }), q({
247
251
  _: 2
248
- }, [q(R, (n, l) => ({
249
- name: l,
250
- fn: C((s) => [J(e.$slots, l, Q(X(s || {})))])
252
+ }, [J(R, (n, t) => ({
253
+ name: t,
254
+ fn: y((s) => [Q(e.$slots, t, X(Y(s || {})))])
251
255
  }))]), 1040, ["class", "columns", "data-source"])]),
252
256
  _: 3
253
257
  }, 16, ["name", "label"]));
254
258
  }
255
259
  });
256
260
  export {
257
- he as default
261
+ ye as default
258
262
  };
@@ -1,6 +1,6 @@
1
1
  import { EditableGridExpose, EditableGridProps } from './interface';
2
2
  import { Recordable } from '../../type';
3
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
4
4
  declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
6
  readonly "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -9,7 +9,9 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
9
9
  attrs: any;
10
10
  slots: Readonly<Record<string, any>> & Record<string, any>;
11
11
  emit: (event: "update:value", ...args: any[]) => void;
12
- }>) => VNode & {
12
+ }>) => VNode<RendererNode, RendererElement, {
13
+ [key: string]: any;
14
+ }> & {
13
15
  __ctx?: Awaited<typeof __VLS_setup>;
14
16
  };
15
17
  export default _default;
@@ -1,16 +1,16 @@
1
- import { defineComponent as M, useSlots as U, ref as w, watch as v, unref as n, createBlock as $, openBlock as q, withCtx as c, createVNode as R, mergeProps as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as ee } from "vue";
2
- import { ApForm as p } from "../../ap-form/index.mjs";
3
- import { isEqual as ae, isArray as b, isNumber as h, cloneDeep as y, omit as te } from "lodash-unified";
1
+ import { defineComponent as U, useSlots as $, ref as w, watch as x, unref as u, openBlock as q, createBlock as J, withCtx as h, createVNode as v, mergeProps as Q, createSlots as X, renderList as Y, renderSlot as Z, normalizeProps as M, guardReactiveProps as ee } from "vue";
2
+ import { ApForm as g } from "../../ap-form/index.mjs";
3
+ import { isEqual as ae, isArray as R, isUndefined as te, isNumber as y, cloneDeep as le, omit as oe } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { isDef as g } from "../../utils/index.mjs";
7
- import { useGetEditableColumns as le } from "../hooks/use-editable-columns.mjs";
6
+ import { isDef as b } from "../../utils/index.mjs";
7
+ import { useGetEditableColumns as ne } from "../hooks/use-editable-columns.mjs";
8
8
  import "../index.vue2.mjs";
9
- import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useControllableValue as ne } from "../../hooks/useControllableValue.mjs";
11
- import { useGlobalConfig as re } from "../../config-provider/hooks/use-global-config.mjs";
12
- import se from "../index.vue.mjs";
13
- const we = /* @__PURE__ */ M({
9
+ import { useNamespace as se } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useControllableValue as re } from "../../hooks/useControllableValue.mjs";
11
+ import { useGlobalConfig as ue } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import ie from "../index.vue.mjs";
13
+ const Re = /* @__PURE__ */ U({
14
14
  name: "EditableGrid",
15
15
  __name: "index",
16
16
  props: {
@@ -155,128 +155,133 @@ const we = /* @__PURE__ */ M({
155
155
  expose: F,
156
156
  emit: S
157
157
  }) {
158
- const N = U(), t = B, {
158
+ const N = $(), t = B, {
159
159
  b: V
160
- } = oe("editable-grid"), _ = S, C = w(), {
161
- value: s,
160
+ } = se("editable-grid"), _ = S, C = w(), {
161
+ value: m,
162
162
  updateValue: L
163
- } = ne(t, _), u = w(), D = re("valueTypeMap"), m = p.useWatch(t.name, u);
164
- v(() => m.value, (e) => {
163
+ } = re(t, _), i = w(), E = ue("valueTypeMap"), c = g.useWatch(t.name, i);
164
+ x(() => c.value, (e) => {
165
165
  var a;
166
166
  L(e), (a = t.onChange) == null || a.call(t, e);
167
167
  }, {
168
- deep: !0
169
- }), v(s, (e) => {
168
+ deep: !0,
169
+ flush: "post"
170
+ }), x(m, (e) => {
170
171
  var a;
171
- e !== n(m) && (ae(e, n(m)) || (a = u.value) == null || a.setFieldValue(t.name, e));
172
+ e !== u(c) && (ae(e, u(c)) || (a = i.value) == null || a.setFieldValue(t.name, e));
172
173
  }, {
173
174
  deep: !0
174
175
  });
175
- const E = le(t, D);
176
- function k() {
176
+ const D = ne(t, E);
177
+ function T() {
177
178
  var e;
178
- (e = u.value) == null || e.resetFields();
179
+ (e = i.value) == null || e.resetFields();
179
180
  }
180
- function A(e) {
181
- return e ? (b(e) ? e : [e]).map((o) => b(o) ? [t.name, ...o] : [t.name, o]) : void 0;
181
+ function k(e) {
182
+ return e ? (R(e) ? e : [e]).map((l) => R(l) ? [t.name, ...l] : [t.name, l]) : void 0;
182
183
  }
183
- async function T(e, a) {
184
- var l;
185
- const o = await ((l = u.value) == null ? void 0 : l.validateFields(A(e), a));
186
- return o == null ? void 0 : o[t.name];
184
+ async function A(e, a) {
185
+ var o;
186
+ const l = await ((o = i.value) == null ? void 0 : o.validateFields(k(e), a));
187
+ return l == null ? void 0 : l[t.name];
187
188
  }
188
189
  function j(e, a) {
189
- var r, d, i;
190
- const o = ((r = n(s)) == null ? void 0 : r.length) || 0;
191
- if (g(t.maxLength) && o >= t.maxLength)
190
+ var n, s, r;
191
+ const l = ((n = u(m)) == null ? void 0 : n.length) || 0;
192
+ if (b(t.maxLength) && l >= t.maxLength)
192
193
  return;
193
- const l = [...n(s) || []];
194
- g(a) ? l.splice(a, 0, {
194
+ const o = {
195
195
  ...e || {}
196
- }) : l.push({
197
- ...e || {}
198
- }), (i = (d = u.value) == null ? void 0 : d.setFieldValue) == null || i.call(d, t.name, l);
196
+ };
197
+ (r = (s = i.value) == null ? void 0 : s.setFieldValue) == null || r.call(s, t.name, o, !0, (d, f) => {
198
+ console.log("run add", d[f]), d[f] || (d[f] = [o]), te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
199
+ });
199
200
  }
200
201
  function z(e, a = "suffix") {
201
- var i, f, x;
202
- const o = ((i = n(s)) == null ? void 0 : i.length) || 0, l = h(e) ? e : e.length;
203
- if (g(t.maxLength) && o + l > t.maxLength)
202
+ var s, r, d;
203
+ const l = ((s = u(m)) == null ? void 0 : s.length) || 0, o = y(e) ? e : e.length;
204
+ if (b(t.maxLength) && l + o > t.maxLength)
204
205
  return;
205
- const r = [...n(s) || []], d = h(e) ? new Array(e).fill(0).map(() => ({})) : y(e);
206
- a === "suffix" ? r.push(...d) : r.unshift(...d), (x = (f = u.value) == null ? void 0 : f.setFieldValue) == null || x.call(f, t.name, r);
206
+ const n = y(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
207
+ (d = (r = i.value) == null ? void 0 : r.setFieldValue) == null || d.call(r, t.name, n, !0, (f, p) => {
208
+ f[p] || (f[p] = [...n]), a === "suffix" ? f[p].push(...n) : f[p].unshift(...n);
209
+ });
207
210
  }
208
- function O(e) {
209
- var l, r;
210
- let a = y(n(s) || []);
211
- const o = h(e) ? [e] : e;
212
- a = a.filter((d, i) => !o.includes(i)), (r = (l = u.value) == null ? void 0 : l.setFieldValue) == null || r.call(l, t.name, a);
211
+ function I(e) {
212
+ var l, o;
213
+ const a = new Set(y(e) ? [e] : e);
214
+ (o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n, s) => {
215
+ n[s] = n[s].filter((r, d) => !a.has(d));
216
+ });
213
217
  }
214
- function P() {
215
- return n(s);
218
+ function O() {
219
+ return u(m);
216
220
  }
217
- function H(e) {
221
+ function P(e) {
218
222
  var a;
219
- (a = u.value) == null || a.setFieldValue(t.name, e);
223
+ (a = i.value) == null || a.setFieldValue(t.name, e);
220
224
  }
221
- function I(e) {
225
+ function H(e) {
222
226
  var a;
223
- return (a = n(s)) == null ? void 0 : a[e];
227
+ return (a = u(m)) == null ? void 0 : a[e];
224
228
  }
225
- function W(e, a, o = !0) {
226
- var r, d;
227
- const l = y(n(s));
228
- l[e] && (l[e] = {
229
- ...o ? l[e] : {},
230
- ...a
231
- }, (d = (r = u.value) == null ? void 0 : r.setFieldValue) == null || d.call(r, t.name, [...l]));
229
+ function W(e, a, l = !0) {
230
+ var o, n;
231
+ (n = (o = i.value) == null ? void 0 : o.setFieldValue) == null || n.call(o, t.name, null, !0, (s, r) => {
232
+ !s[r] || !s[r][e] || (s[r][e] = {
233
+ ...l ? s[r][e] : {},
234
+ ...a
235
+ });
236
+ });
232
237
  }
233
238
  function G(e) {
234
- var o;
235
- const a = e === "end" ? s.value.length - 1 : e;
236
- (o = C.value) == null || o.scrollToRow(a);
239
+ var l;
240
+ const a = e === "end" ? m.value.length - 1 : e;
241
+ (l = C.value) == null || l.scrollToRow(a);
237
242
  }
238
243
  function K() {
239
244
  var e, a;
240
- (a = (e = u.value) == null ? void 0 : e.setFieldValue) == null || a.call(e, t.name, []);
245
+ (a = (e = i.value) == null ? void 0 : e.setFieldValue) == null || a.call(e, t.name, []);
241
246
  }
242
247
  return F({
243
- resetFields: k,
244
- validateFields: T,
248
+ resetFields: T,
249
+ validateFields: A,
245
250
  add: j,
246
- remove: O,
247
- getRowData: I,
248
- getRowsData: P,
251
+ remove: I,
252
+ getRowData: H,
253
+ getRowsData: O,
249
254
  setRowData: W,
250
255
  addMultiple: z,
251
256
  scrollTo: G,
252
257
  clear: K,
253
- setTableData: H
254
- }), (e, a) => (q(), $(n(p), {
258
+ setTableData: P
259
+ }), (e, a) => (q(), J(u(g), {
255
260
  ref_key: "formRef",
256
- ref: u,
261
+ ref: i,
257
262
  "initial-values": {
258
- [t.name]: n(s)
263
+ [t.name]: u(m)
259
264
  },
260
265
  style: {
261
266
  height: "100%"
262
267
  }
263
268
  }, {
264
- default: c(() => [R(n(p).FormItem, {
269
+ default: h(() => [v(u(g).FormItem, {
265
270
  name: e.name,
266
271
  "no-style": ""
267
272
  }, {
268
- default: c(() => [R(se, J(n(te)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
273
+ default: h(() => [v(ie, Q(u(oe)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
269
274
  ref_key: "tableRef",
270
275
  ref: C,
271
- class: n(V)(),
272
- columns: n(E),
273
- "data-source": n(s),
276
+ class: u(V)(),
277
+ columns: u(D),
278
+ "data-source": u(m),
274
279
  "search-form": !1
275
- }), Q({
280
+ }), X({
276
281
  _: 2
277
- }, [X(N, (o, l) => ({
278
- name: l,
279
- fn: c((r) => [Y(e.$slots, l, Z(ee(r || {})))])
282
+ }, [Y(N, (l, o) => ({
283
+ name: o,
284
+ fn: h((n) => [Z(e.$slots, o, M(ee(n || {})))])
280
285
  }))]), 1040, ["class", "columns", "data-source"])]),
281
286
  _: 3
282
287
  }, 8, ["name"])]),
@@ -285,5 +290,5 @@ const we = /* @__PURE__ */ M({
285
290
  }
286
291
  });
287
292
  export {
288
- we as default
293
+ Re as default
289
294
  };
@@ -1,4 +1,4 @@
1
- import { DEFAULT_PAGE_SIZE as g, DEFAULT_CURRENT as E } from "../../ap-table/hooks/use-table-paging-ng.mjs";
1
+ import { DEFAULT_CURRENT as g, DEFAULT_PAGE_SIZE as E } from "../../ap-table/hooks/use-table-paging-ng.mjs";
2
2
  const a = {
3
3
  asc: "ascend",
4
4
  desc: "descend"
@@ -6,8 +6,8 @@ const a = {
6
6
  const t = {};
7
7
  let c = {};
8
8
  const s = {
9
- current: E,
10
- pageSize: g
9
+ current: g,
10
+ pageSize: E
11
11
  };
12
12
  function i(n) {
13
13
  o == null || o(s, c, t, {
@@ -1,6 +1,6 @@
1
1
  import { VxeTableSlots } from 'vxe-table';
2
2
  import { ApGridColumnType, ApGridExpose, ApGridProps } from './interface';
3
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
4
4
  declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApGridProps<RecordType> & Partial<{}>> & PublicProps;
6
6
  expose(exposed: ShallowUnwrapRef<ApGridExpose>): void;
@@ -35,7 +35,9 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
35
35
  }) => any;
36
36
  };
37
37
  emit: {};
38
- }>) => VNode & {
38
+ }>) => VNode<RendererNode, RendererElement, {
39
+ [key: string]: any;
40
+ }> & {
39
41
  __ctx?: Awaited<typeof __VLS_setup>;
40
42
  };
41
43
  export default _default;