pro-design-vue 1.3.41 → 1.4.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 (149) hide show
  1. package/dist/index.full.js +646 -322
  2. package/dist/index.full.min.js +7 -7
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +7 -7
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +647 -323
  7. package/es/components/form/src/context/FormContext.d.ts +1 -0
  8. package/es/components/form/src/hooks/useAction.d.ts +2 -1
  9. package/es/components/form/src/hooks/useInitialValues.d.ts +1 -1
  10. package/es/components/table/src/components/Body/Body.vue.d.ts +1 -1
  11. package/es/components/table/src/components/InteralTable.vue.d.ts +4 -1
  12. package/es/components/table/src/components/Table.d.ts +3 -0
  13. package/es/components/table/src/components/interface.d.ts +4 -1
  14. package/es/components/table/src/hooks/usePerf.d.ts +35 -0
  15. package/es/index.d.ts +5 -1
  16. package/es/packages/components/form/src/base/BaseForm.mjs +7 -6
  17. package/es/packages/components/form/src/base/BaseForm.mjs.map +1 -1
  18. package/es/packages/components/form/src/components/FormGroup.mjs +9 -3
  19. package/es/packages/components/form/src/components/FormGroup.mjs.map +1 -1
  20. package/es/packages/components/form/src/components/FormItem.mjs +36 -17
  21. package/es/packages/components/form/src/components/FormItem.mjs.map +1 -1
  22. package/es/packages/components/form/src/components/FormItems.mjs +75 -72
  23. package/es/packages/components/form/src/components/FormItems.mjs.map +1 -1
  24. package/es/packages/components/form/src/components/FormList.mjs +4 -2
  25. package/es/packages/components/form/src/components/FormList.mjs.map +1 -1
  26. package/es/packages/components/form/src/components/FormListContainer.mjs +57 -28
  27. package/es/packages/components/form/src/components/FormListContainer.mjs.map +1 -1
  28. package/es/packages/components/form/src/components/FormListItem.mjs +15 -12
  29. package/es/packages/components/form/src/components/FormListItem.mjs.map +1 -1
  30. package/es/packages/components/form/src/components/FormSet.mjs +7 -2
  31. package/es/packages/components/form/src/components/FormSet.mjs.map +1 -1
  32. package/es/packages/components/form/src/context/FormContext.mjs.map +1 -1
  33. package/es/packages/components/form/src/context/FormSlotsContext.mjs +2 -2
  34. package/es/packages/components/form/src/context/FormSlotsContext.mjs.map +1 -1
  35. package/es/packages/components/form/src/hooks/useAction.mjs +5 -0
  36. package/es/packages/components/form/src/hooks/useAction.mjs.map +1 -1
  37. package/es/packages/components/form/src/hooks/useFieldValue.mjs +11 -11
  38. package/es/packages/components/form/src/hooks/useFieldValue.mjs.map +1 -1
  39. package/es/packages/components/form/src/hooks/useInitialValues.mjs +2 -2
  40. package/es/packages/components/form/src/hooks/useInitialValues.mjs.map +1 -1
  41. package/es/packages/components/form/src/hooks/useLinkage.mjs +30 -3
  42. package/es/packages/components/form/src/hooks/useLinkage.mjs.map +1 -1
  43. package/es/packages/components/form/src/layouts/DrawerForm.mjs +11 -6
  44. package/es/packages/components/form/src/layouts/DrawerForm.mjs.map +1 -1
  45. package/es/packages/components/form/src/layouts/ModalForm.mjs +12 -7
  46. package/es/packages/components/form/src/layouts/ModalForm.mjs.map +1 -1
  47. package/es/packages/components/form/src/layouts/QueryFilter.mjs +78 -81
  48. package/es/packages/components/form/src/layouts/QueryFilter.mjs.map +1 -1
  49. package/es/packages/components/table/src/components/Body/Body.vue.mjs.map +1 -1
  50. package/es/packages/components/table/src/components/Body/Body.vue2.mjs +13 -18
  51. package/es/packages/components/table/src/components/Body/Body.vue2.mjs.map +1 -1
  52. package/es/packages/components/table/src/components/Form/Form.mjs +9 -9
  53. package/es/packages/components/table/src/components/Form/Form.mjs.map +1 -1
  54. package/es/packages/components/table/src/components/InteralTable.vue.mjs.map +1 -1
  55. package/es/packages/components/table/src/components/InteralTable.vue2.mjs +5 -1
  56. package/es/packages/components/table/src/components/InteralTable.vue2.mjs.map +1 -1
  57. package/es/packages/components/table/src/components/Table.mjs +2 -2
  58. package/es/packages/components/table/src/components/Table.mjs.map +1 -1
  59. package/es/packages/components/table/src/components/interface.mjs +1 -0
  60. package/es/packages/components/table/src/components/interface.mjs.map +1 -1
  61. package/es/packages/components/table/src/hooks/useCal.mjs +6 -0
  62. package/es/packages/components/table/src/hooks/useCal.mjs.map +1 -1
  63. package/es/packages/components/table/src/hooks/useCellProps.mjs +76 -10
  64. package/es/packages/components/table/src/hooks/useCellProps.mjs.map +1 -1
  65. package/es/packages/components/table/src/hooks/useData.mjs +4 -0
  66. package/es/packages/components/table/src/hooks/useData.mjs.map +1 -1
  67. package/es/packages/components/table/src/hooks/useHScrollSync.mjs +4 -0
  68. package/es/packages/components/table/src/hooks/useHScrollSync.mjs.map +1 -1
  69. package/es/packages/components/table/src/hooks/usePerf.mjs +119 -0
  70. package/es/packages/components/table/src/hooks/usePerf.mjs.map +1 -0
  71. package/es/packages/components/table/src/hooks/useVScrollSync.mjs +4 -0
  72. package/es/packages/components/table/src/hooks/useVScrollSync.mjs.map +1 -1
  73. package/es/packages/directives/resize.mjs +45 -20
  74. package/es/packages/directives/resize.mjs.map +1 -1
  75. package/es/version.d.ts +1 -1
  76. package/es/version.mjs +1 -1
  77. package/es/version.mjs.map +1 -1
  78. package/lib/components/form/src/context/FormContext.d.ts +1 -0
  79. package/lib/components/form/src/hooks/useAction.d.ts +2 -1
  80. package/lib/components/form/src/hooks/useInitialValues.d.ts +1 -1
  81. package/lib/components/table/src/components/Body/Body.vue.d.ts +1 -1
  82. package/lib/components/table/src/components/InteralTable.vue.d.ts +4 -1
  83. package/lib/components/table/src/components/Table.d.ts +3 -0
  84. package/lib/components/table/src/components/interface.d.ts +4 -1
  85. package/lib/components/table/src/hooks/usePerf.d.ts +35 -0
  86. package/lib/index.d.ts +5 -1
  87. package/lib/packages/components/form/src/base/BaseForm.js +7 -6
  88. package/lib/packages/components/form/src/base/BaseForm.js.map +1 -1
  89. package/lib/packages/components/form/src/components/FormGroup.js +9 -3
  90. package/lib/packages/components/form/src/components/FormGroup.js.map +1 -1
  91. package/lib/packages/components/form/src/components/FormItem.js +36 -17
  92. package/lib/packages/components/form/src/components/FormItem.js.map +1 -1
  93. package/lib/packages/components/form/src/components/FormItems.js +74 -71
  94. package/lib/packages/components/form/src/components/FormItems.js.map +1 -1
  95. package/lib/packages/components/form/src/components/FormList.js +4 -2
  96. package/lib/packages/components/form/src/components/FormList.js.map +1 -1
  97. package/lib/packages/components/form/src/components/FormListContainer.js +57 -28
  98. package/lib/packages/components/form/src/components/FormListContainer.js.map +1 -1
  99. package/lib/packages/components/form/src/components/FormListItem.js +15 -12
  100. package/lib/packages/components/form/src/components/FormListItem.js.map +1 -1
  101. package/lib/packages/components/form/src/components/FormSet.js +7 -2
  102. package/lib/packages/components/form/src/components/FormSet.js.map +1 -1
  103. package/lib/packages/components/form/src/context/FormContext.js.map +1 -1
  104. package/lib/packages/components/form/src/context/FormSlotsContext.js +1 -1
  105. package/lib/packages/components/form/src/context/FormSlotsContext.js.map +1 -1
  106. package/lib/packages/components/form/src/hooks/useAction.js +5 -0
  107. package/lib/packages/components/form/src/hooks/useAction.js.map +1 -1
  108. package/lib/packages/components/form/src/hooks/useFieldValue.js +10 -10
  109. package/lib/packages/components/form/src/hooks/useFieldValue.js.map +1 -1
  110. package/lib/packages/components/form/src/hooks/useInitialValues.js +1 -1
  111. package/lib/packages/components/form/src/hooks/useInitialValues.js.map +1 -1
  112. package/lib/packages/components/form/src/hooks/useLinkage.js +30 -3
  113. package/lib/packages/components/form/src/hooks/useLinkage.js.map +1 -1
  114. package/lib/packages/components/form/src/layouts/DrawerForm.js +11 -6
  115. package/lib/packages/components/form/src/layouts/DrawerForm.js.map +1 -1
  116. package/lib/packages/components/form/src/layouts/ModalForm.js +12 -7
  117. package/lib/packages/components/form/src/layouts/ModalForm.js.map +1 -1
  118. package/lib/packages/components/form/src/layouts/QueryFilter.js +77 -80
  119. package/lib/packages/components/form/src/layouts/QueryFilter.js.map +1 -1
  120. package/lib/packages/components/table/src/components/Body/Body.vue.js.map +1 -1
  121. package/lib/packages/components/table/src/components/Body/Body.vue2.js +12 -17
  122. package/lib/packages/components/table/src/components/Body/Body.vue2.js.map +1 -1
  123. package/lib/packages/components/table/src/components/Form/Form.js +9 -9
  124. package/lib/packages/components/table/src/components/Form/Form.js.map +1 -1
  125. package/lib/packages/components/table/src/components/InteralTable.vue.js.map +1 -1
  126. package/lib/packages/components/table/src/components/InteralTable.vue2.js +4 -0
  127. package/lib/packages/components/table/src/components/InteralTable.vue2.js.map +1 -1
  128. package/lib/packages/components/table/src/components/Table.js +2 -2
  129. package/lib/packages/components/table/src/components/Table.js.map +1 -1
  130. package/lib/packages/components/table/src/components/interface.js +1 -0
  131. package/lib/packages/components/table/src/components/interface.js.map +1 -1
  132. package/lib/packages/components/table/src/hooks/useCal.js +6 -0
  133. package/lib/packages/components/table/src/hooks/useCal.js.map +1 -1
  134. package/lib/packages/components/table/src/hooks/useCellProps.js +76 -10
  135. package/lib/packages/components/table/src/hooks/useCellProps.js.map +1 -1
  136. package/lib/packages/components/table/src/hooks/useData.js +4 -0
  137. package/lib/packages/components/table/src/hooks/useData.js.map +1 -1
  138. package/lib/packages/components/table/src/hooks/useHScrollSync.js +4 -0
  139. package/lib/packages/components/table/src/hooks/useHScrollSync.js.map +1 -1
  140. package/lib/packages/components/table/src/hooks/usePerf.js +123 -0
  141. package/lib/packages/components/table/src/hooks/usePerf.js.map +1 -0
  142. package/lib/packages/components/table/src/hooks/useVScrollSync.js +4 -0
  143. package/lib/packages/components/table/src/hooks/useVScrollSync.js.map +1 -1
  144. package/lib/packages/directives/resize.js +45 -20
  145. package/lib/packages/directives/resize.js.map +1 -1
  146. package/lib/version.d.ts +1 -1
  147. package/lib/version.js +1 -1
  148. package/lib/version.js.map +1 -1
  149. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! Pro Design Vue v1.3.41 */
1
+ /*! Pro Design Vue v1.4.1 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ant-design-vue'), require('vue'), require('ant-design-vue/es/locale/zh_CN.js')) :
@@ -32,7 +32,7 @@
32
32
  const DEFAULT_NAMESPACE = "pro";
33
33
  const DEFAULT_LOCALE = "zh-CN";
34
34
 
35
- const version$1 = "1.3.41";
35
+ const version$1 = "1.4.1";
36
36
 
37
37
  const makeInstaller = (components = []) => {
38
38
  const install = (app) => {
@@ -3551,7 +3551,7 @@
3551
3551
  };
3552
3552
  }
3553
3553
 
3554
- function NOOP() {
3554
+ function NOOP$1() {
3555
3555
  }
3556
3556
 
3557
3557
  const withInstall = (main, extra) => {
@@ -3568,7 +3568,7 @@
3568
3568
  return main;
3569
3569
  };
3570
3570
  const withNoopInstall = (component) => {
3571
- component.install = NOOP;
3571
+ component.install = NOOP$1;
3572
3572
  return component;
3573
3573
  };
3574
3574
 
@@ -10299,7 +10299,7 @@
10299
10299
 
10300
10300
  const ProIcon = withInstall(_sfc_main$W);
10301
10301
 
10302
- function _isSlot$8(s) {
10302
+ function _isSlot$9(s) {
10303
10303
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
10304
10304
  }
10305
10305
  var Button = /* @__PURE__ */ vue.defineComponent({
@@ -10473,7 +10473,7 @@
10473
10473
  })();
10474
10474
  defaultDom = vue.createVNode(antDesignVue.Tooltip, vue.mergeProps(props.tooltipProps, {
10475
10475
  "title": props.tooltip
10476
- }), _isSlot$8(defaultDom) ? defaultDom : {
10476
+ }), _isSlot$9(defaultDom) ? defaultDom : {
10477
10477
  default: () => [_defaultDom]
10478
10478
  });
10479
10479
  }
@@ -10487,7 +10487,7 @@
10487
10487
  var _a2;
10488
10488
  return (_a2 = props.onCancel) == null ? void 0 : _a2.call(props, props.data);
10489
10489
  }
10490
- }), _isSlot$8(defaultDom) ? defaultDom : {
10490
+ }), _isSlot$9(defaultDom) ? defaultDom : {
10491
10491
  default: () => [defaultDom]
10492
10492
  });
10493
10493
  }
@@ -13725,7 +13725,7 @@
13725
13725
  }
13726
13726
  },
13727
13727
  setup(props, { slots }) {
13728
- const currentValue = vue.reactive({});
13728
+ const currentValue = vue.shallowReactive({});
13729
13729
  vue.watch(
13730
13730
  () => props.value,
13731
13731
  () => {
@@ -14055,7 +14055,7 @@
14055
14055
  return vue.inject(FormContextKey, {});
14056
14056
  };
14057
14057
 
14058
- function _isSlot$7(s) {
14058
+ function _isSlot$8(s) {
14059
14059
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
14060
14060
  }
14061
14061
  var FieldReadonly = /* @__PURE__ */ vue.defineComponent({
@@ -14134,7 +14134,7 @@
14134
14134
  if (props.copy && props.text) {
14135
14135
  return vue.createVNode(ProClipboard, {
14136
14136
  "text": props.text
14137
- }, _isSlot$7(dom) ? dom : {
14137
+ }, _isSlot$8(dom) ? dom : {
14138
14138
  default: () => [dom]
14139
14139
  });
14140
14140
  }
@@ -14145,7 +14145,7 @@
14145
14145
  "placement": "topLeft",
14146
14146
  "title": title,
14147
14147
  "getPopupContainer": getPopupContainer
14148
- }, _isSlot$7(dom) ? dom : {
14148
+ }, _isSlot$8(dom) ? dom : {
14149
14149
  default: () => [dom]
14150
14150
  });
14151
14151
  }
@@ -15265,7 +15265,7 @@
15265
15265
  }
15266
15266
  });
15267
15267
 
15268
- function _isSlot$6(s) {
15268
+ function _isSlot$7(s) {
15269
15269
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
15270
15270
  }
15271
15271
  var FieldRadioGroup = /* @__PURE__ */ vue.defineComponent({
@@ -15329,7 +15329,7 @@
15329
15329
  "value": props.value
15330
15330
  }, attrs, {
15331
15331
  "onChange": onChange
15332
- }), _isSlot$6(_slot = mergeOptions.value.map((option) => {
15332
+ }), _isSlot$7(_slot = mergeOptions.value.map((option) => {
15333
15333
  var _a2;
15334
15334
  return vue.createVNode(antDesignVue.Radio, {
15335
15335
  "value": option.value,
@@ -17579,7 +17579,7 @@
17579
17579
  const useInitialValues = (props) => {
17580
17580
  const hasInitial = vue.ref(true);
17581
17581
  const requestLoading = vue.ref(false);
17582
- const initialValues = vue.ref({ ...props.initialValues });
17582
+ const initialValues = vue.shallowRef({ ...props.initialValues });
17583
17583
  const fetchData = useFetchData$1({ request: props.request });
17584
17584
  vue.onMounted(async () => {
17585
17585
  var _a;
@@ -17600,7 +17600,14 @@
17600
17600
  const useLinkage = () => {
17601
17601
  const hiddenKeys = vue.shallowRef([]);
17602
17602
  const disabledKeys = vue.shallowRef([]);
17603
- const excludeKeys = vue.computed(() => hiddenKeys.value.map((key) => key.split(":")[1]));
17603
+ const hiddenExcludeSet = vue.computed(() => {
17604
+ const set = /* @__PURE__ */ new Set();
17605
+ for (const key of hiddenKeys.value) {
17606
+ const target = key.split(":")[1];
17607
+ if (target) set.add(target);
17608
+ }
17609
+ return set;
17610
+ });
17604
17611
  const genNewKeys = (originKeys, fieldKey, keys) => {
17605
17612
  if (!Array.isArray(keys)) {
17606
17613
  keys = [keys];
@@ -17616,10 +17623,30 @@
17616
17623
  disabledKeys.value = genNewKeys(disabledKeys.value, fieldKey, keys);
17617
17624
  };
17618
17625
  const allHiddenKeys = vue.computed(() => {
17619
- return hiddenKeys.value.filter((key) => !excludeKeys.value.includes(key.split(":")[0])).map((key) => key.split(":")[1]);
17626
+ const excludeSet = hiddenExcludeSet.value;
17627
+ const result = [];
17628
+ for (const key of hiddenKeys.value) {
17629
+ const idx = key.indexOf(":");
17630
+ const source = key.substring(0, idx);
17631
+ const target = key.substring(idx + 1);
17632
+ if (!excludeSet.has(source)) {
17633
+ result.push(target);
17634
+ }
17635
+ }
17636
+ return result;
17620
17637
  });
17621
17638
  const allDisabledKeys = vue.computed(() => {
17622
- return disabledKeys.value.filter((key) => !excludeKeys.value.includes(key.split(":")[0])).map((key) => key.split(":")[1]);
17639
+ const excludeSet = hiddenExcludeSet.value;
17640
+ const result = [];
17641
+ for (const key of disabledKeys.value) {
17642
+ const idx = key.indexOf(":");
17643
+ const source = key.substring(0, idx);
17644
+ const target = key.substring(idx + 1);
17645
+ if (!excludeSet.has(source)) {
17646
+ result.push(target);
17647
+ }
17648
+ }
17649
+ return result;
17623
17650
  });
17624
17651
  return {
17625
17652
  allHiddenKeys,
@@ -17770,6 +17797,7 @@
17770
17797
  props,
17771
17798
  formRef,
17772
17799
  formData,
17800
+ formDataVersion,
17773
17801
  initialValues,
17774
17802
  hasInitial,
17775
17803
  transformerMap,
@@ -17825,6 +17853,7 @@
17825
17853
  const namePath = covertFormName(name);
17826
17854
  if (!namePath) throw new Error("name is require");
17827
17855
  set(formData.value, namePath, value);
17856
+ formDataVersion.value++;
17828
17857
  };
17829
17858
  const setFieldsValue = (values, isMerge = true) => {
17830
17859
  if (!values) throw new Error("values is require");
@@ -17833,6 +17862,7 @@
17833
17862
  } else {
17834
17863
  formData.value = cloneDeep(values);
17835
17864
  }
17865
+ formDataVersion.value++;
17836
17866
  };
17837
17867
  const resetInitialValues = (values) => {
17838
17868
  if (!values) throw new Error("values is require");
@@ -17845,6 +17875,7 @@
17845
17875
  hasInitial.value = true;
17846
17876
  (_a = formRef.value) == null ? void 0 : _a.clearValidate();
17847
17877
  formData.value = cloneDeep(convertKeyInitialValue(initialValues.value, transformerMap.value));
17878
+ formDataVersion.value++;
17848
17879
  Promise.resolve().then(() => {
17849
17880
  hasInitial.value = false;
17850
17881
  onReset == null ? void 0 : onReset(transformKeySubmitValue(formData.value, transformerMap.value, props.omitNil));
@@ -17856,6 +17887,7 @@
17856
17887
  if (!namePath) throw new Error("name is require");
17857
17888
  (_a = formRef.value) == null ? void 0 : _a.clearValidate(name);
17858
17889
  set(formData.value, name, cloneDeep(get(initialValues.value, name)));
17890
+ formDataVersion.value++;
17859
17891
  };
17860
17892
  const clearValidate = (name) => {
17861
17893
  var _a;
@@ -18050,7 +18082,7 @@
18050
18082
  }
18051
18083
  });
18052
18084
 
18053
- function _isSlot$5(s) {
18085
+ function _isSlot$6(s) {
18054
18086
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
18055
18087
  }
18056
18088
  var FormGroup = /* @__PURE__ */ vue.defineComponent({
@@ -18102,12 +18134,18 @@
18102
18134
  formData
18103
18135
  } = useInjectForm();
18104
18136
  const items = vue.computed(() => {
18105
- var _a, _b;
18106
- return (_b = formatItems == null ? void 0 : formatItems(runFunction((_a = props.items) != null ? _a : [], formData.value))) != null ? _b : [];
18137
+ var _a, _b, _c;
18138
+ const raw = (_a = props.items) != null ? _a : [];
18139
+ const fields = (_b = typeof raw === "function" ? runFunction(raw, formData.value) : raw) != null ? _b : [];
18140
+ return (_c = formatItems == null ? void 0 : formatItems(fields)) != null ? _c : [];
18107
18141
  });
18108
18142
  const formItemProps = vue.computed(() => {
18109
18143
  var _a;
18110
- return (_a = runFunction(props.formItemProps, formData.value)) != null ? _a : {};
18144
+ const raw = props.formItemProps;
18145
+ if (typeof raw === "function") {
18146
+ return (_a = runFunction(raw, formData.value)) != null ? _a : {};
18147
+ }
18148
+ return raw != null ? raw : {};
18111
18149
  });
18112
18150
  const isExistTitle = vue.computed(() => {
18113
18151
  if (!props.title) {
@@ -18150,7 +18188,7 @@
18150
18188
  }, null)]), vue.createVNode("div", null, [vue.createVNode(FormRowWrapper, {
18151
18189
  "rowProps": props.rowProps,
18152
18190
  "grid": props.grid
18153
- }, _isSlot$5(defaultDom) ? defaultDom : {
18191
+ }, _isSlot$6(defaultDom) ? defaultDom : {
18154
18192
  default: () => [defaultDom]
18155
18193
  })])])]
18156
18194
  });
@@ -18164,31 +18202,31 @@
18164
18202
  convertValue
18165
18203
  }) {
18166
18204
  const fieldValue = vue.shallowRef();
18167
- const { formData, initialValues } = useInjectForm();
18168
- const modelValue = vue.computed(() => get(formData.value, namePath.value));
18205
+ const { formData, formDataVersion, initialValues } = useInjectForm();
18206
+ const modelValue = vue.computed(() => {
18207
+ void formDataVersion.value;
18208
+ return get(formData.value, namePath.value);
18209
+ });
18169
18210
  const onValueChange = (value) => {
18170
18211
  set(formData.value, namePath.value, value);
18212
+ formDataVersion.value++;
18171
18213
  };
18172
18214
  vue.watch(
18173
18215
  modelValue,
18174
18216
  (newValue) => {
18175
- fieldValue.value = cloneDeep(newValue);
18217
+ fieldValue.value = newValue;
18176
18218
  },
18177
18219
  {
18178
- immediate: true,
18179
- deep: true
18220
+ immediate: true
18180
18221
  }
18181
18222
  );
18182
18223
  const initFieldInitialValue = () => {
18183
18224
  var _a;
18184
- if (
18185
- // !mountedRef.value &&
18186
- typeof modelValue.value === "undefined" && typeof initialValue !== "undefined"
18187
- ) {
18225
+ if (typeof modelValue.value === "undefined" && typeof initialValue !== "undefined") {
18188
18226
  const value = convertValue ? convertValue(initialValue, namePath.value) : initialValue;
18189
18227
  set((_a = initialValues == null ? void 0 : initialValues.value) != null ? _a : {}, namePath.value, cloneDeep(initialValue));
18190
18228
  set(formData.value, namePath.value, cloneDeep(value));
18191
- fieldValue.value = value;
18229
+ fieldValue.value = get(formData.value, namePath.value);
18192
18230
  }
18193
18231
  };
18194
18232
  initFieldInitialValue();
@@ -18265,14 +18303,19 @@
18265
18303
  });
18266
18304
  const formItemProps = vue.computed(() => {
18267
18305
  var _a;
18268
- return (_a = runFunction(props.formItemProps, formData.value)) != null ? _a : {};
18306
+ const raw = props.formItemProps;
18307
+ if (typeof raw === "function") {
18308
+ return (_a = runFunction(raw, formData.value)) != null ? _a : {};
18309
+ }
18310
+ return raw != null ? raw : {};
18269
18311
  });
18270
18312
  const restItemProps = vue.computed(() => omitUndefined({
18271
18313
  ...pickKeys(formItemProps.value, ALL_ANTD_PROP_KEYS$2)
18272
18314
  }));
18273
18315
  const items = vue.computed(() => {
18274
18316
  var _a, _b, _c;
18275
- let children = (_b = runFunction((_a = props.items) != null ? _a : [], formData.value)) != null ? _b : [];
18317
+ const raw = (_a = props.items) != null ? _a : [];
18318
+ let children = (_b = typeof raw === "function" ? runFunction(raw, formData.value) : raw) != null ? _b : [];
18276
18319
  if (Array.isArray(props.initialValue) && props.initialValue.length) {
18277
18320
  children = children.filter((item) => {
18278
18321
  var _a2;
@@ -18458,24 +18501,27 @@
18458
18501
  return newDependencies;
18459
18502
  };
18460
18503
  const genListItems = (fields) => {
18461
- return cloneDeep(fields).filter((item) => {
18504
+ return fields.filter((item) => {
18462
18505
  var _a;
18463
18506
  return !NOT_ALLOW_FIELD_TYPES.includes((_a = item.fieldType) != null ? _a : "");
18464
18507
  }).map((field) => {
18465
18508
  var _a, _b, _c, _d, _e, _f;
18466
- if (field.fieldType === ProFieldType.GROUP) {
18467
- field.children = genListItems((_b = runFunction((_a = field.children) != null ? _a : [], formData.value)) != null ? _b : []);
18468
- return field;
18469
- }
18470
- const originName = (_c = field.originName) != null ? _c : field.name;
18471
- const originKey = (_d = field.originKey) != null ? _d : field.key;
18472
- const namePath = covertFormName(field.name);
18473
- const title = index.value === 0 || props.alwaysShowItemLabel ? field.title : void 0;
18509
+ const cloned = {
18510
+ ...field
18511
+ };
18512
+ if (cloned.fieldType === ProFieldType.GROUP) {
18513
+ cloned.children = genListItems((_b = runFunction((_a = cloned.children) != null ? _a : [], formData.value)) != null ? _b : []);
18514
+ return cloned;
18515
+ }
18516
+ const originName = (_c = cloned.originName) != null ? _c : cloned.name;
18517
+ const originKey = (_d = cloned.originKey) != null ? _d : cloned.key;
18518
+ const namePath = covertFormName(cloned.name);
18519
+ const title = index.value === 0 || props.alwaysShowItemLabel ? cloned.title : void 0;
18474
18520
  const item = {
18475
- ...field,
18521
+ ...cloned,
18476
18522
  title,
18477
18523
  originKey,
18478
- key: `${listKey.value}_${(_e = field.key) != null ? _e : namePath == null ? void 0 : namePath.join("_")}`,
18524
+ key: `${listKey.value}_${(_e = cloned.key) != null ? _e : namePath == null ? void 0 : namePath.join("_")}`,
18479
18525
  originName,
18480
18526
  name: [...(_f = listName == null ? void 0 : listName.value) != null ? _f : [], namePath].filter((item2) => item2 !== void 0).flat(1)
18481
18527
  };
@@ -18487,7 +18533,8 @@
18487
18533
  };
18488
18534
  const items = vue.computed(() => {
18489
18535
  var _a, _b, _c;
18490
- const fields = (_b = runFunction((_a = props.items) != null ? _a : [], formData.value)) != null ? _b : [];
18536
+ const raw = (_a = props.items) != null ? _a : [];
18537
+ const fields = (_b = typeof raw === "function" ? runFunction(raw, formData.value) : raw) != null ? _b : [];
18491
18538
  return (_c = formatItems == null ? void 0 : formatItems(genListItems(fields))) != null ? _c : [];
18492
18539
  });
18493
18540
  const showRowTitle = vue.computed(() => props.alwaysShowRowTitle && props.rowTitle);
@@ -18625,7 +18672,7 @@
18625
18672
  }
18626
18673
  });
18627
18674
 
18628
- function _isSlot$4(s) {
18675
+ function _isSlot$5(s) {
18629
18676
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
18630
18677
  }
18631
18678
  var FormListContainer = /* @__PURE__ */ vue.defineComponent({
@@ -18730,14 +18777,16 @@
18730
18777
  slots
18731
18778
  }) {
18732
18779
  const loading = vue.ref(false);
18733
- const listValues = vue.ref([]);
18734
18780
  const {
18735
18781
  prefixCls
18736
18782
  } = useInjectForm();
18783
+ const formItemContext = antDesignVue.Form.useInjectFormItemContext();
18737
18784
  const keyRef = vue.shallowRef({
18738
18785
  keys: [],
18739
18786
  id: 0
18740
18787
  });
18788
+ let lastActionVersion = 0;
18789
+ let watchedActionVersion = 0;
18741
18790
  const {
18742
18791
  fieldValue,
18743
18792
  onValueChange
@@ -18747,31 +18796,35 @@
18747
18796
  convertValue: props.convertValue,
18748
18797
  transform: props.transform
18749
18798
  });
18750
- const formItemContext = antDesignVue.Form.useInjectFormItemContext();
18751
18799
  const count = vue.computed(() => {
18752
18800
  var _a, _b;
18753
18801
  return (_b = (_a = fieldValue.value) == null ? void 0 : _a.length) != null ? _b : 0;
18754
18802
  });
18755
18803
  const action = {
18756
18804
  add: async (defaultValue, index) => {
18757
- var _a, _b, _c;
18805
+ var _a, _b;
18758
18806
  if ((_a = props.actionGuard) == null ? void 0 : _a.beforeAddRow) {
18759
18807
  const success = await ((_b = props.actionGuard) == null ? void 0 : _b.beforeAddRow(defaultValue, index, count.value));
18760
18808
  if (!success) {
18761
18809
  return false;
18762
18810
  }
18763
18811
  }
18764
- const newValue = cloneDeep((_c = fieldValue.value) != null ? _c : []);
18812
+ const newValue = fieldValue.value ? [...fieldValue.value] : [];
18765
18813
  if (index !== void 0 && index >= 0 && index <= newValue.length) {
18766
- keyRef.value.keys = [...keyRef.value.keys.slice(0, index), keyRef.value.id, ...keyRef.value.keys.slice(index)];
18767
- onValueChange(cloneDeep([...newValue.slice(0, index), defaultValue, ...newValue.slice(index)]));
18768
- formItemContext.onFieldChange();
18814
+ keyRef.value = {
18815
+ keys: [...keyRef.value.keys.slice(0, index), keyRef.value.id, ...keyRef.value.keys.slice(index)],
18816
+ id: keyRef.value.id + 1
18817
+ };
18818
+ onValueChange([...newValue.slice(0, index), defaultValue, ...newValue.slice(index)]);
18769
18819
  } else {
18770
- keyRef.value.keys = [...keyRef.value.keys, keyRef.value.id];
18771
- onValueChange(cloneDeep([...newValue, defaultValue]));
18772
- formItemContext.onFieldChange();
18820
+ keyRef.value = {
18821
+ keys: [...keyRef.value.keys, keyRef.value.id],
18822
+ id: keyRef.value.id + 1
18823
+ };
18824
+ onValueChange([...newValue, defaultValue]);
18773
18825
  }
18774
- keyRef.value.id += 1;
18826
+ lastActionVersion++;
18827
+ formItemContext.onFieldChange();
18775
18828
  Promise.resolve().then(() => {
18776
18829
  var _a2;
18777
18830
  (_a2 = props.onAfterAdd) == null ? void 0 : _a2.call(props, defaultValue, index, count.value);
@@ -18779,21 +18832,24 @@
18779
18832
  return true;
18780
18833
  },
18781
18834
  remove: async (index) => {
18782
- var _a, _b, _c;
18835
+ var _a, _b;
18783
18836
  if ((_a = props.actionGuard) == null ? void 0 : _a.beforeRemoveRow) {
18784
18837
  const success = await ((_b = props.actionGuard) == null ? void 0 : _b.beforeRemoveRow(index, count.value));
18785
18838
  if (!success) {
18786
18839
  return false;
18787
18840
  }
18788
18841
  }
18789
- const newValue = cloneDeep((_c = fieldValue.value) != null ? _c : []);
18842
+ const newValue = fieldValue.value ? [...fieldValue.value] : [];
18790
18843
  const indexSet = new Set(Array.isArray(index) ? index : [index]);
18791
18844
  if (indexSet.size <= 0) {
18792
18845
  return false;
18793
18846
  }
18794
- keyRef.value.keys = keyRef.value.keys.filter((_, keysIndex) => !indexSet.has(keysIndex));
18795
- const value = newValue.filter((_, valueIndex) => !indexSet.has(valueIndex));
18796
- onValueChange(value);
18847
+ keyRef.value = {
18848
+ keys: keyRef.value.keys.filter((_, keysIndex) => !indexSet.has(keysIndex)),
18849
+ id: keyRef.value.id
18850
+ };
18851
+ onValueChange(newValue.filter((_, valueIndex) => !indexSet.has(valueIndex)));
18852
+ lastActionVersion++;
18797
18853
  formItemContext.onFieldChange();
18798
18854
  Promise.resolve().then(() => {
18799
18855
  var _a2;
@@ -18818,10 +18874,32 @@
18818
18874
  const onCopy = async (index) => {
18819
18875
  await action.add(cloneDeep(fieldValue.value[index]), count.value + 1);
18820
18876
  };
18821
- vue.watch(fieldValue, () => {
18822
- var _a;
18823
- if (!isEqual(listValues.value, fieldValue.value)) {
18824
- listValues.value = cloneDeep((_a = fieldValue.value) != null ? _a : []);
18877
+ vue.watch(fieldValue, (newVal, oldVal) => {
18878
+ var _a, _b;
18879
+ if (lastActionVersion !== watchedActionVersion) {
18880
+ watchedActionVersion = lastActionVersion;
18881
+ return;
18882
+ }
18883
+ const len = (_a = newVal == null ? void 0 : newVal.length) != null ? _a : 0;
18884
+ const keysLen = keyRef.value.keys.length;
18885
+ if (keysLen !== len) {
18886
+ const newKeys = [];
18887
+ for (let i = 0; i < len; i++) {
18888
+ newKeys.push((_b = keyRef.value.keys[i]) != null ? _b : keyRef.value.id++);
18889
+ }
18890
+ keyRef.value = {
18891
+ keys: newKeys,
18892
+ id: keyRef.value.id
18893
+ };
18894
+ } else if (newVal !== oldVal) {
18895
+ const newKeys = [];
18896
+ for (let i = 0; i < len; i++) {
18897
+ newKeys.push(keyRef.value.id++);
18898
+ }
18899
+ keyRef.value = {
18900
+ keys: newKeys,
18901
+ id: keyRef.value.id
18902
+ };
18825
18903
  }
18826
18904
  }, {
18827
18905
  immediate: true
@@ -18846,7 +18924,7 @@
18846
18924
  }, restProps, {
18847
18925
  "loading": loading.value,
18848
18926
  "onClick": onAdd
18849
- }), _isSlot$4(creatorButtonText) ? creatorButtonText : {
18927
+ }), _isSlot$5(creatorButtonText) ? creatorButtonText : {
18850
18928
  default: () => [creatorButtonText]
18851
18929
  });
18852
18930
  if (slots.creator) {
@@ -18862,17 +18940,15 @@
18862
18940
  return defaultDom;
18863
18941
  });
18864
18942
  return () => {
18865
- var _a, _b, _c, _d, _e, _f, _g;
18866
- if (props.readonly && !((_a = listValues.value) == null ? void 0 : _a.length)) {
18867
- listValues.value = [{}];
18868
- }
18943
+ var _a, _b, _c, _d, _e;
18944
+ const listData = props.readonly && !((_a = fieldValue.value) == null ? void 0 : _a.length) ? [{}] : (_b = fieldValue.value) != null ? _b : [];
18869
18945
  return vue.createVNode("div", {
18870
18946
  "style": "width: max-content; max-width: 100%; min-width: 100%; ",
18871
18947
  "class": {
18872
18948
  [`${prefixCls}-list-container`]: true,
18873
- [`${prefixCls}-list-empty`]: ((_c = (_b = fieldValue.value) != null ? _b : []) == null ? void 0 : _c.length) == 0
18949
+ [`${prefixCls}-list-empty`]: listData.length === 0
18874
18950
  }
18875
- }, [props.creatorButtonProps !== false && ((_d = props.creatorButtonProps) == null ? void 0 : _d.position) === "top" && creatorButton.value, ((_e = listValues.value) != null ? _e : []).map((record, index) => {
18951
+ }, [props.creatorButtonProps !== false && ((_c = props.creatorButtonProps) == null ? void 0 : _c.position) === "top" && creatorButton.value, listData.map((record, index) => {
18876
18952
  let key = keyRef.value.keys[index];
18877
18953
  if (key === void 0) {
18878
18954
  keyRef.value.keys[index] = keyRef.value.id;
@@ -18905,7 +18981,7 @@
18905
18981
  action: slots.action,
18906
18982
  item: slots.item
18907
18983
  });
18908
- }), props.creatorButtonProps !== false && (((_f = props.creatorButtonProps) == null ? void 0 : _f.position) === "bottom" || ((_g = props.creatorButtonProps) == null ? void 0 : _g.position) === void 0) && creatorButton.value]);
18984
+ }), props.creatorButtonProps !== false && (((_d = props.creatorButtonProps) == null ? void 0 : _d.position) === "bottom" || ((_e = props.creatorButtonProps) == null ? void 0 : _e.position) === void 0) && creatorButton.value]);
18909
18985
  };
18910
18986
  }
18911
18987
  });
@@ -19062,8 +19138,10 @@
19062
19138
  });
19063
19139
  });
19064
19140
  const items = vue.computed(() => {
19065
- var _a, _b;
19066
- return (_b = formatItems == null ? void 0 : formatItems(runFunction((_a = props.items) != null ? _a : [], formData.value))) != null ? _b : [];
19141
+ var _a, _b, _c;
19142
+ const raw = (_a = props.items) != null ? _a : [];
19143
+ const fields = (_b = typeof raw === "function" ? runFunction(raw, formData.value) : raw) != null ? _b : [];
19144
+ return (_c = formatItems == null ? void 0 : formatItems(fields)) != null ? _c : [];
19067
19145
  });
19068
19146
  const slotsGetter = vue.computed(() => {
19069
19147
  const temp = {};
@@ -19791,6 +19869,7 @@
19791
19869
  formKey,
19792
19870
  prefixCls,
19793
19871
  formData,
19872
+ formDataVersion,
19794
19873
  readonly,
19795
19874
  readonlyProps,
19796
19875
  disabledKeys,
@@ -19809,6 +19888,7 @@
19809
19888
  rowData
19810
19889
  } = useInjectFormList();
19811
19890
  const formSlotsContext = useInjectSlots$1();
19891
+ const formItemContext = antDesignVue.Form.useInjectFormItemContext();
19812
19892
  const {
19813
19893
  fieldValue,
19814
19894
  onValueChange
@@ -19829,7 +19909,11 @@
19829
19909
  });
19830
19910
  const mergeReadonly = vue.computed(() => {
19831
19911
  var _a;
19832
- return runFunction((_a = props.item.readonly) != null ? _a : readonly == null ? void 0 : readonly.value, formData.value, rowData == null ? void 0 : rowData.value);
19912
+ const readonlyProp = (_a = props.item.readonly) != null ? _a : readonly == null ? void 0 : readonly.value;
19913
+ if (typeof readonlyProp === "function") {
19914
+ return runFunction(readonlyProp, formData.value, rowData == null ? void 0 : rowData.value);
19915
+ }
19916
+ return readonlyProp;
19833
19917
  });
19834
19918
  const mergeReadonlyProps = vue.computed(() => merge({}, readonlyProps == null ? void 0 : readonlyProps.value, props.item.readonlyProps));
19835
19919
  const linkageDisabledKeys = vue.computed(() => disabledKeys.value.map((key) => key.split(":")[1]));
@@ -19840,17 +19924,22 @@
19840
19924
  });
19841
19925
  const formItemProps = vue.computed(() => {
19842
19926
  var _a;
19843
- return (_a = runFunction(props.item.formItemProps, formData.value, rowData == null ? void 0 : rowData.value)) != null ? _a : {};
19927
+ const raw = props.item.formItemProps;
19928
+ if (typeof raw === "function") {
19929
+ return (_a = runFunction(raw, formData.value, rowData == null ? void 0 : rowData.value)) != null ? _a : {};
19930
+ }
19931
+ return raw != null ? raw : {};
19844
19932
  });
19845
19933
  const restItemProps = vue.computed(() => {
19846
19934
  var _a, _b, _c, _d, _e, _f, _g, _h;
19935
+ const rulesProp = (_a = props.item.rules) != null ? _a : formItemProps.value.rules;
19847
19936
  return omitUndefined({
19848
19937
  ...pickKeys(formItemProps.value, ALL_ANTD_PROP_KEYS),
19849
- labelCol: (_b = (_a = formItemProps.value) == null ? void 0 : _a.labelCol) != null ? _b : labelCol == null ? void 0 : labelCol.value,
19850
- wrapperCol: (_d = (_c = formItemProps.value) == null ? void 0 : _c.wrapperCol) != null ? _d : wrapperCol == null ? void 0 : wrapperCol.value,
19938
+ labelCol: (_c = (_b = formItemProps.value) == null ? void 0 : _b.labelCol) != null ? _c : labelCol == null ? void 0 : labelCol.value,
19939
+ wrapperCol: (_e = (_d = formItemProps.value) == null ? void 0 : _d.wrapperCol) != null ? _e : wrapperCol == null ? void 0 : wrapperCol.value,
19851
19940
  name: mergeReadonly.value ? void 0 : props.item.name,
19852
- htmlFor: mergeReadonly.value ? void 0 : (_g = (_e = formItemProps.value) == null ? void 0 : _e.htmlFor) != null ? _g : `form-${(_f = formKey.value) != null ? _f : ""}-${props.item.key}`,
19853
- rules: mergeReadonly.value ? void 0 : runFunction((_h = props.item.rules) != null ? _h : formItemProps.value.rules, formData.value, action, rowData == null ? void 0 : rowData.value)
19941
+ htmlFor: mergeReadonly.value ? void 0 : (_h = (_f = formItemProps.value) == null ? void 0 : _f.htmlFor) != null ? _h : `form-${(_g = formKey.value) != null ? _g : ""}-${props.item.key}`,
19942
+ rules: mergeReadonly.value ? void 0 : runFunction(rulesProp, formData.value, action, rowData == null ? void 0 : rowData.value)
19854
19943
  });
19855
19944
  });
19856
19945
  const clearOnChange = (newValue) => {
@@ -19861,27 +19950,33 @@
19861
19950
  if (clear) {
19862
19951
  const clearNamePaths = (_b = runFunction(clear, newValue, formData.value, rowData == null ? void 0 : rowData.value)) != null ? _b : [];
19863
19952
  if (clearNamePaths.length > 0) {
19953
+ let changed = false;
19864
19954
  clearNamePaths.forEach((namePath) => {
19865
19955
  var _a2;
19866
19956
  const path = isList ? [...(_a2 = listName == null ? void 0 : listName.value) != null ? _a2 : [], ...covertFormName(namePath)].filter((item) => item !== void 0).flat(1) : covertFormName(namePath);
19867
19957
  const value = get(formData.value, path);
19868
19958
  if (typeof value !== "undefined") {
19869
19959
  set(formData.value, path, void 0);
19960
+ changed = true;
19870
19961
  }
19871
19962
  });
19963
+ if (changed) {
19964
+ formDataVersion.value++;
19965
+ }
19872
19966
  }
19873
19967
  }
19874
19968
  };
19875
19969
  const fieldProps = vue.computed(() => {
19876
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
19877
- const baseProps = runFunction((_a = props.item.fieldProps) != null ? _a : {}, formData.value, action, rowData == null ? void 0 : rowData.value);
19970
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
19971
+ const raw = props.item.fieldProps;
19972
+ const baseProps = runFunction(raw != null ? raw : {}, formData.value, action, rowData == null ? void 0 : rowData.value);
19878
19973
  const mergeProps = {
19879
19974
  ...baseProps,
19880
- id: (_c = baseProps == null ? void 0 : baseProps.id) != null ? _c : `form-${(_b = formKey.value) != null ? _b : ""}-${props.item.key}`,
19881
- disabled: ((_e = runFunction((_d = props.item.disabled) != null ? _d : baseProps == null ? void 0 : baseProps.disabled, formData.value, rowData == null ? void 0 : rowData.value)) != null ? _e : allDisabledKeys.value.includes(props.item.key)) ? true : void 0,
19882
- placeholder: (_f = props.item.placeholder) != null ? _f : baseProps == null ? void 0 : baseProps.placeholder,
19883
- options: (_h = (_g = props.item.options) != null ? _g : baseProps == null ? void 0 : baseProps.options) != null ? _h : baseProps == null ? void 0 : baseProps.treeData,
19884
- allowClear: (_j = (_i = props.item.allowClear) != null ? _i : baseProps == null ? void 0 : baseProps.allowClear) != null ? _j : true
19975
+ id: (_b = baseProps == null ? void 0 : baseProps.id) != null ? _b : `form-${(_a = formKey.value) != null ? _a : ""}-${props.item.key}`,
19976
+ disabled: ((_d = runFunction((_c = props.item.disabled) != null ? _c : baseProps == null ? void 0 : baseProps.disabled, formData.value, rowData == null ? void 0 : rowData.value)) != null ? _d : allDisabledKeys.value.includes(props.item.key)) ? true : void 0,
19977
+ placeholder: (_e = props.item.placeholder) != null ? _e : baseProps == null ? void 0 : baseProps.placeholder,
19978
+ options: (_g = (_f = props.item.options) != null ? _f : baseProps == null ? void 0 : baseProps.options) != null ? _g : baseProps == null ? void 0 : baseProps.treeData,
19979
+ allowClear: (_i = (_h = props.item.allowClear) != null ? _h : baseProps == null ? void 0 : baseProps.allowClear) != null ? _i : true
19885
19980
  };
19886
19981
  return omitUndefined({
19887
19982
  valueEnum: props.item.valueEnum,
@@ -19894,6 +19989,7 @@
19894
19989
  var _a2, _b2;
19895
19990
  clearOnChange(value);
19896
19991
  onValueChange(value);
19992
+ formItemContext.onFieldChange();
19897
19993
  (_b2 = (_a2 = props.item).onChange) == null ? void 0 : _b2.call(_a2, value, ...args, action);
19898
19994
  },
19899
19995
  ...fieldPropsMap[fieldType.value] ? pickKeys(mergeProps, fieldPropsMap[fieldType.value]) : mergeProps
@@ -19901,9 +19997,8 @@
19901
19997
  });
19902
19998
  const fieldStyle = vue.computed(() => {
19903
19999
  var _a;
19904
- const baseProps = runFunction((_a = props.item.fieldProps) != null ? _a : {}, formData.value, rowData == null ? void 0 : rowData.value);
19905
20000
  const newStyle = {
19906
- ...baseProps == null ? void 0 : baseProps.style
20001
+ ...(_a = fieldProps.value) == null ? void 0 : _a.style
19907
20002
  };
19908
20003
  if (props.item.width && !fieldWidthSizeMap[props.item.width]) {
19909
20004
  newStyle.width = isNumber$2(props.item.width) ? props.item.width + "px" : props.item.width;
@@ -19999,8 +20094,10 @@
19999
20094
  vue.watch(() => {
20000
20095
  var _a;
20001
20096
  return (_a = restItemProps.value) == null ? void 0 : _a.rules;
20002
- }, () => {
20003
- action.clearValidate(props.item.name);
20097
+ }, (newRules, oldRules) => {
20098
+ if (!isEqual(newRules, oldRules)) {
20099
+ action.clearValidate(props.item.name);
20100
+ }
20004
20101
  });
20005
20102
  return () => {
20006
20103
  var _a, _b;
@@ -20067,6 +20164,9 @@
20067
20164
  }
20068
20165
  });
20069
20166
 
20167
+ function _isSlot$4(s) {
20168
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
20169
+ }
20070
20170
  const LIST_PROP_KEYS = ["min", "max", "rowTitle", "rowTitleStyle", "alwaysShowRowTitle", "isValidateList", "emptyListMessage", "creatorRecord", "creatorButtonProps", "alwaysShowItemLabel", "actionGuard", "copyIconProps", "deleteIconProps", "onAfterAdd", "onAfterRemove"];
20071
20171
  const LIST_SLOT_NAMES = ["action", "creator", "item"];
20072
20172
  var FormItems = /* @__PURE__ */ vue.defineComponent({
@@ -20105,86 +20205,86 @@
20105
20205
  var _a;
20106
20206
  return (_a = props.grid) != null ? _a : grid == null ? void 0 : grid.value;
20107
20207
  });
20108
- const getItemsDom = vue.computed(() => {
20109
- return props.list.filter((item) => !allHiddenKeys.value.includes(item.key)).map((item) => {
20110
- var _a;
20111
- if (item.fieldType === ProFieldType.GROUP) {
20112
- return vue.createVNode(FormGroup, {
20113
- "key": item.key,
20114
- "items": item.children,
20115
- "title": item.title,
20116
- "tooltip": item.tooltip,
20117
- "colProps": item.colProps,
20118
- "rowProps": item.rowProps,
20119
- "spaceProps": item.spaceProps,
20120
- "grid": item.grid,
20121
- "item": item,
20122
- "formItemProps": item.formItemProps
20123
- }, null);
20124
- }
20125
- if (item.fieldType === ProFieldType.FORM_SET) {
20126
- return vue.createVNode(FormSet, {
20127
- "key": item.key,
20128
- "name": item.name,
20129
- "items": item.children,
20130
- "title": item.title,
20131
- "tooltip": item.tooltip,
20132
- "colProps": item.colProps,
20133
- "rowProps": item.rowProps,
20134
- "spaceProps": item.spaceProps,
20135
- "formItemProps": item.formItemProps,
20136
- "initialValue": item.initialValue,
20137
- "convertValue": item.convertValue,
20138
- "transform": item.transform
20139
- }, null);
20140
- }
20141
- if (item.fieldType === ProFieldType.FORM_LIST) {
20142
- const fieldProps = omitUndefined(pickKeys((_a = item.fieldProps) != null ? _a : {}, LIST_PROP_KEYS));
20143
- const slotsGetter = {};
20144
- LIST_SLOT_NAMES.forEach((name) => {
20145
- var _a2;
20146
- const slot = getSlot((_a2 = item.fieldProps) == null ? void 0 : _a2[`${name}Render`], formSlotsContext);
20147
- if (slot) {
20148
- slotsGetter[name] = (args) => vue.createVNode(RenderVNode$1, {
20149
- "vnode": slot,
20150
- "props": args
20151
- }, null);
20152
- }
20153
- });
20154
- return vue.createVNode(FormList, vue.mergeProps({
20155
- "key": item.key,
20156
- "name": item.name,
20157
- "originName": item.originName,
20158
- "items": item.children,
20159
- "title": item.title,
20160
- "tooltip": item.tooltip,
20161
- "rules": item.rules,
20162
- "colProps": item.colProps,
20163
- "rowProps": item.rowProps,
20164
- "formItemProps": item.formItemProps,
20165
- "initialValue": item.initialValue,
20166
- "convertValue": item.convertValue,
20167
- "transform": item.transform
20168
- }, fieldProps), {
20169
- ...slotsGetter
20170
- });
20171
- }
20172
- return vue.createVNode(FormItem, {
20208
+ const visibleList = vue.computed(() => props.list.filter((item) => !allHiddenKeys.value.includes(item.key)));
20209
+ const renderItem = (item) => {
20210
+ var _a;
20211
+ if (item.fieldType === ProFieldType.GROUP) {
20212
+ return vue.createVNode(FormGroup, {
20173
20213
  "key": item.key,
20214
+ "items": item.children,
20215
+ "title": item.title,
20216
+ "tooltip": item.tooltip,
20217
+ "colProps": item.colProps,
20218
+ "rowProps": item.rowProps,
20219
+ "spaceProps": item.spaceProps,
20220
+ "grid": item.grid,
20174
20221
  "item": item,
20175
- "grid": mergeGrid.value
20222
+ "formItemProps": item.formItemProps
20176
20223
  }, null);
20177
- });
20178
- });
20224
+ }
20225
+ if (item.fieldType === ProFieldType.FORM_SET) {
20226
+ return vue.createVNode(FormSet, {
20227
+ "key": item.key,
20228
+ "name": item.name,
20229
+ "items": item.children,
20230
+ "title": item.title,
20231
+ "tooltip": item.tooltip,
20232
+ "colProps": item.colProps,
20233
+ "rowProps": item.rowProps,
20234
+ "spaceProps": item.spaceProps,
20235
+ "formItemProps": item.formItemProps,
20236
+ "initialValue": item.initialValue,
20237
+ "convertValue": item.convertValue,
20238
+ "transform": item.transform
20239
+ }, null);
20240
+ }
20241
+ if (item.fieldType === ProFieldType.FORM_LIST) {
20242
+ const fieldProps = omitUndefined(pickKeys((_a = item.fieldProps) != null ? _a : {}, LIST_PROP_KEYS));
20243
+ const slotsGetter = {};
20244
+ LIST_SLOT_NAMES.forEach((name) => {
20245
+ var _a2;
20246
+ const slot = getSlot((_a2 = item.fieldProps) == null ? void 0 : _a2[`${name}Render`], formSlotsContext);
20247
+ if (slot) {
20248
+ slotsGetter[name] = (args) => vue.createVNode(RenderVNode$1, {
20249
+ "vnode": slot,
20250
+ "props": args
20251
+ }, null);
20252
+ }
20253
+ });
20254
+ return vue.createVNode(FormList, vue.mergeProps({
20255
+ "key": item.key,
20256
+ "name": item.name,
20257
+ "originName": item.originName,
20258
+ "items": item.children,
20259
+ "title": item.title,
20260
+ "tooltip": item.tooltip,
20261
+ "rules": item.rules,
20262
+ "colProps": item.colProps,
20263
+ "rowProps": item.rowProps,
20264
+ "formItemProps": item.formItemProps,
20265
+ "initialValue": item.initialValue,
20266
+ "convertValue": item.convertValue,
20267
+ "transform": item.transform
20268
+ }, fieldProps), {
20269
+ ...slotsGetter
20270
+ });
20271
+ }
20272
+ return vue.createVNode(FormItem, {
20273
+ "key": item.key,
20274
+ "item": item,
20275
+ "grid": mergeGrid.value
20276
+ }, null);
20277
+ };
20179
20278
  return () => {
20279
+ const items = visibleList.value.map(renderItem);
20180
20280
  if (props.type === "space" && !(mergeGrid == null ? void 0 : mergeGrid.value)) {
20181
20281
  return vue.createVNode(antDesignVue.Space, vue.mergeProps(props.spaceProps, {
20182
20282
  "align": "start"
20183
- }), {
20184
- default: () => [getItemsDom.value]
20283
+ }), _isSlot$4(items) ? items : {
20284
+ default: () => [items]
20185
20285
  });
20186
20286
  }
20187
- return getItemsDom.value;
20287
+ return items;
20188
20288
  };
20189
20289
  }
20190
20290
  });
@@ -20387,6 +20487,7 @@
20387
20487
  const formRef = vue.ref();
20388
20488
  const prefixCls = usePrefixCls("form");
20389
20489
  const formData = vue.ref({});
20490
+ const formDataVersion = vue.ref(0);
20390
20491
  const formItems = vue.ref([]);
20391
20492
  const formKey = vue.computed(() => {
20392
20493
  var _a;
@@ -20409,7 +20510,7 @@
20409
20510
  const formProps = vue.computed(() => {
20410
20511
  var _a;
20411
20512
  return {
20412
- ...omitUndefined(omit(props, ["colProps", "submitter", "loading", "showLoading", "omitNil", "grid", "theme", "colon", "customUi", "gridSubmitter", "requestAbort", "isKeyPressSubmit", "formKey", "initialValues", "rowProps", "dateFormatter", "params", "readonly", "readonlyProps", "items", "request", "validateMessages", "requiredMark", "labelAlign", "labelCol", "wrapperCol", "submitOnLoading", "onLoadingChange", "onFinish", "onValuesChange"])),
20513
+ ...omitUndefined(omit(props, ["colProps", "submitter", "loading", "showLoading", "omitNil", "grid", "theme", "colon", "customUi", "gridSubmitter", "requestAbort", "isKeyPressSubmit", "formKey", "initialValues", "rowProps", "dateFormatter", "params", "readonly", "readonlyProps", "items", "request", "validateMessages", "requiredMark", "labelAlign", "labelCol", "wrapperCol", "submitOnLoading", "onLoadingChange", "onFinish", "onFinishFailed", "onReset", "onValuesChange", "onInit"])),
20413
20514
  layout: (_a = props.layout) != null ? _a : "vertical"
20414
20515
  };
20415
20516
  });
@@ -20451,6 +20552,7 @@
20451
20552
  vue.watch(initialValues, (newValues, oldValues) => {
20452
20553
  if (!isEqual(newValues, oldValues)) {
20453
20554
  formData.value = cloneDeep(convertKeyInitialValue(newValues, transformerMap.value));
20555
+ formDataVersion.value++;
20454
20556
  if (!props.request || props.requestAbort) {
20455
20557
  Promise.resolve().then(() => {
20456
20558
  hasInitial.value = false;
@@ -20458,8 +20560,7 @@
20458
20560
  }
20459
20561
  }
20460
20562
  }, {
20461
- immediate: true,
20462
- deep: true
20563
+ immediate: true
20463
20564
  });
20464
20565
  const onValuesChange = debounce(() => {
20465
20566
  var _a;
@@ -20482,18 +20583,17 @@
20482
20583
  }
20483
20584
  }
20484
20585
  };
20485
- vue.watch(formData, () => {
20586
+ vue.watch(formDataVersion, () => {
20486
20587
  if (!hasInitial.value) {
20487
20588
  onValuesChange();
20488
20589
  }
20489
- }, {
20490
- deep: true
20491
20590
  });
20492
20591
  const linkage = useLinkage();
20493
20592
  const action = useAction({
20494
20593
  props,
20495
20594
  formRef,
20496
20595
  formData,
20596
+ formDataVersion,
20497
20597
  initialValues,
20498
20598
  hasInitial,
20499
20599
  transformerMap,
@@ -20558,6 +20658,7 @@
20558
20658
  prefixCls,
20559
20659
  initialValues,
20560
20660
  formData,
20661
+ formDataVersion,
20561
20662
  hasInitial,
20562
20663
  theme: vue.computed(() => props.theme),
20563
20664
  customUi: vue.computed(() => props.customUi),
@@ -20650,7 +20751,8 @@
20650
20751
  emits: ["update:open"],
20651
20752
  setup(props, {
20652
20753
  slots,
20653
- emit
20754
+ emit,
20755
+ expose
20654
20756
  }) {
20655
20757
  const _open = vue.ref(false);
20656
20758
  const loading = vue.ref(false);
@@ -20762,6 +20864,7 @@
20762
20864
  (_c = (_b = formRef.value) == null ? void 0 : _b.reset) == null ? void 0 : _c.call(_b);
20763
20865
  }
20764
20866
  };
20867
+ expose(useFormExpose(formRef));
20765
20868
  const onFinishHandle = async (values) => {
20766
20869
  var _a;
20767
20870
  const response = (_a = props.onFinish) == null ? void 0 : _a.call(props, values);
@@ -20800,7 +20903,7 @@
20800
20903
  }
20801
20904
  }), {
20802
20905
  default: () => [vue.createVNode(BaseForm, vue.mergeProps(formProps.value, {
20803
- "submitter": submitterConfig.value,
20906
+ "submitter": props.readonly ? false : submitterConfig.value,
20804
20907
  "onFinish": async (values) => {
20805
20908
  const result = await onFinishHandle(values);
20806
20909
  return result;
@@ -20826,10 +20929,12 @@
20826
20929
  }
20827
20930
  }), formSlots.value)],
20828
20931
  ...drawerSlots.value,
20829
- footer: props.submitter !== false && !props.readonly ? () => vue.createVNode("div", {
20830
- "style": "display: flex; justify-content: flex-end;",
20831
- "ref": footerRef
20832
- }, null) : void 0
20932
+ ...props.submitter !== false && !props.readonly ? {
20933
+ footer: () => vue.createVNode("div", {
20934
+ "style": "display: flex; justify-content: flex-end;",
20935
+ "ref": footerRef
20936
+ }, null)
20937
+ } : {}
20833
20938
  }), triggerDom.value]);
20834
20939
  }
20835
20940
  });
@@ -20847,7 +20952,8 @@
20847
20952
  emits: ["update:open"],
20848
20953
  setup(props, {
20849
20954
  slots,
20850
- emit
20955
+ emit,
20956
+ expose
20851
20957
  }) {
20852
20958
  const _open = vue.ref(false);
20853
20959
  const loading = vue.ref(false);
@@ -20891,7 +20997,7 @@
20891
20997
  ...omit((_a = props.modalProps) != null ? _a : {}, ["title", "width", "footer", "onCancel", "afterClose"]),
20892
20998
  width: props.width,
20893
20999
  title: props.title,
20894
- footer: props.submitter === false ? null : void 0
21000
+ footer: props.readonly || props.submitter === false ? null : void 0
20895
21001
  });
20896
21002
  });
20897
21003
  const modalSlots = vue.computed(() => {
@@ -20961,6 +21067,7 @@
20961
21067
  (_c = (_b = formRef.value) == null ? void 0 : _b.reset) == null ? void 0 : _c.call(_b);
20962
21068
  }
20963
21069
  };
21070
+ expose(useFormExpose(formRef));
20964
21071
  const onFinishHandle = async (values) => {
20965
21072
  var _a;
20966
21073
  const response = (_a = props.onFinish) == null ? void 0 : _a.call(props, values);
@@ -20999,7 +21106,7 @@
20999
21106
  }
21000
21107
  }), {
21001
21108
  default: () => [vue.createVNode(BaseForm, vue.mergeProps(formProps.value, {
21002
- "submitter": submitterConfig.value,
21109
+ "submitter": props.readonly ? false : submitterConfig.value,
21003
21110
  "onFinish": async (values) => {
21004
21111
  const result = await onFinishHandle(values);
21005
21112
  return result;
@@ -21025,10 +21132,12 @@
21025
21132
  }
21026
21133
  }), formSlots.value)],
21027
21134
  ...modalSlots.value,
21028
- footer: props.submitter !== false && !props.readonly ? () => vue.createVNode("div", {
21029
- "style": "display: flex; justify-content: flex-end;",
21030
- "ref": footerRef
21031
- }, null) : void 0
21135
+ ...props.submitter !== false && !props.readonly ? {
21136
+ footer: () => vue.createVNode("div", {
21137
+ "style": "display: flex; justify-content: flex-end;",
21138
+ "ref": footerRef
21139
+ }, null)
21140
+ } : {}
21032
21141
  }), triggerDom.value]);
21033
21142
  }
21034
21143
  });
@@ -21077,7 +21186,7 @@
21077
21186
  const flatMapItems = (items, ignoreRules) => {
21078
21187
  return items == null ? void 0 : items.flatMap((item) => {
21079
21188
  if (item.fieldType === ProFieldType.GROUP && !item.title) {
21080
- return item.props.children;
21189
+ return item.children;
21081
21190
  }
21082
21191
  if (ignoreRules) {
21083
21192
  return {
@@ -21116,14 +21225,10 @@
21116
21225
  const {
21117
21226
  form
21118
21227
  } = useProConfigInject();
21119
- const totalSpan = vue.ref(0);
21120
- const totalSize = vue.ref(0);
21121
- const currentSpan = vue.ref(0);
21122
21228
  const intl = useIntl();
21123
21229
  const prefixCls = usePrefixCls("query-filter");
21124
21230
  const wrapEl = vue.useTemplateRef("wrapper");
21125
21231
  const formRef = vue.ref();
21126
- const processedList = vue.ref([]);
21127
21232
  const [width, setWidth] = useMergedState$1(defaultWidth);
21128
21233
  const formExpose = useFormExpose(formRef);
21129
21234
  useResizeObserver(wrapEl, useDebounceFn((entries) => {
@@ -21148,20 +21253,6 @@
21148
21253
  }
21149
21254
  return Math.max(1, 24 / spanSize.value.span - 1);
21150
21255
  });
21151
- const hiddenNum = vue.computed(() => props.showHiddenNum && processedList.value.filter((item) => item.hidden).length);
21152
- const needCollapse = vue.computed(() => {
21153
- if (totalSpan.value < 24 || totalSize.value <= showLength.value) {
21154
- return false;
21155
- }
21156
- return true;
21157
- });
21158
- const offset = vue.computed(() => {
21159
- const offsetSpan = currentSpan.value % 24 + spanSize.value.span;
21160
- if (offsetSpan > 24) {
21161
- return 24 - spanSize.value.span;
21162
- }
21163
- return 24 - offsetSpan;
21164
- });
21165
21256
  const formItemFixStyle = vue.computed(() => {
21166
21257
  var _a2, _b, _c;
21167
21258
  const labelWidth = (_c = (_b = props.labelWidth) != null ? _b : (_a2 = form == null ? void 0 : form.value) == null ? void 0 : _a2.labelWidth) != null ? _c : "80";
@@ -21188,6 +21279,80 @@
21188
21279
  emit("collapse", val);
21189
21280
  }
21190
21281
  });
21282
+ const processedResult = vue.computed(() => {
21283
+ var _a2;
21284
+ let _totalSpan = 0;
21285
+ let _totalSize = 0;
21286
+ let _currentSpan = 0;
21287
+ let list = [];
21288
+ if ((_a2 = props.items) == null ? void 0 : _a2.length) {
21289
+ let firstRowFull = false;
21290
+ list = flatMapItems(props.items, props.ignoreRules).map((item, index) => {
21291
+ var _a3;
21292
+ const colSize = (_a3 = item.colSize) != null ? _a3 : 1;
21293
+ const colSpan = Math.min(spanSize.value.span * (colSize || 1), 24);
21294
+ _totalSpan += colSpan;
21295
+ _totalSize += colSize;
21296
+ if (index === 0) {
21297
+ firstRowFull = colSpan === 24 && !item.hidden;
21298
+ }
21299
+ const hidden = item.hidden || collapsed.value && (firstRowFull || _totalSize > showLength.value) && !!index;
21300
+ if (hidden) {
21301
+ if (!props.preserve) {
21302
+ return {
21303
+ ...item,
21304
+ colProps: {
21305
+ span: 0
21306
+ },
21307
+ hidden: true
21308
+ };
21309
+ }
21310
+ return {
21311
+ ...item,
21312
+ colProps: {
21313
+ span: colSpan
21314
+ },
21315
+ hidden: true
21316
+ };
21317
+ }
21318
+ if (24 - _currentSpan % 24 < colSpan) {
21319
+ _totalSpan += 24 - _currentSpan % 24;
21320
+ _currentSpan += 24 - _currentSpan % 24;
21321
+ }
21322
+ _currentSpan += colSpan;
21323
+ return {
21324
+ ...item,
21325
+ hidden,
21326
+ formItemProps: {
21327
+ ...item.title ? formItemFixStyle.value : {},
21328
+ ...item.formItemProps
21329
+ },
21330
+ colProps: {
21331
+ span: colSpan
21332
+ }
21333
+ };
21334
+ });
21335
+ }
21336
+ return {
21337
+ list,
21338
+ totalSpan: _totalSpan,
21339
+ totalSize: _totalSize,
21340
+ currentSpan: _currentSpan
21341
+ };
21342
+ });
21343
+ const needCollapse = vue.computed(() => {
21344
+ if (processedResult.value.totalSpan < 24 || processedResult.value.totalSize <= showLength.value) {
21345
+ return false;
21346
+ }
21347
+ return true;
21348
+ });
21349
+ const offset = vue.computed(() => {
21350
+ const offsetSpan = processedResult.value.currentSpan % 24 + spanSize.value.span;
21351
+ if (offsetSpan > 24) {
21352
+ return 24 - spanSize.value.span;
21353
+ }
21354
+ return 24 - offsetSpan;
21355
+ });
21191
21356
  const formProps = vue.computed(() => {
21192
21357
  return {
21193
21358
  ...omitUndefined(omit(props, [
@@ -21238,66 +21403,7 @@
21238
21403
  }
21239
21404
  }, props.submitter);
21240
21405
  });
21241
- vue.watch([spanSize, collapsed, () => props.items], () => {
21242
- var _a2;
21243
- let firstRowFull = false;
21244
- currentSpan.value = 0;
21245
- totalSize.value = 0;
21246
- totalSpan.value = 0;
21247
- if ((_a2 = props.items) == null ? void 0 : _a2.length) {
21248
- processedList.value = flatMapItems(props.items, props.ignoreRules).map((item, index) => {
21249
- var _a3;
21250
- const colSize = (_a3 = item.colSize) != null ? _a3 : 1;
21251
- const colSpan = Math.min(spanSize.value.span * (colSize || 1), 24);
21252
- totalSpan.value += colSpan;
21253
- totalSize.value += colSize;
21254
- if (index === 0) {
21255
- firstRowFull = colSpan === 24 && !item.hidden;
21256
- }
21257
- const hidden = item.hidden || // 如果收起了
21258
- collapsed.value && (firstRowFull || // 如果 超过显示长度 且 总长度超过了 24
21259
- totalSize.value > showLength.value) && !!index;
21260
- if (hidden) {
21261
- if (!props.preserve) {
21262
- return {
21263
- ...item,
21264
- colProps: {
21265
- span: 0
21266
- },
21267
- hidden: true
21268
- };
21269
- }
21270
- return {
21271
- ...item,
21272
- colProps: {
21273
- span: colSpan
21274
- },
21275
- hidden: true
21276
- };
21277
- }
21278
- if (24 - currentSpan.value % 24 < colSpan) {
21279
- totalSpan.value += 24 - currentSpan.value % 24;
21280
- currentSpan.value += 24 - currentSpan.value % 24;
21281
- }
21282
- currentSpan.value += colSpan;
21283
- return {
21284
- ...item,
21285
- hidden,
21286
- formItemProps: {
21287
- ...item.title ? formItemFixStyle.value : {},
21288
- ...item.formItemProps
21289
- },
21290
- colProps: {
21291
- span: colSpan
21292
- }
21293
- };
21294
- });
21295
- } else {
21296
- processedList.value = [];
21297
- }
21298
- }, {
21299
- immediate: true
21300
- });
21406
+ const hiddenNum = vue.computed(() => props.showHiddenNum && processedResult.value.list.filter((item) => item.hidden).length);
21301
21407
  expose({
21302
21408
  formRef,
21303
21409
  ...formExpose
@@ -21321,7 +21427,7 @@
21321
21427
  "isKeyPressSubmit": (_a2 = props.isKeyPressSubmit) != null ? _a2 : true,
21322
21428
  "showLoading": false,
21323
21429
  "submitter": submitterConfig.value,
21324
- "items": processedList.value,
21430
+ "items": processedResult.value.list,
21325
21431
  "layout": spanSize.value.layout,
21326
21432
  "onReset": (values) => {
21327
21433
  var _a3, _b, _c, _d;
@@ -24076,6 +24182,7 @@
24076
24182
  showHeaderScrollbar: Boolean,
24077
24183
  deepWatchDataSource: Boolean,
24078
24184
  deepWatchColumns: Boolean,
24185
+ perf: Boolean,
24079
24186
  prefixCls: String,
24080
24187
  columnDrag: {
24081
24188
  type: Boolean,
@@ -25584,6 +25691,121 @@
25584
25691
  frame && cancelRequestAnimationFrame(frame.id);
25585
25692
  };
25586
25693
 
25694
+ const PERF_KEY = Symbol("TablePerf");
25695
+ const MAX_ENTRIES = 200;
25696
+ const NOOP = () => {
25697
+ };
25698
+ const NOOP_CTX = {
25699
+ enabled: vue.shallowRef(false),
25700
+ metrics: vue.shallowRef({ entries: [], memory: null, scrollEventsPerSec: 0, fps: 0 }),
25701
+ markStart: NOOP,
25702
+ markEnd: NOOP,
25703
+ captureMemory: NOOP,
25704
+ recordScrollEvent: NOOP
25705
+ };
25706
+ let _activeCtx = NOOP_CTX;
25707
+ function createPerfContext(enabled) {
25708
+ const metrics = vue.shallowRef({
25709
+ entries: [],
25710
+ memory: null,
25711
+ scrollEventsPerSec: 0,
25712
+ fps: 0
25713
+ });
25714
+ let scrollCount = 0;
25715
+ let frameCount = 0;
25716
+ let lastFpsTime = 0;
25717
+ const pendingMarks = /* @__PURE__ */ new Map();
25718
+ const fpsLoop = (now) => {
25719
+ frameCount++;
25720
+ if (now - lastFpsTime >= 1e3) {
25721
+ const current = metrics.value;
25722
+ metrics.value = {
25723
+ ...current,
25724
+ fps: frameCount,
25725
+ scrollEventsPerSec: scrollCount
25726
+ };
25727
+ frameCount = 0;
25728
+ scrollCount = 0;
25729
+ lastFpsTime = now;
25730
+ }
25731
+ if (enabled.value) {
25732
+ requestAnimationFrame(fpsLoop);
25733
+ }
25734
+ };
25735
+ const start = () => {
25736
+ lastFpsTime = performance.now();
25737
+ frameCount = 0;
25738
+ scrollCount = 0;
25739
+ requestAnimationFrame(fpsLoop);
25740
+ };
25741
+ const markStart = (label) => {
25742
+ if (!enabled.value) return;
25743
+ pendingMarks.set(label, performance.now());
25744
+ };
25745
+ const markEnd = (label) => {
25746
+ if (!enabled.value) return;
25747
+ const startTime = pendingMarks.get(label);
25748
+ if (startTime === void 0) return;
25749
+ pendingMarks.delete(label);
25750
+ const duration = performance.now() - startTime;
25751
+ const current = metrics.value;
25752
+ const entries = current.entries.length >= MAX_ENTRIES ? current.entries.slice(-MAX_ENTRIES + 1) : [...current.entries];
25753
+ entries.push({ label, duration, timestamp: Date.now() });
25754
+ metrics.value = { ...current, entries };
25755
+ };
25756
+ const captureMemory = (rows, cells) => {
25757
+ var _a, _b, _c;
25758
+ if (!enabled.value) return;
25759
+ const mem = performance.memory;
25760
+ const current = metrics.value;
25761
+ metrics.value = {
25762
+ ...current,
25763
+ memory: {
25764
+ usedJSHeapSize: (_a = mem == null ? void 0 : mem.usedJSHeapSize) != null ? _a : 0,
25765
+ totalJSHeapSize: (_b = mem == null ? void 0 : mem.totalJSHeapSize) != null ? _b : 0,
25766
+ jsHeapSizeLimit: (_c = mem == null ? void 0 : mem.jsHeapSizeLimit) != null ? _c : 0,
25767
+ renderedRows: rows,
25768
+ renderedCells: cells,
25769
+ timestamp: Date.now()
25770
+ }
25771
+ };
25772
+ };
25773
+ const recordScrollEvent = () => {
25774
+ if (!enabled.value) return;
25775
+ scrollCount++;
25776
+ };
25777
+ if (enabled.value) start();
25778
+ const ctx = {
25779
+ enabled,
25780
+ metrics,
25781
+ markStart,
25782
+ markEnd,
25783
+ captureMemory,
25784
+ recordScrollEvent
25785
+ };
25786
+ _activeCtx = ctx;
25787
+ return ctx;
25788
+ }
25789
+ function providePerfContext(ctx) {
25790
+ vue.provide(PERF_KEY, ctx);
25791
+ }
25792
+ function usePerf() {
25793
+ const injected = vue.inject(PERF_KEY, null);
25794
+ if (injected) return injected;
25795
+ return {
25796
+ get enabled() {
25797
+ return _activeCtx.enabled;
25798
+ },
25799
+ get metrics() {
25800
+ return _activeCtx.metrics;
25801
+ },
25802
+ markStart: (l) => _activeCtx.markStart(l),
25803
+ markEnd: (l) => _activeCtx.markEnd(l),
25804
+ captureMemory: (r, c) => _activeCtx.captureMemory(r, c),
25805
+ recordScrollEvent: () => _activeCtx.recordScrollEvent()
25806
+ };
25807
+ }
25808
+
25587
25809
  const HScrollSymbolKey = Symbol("HScrollSymbolKey");
25588
25810
  const useHScrollSyncProvide = ({
25589
25811
  scrollLeft,
@@ -25591,6 +25813,7 @@
25591
25813
  onScroll,
25592
25814
  bodyWidth
25593
25815
  }) => {
25816
+ const perf = usePerf();
25594
25817
  const domsSet = /* @__PURE__ */ new Set();
25595
25818
  const setAllDoms = (scrollLeft2) => {
25596
25819
  const left = Math.max(0, Math.min(scrollLeft2, maxScrollLeft.value));
@@ -25603,6 +25826,7 @@
25603
25826
  var _a;
25604
25827
  const left = (_a = e.target) == null ? void 0 : _a.scrollLeft;
25605
25828
  if (left !== scrollLeft.value) {
25829
+ perf.recordScrollEvent();
25606
25830
  setAllDoms(left);
25607
25831
  scrollLeft.value = left;
25608
25832
  onScroll(e);
@@ -25613,6 +25837,7 @@
25613
25837
  const left = (_a = e.target) == null ? void 0 : _a.scrollLeft;
25614
25838
  if (left !== scrollLeft.value) {
25615
25839
  raf.cancel(rafFrame);
25840
+ perf.recordScrollEvent();
25616
25841
  rafFrame = raf(() => {
25617
25842
  scrollLeft.value = left;
25618
25843
  onScroll(e);
@@ -25668,6 +25893,7 @@
25668
25893
  updateAnimate,
25669
25894
  bodyWidth
25670
25895
  }) => {
25896
+ const perf = usePerf();
25671
25897
  const domsSet = /* @__PURE__ */ new Set();
25672
25898
  const setAllDoms = (scrollTop2) => {
25673
25899
  const top = Math.max(0, Math.min(scrollTop2, maxScrollTop.value));
@@ -25680,6 +25906,7 @@
25680
25906
  var _a;
25681
25907
  const top = (_a = e.target) == null ? void 0 : _a.scrollTop;
25682
25908
  if (top !== scrollTop.value) {
25909
+ perf.recordScrollEvent();
25683
25910
  updateAnimate();
25684
25911
  setAllDoms(top);
25685
25912
  scrollTop.value = top;
@@ -25703,6 +25930,7 @@
25703
25930
  const top = (_a = e.target) == null ? void 0 : _a.scrollTop;
25704
25931
  if (top !== scrollTop.value) {
25705
25932
  raf.cancel(rafFrame);
25933
+ perf.recordScrollEvent();
25706
25934
  updateAnimate();
25707
25935
  rafFrame = raf(() => {
25708
25936
  scrollTop.value = top;
@@ -26260,43 +26488,68 @@
26260
26488
  }
26261
26489
  target.__resizeObserver__rect = { width: newWidth, height: newHeight };
26262
26490
  }
26263
- function resizeDisconnect(el) {
26264
- if (el.__resizeObserver__listeners) {
26265
- el.__resizeObserver__listeners.unobserve(el);
26266
- el.__resizeObserver__listeners.disconnect();
26267
- el.__resizeObserver__listeners = null;
26491
+ const sharedObservers = {};
26492
+ const observerRefCounts = {};
26493
+ function getSharedObserver(arg) {
26494
+ const key = arg || "__default__";
26495
+ if (!sharedObservers[key]) {
26496
+ sharedObservers[key] = new index((entries) => {
26497
+ for (let i = 0; i < entries.length; i++) {
26498
+ const entry = entries[i];
26499
+ const target = entry.target;
26500
+ resizeHandler(
26501
+ target,
26502
+ target.__resizeObserver__arg,
26503
+ entry.contentRect,
26504
+ target.__resizeObserver__rect || {}
26505
+ );
26506
+ }
26507
+ });
26508
+ observerRefCounts[key] = 0;
26268
26509
  }
26510
+ return sharedObservers[key];
26269
26511
  }
26270
- function resizeCallbackFactory(arg) {
26271
- return function(entries) {
26272
- const target = entries[0].target;
26273
- resizeHandler(target, arg, target.getBoundingClientRect(), target.__resizeObserver__rect || {});
26274
- };
26512
+ function sharedObserve(el, arg) {
26513
+ const key = arg || "__default__";
26514
+ el.__resizeObserver__arg = arg;
26515
+ const observer = getSharedObserver(arg);
26516
+ observer.observe(el);
26517
+ observerRefCounts[key] = (observerRefCounts[key] || 0) + 1;
26518
+ }
26519
+ function sharedUnobserve(el, arg) {
26520
+ const key = arg || "__default__";
26521
+ const observer = sharedObservers[key];
26522
+ if (observer) {
26523
+ observer.unobserve(el);
26524
+ observerRefCounts[key]--;
26525
+ if (observerRefCounts[key] <= 0) {
26526
+ observer.disconnect();
26527
+ delete sharedObservers[key];
26528
+ delete observerRefCounts[key];
26529
+ }
26530
+ }
26531
+ el.__resizeObserver__arg = void 0;
26275
26532
  }
26276
26533
  const resize = {
26277
26534
  created(el, binding) {
26278
26535
  const { arg, value = true } = binding;
26279
26536
  if (value) {
26280
- const resizeObserver = new index(resizeCallbackFactory(arg));
26281
- resizeObserver.observe(el);
26282
- el.__resizeObserver__listeners = resizeObserver;
26537
+ sharedObserve(el, arg);
26283
26538
  }
26284
26539
  },
26285
26540
  updated(el, binding) {
26286
26541
  const { arg, value = true } = binding;
26287
- if (value && !el.__resizeObserver__listeners) {
26288
- const resizeObserver = new index(resizeCallbackFactory(arg));
26289
- resizeObserver.observe(el);
26290
- el.__resizeObserver__listeners = resizeObserver;
26291
- } else if (!value) {
26292
- resizeDisconnect(el);
26542
+ if (value && el.__resizeObserver__arg === void 0) {
26543
+ sharedObserve(el, arg);
26544
+ } else if (!value && el.__resizeObserver__arg !== void 0) {
26545
+ sharedUnobserve(el, arg);
26293
26546
  }
26294
26547
  },
26295
26548
  beforeUnmount(el, binding) {
26296
26549
  const { arg, value = true } = binding;
26297
26550
  if (value) {
26298
26551
  resizeHandler(el, arg, { width: 0, height: 0 }, el.__resizeObserver__rect || {});
26299
- resizeDisconnect(el);
26552
+ sharedUnobserve(el, arg);
26300
26553
  }
26301
26554
  }
26302
26555
  };
@@ -27630,6 +27883,7 @@
27630
27883
  }
27631
27884
 
27632
27885
  function useCal(props, flattenData, scrollHeight, scrollTop, virtual, keyEntities) {
27886
+ const perf = usePerf();
27633
27887
  const rowPosition = vue.shallowRef([]);
27634
27888
  const rowHeights = vue.shallowRef({});
27635
27889
  const mergedRowHeights = vue.shallowRef({});
@@ -27734,6 +27988,7 @@
27734
27988
  raf.cancel(refreshRaf);
27735
27989
  refreshRaf = raf(
27736
27990
  () => {
27991
+ perf.markStart("rowPositionRecalc");
27737
27992
  const defaultHeight = currentSizeHeight.value;
27738
27993
  const crhs = currentRowHeights.value;
27739
27994
  const rhs = rowHeights.value;
@@ -27753,6 +28008,7 @@
27753
28008
  mergedRowHeights.value = newMergedRowHeights;
27754
28009
  viewportHeight.value = newViewportHeight;
27755
28010
  rowPosition.value = newRowPosition;
28011
+ perf.markEnd("rowPositionRecalc");
27756
28012
  },
27757
28013
  isRaf.value ? 0 : 1
27758
28014
  );
@@ -27763,6 +28019,7 @@
27763
28019
  });
27764
28020
  const calculationRowHeights = (data) => {
27765
28021
  var _a, _b;
28022
+ perf.markStart("calculationRowHeights");
27766
28023
  const newRowHeights = {};
27767
28024
  const defaultHeight = currentSizeHeight.value;
27768
28025
  const newCurrentRowHeights = {};
@@ -27795,6 +28052,7 @@
27795
28052
  }
27796
28053
  rowHeights.value = newRowHeights;
27797
28054
  currentRowHeights.value = newCurrentRowHeights;
28055
+ perf.markEnd("calculationRowHeights");
27798
28056
  };
27799
28057
  vue.watch(
27800
28058
  [flattenData, mergeRowHeight],
@@ -28121,6 +28379,7 @@
28121
28379
  function useData(_props, rowPosition, flattenData, startIndex, endIndex, draggingRowKey, useAnimate, getRowFlattenIndexByKey, latestRangeStartCell) {
28122
28380
  const data = vue.shallowRef([]);
28123
28381
  const pos = vue.shallowRef([]);
28382
+ const perf = usePerf();
28124
28383
  let rowKeyIndexMap = {};
28125
28384
  let exchange = true;
28126
28385
  vue.watch(
@@ -28130,6 +28389,7 @@
28130
28389
  if (flattenData.value.length !== rowPosition.value.length) {
28131
28390
  return;
28132
28391
  }
28392
+ perf.markStart("useData-slice");
28133
28393
  const newData = [];
28134
28394
  const newPos = [];
28135
28395
  const recordPositionArr = [];
@@ -28184,6 +28444,7 @@
28184
28444
  rowKeyIndexMap = newRowKeyIndexMap;
28185
28445
  data.value = newData;
28186
28446
  pos.value = newPos;
28447
+ perf.markEnd("useData-slice");
28187
28448
  },
28188
28449
  { immediate: true }
28189
28450
  );
@@ -28236,16 +28497,37 @@
28236
28497
  const allCellProps = vue.shallowRef({});
28237
28498
  const hasMultiRowSpanInfo = vue.shallowRef({});
28238
28499
  const centerRowColumnsMap = vue.shallowRef(/* @__PURE__ */ new Map());
28500
+ const perf = usePerf();
28501
+ const EMPTY_OBJ = Object.freeze({});
28502
+ const cellPropsCache = /* @__PURE__ */ new Map();
28503
+ let prevLeftCols = [];
28504
+ let prevRightCols = [];
28505
+ let prevCenterCols = [];
28506
+ let prevAllCols = [];
28507
+ let prevBodyWidth = 0;
28508
+ let prevLeftWidth = 0;
28509
+ let prevCenterWidth = 0;
28510
+ let prevCustomCell = void 0;
28511
+ let prevMergedRowHeights = {};
28239
28512
  const computedCellProps = (offsetLeft, column, rowIndex, record, overflow) => {
28240
- var _a, _b, _c, _d;
28513
+ var _a, _b, _c;
28241
28514
  const { customRender, originColumn, dataIndex, columnIndex, left, customCell } = column;
28242
28515
  const cellProps = {};
28243
- const customCellProps = (_b = (_a = customCell || contextCustomCell.value) == null ? void 0 : _a({ record, rowIndex, column })) != null ? _b : {};
28244
- const mergeCellStyles = Object.assign(
28245
- { overflow },
28246
- parseStyleText(customCellProps.style || {})
28247
- );
28248
- const copyCustomCellProps = Object.assign({}, customCellProps);
28516
+ const hasCustomCell = !!(customCell || contextCustomCell.value);
28517
+ const customCellProps = hasCustomCell ? (_a = (customCell || contextCustomCell.value)({ record, rowIndex, column })) != null ? _a : EMPTY_OBJ : EMPTY_OBJ;
28518
+ if (customCellProps === EMPTY_OBJ && !customRender) {
28519
+ const { width: width2 } = getColumnPosition(columnIndex, 1);
28520
+ const style = {
28521
+ overflow,
28522
+ width: `${width2}px`,
28523
+ left: `${left - offsetLeft}px`
28524
+ };
28525
+ if (width2 === 0) style.display = "none";
28526
+ cellProps.props = { colSpan: 1, rowSpan: 1, style };
28527
+ return cellProps;
28528
+ }
28529
+ const mergeCellStyles = customCellProps !== EMPTY_OBJ ? Object.assign({ overflow }, parseStyleText(customCellProps.style || {})) : { overflow };
28530
+ const copyCustomCellProps = customCellProps !== EMPTY_OBJ ? Object.assign({}, customCellProps) : {};
28249
28531
  if (customRender) {
28250
28532
  const value = getPathValue(record, dataIndex);
28251
28533
  const customCellRender = customRender({
@@ -28266,8 +28548,8 @@
28266
28548
  cellProps.children = customCellRender;
28267
28549
  }
28268
28550
  }
28269
- copyCustomCellProps.colSpan = (_c = copyCustomCellProps.colSpan) != null ? _c : 1;
28270
- copyCustomCellProps.rowSpan = (_d = copyCustomCellProps.rowSpan) != null ? _d : 1;
28551
+ copyCustomCellProps.colSpan = (_b = copyCustomCellProps.colSpan) != null ? _b : 1;
28552
+ copyCustomCellProps.rowSpan = (_c = copyCustomCellProps.rowSpan) != null ? _c : 1;
28271
28553
  const { width } = getColumnPosition(columnIndex, copyCustomCellProps.colSpan);
28272
28554
  Object.assign(mergeCellStyles, { width: `${width}px`, left: left - offsetLeft + "px" });
28273
28555
  if (width === 0) {
@@ -28285,6 +28567,29 @@
28285
28567
  return cellProps;
28286
28568
  };
28287
28569
  vue.watchEffect(() => {
28570
+ perf.markStart("useCellProps");
28571
+ const curLeft = leftColumns.value;
28572
+ const curRight = rightColumns.value;
28573
+ const curCenter = visibleCenterColumns.value;
28574
+ const curAll = allColumns.value;
28575
+ const curBodyW = bodyWidth.value;
28576
+ const curLeftW = leftWidth.value;
28577
+ const curCenterW = centerWidth.value;
28578
+ const curCustomCell = contextCustomCell.value;
28579
+ const curMergedH = mergedRowHeights.value;
28580
+ const columnsChanged = curLeft !== prevLeftCols || curRight !== prevRightCols || curCenter !== prevCenterCols || curAll !== prevAllCols || curBodyW !== prevBodyWidth || curLeftW !== prevLeftWidth || curCenterW !== prevCenterWidth || curCustomCell !== prevCustomCell || curMergedH !== prevMergedRowHeights;
28581
+ if (columnsChanged) {
28582
+ cellPropsCache.clear();
28583
+ prevLeftCols = curLeft;
28584
+ prevRightCols = curRight;
28585
+ prevCenterCols = curCenter;
28586
+ prevAllCols = curAll;
28587
+ prevBodyWidth = curBodyW;
28588
+ prevLeftWidth = curLeftW;
28589
+ prevCenterWidth = curCenterW;
28590
+ prevCustomCell = curCustomCell;
28591
+ prevMergedRowHeights = curMergedH;
28592
+ }
28288
28593
  const rawAllCellProps = {};
28289
28594
  const rawRowSpanInfo = {};
28290
28595
  const genAllCellProps = (index, offsetLeft, finallyColumns, rowKey, rowIndex, record, overflow, rowColumnsMap2) => {
@@ -28337,8 +28642,15 @@
28337
28642
  for (let i = 0; i < len; i++) {
28338
28643
  if (!data.value[i]) continue;
28339
28644
  const { record, isExpandRow, rowKey, rowIndex } = data.value[i];
28340
- rawAllCellProps[rowKey] = {};
28341
28645
  const overflow = mergedRowHeights.value[rowKey] ? "hidden" : "initial";
28646
+ const cached = cellPropsCache.get(rowKey);
28647
+ if (cached && cached.overflow === overflow) {
28648
+ rawAllCellProps[rowKey] = cached.cellProps;
28649
+ if (cached.hasRowSpan) rawRowSpanInfo[rowKey] = true;
28650
+ if (cached.centerColumns) rowColumnsMap.set(rowKey, cached.centerColumns);
28651
+ continue;
28652
+ }
28653
+ rawAllCellProps[rowKey] = {};
28342
28654
  if (isExpandRow) {
28343
28655
  rawAllCellProps[rowKey][ExpandColumnKey] = {
28344
28656
  props: {
@@ -28367,10 +28679,24 @@
28367
28679
  overflow
28368
28680
  );
28369
28681
  }
28682
+ cellPropsCache.set(rowKey, {
28683
+ cellProps: rawAllCellProps[rowKey],
28684
+ hasRowSpan: !!rawRowSpanInfo[rowKey],
28685
+ centerColumns: rowColumnsMap.get(rowKey),
28686
+ overflow
28687
+ });
28370
28688
  }
28371
28689
  allCellProps.value = rawAllCellProps;
28372
28690
  hasMultiRowSpanInfo.value = rawRowSpanInfo;
28373
28691
  centerRowColumnsMap.value = rowColumnsMap;
28692
+ if (perf.enabled.value) {
28693
+ const totalCells = Object.values(rawAllCellProps).reduce(
28694
+ (sum, row) => sum + Object.keys(row).length,
28695
+ 0
28696
+ );
28697
+ perf.captureMemory(len, totalCells);
28698
+ }
28699
+ perf.markEnd("useCellProps");
28374
28700
  });
28375
28701
  return { allCellProps, hasMultiRowSpanInfo, centerRowColumnsMap };
28376
28702
  };
@@ -34655,21 +34981,12 @@
34655
34981
  return summaryStyle.value;
34656
34982
  });
34657
34983
  const emptyStyle = vue.computed(() => ({ width: `${props.bodyWidth}px` }));
34658
- useResizeObserver(
34659
- measureDomRef,
34660
- useDebounceFn((entries) => {
34661
- var _a;
34662
- const contentRect = (_a = entries[0]) == null ? void 0 : _a.contentRect;
34663
- emit("update:bodyWidth", (contentRect == null ? void 0 : contentRect.width) || 0);
34664
- emit("update:bodyHeight", (contentRect == null ? void 0 : contentRect.height) || 0);
34665
- }, 100)
34666
- );
34667
- const handleBodyInnerResize = useDebounceFn((e) => {
34668
- bodyInnerWidth.value = e.detail.width;
34669
- }, 100);
34670
- const handleBodyScrollResize = (e) => {
34671
- emit("update:bodyScrollWidth", e.detail.width);
34672
- };
34984
+ useResizeObserver(measureDomRef, (entries) => {
34985
+ var _a;
34986
+ const contentRect = (_a = entries[0]) == null ? void 0 : _a.contentRect;
34987
+ emit("update:bodyWidth", (contentRect == null ? void 0 : contentRect.width) || 0);
34988
+ emit("update:bodyHeight", (contentRect == null ? void 0 : contentRect.height) || 0);
34989
+ });
34673
34990
  return {
34674
34991
  bodyContainerStyle,
34675
34992
  measureDomStyle: vue.computed(() => ({
@@ -34713,8 +35030,12 @@
34713
35030
  centerColumns,
34714
35031
  rightColumns,
34715
35032
  bodyInnerWidth,
34716
- handleBodyInnerResize,
34717
- handleBodyScrollResize,
35033
+ handleBodyInnerResize: (e) => {
35034
+ bodyInnerWidth.value = e.detail.width;
35035
+ },
35036
+ handleBodyScrollResize: (e) => {
35037
+ emit("update:bodyScrollWidth", e.detail.width);
35038
+ },
34718
35039
  bodyRef,
34719
35040
  measureDomRef,
34720
35041
  bodyInnerRef,
@@ -35361,6 +35682,9 @@
35361
35682
  slots: {},
35362
35683
  setup(props, { expose, emit, slots }) {
35363
35684
  const { table } = useProConfigInject();
35685
+ const perfEnabled = vue.shallowRef(!!props.perf);
35686
+ const perfContext = createPerfContext(perfEnabled);
35687
+ providePerfContext(perfContext);
35364
35688
  const counter = useInjectContainer();
35365
35689
  const rowKey = vue.computed(() => {
35366
35690
  var _a, _b, _c;
@@ -37677,7 +38001,7 @@
37677
38001
  [`${props.prefixCls}-card-bordered`]: isCard.value && isBordered("search", props.cardBordered)
37678
38002
  }));
37679
38003
  return () => {
37680
- var _a, _b;
38004
+ var _a;
37681
38005
  return vue.createVNode("div", {
37682
38006
  "class": className.value,
37683
38007
  "style": {
@@ -37689,27 +38013,27 @@
37689
38013
  "items": props.items,
37690
38014
  "loading": props.loading,
37691
38015
  "style": {
37692
- marginBlockEnd: ((_a = props.search) == null ? void 0 : _a.cardProps) !== false && props.tableShowCard ? 0 : "16px",
37693
- ...(_b = props.search) == null ? void 0 : _b.style
38016
+ marginBlockEnd: isCard.value ? 0 : "16px",
38017
+ ...(_a = props.search) == null ? void 0 : _a.style
37694
38018
  },
37695
38019
  "onReset": props.onReset,
37696
38020
  "onFinish": (values) => {
37697
- var _a2, _b2;
38021
+ var _a2, _b;
37698
38022
  submit(values, false);
37699
- (_b2 = (_a2 = props.search) == null ? void 0 : _a2.onFinish) == null ? void 0 : _b2.call(_a2, values);
38023
+ (_b = (_a2 = props.search) == null ? void 0 : _a2.onFinish) == null ? void 0 : _b.call(_a2, values);
37700
38024
  },
37701
38025
  "onValuesChange": (values) => {
37702
- var _a2, _b2, _c;
38026
+ var _a2, _b, _c;
37703
38027
  if (((_a2 = props.search) == null ? void 0 : _a2.submitter) === false) {
37704
38028
  submit(values, true);
37705
38029
  }
37706
- (_c = (_b2 = props.search) == null ? void 0 : _b2.onValuesChange) == null ? void 0 : _c.call(_b2, values);
38030
+ (_c = (_b = props.search) == null ? void 0 : _b.onValuesChange) == null ? void 0 : _c.call(_b, values);
37707
38031
  },
37708
38032
  "onInit": (values, action) => {
37709
- var _a2, _b2, _c;
38033
+ var _a2, _b, _c;
37710
38034
  submit(values, true);
37711
38035
  (_a2 = props.setFormAction) == null ? void 0 : _a2.call(props, action);
37712
- (_c = (_b2 = props.search) == null ? void 0 : _b2.onInit) == null ? void 0 : _c.call(_b2, values, action);
38036
+ (_c = (_b = props.search) == null ? void 0 : _b.onInit) == null ? void 0 : _c.call(_b, values, action);
37713
38037
  },
37714
38038
  "onCollapse": props.onCollapse
37715
38039
  }), slots)]);
@@ -37998,11 +38322,11 @@
37998
38322
  return false;
37999
38323
  });
38000
38324
  const showTableCard = vue.computed(() => {
38001
- var _a2, _b2;
38325
+ var _a2, _b2, _c;
38002
38326
  if (counter.hasFullScreen.value) {
38003
38327
  return false;
38004
38328
  }
38005
- return !!((_b2 = props.cardProps) != null ? _b2 : (_a2 = table == null ? void 0 : table.value) == null ? void 0 : _a2.cardProps) && !notNeedCardDom.value;
38329
+ return !!((_c = (_b2 = props.cardProps) != null ? _b2 : (_a2 = table == null ? void 0 : table.value) == null ? void 0 : _a2.cardProps) != null ? _c : true) && !notNeedCardDom.value;
38006
38330
  });
38007
38331
  const cardBodyStyle = vue.computed(() => {
38008
38332
  if (!showTableCard.value) return {};