pro-design-vue 1.0.0-rc.12 → 1.0.0-rc.14

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 (164) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +211 -132
  3. package/dist/index.full.min.js +8 -8
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +8 -8
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +211 -132
  8. package/es/components/form/src/Form.d.ts +1 -1
  9. package/es/components/form/src/base/BaseForm.d.ts +1 -1
  10. package/es/components/form/src/base/BaseForm.mjs +4 -3
  11. package/es/components/form/src/base/BaseForm.mjs.map +1 -1
  12. package/es/components/form/src/base/StepForm.d.ts +1 -1
  13. package/es/components/form/src/components/FormGroup.d.ts +3 -1
  14. package/es/components/form/src/components/FormItem.mjs +20 -22
  15. package/es/components/form/src/components/FormItem.mjs.map +1 -1
  16. package/es/components/form/src/components/FormList.d.ts +3 -1
  17. package/es/components/form/src/components/FormListContainer.d.ts +3 -1
  18. package/es/components/form/src/components/FormSet.d.ts +3 -1
  19. package/es/components/form/src/components/FormSubmitter.d.ts +2 -2
  20. package/es/components/form/src/components/FormSubmitter.mjs +25 -7
  21. package/es/components/form/src/components/FormSubmitter.mjs.map +1 -1
  22. package/es/components/form/src/components/FormTitle.d.ts +3 -1
  23. package/es/components/form/src/layouts/DrawerForm.d.ts +1 -1
  24. package/es/components/form/src/layouts/ModalForm.d.ts +1 -1
  25. package/es/components/form/src/layouts/QueryFilter.d.ts +1 -1
  26. package/es/components/form/src/layouts/QueryFilter.mjs +1 -2
  27. package/es/components/form/src/layouts/QueryFilter.mjs.map +1 -1
  28. package/es/components/form/src/layouts/StepsForm.d.ts +1 -1
  29. package/es/components/form/src/layouts/StepsForm.mjs +3 -7
  30. package/es/components/form/src/layouts/StepsForm.mjs.map +1 -1
  31. package/es/components/form/src/type.d.ts +17 -8
  32. package/es/components/table/src/components/Body/Body.vue.mjs.map +1 -1
  33. package/es/components/table/src/components/Body/Body.vue2.mjs +1 -2
  34. package/es/components/table/src/components/Body/Body.vue2.mjs.map +1 -1
  35. package/es/components/table/src/components/Body/BodyCell.mjs +1 -1
  36. package/es/components/table/src/components/Body/BodyCell.mjs.map +1 -1
  37. package/es/components/table/src/components/Body/BodyRow.vue.mjs.map +1 -1
  38. package/es/components/table/src/components/Body/BodyRow.vue2.mjs +3 -3
  39. package/es/components/table/src/components/Body/BodyRow.vue2.mjs.map +1 -1
  40. package/es/components/table/src/components/Drag/RowHandler.vue.mjs.map +1 -1
  41. package/es/components/table/src/components/Drag/RowHandler.vue2.mjs +17 -16
  42. package/es/components/table/src/components/Drag/RowHandler.vue2.mjs.map +1 -1
  43. package/es/components/table/src/components/Header/HeaderCellTitle.vue.mjs +18 -6
  44. package/es/components/table/src/components/Header/HeaderCellTitle.vue.mjs.map +1 -1
  45. package/es/components/table/src/components/Header/HeaderCellTitle.vue2.mjs +1 -0
  46. package/es/components/table/src/components/Header/HeaderCellTitle.vue2.mjs.map +1 -1
  47. package/es/components/table/src/components/Header/HeaderExtraCell.vue.mjs.map +1 -1
  48. package/es/components/table/src/components/Header/HeaderExtraCell.vue2.mjs +1 -0
  49. package/es/components/table/src/components/Header/HeaderExtraCell.vue2.mjs.map +1 -1
  50. package/es/components/table/src/components/InteralTable.vue.d.ts +18 -0
  51. package/es/components/table/src/components/InteralTable.vue.mjs.map +1 -1
  52. package/es/components/table/src/components/InteralTable.vue2.mjs +11 -5
  53. package/es/components/table/src/components/InteralTable.vue2.mjs.map +1 -1
  54. package/es/components/table/src/components/Table.d.ts +22 -4
  55. package/es/components/table/src/components/Table.mjs +47 -13
  56. package/es/components/table/src/components/Table.mjs.map +1 -1
  57. package/es/components/table/src/components/interface.d.ts +30 -3
  58. package/es/components/table/src/components/interface.mjs +9 -1
  59. package/es/components/table/src/components/interface.mjs.map +1 -1
  60. package/es/components/table/src/hooks/useCellProps.mjs +3 -1
  61. package/es/components/table/src/hooks/useCellProps.mjs.map +1 -1
  62. package/es/components/table/src/hooks/useContainer.mjs +1 -1
  63. package/es/components/table/src/hooks/useContainer.mjs.map +1 -1
  64. package/es/components/table/src/hooks/useFetchData.mjs +2 -1
  65. package/es/components/table/src/hooks/useFetchData.mjs.map +1 -1
  66. package/es/components/table/src/hooks/useHover.d.ts +3 -0
  67. package/es/components/table/src/hooks/useHover.mjs +3 -1
  68. package/es/components/table/src/hooks/useHover.mjs.map +1 -1
  69. package/es/components/table/src/hooks/usePagination.d.ts +1 -0
  70. package/es/components/table/src/hooks/usePagination.mjs +7 -2
  71. package/es/components/table/src/hooks/usePagination.mjs.map +1 -1
  72. package/es/components/table/src/utils/genProColumnToColumn.mjs +6 -4
  73. package/es/components/table/src/utils/genProColumnToColumn.mjs.map +1 -1
  74. package/es/components/table/src/utils/util.d.ts +1 -1
  75. package/es/components/table/src/utils/util.mjs +1 -1
  76. package/es/components/table/src/utils/util.mjs.map +1 -1
  77. package/es/index.d.ts +54 -16
  78. package/es/utils/validate.d.ts +1 -1
  79. package/es/utils/validate.mjs +1 -1
  80. package/es/utils/validate.mjs.map +1 -1
  81. package/es/version.d.ts +1 -1
  82. package/es/version.mjs +1 -1
  83. package/es/version.mjs.map +1 -1
  84. package/lib/components/form/src/Form.d.ts +1 -1
  85. package/lib/components/form/src/base/BaseForm.d.ts +1 -1
  86. package/lib/components/form/src/base/BaseForm.js +4 -3
  87. package/lib/components/form/src/base/BaseForm.js.map +1 -1
  88. package/lib/components/form/src/base/StepForm.d.ts +1 -1
  89. package/lib/components/form/src/components/FormGroup.d.ts +3 -1
  90. package/lib/components/form/src/components/FormItem.js +20 -22
  91. package/lib/components/form/src/components/FormItem.js.map +1 -1
  92. package/lib/components/form/src/components/FormList.d.ts +3 -1
  93. package/lib/components/form/src/components/FormListContainer.d.ts +3 -1
  94. package/lib/components/form/src/components/FormSet.d.ts +3 -1
  95. package/lib/components/form/src/components/FormSubmitter.d.ts +2 -2
  96. package/lib/components/form/src/components/FormSubmitter.js +25 -7
  97. package/lib/components/form/src/components/FormSubmitter.js.map +1 -1
  98. package/lib/components/form/src/components/FormTitle.d.ts +3 -1
  99. package/lib/components/form/src/layouts/DrawerForm.d.ts +1 -1
  100. package/lib/components/form/src/layouts/ModalForm.d.ts +1 -1
  101. package/lib/components/form/src/layouts/QueryFilter.d.ts +1 -1
  102. package/lib/components/form/src/layouts/QueryFilter.js +1 -2
  103. package/lib/components/form/src/layouts/QueryFilter.js.map +1 -1
  104. package/lib/components/form/src/layouts/StepsForm.d.ts +1 -1
  105. package/lib/components/form/src/layouts/StepsForm.js +3 -7
  106. package/lib/components/form/src/layouts/StepsForm.js.map +1 -1
  107. package/lib/components/form/src/type.d.ts +17 -8
  108. package/lib/components/table/src/components/Body/Body.vue.js.map +1 -1
  109. package/lib/components/table/src/components/Body/Body.vue2.js +1 -2
  110. package/lib/components/table/src/components/Body/Body.vue2.js.map +1 -1
  111. package/lib/components/table/src/components/Body/BodyCell.js +1 -1
  112. package/lib/components/table/src/components/Body/BodyCell.js.map +1 -1
  113. package/lib/components/table/src/components/Body/BodyRow.vue.js.map +1 -1
  114. package/lib/components/table/src/components/Body/BodyRow.vue2.js +3 -3
  115. package/lib/components/table/src/components/Body/BodyRow.vue2.js.map +1 -1
  116. package/lib/components/table/src/components/Drag/RowHandler.vue.js.map +1 -1
  117. package/lib/components/table/src/components/Drag/RowHandler.vue2.js +17 -16
  118. package/lib/components/table/src/components/Drag/RowHandler.vue2.js.map +1 -1
  119. package/lib/components/table/src/components/Header/HeaderCellTitle.vue.js +17 -5
  120. package/lib/components/table/src/components/Header/HeaderCellTitle.vue.js.map +1 -1
  121. package/lib/components/table/src/components/Header/HeaderCellTitle.vue2.js +1 -0
  122. package/lib/components/table/src/components/Header/HeaderCellTitle.vue2.js.map +1 -1
  123. package/lib/components/table/src/components/Header/HeaderExtraCell.vue.js.map +1 -1
  124. package/lib/components/table/src/components/Header/HeaderExtraCell.vue2.js +1 -0
  125. package/lib/components/table/src/components/Header/HeaderExtraCell.vue2.js.map +1 -1
  126. package/lib/components/table/src/components/InteralTable.vue.d.ts +18 -0
  127. package/lib/components/table/src/components/InteralTable.vue.js.map +1 -1
  128. package/lib/components/table/src/components/InteralTable.vue2.js +12 -6
  129. package/lib/components/table/src/components/InteralTable.vue2.js.map +1 -1
  130. package/lib/components/table/src/components/Table.d.ts +22 -4
  131. package/lib/components/table/src/components/Table.js +46 -12
  132. package/lib/components/table/src/components/Table.js.map +1 -1
  133. package/lib/components/table/src/components/interface.d.ts +30 -3
  134. package/lib/components/table/src/components/interface.js +9 -1
  135. package/lib/components/table/src/components/interface.js.map +1 -1
  136. package/lib/components/table/src/hooks/useCellProps.js +3 -1
  137. package/lib/components/table/src/hooks/useCellProps.js.map +1 -1
  138. package/lib/components/table/src/hooks/useContainer.js +1 -1
  139. package/lib/components/table/src/hooks/useContainer.js.map +1 -1
  140. package/lib/components/table/src/hooks/useFetchData.js +2 -1
  141. package/lib/components/table/src/hooks/useFetchData.js.map +1 -1
  142. package/lib/components/table/src/hooks/useHover.d.ts +3 -0
  143. package/lib/components/table/src/hooks/useHover.js +2 -0
  144. package/lib/components/table/src/hooks/useHover.js.map +1 -1
  145. package/lib/components/table/src/hooks/usePagination.d.ts +1 -0
  146. package/lib/components/table/src/hooks/usePagination.js +7 -1
  147. package/lib/components/table/src/hooks/usePagination.js.map +1 -1
  148. package/lib/components/table/src/utils/genProColumnToColumn.js +6 -4
  149. package/lib/components/table/src/utils/genProColumnToColumn.js.map +1 -1
  150. package/lib/components/table/src/utils/util.d.ts +1 -1
  151. package/lib/components/table/src/utils/util.js +1 -1
  152. package/lib/components/table/src/utils/util.js.map +1 -1
  153. package/lib/index.d.ts +54 -16
  154. package/lib/utils/validate.d.ts +1 -1
  155. package/lib/utils/validate.js +1 -1
  156. package/lib/utils/validate.js.map +1 -1
  157. package/lib/version.d.ts +1 -1
  158. package/lib/version.js +1 -1
  159. package/lib/version.js.map +1 -1
  160. package/package.json +1 -1
  161. package/theme-chalk/index.css +1 -1
  162. package/theme-chalk/pro-form.css +1 -1
  163. package/theme-chalk/src/form.less +5 -0
  164. package/theme-chalk/src/table/table.less +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderExtraCell.vue.mjs","sources":["../../../../../../../../packages/components/table/src/components/Header/HeaderExtraCell.vue"],"sourcesContent":["<!--\n * @Author: shen\n * @Date: 2023-11-06 16:03:18\n * @LastEditors: shen\n * @LastEditTime: 2025-07-28 09:05:37\n * @Description:\n-->\n<script lang=\"ts\">\nimport type { CSSProperties, PropType } from 'vue'\nimport type { FinallyColumnType, DefaultRecordType, Key } from '../interface'\n\nimport { defineComponent, inject, computed, Fragment, h } from 'vue'\nimport { Dropdown, Menu, MenuItem } from 'ant-design-vue'\nimport { DownOutlined } from '@ant-design/icons-vue'\nimport { AUTO_HEADER_HEIGHT } from '../../utils/constant'\nimport { getCellFixedInfo } from '../../utils/fixUtil'\nimport { useInjectTable } from '../context/TableContext'\nimport supportSticky from '../../utils/supportSticky'\nimport eagerComputed from '../../utils/eagerComputed'\nimport Checkbox from '../Checkbox'\n\nexport default defineComponent({\n name: 'HeaderExtraCell',\n components: {\n Checkbox,\n Dropdown,\n AMenu: Menu,\n MenuItem,\n DownOutlined,\n },\n props: {\n component: { type: String, default: 'div' },\n prefixCls: String,\n column: { type: Object as PropType<FinallyColumnType<DefaultRecordType>>, default: () => ({}) },\n additionalProps: Object,\n },\n setup(props) {\n const autoHeight = inject<boolean>(AUTO_HEADER_HEIGHT, false)\n const tableContext = useInjectTable()\n const { pageDataEnableRowKeys, getRecordByKey, mergedRowSelection } = tableContext\n const {\n checkedCurrentAll,\n checkedCurrentSome,\n allDisabled,\n allDisabledAndChecked,\n allDisabledSomeChecked,\n mergedSelections,\n setSelectedKeys,\n } = tableContext.selection\n\n const rowSelectionType = computed(() => tableContext.mergedRowSelection.value.type)\n const hideSelectAll = computed(() => tableContext.mergedRowSelection.value.hideSelectAll)\n const derivedSelectedKeySet = computed(() => tableContext.selection.derivedSelectedKeySet.value)\n const sortColumns = computed(() =>\n tableContext.sorterStates.value.map(({ column, sortOrder }) => ({\n column,\n order: sortOrder,\n })),\n )\n\n const title = computed(() => {\n return h(Fragment, [\n typeof props.column.title == 'function'\n ? props.column.title({\n sortColumns: sortColumns.value,\n sortColumn: sortColumns.value[0]?.column,\n sortOrder: sortColumns.value[0]?.order,\n })\n : props.column.title,\n ])\n })\n\n const cellFixedInfo = computed(() => {\n if (autoHeight) {\n const additionalProps = props.additionalProps!\n return getCellFixedInfo(\n additionalProps.colstart,\n additionalProps.colend,\n tableContext.allColumns.value,\n tableContext.stickyOffsets.value,\n tableContext.props.direction,\n )\n }\n return undefined\n })\n\n const cellClass = computed(() => {\n const { prefixCls } = props\n let cellFixedCls = {}\n if (cellFixedInfo.value && supportSticky) {\n const autoCellPrefixCls = `${prefixCls}-cell`,\n { fixLeft, fixRight, firstFixLeft, lastFixLeft, firstFixRight, lastFixRight } =\n cellFixedInfo.value\n cellFixedCls = {\n [`${autoCellPrefixCls}-fix-left`]: typeof fixLeft === 'number',\n [`${autoCellPrefixCls}-fix-left-first`]: firstFixLeft,\n [`${autoCellPrefixCls}-fix-left-last`]: lastFixLeft,\n [`${autoCellPrefixCls}-fix-right`]: typeof fixRight == 'number',\n [`${autoCellPrefixCls}-fix-right-first`]: firstFixRight,\n [`${autoCellPrefixCls}-fix-right-last`]: lastFixRight,\n }\n }\n return Object.assign(\n {\n [`${prefixCls}-cell`]: true,\n [`${prefixCls}-header-cell`]: true,\n [`${prefixCls}-header-extra-cell`]: true,\n },\n cellFixedCls,\n )\n })\n\n return {\n cellClass,\n componentStyle: computed(() => {\n const styles: CSSProperties = {}\n if (cellFixedInfo.value && supportSticky) {\n const { fixLeft, fixRight } = cellFixedInfo.value\n if (typeof fixLeft == 'number') {\n styles.position = 'sticky'\n styles.left = `${fixLeft}px`\n }\n if (typeof fixRight == 'number') {\n styles.position = 'sticky'\n styles.right = `${fixRight}px`\n }\n }\n return autoHeight ? styles : { height: `${props.column.height}px` }\n }),\n getPopupContainer: computed(() => tableContext.getPopupContainer.value),\n rowSelectionType,\n hideSelectAll,\n onSelectAllChange: () => {\n const changeRows: Key[] = []\n const copyDerivedSelectedKeySet = new Set(derivedSelectedKeySet.value)\n if (checkedCurrentAll.value) {\n pageDataEnableRowKeys.value.forEach((key: Key) => {\n copyDerivedSelectedKeySet.delete(key)\n changeRows.push(key)\n })\n } else {\n pageDataEnableRowKeys.value.forEach((key: Key) => {\n if (!copyDerivedSelectedKeySet.has(key)) {\n copyDerivedSelectedKeySet.add(key)\n changeRows.push(key)\n }\n })\n }\n\n const selectedRows: Key[] = Array.from(copyDerivedSelectedKeySet)\n mergedRowSelection.value.onSelectAll?.(\n !checkedCurrentAll,\n selectedRows.map((key: Key) => getRecordByKey(key)),\n changeRows.map((key: Key) => getRecordByKey(key)),\n )\n setSelectedKeys(selectedRows)\n },\n checked: eagerComputed(() =>\n allDisabled.value\n ? allDisabledAndChecked.value\n : !!tableContext.flattenData.value.length && checkedCurrentAll.value,\n ),\n indeterminate: eagerComputed(() =>\n allDisabled.value\n ? !allDisabledAndChecked.value && allDisabledSomeChecked.value\n : !checkedCurrentAll.value && checkedCurrentSome.value,\n ),\n disabled: eagerComputed(\n () => tableContext.flattenData.value.length === 0 || allDisabled.value,\n ),\n mergedSelections,\n onMenuClick: (callback: any) => {\n callback?.(pageDataEnableRowKeys.value)\n },\n autoHeight,\n title,\n h,\n Fragment,\n }\n },\n})\n</script>\n\n<template>\n <component\n :is=\"component\"\n tabindex=\"-1\"\n role=\"cell\"\n :class=\"cellClass\"\n :style=\"componentStyle\"\n v-bind=\"additionalProps\"\n @click.stop\n >\n <template\n v-if=\"column.type !== 'checkbox' || rowSelectionType === 'radio' || hideSelectAll\"\n ></template>\n <div v-else :class=\"`${prefixCls}-selection-wrap`\">\n <div :class=\"`${prefixCls}-selection`\">\n <component v-if=\"column.title\" :is=\"title\" />\n <template v-else>\n <Checkbox\n :prefix-cls=\"prefixCls\"\n :indeterminate=\"indeterminate\"\n :disabled=\"disabled\"\n :checked=\"checked\"\n :aria-label=\"\n checked\n ? 'Press Space to toggle all row selection (checked)'\n : 'Press Space to toggle all row selection (unchecked)'\n \"\n @change=\"onSelectAllChange\"\n />\n <div v-if=\"mergedSelections\" :class=\"`${prefixCls}-selection-extra`\">\n <Dropdown :get-popup-container=\"getPopupContainer\">\n <span>\n <DownOutlined :class=\"`${prefixCls}-selection-extra-dropdown-icon`\" />\n </span>\n <template #overlay>\n <AMenu :get-popup-container=\"getPopupContainer\">\n <template\n v-for=\"(item, index) in mergedSelections\"\n :key=\"(item && item.key) || index\"\n >\n <MenuItem\n v-if=\"item\"\n :key=\"item.key || index\"\n @click=\"onMenuClick(item.onSelect)\"\n >\n <component\n :is=\"\n h(Fragment, [\n typeof item.text == 'function' ? item.text(item) : item.text,\n ])\n \"\n ></component>\n </MenuItem>\n </template>\n </AMenu>\n </template>\n </Dropdown>\n </div>\n </template>\n </div>\n </div>\n </component>\n</template>\n"],"names":["_createBlock","_resolveDynamicComponent","_mergeProps","_withModifiers","_openBlock","_createElementBlock","_Fragment","_normalizeClass","_createElementVNode","_createVNode","_withCtx","_renderList"],"mappings":";;;;;;;;;;sBAwLEA,WAAA,CA4DYC,wBA3DL,IAAA,CAAA,SAAS,GADhBC,UAAA,CA4DY;AAAA,IA1DV,QAAA,EAAS,IAAA;AAAA,IACT,IAAA,EAAK,MAAA;AAAA,IACJ,OAAO,IAAA,CAAA,SAAA;AAAA,IACP,OAAO,IAAA,CAAA;AAAA,GAAA,EACA,KAAA,eAAA,EAAe;AAAA,IACtB,OAAA,EAAK,OAAA,CAAA,CAAA,KAAA,OAAA,CAAA,CAAA,GAAAC,cAAN,MAAA;AAAA,IAAA,CAAA,EAAW,CAAA,MAAA,CAAA,CAAA;AAAA,GAAA,CAAA,EAAA;AAAA,qBAEX,MAEY;AAAA,MADJ,IAAA,CAAA,MAAA,CAAO,IAAA,KAAI,UAAA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BAAvD,KAAA,EAAKF,cAAA,IAAK,IAAA,CAAA,SAAS,CAAA,8BAAA,CAAA;AAAA,6BAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,OAAA,CAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"HeaderExtraCell.vue.mjs","sources":["../../../../../../../../packages/components/table/src/components/Header/HeaderExtraCell.vue"],"sourcesContent":["<!--\n * @Author: shen\n * @Date: 2023-11-06 16:03:18\n * @LastEditors: shen\n * @LastEditTime: 2025-09-30 16:52:24\n * @Description:\n-->\n<script lang=\"ts\">\nimport type { CSSProperties, PropType } from 'vue'\nimport type { FinallyColumnType, DefaultRecordType, Key } from '../interface'\n\nimport { defineComponent, inject, computed, Fragment, h } from 'vue'\nimport { Dropdown, Menu, MenuItem } from 'ant-design-vue'\nimport { DownOutlined } from '@ant-design/icons-vue'\nimport { AUTO_HEADER_HEIGHT } from '../../utils/constant'\nimport { getCellFixedInfo } from '../../utils/fixUtil'\nimport { useInjectTable } from '../context/TableContext'\nimport supportSticky from '../../utils/supportSticky'\nimport eagerComputed from '../../utils/eagerComputed'\nimport Checkbox from '../Checkbox'\n\nexport default defineComponent({\n name: 'HeaderExtraCell',\n components: {\n Checkbox,\n Dropdown,\n AMenu: Menu,\n MenuItem,\n DownOutlined,\n },\n props: {\n component: { type: String, default: 'div' },\n prefixCls: String,\n column: { type: Object as PropType<FinallyColumnType<DefaultRecordType>>, default: () => ({}) },\n additionalProps: Object,\n },\n setup(props) {\n const autoHeight = inject<boolean>(AUTO_HEADER_HEIGHT, false)\n const tableContext = useInjectTable()\n const { pageDataEnableRowKeys, getRecordByKey, mergedRowSelection } = tableContext\n const {\n checkedCurrentAll,\n checkedCurrentSome,\n allDisabled,\n allDisabledAndChecked,\n allDisabledSomeChecked,\n mergedSelections,\n setSelectedKeys,\n } = tableContext.selection\n\n const rowSelectionType = computed(() => tableContext.mergedRowSelection.value.type)\n const hideSelectAll = computed(() => tableContext.mergedRowSelection.value.hideSelectAll)\n const derivedSelectedKeySet = computed(() => tableContext.selection.derivedSelectedKeySet.value)\n const sortColumns = computed(() =>\n tableContext.sorterStates.value.map(({ column, sortOrder }) => ({\n column,\n order: sortOrder,\n })),\n )\n\n const title = computed(() => {\n return h(Fragment, [\n typeof props.column.title == 'function'\n ? props.column.title({\n column: props.column.originColumn!,\n sortColumns: sortColumns.value,\n sortColumn: sortColumns.value[0]?.column,\n sortOrder: sortColumns.value[0]?.order,\n })\n : props.column.title,\n ])\n })\n\n const cellFixedInfo = computed(() => {\n if (autoHeight) {\n const additionalProps = props.additionalProps!\n return getCellFixedInfo(\n additionalProps.colstart,\n additionalProps.colend,\n tableContext.allColumns.value,\n tableContext.stickyOffsets.value,\n tableContext.props.direction,\n )\n }\n return undefined\n })\n\n const cellClass = computed(() => {\n const { prefixCls } = props\n let cellFixedCls = {}\n if (cellFixedInfo.value && supportSticky) {\n const autoCellPrefixCls = `${prefixCls}-cell`,\n { fixLeft, fixRight, firstFixLeft, lastFixLeft, firstFixRight, lastFixRight } =\n cellFixedInfo.value\n cellFixedCls = {\n [`${autoCellPrefixCls}-fix-left`]: typeof fixLeft === 'number',\n [`${autoCellPrefixCls}-fix-left-first`]: firstFixLeft,\n [`${autoCellPrefixCls}-fix-left-last`]: lastFixLeft,\n [`${autoCellPrefixCls}-fix-right`]: typeof fixRight == 'number',\n [`${autoCellPrefixCls}-fix-right-first`]: firstFixRight,\n [`${autoCellPrefixCls}-fix-right-last`]: lastFixRight,\n }\n }\n return Object.assign(\n {\n [`${prefixCls}-cell`]: true,\n [`${prefixCls}-header-cell`]: true,\n [`${prefixCls}-header-extra-cell`]: true,\n },\n cellFixedCls,\n )\n })\n\n return {\n cellClass,\n componentStyle: computed(() => {\n const styles: CSSProperties = {}\n if (cellFixedInfo.value && supportSticky) {\n const { fixLeft, fixRight } = cellFixedInfo.value\n if (typeof fixLeft == 'number') {\n styles.position = 'sticky'\n styles.left = `${fixLeft}px`\n }\n if (typeof fixRight == 'number') {\n styles.position = 'sticky'\n styles.right = `${fixRight}px`\n }\n }\n return autoHeight ? styles : { height: `${props.column.height}px` }\n }),\n getPopupContainer: computed(() => tableContext.getPopupContainer.value),\n rowSelectionType,\n hideSelectAll,\n onSelectAllChange: () => {\n const changeRows: Key[] = []\n const copyDerivedSelectedKeySet = new Set(derivedSelectedKeySet.value)\n if (checkedCurrentAll.value) {\n pageDataEnableRowKeys.value.forEach((key: Key) => {\n copyDerivedSelectedKeySet.delete(key)\n changeRows.push(key)\n })\n } else {\n pageDataEnableRowKeys.value.forEach((key: Key) => {\n if (!copyDerivedSelectedKeySet.has(key)) {\n copyDerivedSelectedKeySet.add(key)\n changeRows.push(key)\n }\n })\n }\n\n const selectedRows: Key[] = Array.from(copyDerivedSelectedKeySet)\n mergedRowSelection.value.onSelectAll?.(\n !checkedCurrentAll,\n selectedRows.map((key: Key) => getRecordByKey(key)),\n changeRows.map((key: Key) => getRecordByKey(key)),\n )\n setSelectedKeys(selectedRows)\n },\n checked: eagerComputed(() =>\n allDisabled.value\n ? allDisabledAndChecked.value\n : !!tableContext.flattenData.value.length && checkedCurrentAll.value,\n ),\n indeterminate: eagerComputed(() =>\n allDisabled.value\n ? !allDisabledAndChecked.value && allDisabledSomeChecked.value\n : !checkedCurrentAll.value && checkedCurrentSome.value,\n ),\n disabled: eagerComputed(\n () => tableContext.flattenData.value.length === 0 || allDisabled.value,\n ),\n mergedSelections,\n onMenuClick: (callback: any) => {\n callback?.(pageDataEnableRowKeys.value)\n },\n autoHeight,\n title,\n h,\n Fragment,\n }\n },\n})\n</script>\n\n<template>\n <component\n :is=\"component\"\n tabindex=\"-1\"\n role=\"cell\"\n :class=\"cellClass\"\n :style=\"componentStyle\"\n v-bind=\"additionalProps\"\n @click.stop\n >\n <template\n v-if=\"column.type !== 'checkbox' || rowSelectionType === 'radio' || hideSelectAll\"\n ></template>\n <div v-else :class=\"`${prefixCls}-selection-wrap`\">\n <div :class=\"`${prefixCls}-selection`\">\n <component v-if=\"column.title\" :is=\"title\" />\n <template v-else>\n <Checkbox\n :prefix-cls=\"prefixCls\"\n :indeterminate=\"indeterminate\"\n :disabled=\"disabled\"\n :checked=\"checked\"\n :aria-label=\"\n checked\n ? 'Press Space to toggle all row selection (checked)'\n : 'Press Space to toggle all row selection (unchecked)'\n \"\n @change=\"onSelectAllChange\"\n />\n <div v-if=\"mergedSelections\" :class=\"`${prefixCls}-selection-extra`\">\n <Dropdown :get-popup-container=\"getPopupContainer\">\n <span>\n <DownOutlined :class=\"`${prefixCls}-selection-extra-dropdown-icon`\" />\n </span>\n <template #overlay>\n <AMenu :get-popup-container=\"getPopupContainer\">\n <template\n v-for=\"(item, index) in mergedSelections\"\n :key=\"(item && item.key) || index\"\n >\n <MenuItem\n v-if=\"item\"\n :key=\"item.key || index\"\n @click=\"onMenuClick(item.onSelect)\"\n >\n <component\n :is=\"\n h(Fragment, [\n typeof item.text == 'function' ? item.text(item) : item.text,\n ])\n \"\n ></component>\n </MenuItem>\n </template>\n </AMenu>\n </template>\n </Dropdown>\n </div>\n </template>\n </div>\n </div>\n </component>\n</template>\n"],"names":["_createBlock","_resolveDynamicComponent","_mergeProps","_withModifiers","_openBlock","_createElementBlock","_Fragment","_normalizeClass","_createElementVNode","_createVNode","_withCtx","_renderList"],"mappings":";;;;;;;;;;sBAyLEA,WAAA,CA4DYC,wBA3DL,IAAA,CAAA,SAAS,GADhBC,UAAA,CA4DY;AAAA,IA1DV,QAAA,EAAS,IAAA;AAAA,IACT,IAAA,EAAK,MAAA;AAAA,IACJ,OAAO,IAAA,CAAA,SAAA;AAAA,IACP,OAAO,IAAA,CAAA;AAAA,GAAA,EACA,KAAA,eAAA,EAAe;AAAA,IACtB,OAAA,EAAK,OAAA,CAAA,CAAA,KAAA,OAAA,CAAA,CAAA,GAAAC,cAAN,MAAA;AAAA,IAAA,CAAA,EAAW,CAAA,MAAA,CAAA,CAAA;AAAA,GAAA,CAAA,EAAA;AAAA,qBAEX,MAEY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,IAAA,EAAA;AAAA,4BADLC,YAAsE,uBAAA,EAAA;AAAA,8BAAvD,KAAA,EAAKF,cAAA,IAAK,IAAA,CAAA,SAAS,CAAA,8BAAA,CAAA;AAAA,6BAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,OAAA,CAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -49,6 +49,7 @@ var _sfc_main = defineComponent({
49
49
  var _a, _b;
50
50
  return h(Fragment, [
51
51
  typeof props.column.title == "function" ? props.column.title({
52
+ column: props.column.originColumn,
52
53
  sortColumns: sortColumns.value,
53
54
  sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
54
55
  sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderExtraCell.vue2.mjs","sources":["../../../../../../../../packages/components/table/src/components/Header/HeaderExtraCell.vue"],"sourcesContent":["<!--\n * @Author: shen\n * @Date: 2023-11-06 16:03:18\n * @LastEditors: shen\n * @LastEditTime: 2025-07-28 09:05:37\n * @Description:\n-->\n<script lang=\"ts\">\nimport type { CSSProperties, PropType } from 'vue'\nimport type { FinallyColumnType, DefaultRecordType, Key } from '../interface'\n\nimport { defineComponent, inject, computed, Fragment, h } from 'vue'\nimport { Dropdown, Menu, MenuItem } from 'ant-design-vue'\nimport { DownOutlined } from '@ant-design/icons-vue'\nimport { AUTO_HEADER_HEIGHT } from '../../utils/constant'\nimport { getCellFixedInfo } from '../../utils/fixUtil'\nimport { useInjectTable } from '../context/TableContext'\nimport supportSticky from '../../utils/supportSticky'\nimport eagerComputed from '../../utils/eagerComputed'\nimport Checkbox from '../Checkbox'\n\nexport default defineComponent({\n name: 'HeaderExtraCell',\n components: {\n Checkbox,\n Dropdown,\n AMenu: Menu,\n MenuItem,\n DownOutlined,\n },\n props: {\n component: { type: String, default: 'div' },\n prefixCls: String,\n column: { type: Object as PropType<FinallyColumnType<DefaultRecordType>>, default: () => ({}) },\n additionalProps: Object,\n },\n setup(props) {\n const autoHeight = inject<boolean>(AUTO_HEADER_HEIGHT, false)\n const tableContext = useInjectTable()\n const { pageDataEnableRowKeys, getRecordByKey, mergedRowSelection } = tableContext\n const {\n checkedCurrentAll,\n checkedCurrentSome,\n allDisabled,\n allDisabledAndChecked,\n allDisabledSomeChecked,\n mergedSelections,\n setSelectedKeys,\n } = tableContext.selection\n\n const rowSelectionType = computed(() => tableContext.mergedRowSelection.value.type)\n const hideSelectAll = computed(() => tableContext.mergedRowSelection.value.hideSelectAll)\n const derivedSelectedKeySet = computed(() => tableContext.selection.derivedSelectedKeySet.value)\n const sortColumns = computed(() =>\n tableContext.sorterStates.value.map(({ column, sortOrder }) => ({\n column,\n order: sortOrder,\n })),\n )\n\n const title = computed(() => {\n return h(Fragment, [\n typeof props.column.title == 'function'\n ? props.column.title({\n sortColumns: sortColumns.value,\n sortColumn: sortColumns.value[0]?.column,\n sortOrder: sortColumns.value[0]?.order,\n })\n : props.column.title,\n ])\n })\n\n const cellFixedInfo = computed(() => {\n if (autoHeight) {\n const additionalProps = props.additionalProps!\n return getCellFixedInfo(\n additionalProps.colstart,\n additionalProps.colend,\n tableContext.allColumns.value,\n tableContext.stickyOffsets.value,\n tableContext.props.direction,\n )\n }\n return undefined\n })\n\n const cellClass = computed(() => {\n const { prefixCls } = props\n let cellFixedCls = {}\n if (cellFixedInfo.value && supportSticky) {\n const autoCellPrefixCls = `${prefixCls}-cell`,\n { fixLeft, fixRight, firstFixLeft, lastFixLeft, firstFixRight, lastFixRight } =\n cellFixedInfo.value\n cellFixedCls = {\n [`${autoCellPrefixCls}-fix-left`]: typeof fixLeft === 'number',\n [`${autoCellPrefixCls}-fix-left-first`]: firstFixLeft,\n [`${autoCellPrefixCls}-fix-left-last`]: lastFixLeft,\n [`${autoCellPrefixCls}-fix-right`]: typeof fixRight == 'number',\n [`${autoCellPrefixCls}-fix-right-first`]: firstFixRight,\n [`${autoCellPrefixCls}-fix-right-last`]: lastFixRight,\n }\n }\n return Object.assign(\n {\n [`${prefixCls}-cell`]: true,\n [`${prefixCls}-header-cell`]: true,\n [`${prefixCls}-header-extra-cell`]: true,\n },\n cellFixedCls,\n )\n })\n\n return {\n cellClass,\n componentStyle: computed(() => {\n const styles: CSSProperties = {}\n if (cellFixedInfo.value && supportSticky) {\n const { fixLeft, fixRight } = cellFixedInfo.value\n if (typeof fixLeft == 'number') {\n styles.position = 'sticky'\n styles.left = `${fixLeft}px`\n }\n if (typeof fixRight == 'number') {\n styles.position = 'sticky'\n styles.right = `${fixRight}px`\n }\n }\n return autoHeight ? styles : { height: `${props.column.height}px` }\n }),\n getPopupContainer: computed(() => tableContext.getPopupContainer.value),\n rowSelectionType,\n hideSelectAll,\n onSelectAllChange: () => {\n const changeRows: Key[] = []\n const copyDerivedSelectedKeySet = new Set(derivedSelectedKeySet.value)\n if (checkedCurrentAll.value) {\n pageDataEnableRowKeys.value.forEach((key: Key) => {\n copyDerivedSelectedKeySet.delete(key)\n changeRows.push(key)\n })\n } else {\n pageDataEnableRowKeys.value.forEach((key: Key) => {\n if (!copyDerivedSelectedKeySet.has(key)) {\n copyDerivedSelectedKeySet.add(key)\n changeRows.push(key)\n }\n })\n }\n\n const selectedRows: Key[] = Array.from(copyDerivedSelectedKeySet)\n mergedRowSelection.value.onSelectAll?.(\n !checkedCurrentAll,\n selectedRows.map((key: Key) => getRecordByKey(key)),\n changeRows.map((key: Key) => getRecordByKey(key)),\n )\n setSelectedKeys(selectedRows)\n },\n checked: eagerComputed(() =>\n allDisabled.value\n ? allDisabledAndChecked.value\n : !!tableContext.flattenData.value.length && checkedCurrentAll.value,\n ),\n indeterminate: eagerComputed(() =>\n allDisabled.value\n ? !allDisabledAndChecked.value && allDisabledSomeChecked.value\n : !checkedCurrentAll.value && checkedCurrentSome.value,\n ),\n disabled: eagerComputed(\n () => tableContext.flattenData.value.length === 0 || allDisabled.value,\n ),\n mergedSelections,\n onMenuClick: (callback: any) => {\n callback?.(pageDataEnableRowKeys.value)\n },\n autoHeight,\n title,\n h,\n Fragment,\n }\n },\n})\n</script>\n\n<template>\n <component\n :is=\"component\"\n tabindex=\"-1\"\n role=\"cell\"\n :class=\"cellClass\"\n :style=\"componentStyle\"\n v-bind=\"additionalProps\"\n @click.stop\n >\n <template\n v-if=\"column.type !== 'checkbox' || rowSelectionType === 'radio' || hideSelectAll\"\n ></template>\n <div v-else :class=\"`${prefixCls}-selection-wrap`\">\n <div :class=\"`${prefixCls}-selection`\">\n <component v-if=\"column.title\" :is=\"title\" />\n <template v-else>\n <Checkbox\n :prefix-cls=\"prefixCls\"\n :indeterminate=\"indeterminate\"\n :disabled=\"disabled\"\n :checked=\"checked\"\n :aria-label=\"\n checked\n ? 'Press Space to toggle all row selection (checked)'\n : 'Press Space to toggle all row selection (unchecked)'\n \"\n @change=\"onSelectAllChange\"\n />\n <div v-if=\"mergedSelections\" :class=\"`${prefixCls}-selection-extra`\">\n <Dropdown :get-popup-container=\"getPopupContainer\">\n <span>\n <DownOutlined :class=\"`${prefixCls}-selection-extra-dropdown-icon`\" />\n </span>\n <template #overlay>\n <AMenu :get-popup-container=\"getPopupContainer\">\n <template\n v-for=\"(item, index) in mergedSelections\"\n :key=\"(item && item.key) || index\"\n >\n <MenuItem\n v-if=\"item\"\n :key=\"item.key || index\"\n @click=\"onMenuClick(item.onSelect)\"\n >\n <component\n :is=\"\n h(Fragment, [\n typeof item.text == 'function' ? item.text(item) : item.text,\n ])\n \"\n ></component>\n </MenuItem>\n </template>\n </AMenu>\n </template>\n </Dropdown>\n </div>\n </template>\n </div>\n </div>\n </component>\n</template>\n"],"names":[],"mappings":";;;;;;;;;;AAqBA,gBAAe,eAAA,CAAgB;AAAA,EAC7B,IAAA,EAAM,iBAAA;AAAA,EACN,UAAA,EAAY;AAAA,IACV,QAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA,EAAO,IAAA;AAAA,IACP,QAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,KAAA,EAAO;AAAA,I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GAAA,KAAa,cAAA,CAAe,GAAG,CAAC;AAAA,SAAA;AAElD,QAAA,eAAA,CAAgB,YAAY,CAAA;AAAA,MAC9B,CAAA;AAAA,MACA,OAAA,EAAS,aAAA;AAAA,QAAc,MACrB,WAAA,CAAY,KAAA,GACR,qBAAA,CAAsB,KAAA,GACtB,CAAC,CAAC,YAAA,CAAa,WAAA,CAAY,KAAA,CAAM,MAAA,IAAU,iBAAA,CAAkB;AAAA,OACnE;AAAA,MACA,aAAA,EAAe,aAAA;AAAA,QAAc,MAC3B,WAAA,CAAY,KAAA,GACR,CAAC,qBAAA,CAAsB,KAAA,IAAS,sBAAA,CAAuB,KAAA,GACvD,CAAC,iBAAA,CAAkB,KAAA,IAAS,kBAAA,CAAmB;AAAA,OACrD;AAAA,MACA,QAAA,EAAU,aAAA;AAAA,QACR,MAAM,YAAA,CAAa,WAAA,CAAY,KAAA,CAAM,MAAA,KAAW,KAAK,WAAA,CAAY;AAAA,OACnE;AAAA,MACA,gBAAA;AAAA,MACA,WAAA,EAAa,CAAC,QAAA,KAAkB;AAC9B,QAAA,QAAA,IAAA,IAAA,GAAA,MAAA,GAAA,QAAA,CAAW,qBAAA,CAAsB,KAAA,CAAA;AAAA,MACnC,CAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,CAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AACF,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"HeaderExtraCell.vue2.mjs","sources":["../../../../../../../../packages/components/table/src/components/Header/HeaderExtraCell.vue"],"sourcesContent":["<!--\n * @Author: shen\n * @Date: 2023-11-06 16:03:18\n * @LastEditors: shen\n * @LastEditTime: 2025-09-30 16:52:24\n * @Description:\n-->\n<script lang=\"ts\">\nimport type { CSSProperties, PropType } from 'vue'\nimport type { FinallyColumnType, DefaultRecordType, Key } from '../interface'\n\nimport { defineComponent, inject, computed, Fragment, h } from 'vue'\nimport { Dropdown, Menu, MenuItem } from 'ant-design-vue'\nimport { DownOutlined } from '@ant-design/icons-vue'\nimport { AUTO_HEADER_HEIGHT } from '../../utils/constant'\nimport { getCellFixedInfo } from '../../utils/fixUtil'\nimport { useInjectTable } from '../context/TableContext'\nimport supportSticky from '../../utils/supportSticky'\nimport eagerComputed from '../../utils/eagerComputed'\nimport Checkbox from '../Checkbox'\n\nexport default defineComponent({\n name: 'HeaderExtraCell',\n components: {\n Checkbox,\n Dropdown,\n AMenu: Menu,\n MenuItem,\n DownOutlined,\n },\n props: {\n component: { type: String, default: 'div' },\n prefixCls: String,\n column: { type: Object as PropType<FinallyColumnType<DefaultRecordType>>, default: () => ({}) },\n additionalProps: Object,\n },\n setup(props) {\n const autoHeight = inject<boolean>(AUTO_HEADER_HEIGHT, false)\n const tableContext = useInjectTable()\n const { pageDataEnableRowKeys, getRecordByKey, mergedRowSelection } = tableContext\n const {\n checkedCurrentAll,\n checkedCurrentSome,\n allDisabled,\n allDisabledAndChecked,\n allDisabledSomeChecked,\n mergedSelections,\n setSelectedKeys,\n } = tableContext.selection\n\n const rowSelectionType = computed(() => tableContext.mergedRowSelection.value.type)\n const hideSelectAll = computed(() => tableContext.mergedRowSelection.value.hideSelectAll)\n const derivedSelectedKeySet = computed(() => tableContext.selection.derivedSelectedKeySet.value)\n const sortColumns = computed(() =>\n tableContext.sorterStates.value.map(({ column, sortOrder }) => ({\n column,\n order: sortOrder,\n })),\n )\n\n const title = computed(() => {\n return h(Fragment, [\n typeof props.column.title == 'function'\n ? props.column.title({\n column: props.column.originColumn!,\n sortColumns: sortColumns.value,\n sortColumn: sortColumns.value[0]?.column,\n sortOrder: sortColumns.value[0]?.order,\n })\n : props.column.title,\n ])\n })\n\n const cellFixedInfo = computed(() => {\n if (autoHeight) {\n const additionalProps = props.additionalProps!\n return getCellFixedInfo(\n additionalProps.colstart,\n additionalProps.colend,\n tableContext.allColumns.value,\n tableContext.stickyOffsets.value,\n tableContext.props.direction,\n )\n }\n return undefined\n })\n\n const cellClass = computed(() => {\n const { prefixCls } = props\n let cellFixedCls = {}\n if (cellFixedInfo.value && supportSticky) {\n const autoCellPrefixCls = `${prefixCls}-cell`,\n { fixLeft, fixRight, firstFixLeft, lastFixLeft, firstFixRight, lastFixRight } =\n cellFixedInfo.value\n cellFixedCls = {\n [`${autoCellPrefixCls}-fix-left`]: typeof fixLeft === 'number',\n [`${autoCellPrefixCls}-fix-left-first`]: firstFixLeft,\n [`${autoCellPrefixCls}-fix-left-last`]: lastFixLeft,\n [`${autoCellPrefixCls}-fix-right`]: typeof fixRight == 'number',\n [`${autoCellPrefixCls}-fix-right-first`]: firstFixRight,\n [`${autoCellPrefixCls}-fix-right-last`]: lastFixRight,\n }\n }\n return Object.assign(\n {\n [`${prefixCls}-cell`]: true,\n [`${prefixCls}-header-cell`]: true,\n [`${prefixCls}-header-extra-cell`]: true,\n },\n cellFixedCls,\n )\n })\n\n return {\n cellClass,\n componentStyle: computed(() => {\n const styles: CSSProperties = {}\n if (cellFixedInfo.value && supportSticky) {\n const { fixLeft, fixRight } = cellFixedInfo.value\n if (typeof fixLeft == 'number') {\n styles.position = 'sticky'\n styles.left = `${fixLeft}px`\n }\n if (typeof fixRight == 'number') {\n styles.position = 'sticky'\n styles.right = `${fixRight}px`\n }\n }\n return autoHeight ? styles : { height: `${props.column.height}px` }\n }),\n getPopupContainer: computed(() => tableContext.getPopupContainer.value),\n rowSelectionType,\n hideSelectAll,\n onSelectAllChange: () => {\n const changeRows: Key[] = []\n const copyDerivedSelectedKeySet = new Set(derivedSelectedKeySet.value)\n if (checkedCurrentAll.value) {\n pageDataEnableRowKeys.value.forEach((key: Key) => {\n copyDerivedSelectedKeySet.delete(key)\n changeRows.push(key)\n })\n } else {\n pageDataEnableRowKeys.value.forEach((key: Key) => {\n if (!copyDerivedSelectedKeySet.has(key)) {\n copyDerivedSelectedKeySet.add(key)\n changeRows.push(key)\n }\n })\n }\n\n const selectedRows: Key[] = Array.from(copyDerivedSelectedKeySet)\n mergedRowSelection.value.onSelectAll?.(\n !checkedCurrentAll,\n selectedRows.map((key: Key) => getRecordByKey(key)),\n changeRows.map((key: Key) => getRecordByKey(key)),\n )\n setSelectedKeys(selectedRows)\n },\n checked: eagerComputed(() =>\n allDisabled.value\n ? allDisabledAndChecked.value\n : !!tableContext.flattenData.value.length && checkedCurrentAll.value,\n ),\n indeterminate: eagerComputed(() =>\n allDisabled.value\n ? !allDisabledAndChecked.value && allDisabledSomeChecked.value\n : !checkedCurrentAll.value && checkedCurrentSome.value,\n ),\n disabled: eagerComputed(\n () => tableContext.flattenData.value.length === 0 || allDisabled.value,\n ),\n mergedSelections,\n onMenuClick: (callback: any) => {\n callback?.(pageDataEnableRowKeys.value)\n },\n autoHeight,\n title,\n h,\n Fragment,\n }\n },\n})\n</script>\n\n<template>\n <component\n :is=\"component\"\n tabindex=\"-1\"\n role=\"cell\"\n :class=\"cellClass\"\n :style=\"componentStyle\"\n v-bind=\"additionalProps\"\n @click.stop\n >\n <template\n v-if=\"column.type !== 'checkbox' || rowSelectionType === 'radio' || hideSelectAll\"\n ></template>\n <div v-else :class=\"`${prefixCls}-selection-wrap`\">\n <div :class=\"`${prefixCls}-selection`\">\n <component v-if=\"column.title\" :is=\"title\" />\n <template v-else>\n <Checkbox\n :prefix-cls=\"prefixCls\"\n :indeterminate=\"indeterminate\"\n :disabled=\"disabled\"\n :checked=\"checked\"\n :aria-label=\"\n checked\n ? 'Press Space to toggle all row selection (checked)'\n : 'Press Space to toggle all row selection (unchecked)'\n \"\n @change=\"onSelectAllChange\"\n />\n <div v-if=\"mergedSelections\" :class=\"`${prefixCls}-selection-extra`\">\n <Dropdown :get-popup-container=\"getPopupContainer\">\n <span>\n <DownOutlined :class=\"`${prefixCls}-selection-extra-dropdown-icon`\" />\n </span>\n <template #overlay>\n <AMenu :get-popup-container=\"getPopupContainer\">\n <template\n v-for=\"(item, index) in mergedSelections\"\n :key=\"(item && item.key) || index\"\n >\n <MenuItem\n v-if=\"item\"\n :key=\"item.key || index\"\n @click=\"onMenuClick(item.onSelect)\"\n >\n <component\n :is=\"\n h(Fragment, [\n typeof item.text == 'function' ? item.text(item) : item.text,\n ])\n \"\n ></component>\n </MenuItem>\n </template>\n </AMenu>\n </template>\n </Dropdown>\n </div>\n </template>\n </div>\n </div>\n </component>\n</template>\n"],"names":[],"mappings":";;;;;;;;;;AAqBA,gBAAe,eAAA,CAAgB;AAAA,EAC7B,IAAA,EAAM,iBAAA;AAAA,EACN,UAAA,EAAY;AAAA,IACV,QAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA,EAAO,IAAA;AAAA,IACP,QAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,KAAA,EAAO;AAAA,IACL,SAAA,EAAW,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAS,KAAA,EAAM;AAAA,IAC1C,SAAA,EAAW,MAAA;AAAA,IACX,QAAQ,EAAE,IAAA,EAAM,QAA0D,OAAA,EAAS,OAAO,EAAC,CAAA,EAAG;AAAA,IAC9F,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,MAAM,KAAA,EAAO;AACX,IAAA,MAAM,UAAA,GAAa,MAAA,CAAgB,kBAAA,EAAoB,KAAK,CAAA;AAC5D,IAAA,MAAM,eAAe,cAAA,EAAe;AACpC,IAAA,MAAM,EAAE,qBAAA,EAAuB,cAAA,EAAgB,kBAAA,EAAmB,GAAI,YAAA;AACtE,IAAA,MAAM;AAAA,MACJ,iBAAA;AAAA,MACA,kBAAA;AAAA,MACA,WAAA;AAAA,MACA,qBAAA;AAAA,MACA,sBAAA;AAAA,MACA,gBAAA;AAAA,MACA;AAAA,QACE,YAAA,CAAa,SAAA;AAEjB,IAAA,MAAM,mBAAmB,QAAA,CAAS,MAAM,YAAA,CAAa,kBAAA,CAAmB,MAAM,IAAI,CAAA;AAClF,IAAA,MAAM,gBAAgB,QAAA,CAAS,MAAM,YAAA,CAAa,kBAAA,CAAmB,MAAM,aAAa,CAAA;AACxF,IAAA,MAAM,wBAAwB,QAAA,CAAS,MAAM,YAAA,CAAa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AAA;AAAA,MACA,KAAA;AAAA,MACA,CAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AACF,CAAC,CAAA;;;;"}
@@ -74,6 +74,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
74
74
  };
75
75
  size: {
76
76
  type: import("vue").PropType<import("./interface").DensitySize>;
77
+ default: string;
77
78
  };
78
79
  bordered: {
79
80
  type: BooleanConstructor;
@@ -180,6 +181,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
180
181
  type: NumberConstructor;
181
182
  default: number;
182
183
  };
184
+ rowHover: {
185
+ type: BooleanConstructor;
186
+ default: undefined;
187
+ };
183
188
  rowKey: {
184
189
  type: import("vue").PropType<string | GetRowKey<DefaultRecordType>>;
185
190
  };
@@ -370,6 +375,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
370
375
  'onUpdate:dataSource': {
371
376
  type: import("vue").PropType<(dataSource: DefaultRecordType[]) => void>;
372
377
  };
378
+ 'onUpdate:columns': {
379
+ type: import("vue").PropType<(columns: import("pro-design-vue").ProTableColumnsType<DefaultRecordType>, action: "resize" | "drag") => void>;
380
+ };
373
381
  columnEmptyText: {
374
382
  type: import("vue").PropType<string | false>;
375
383
  default: string;
@@ -579,6 +587,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
579
587
  };
580
588
  size: {
581
589
  type: import("vue").PropType<import("./interface").DensitySize>;
590
+ default: string;
582
591
  };
583
592
  bordered: {
584
593
  type: BooleanConstructor;
@@ -685,6 +694,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
685
694
  type: NumberConstructor;
686
695
  default: number;
687
696
  };
697
+ rowHover: {
698
+ type: BooleanConstructor;
699
+ default: undefined;
700
+ };
688
701
  rowKey: {
689
702
  type: import("vue").PropType<string | GetRowKey<DefaultRecordType>>;
690
703
  };
@@ -875,6 +888,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
875
888
  'onUpdate:dataSource': {
876
889
  type: import("vue").PropType<(dataSource: DefaultRecordType[]) => void>;
877
890
  };
891
+ 'onUpdate:columns': {
892
+ type: import("vue").PropType<(columns: import("pro-design-vue").ProTableColumnsType<DefaultRecordType>, action: "resize" | "drag") => void>;
893
+ };
878
894
  columnEmptyText: {
879
895
  type: import("vue").PropType<string | false>;
880
896
  default: string;
@@ -952,6 +968,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
952
968
  "onUpdate:filters"?: ((...args: any[]) => any) | undefined;
953
969
  }>, {
954
970
  direction: "rtl";
971
+ size: import("./interface").DensitySize;
955
972
  loading: boolean | Partial<import("vue").ExtractPropTypes<{
956
973
  prefixCls: StringConstructor;
957
974
  spinning: {
@@ -1009,6 +1026,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1009
1026
  rowExpandable: (record: DefaultRecordType) => boolean;
1010
1027
  rowSelection: import("pro-design-vue").ProTableRowSelection<DefaultRecordType>;
1011
1028
  rowHoverDelay: number;
1029
+ rowHover: boolean;
1012
1030
  customRow: (data: DefaultRecordType, index?: number) => Omit<import("vue").HTMLAttributes, "style"> & {
1013
1031
  style?: import("vue").CSSProperties;
1014
1032
  };
@@ -1 +1 @@
1
- {"version":3,"file":"InteralTable.vue.mjs","sources":["../../../../../../../packages/components/table/src/components/InteralTable.vue"],"sourcesContent":["<!--\n * @Author: shen\n * @Date: 2023-11-01 09:29:27\n * @LastEditors: shen\n * @LastEditTime: 2025-09-19 10:44:08\n * @Description:\n-->\n<script lang=\"ts\">\nimport type { WatchStopHandle } from 'vue'\nimport {\n computed,\n defineComponent,\n shallowRef,\n ref,\n watchEffect,\n inject,\n watch,\n toRaw,\n triggerRef,\n onActivated,\n isReactive,\n toRef,\n} from 'vue'\nimport { Spin, Pagination } from 'ant-design-vue'\nimport { animateRows as globalAnimateRows } from './config'\nimport { baseTableProps } from './interface'\nimport { DOWN, LEFT, UP } from './Drag/constant'\nimport { addNestItemData, deleteNestItemData, isPromise } from '../utils/util'\nimport { useEditProvider } from '../hooks/useEdit'\nimport { useProvidePopup } from './context/PopupContext'\nimport { useHScrollSyncProvide } from '../hooks/useHScrollSync'\nimport { useVScrollSyncProvide } from '../hooks/useVScrollSync'\nimport { useProvideTable } from './context/TableContext'\nimport { useProvideRangeStore } from '../hooks/useRangeStore'\nimport { usePrefixCls } from '@pro-design-vue/hooks'\nimport { resize } from '@pro-design-vue/directives'\nimport { omit, debounce } from '@pro-design-vue/utils'\nimport useKVMap from '../hooks/useKVMap'\nimport useLicense from '../hooks/useLicense'\nimport devWarning from '../utils/devWarning'\nimport eagerComputed from '../utils/eagerComputed'\nimport getScrollBarSize from '../utils/getScrollBarSize'\nimport useColumns from '../hooks/useColumns'\nimport useSorter from '../hooks/useSorter'\nimport useFilter from '../hooks/useFilter'\nimport useCal from '../hooks/useCal'\nimport useFlattenRecords from '../hooks/useFlattenRecords'\nimport useSelection from '../hooks/useRowSelection'\nimport usePagination, { getPaginationParam } from '../hooks/usePagination'\nimport raf from '../utils/raf'\nimport easeoutScroll from '../utils/easeoutScroll'\nimport useData from '../hooks/useData'\nimport supportSticky from '../utils/supportSticky'\nimport classNames from '../utils/classNames'\nimport useCellProps from '../hooks/useCellProps'\nimport KeyCode from '../utils/KeyCode'\nimport TableSlotsContextProvider from './context/TableSlotsContext'\nimport MeasureWidth from './MeasureWidth.vue'\nimport PopupContainer from './PopupContainer.vue'\nimport AutoHeightHeader from './AutoHeightHeader/Header.vue'\nimport Header from './Header/Header.vue'\nimport Body from './Body/Body.vue'\n\nimport type { SpinProps } from 'ant-design-vue/es/spin'\nimport type {\n GetRowKey,\n Key,\n SorterResult,\n TableLocale,\n ColumnType,\n ResizeActionType,\n DragRowEventInfo,\n DragColumnEventInfo,\n DefaultRecordType,\n TableAction,\n} from './interface'\nimport type { CustomSlotsType } from '../utils/type'\nimport type { RangeCell } from '../hooks/RangeInterface'\nimport type { SortState } from '../hooks/useSorter'\nimport type { FilterState } from '../hooks/useFilter'\nimport type { ContextSlots } from './context/TableSlotsContext'\n\nexport type FilterValue = (Key | boolean)[]\nexport interface ChangeEventInfo<RecordType> {\n pagination: {\n current?: number\n pageSize?: number\n total?: number\n }\n filters: Record<string, FilterValue | null>\n sorter: SorterResult<RecordType> | SorterResult<RecordType>[]\n filterStates: FilterState<RecordType>[]\n sorterStates: SortState<RecordType>[]\n currentDataSource: RecordType[]\n action: TableAction\n}\nconst EMPTY_LIST: any[] = []\n\nexport default defineComponent({\n name: 'ProTable',\n inheritAttrs: false,\n directives: { resize },\n components: {\n TableSlotsContextProvider,\n Spin,\n MeasureWidth,\n Pagination,\n PopupContainer,\n AutoHeightHeader,\n ProHeader: Header,\n ProBody: Body,\n },\n props: baseTableProps(),\n emits: [\n 'update:pagination',\n 'scroll',\n 'update:selectedRowKeys',\n 'update:expandedRowKeys',\n 'update:columns',\n 'update:sorter',\n 'update:filters',\n 'expand',\n 'expandedRowsChange',\n 'resizeColumn',\n 'update:dataSource',\n 'cellKeydown',\n ],\n slots: {} as CustomSlotsType<ContextSlots>,\n setup(props, { expose, emit, slots }) {\n const rowKey = computed(() => props.rowKey ?? 'id')\n const popupContainer = shallowRef<any>(null)\n const customUiCls = usePrefixCls('custom-ui')\n\n const { editCellKeys, openEditor, closeEditor } = useEditProvider()\n\n useProvidePopup()\n\n const getPopupContainer = computed(() => props.getPopupContainer!)\n const { status, watermarkMsg } = useLicense()\n\n const dragRowsHandle = new Map<Key, Set<HTMLSpanElement>>()\n const draggingRowKey = ref<Key | null>(null)\n const insertToRowKey = ref<Key | null>(null)\n const dragColumnsHandle = new Map<Key, Set<HTMLDivElement>>()\n const draggingColumnKey = ref<Key>('')\n const latestRangeStartCell = shallowRef<RangeCell | null>(null)\n const mergedSummaryFixed = computed(() =>\n props.summaryFixed === true || props.summaryFixed === ('' as any)\n ? 'bottom'\n : props.summaryFixed,\n )\n const realHeaderHeight = ref(0)\n\n watchEffect(() => {\n devWarning(\n !(typeof rowKey.value == 'function' && rowKey.value.length > 1),\n 'table',\n '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.',\n )\n })\n\n const localeData: any = inject('localeData', {\n antLocale: {\n Table: {\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting',\n },\n },\n })\n\n const locale = computed<TableLocale>(() => {\n const antLocale = localeData?.antLocale || {}\n return {\n ...(antLocale.locale === 'zh-cn'\n ? {\n triggerDesc: '\\u70B9\\u51FB\\u964D\\u5E8F',\n triggerAsc: '\\u70B9\\u51FB\\u5347\\u5E8F',\n cancelSort: '\\u53D6\\u6D88\\u6392\\u5E8F',\n }\n : {}),\n ...(antLocale.Table || {}),\n ...(props.locale || {}),\n }\n })\n\n const scrollTop = ref(0)\n const scrollLeft = ref(0)\n const rootRef = ref<HTMLDivElement>()\n const bodyWidth = ref(0)\n const bodyHeight = ref(0)\n const measureWidthRef = shallowRef<HTMLDivElement>()\n\n const mergedScrollX = eagerComputed(() => props.scrollX ?? props.scroll?.x)\n const mergedScrollY = eagerComputed(() => props.scroll?.y ?? props.height ?? props.maxHeight)\n const bodyScrollWidth = ref(typeof mergedScrollX.value == 'number' ? mergedScrollX.value : 0)\n\n watch(mergedScrollX, () => {\n bodyScrollWidth.value = typeof mergedScrollX.value == 'number' ? mergedScrollX.value : 0\n })\n\n const virtual = eagerComputed<boolean>(() => !(props.virtual === false || !mergedScrollY.value))\n const xVirtual = eagerComputed<boolean>(\n () => props.xVirtual || (props.virtual !== false && props.xVirtual !== false),\n )\n\n const getRowKey = computed<GetRowKey>(() =>\n typeof rowKey.value == 'function'\n ? rowKey.value\n : (record: Record<string, any>) => {\n return record?.[rowKey.value as string]\n },\n )\n\n const rawData = shallowRef<DefaultRecordType[]>([])\n const rawColumns = shallowRef<ColumnType[]>([])\n\n let dataSourceWatchStopHandle: WatchStopHandle\n let columnsWatchStopHandle: WatchStopHandle\n watch(\n () => props.deepWatchDataSource,\n () => {\n dataSourceWatchStopHandle && dataSourceWatchStopHandle()\n dataSourceWatchStopHandle = watch(\n () => props.dataSource,\n () => {\n rawData.value = toRaw(props.dataSource) || EMPTY_LIST\n triggerRef(rawData)\n },\n { immediate: true, deep: !!props.deepWatchDataSource },\n )\n },\n { immediate: true, deep: true },\n )\n\n watch(\n () => props.deepWatchColumns,\n () => {\n columnsWatchStopHandle && columnsWatchStopHandle()\n columnsWatchStopHandle = watch(\n () => props.columns,\n () => {\n rawColumns.value = toRaw(props.columns) || EMPTY_LIST\n triggerRef(rawColumns)\n },\n { immediate: true, deep: true },\n )\n },\n { immediate: true, deep: !!props.deepWatchColumns },\n )\n\n const childrenColumnName = computed(() => props.childrenColumnName || 'children')\n\n const { getRecordByKey, getIndexsByKey, getKeyByIndexs, allDataRowKeys, allDataRootRowKeys } =\n useKVMap(rawData, childrenColumnName, getRowKey)\n\n const defaultExpandedRowKeys = shallowRef<Key[]>([])\n watchEffect(() => {\n props.defaultExpandedRowKeys && (defaultExpandedRowKeys.value = props.defaultExpandedRowKeys)\n props.defaultExpandAllRows && (defaultExpandedRowKeys.value = allDataRowKeys.value)\n })\n\n const mergedRowSelection = computed(() => {\n const rowSelection = props.rowSelection || {}\n const { checkStrictly = true } = rowSelection\n return { ...rowSelection, checkStrictly }\n })\n\n const expandedRowKeys = computed(\n () => new Set(props.expandedRowKeys || defaultExpandedRowKeys.value || []),\n )\n\n const spinProps = computed<SpinProps>(() => {\n if (typeof props.loading === 'boolean') {\n return { spinning: props.loading }\n } else if (typeof props.loading === 'object') {\n return { spinning: true, ...props.loading }\n } else {\n return { spinning: false }\n }\n })\n\n onActivated(() => {\n scrollTo({ left: 0, top: 0 })\n })\n\n let triggerOnChange: any = () => {}\n\n const scrollBarSize = shallowRef(getScrollBarSize())\n const baseHeight = computed(() =>\n props.size === 'small' ? 39 : props.size === 'middle' ? 47 : 55,\n )\n const expandedRowRender = computed(() => props.expandedRowRender)\n const expandType = eagerComputed(() =>\n rawData.value.some((column) => column?.[childrenColumnName.value])\n ? 'nest'\n : expandedRowRender.value\n ? 'row'\n : null,\n )\n const expandable = eagerComputed(() => !!props.expandedRowRender)\n\n const columns = useColumns({\n props,\n rawColumns,\n bodyScrollWidth,\n baseHeight,\n measureWidthRef,\n expandable,\n expandType,\n scrollLeft,\n bodyWidth,\n xVirtual,\n draggingColumnKey,\n latestRangeStartCell,\n })\n\n const { sortedData, sorterStates, sorter, changeSorter } = useSorter(\n props,\n rawData,\n columns.allColumns,\n (sorter, sorterStates) => {\n scrollTop.value > bodyHeight.value && updateAnimate()\n triggerOnChange({ sorter, sorterStates }, 'sort', false)\n },\n )\n\n const { filterData, filterStates, filters, changeFilter } = useFilter(\n props,\n sortedData,\n columns.allColumns,\n (filters, filterStates) => {\n triggerOnChange({ filters, filterStates }, 'filter', true)\n },\n )\n\n const total = eagerComputed(() => filterData.value.length)\n const paginationParam = computed(() => {\n if (props.pagination === false) {\n return {}\n }\n return getPaginationParam(props.pagination, mergedPagination.value)\n })\n\n const triggeronPaginationChange = (current: number, pageSize: number) => {\n const pagination = { ...paginationParam.value, current, pageSize }\n props['onUpdate:pagination'] &&\n emit(\n 'update:pagination',\n isReactive(props.pagination)\n ? Object.assign(props.pagination || {}, pagination)\n : pagination,\n )\n }\n\n const {\n mergedPagination,\n pos,\n refreshPagination,\n onChange: onPaginationChange,\n onShowSizeChange,\n pageData,\n } = usePagination(total, props, filterData, (current, pageSize) => {\n const pagination = { ...paginationParam.value, current, pageSize }\n triggeronPaginationChange(current, pageSize)\n updateAnimate()\n triggerOnChange({ pagination }, 'paginate')\n })\n\n const {\n flattenData,\n keyEntities,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n checkboxPropsMap,\n getRowFlattenIndexByKey,\n isMyChildren,\n getRowByFlattenIndex,\n } = useFlattenRecords(\n pageData,\n childrenColumnName,\n expandedRowKeys,\n getRowKey,\n expandType,\n mergedRowSelection,\n )\n\n const cal = useCal(props, flattenData, bodyHeight, scrollTop, virtual, keyEntities)\n\n const { rowPosition, viewportHeight, startIndex, endIndex } = cal\n const { leftWidth, rightWidth, centerWidth, bodyMaxWidth } = columns\n\n const selection = useSelection(props, mergedRowSelection, rawData, {\n prefixCls: computed(() => props.prefixCls!),\n pageData,\n getRowKey,\n getRecordByKey,\n childrenColumnName,\n locale,\n flattenData,\n keyEntities,\n checkboxPropsMap,\n allDataRowKeys,\n allDataRootRowKeys,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n })\n\n const bodyRef = ref<HTMLDivElement>()\n let leftRaf: any, topRaf: any\n\n const scrollTo = (options: any = {}, type = 'auto', isAnimate = false) => {\n if (!isAnimate) {\n updateAnimate()\n }\n const mergeOptions = typeof options == 'number' ? { top: options } : options\n let left, top\n if ('left' in mergeOptions) {\n left = mergeOptions.left || 0\n } else if ('columnIndex' in mergeOptions) {\n const position = columns.getColumnPosition(mergeOptions.columnIndex!)\n if (position) {\n left = position.left - leftWidth.value\n }\n } else if ('columnKey' in mergeOptions) {\n const position = columns.getColumnPositionByKey(mergeOptions.columnKey!)\n if (position) {\n left = position.left - leftWidth.value\n }\n }\n if ('top' in mergeOptions) {\n top = Math.min(Math.max(mergeOptions.top || 0, 0), maxScrollTop.value)\n } else if ('rowKey' in mergeOptions) {\n const pos = cal.getRowPositionByKey(mergeOptions.rowKey!)\n if (pos) {\n top = pos\n }\n }\n\n left = Math.max(Math.min(maxScrollLeft.value, left || 0), 0)\n if (!showVerticalScrollbar.value) {\n top = 0\n }\n if (type === 'smooth') {\n if (left !== undefined) {\n raf.cancel(leftRaf)\n leftRaf = easeoutScroll(scrollLeft.value, left, (val: number) => {\n scrollLeft.value = val\n })\n }\n if (top !== undefined) {\n raf.cancel(topRaf)\n topRaf = easeoutScroll(scrollTop.value, top, (val: number) => {\n scrollTop.value = val\n })\n }\n } else {\n if (left !== undefined) {\n scrollLeft.value = left\n }\n if (top !== undefined) {\n scrollTop.value = top\n }\n }\n }\n\n const useAnimate = ref(false)\n const animateRows = computed(() => {\n return !!(props.animateRows ?? globalAnimateRows.value)\n })\n\n let timer: any\n watch(\n animateRows,\n (newVal) => {\n useAnimate.value = newVal\n },\n { immediate: true },\n )\n\n const updateAnimate = () => {\n useAnimate.value = false\n clearTimeout(timer)\n timer = setTimeout(() => {\n useAnimate.value = animateRows.value\n }, 100)\n }\n\n const maxScrollLeft = computed(() => bodyMaxWidth.value - bodyWidth.value)\n const maxScrollTop = computed(() => viewportHeight.value - bodyHeight.value)\n const onScroll = (e) => {\n emit('scroll', e)\n }\n\n useHScrollSyncProvide({ scrollLeft, maxScrollLeft, onScroll, bodyWidth })\n useVScrollSyncProvide({ scrollTop, maxScrollTop, onScroll, updateAnimate, bodyWidth })\n\n const { data, pos: dataRowPosition } = useData(\n props,\n rowPosition,\n flattenData,\n startIndex,\n endIndex,\n draggingRowKey,\n useAnimate,\n getRowFlattenIndexByKey,\n latestRangeStartCell,\n )\n\n const pingedLeft = ref(false)\n const pingedRight = ref(false)\n const noPinged = ref(false)\n\n watchEffect(() => {\n pingedLeft.value = supportSticky && !!scrollLeft.value\n pingedRight.value =\n supportSticky &&\n centerWidth.value - (bodyWidth.value - leftWidth.value - rightWidth.value) >\n scrollLeft.value\n noPinged.value = !pingedLeft.value && !pingedRight.value\n })\n\n const rootClass = computed(() =>\n classNames({\n [`${props.prefixCls}`]: true,\n [`${props.prefixCls}-support-sticky`]: supportSticky,\n [`${props.prefixCls}-stripe`]: props.stripe,\n [`${props.prefixCls}-bordered`]: props.bordered,\n [`${props.prefixCls}-${props.size}`]: true,\n [`${props.prefixCls}-ping-left`]: pingedLeft.value,\n [`${props.prefixCls}-ping-right`]: pingedRight.value,\n [`${props.prefixCls}-no-ping`]: noPinged.value,\n [`${props.prefixCls}-has-animate`]: animateRows.value,\n }),\n )\n const rootStyle = computed(() => ({\n height: typeof props.height == 'number' ? `${props.height}px` : props.height,\n maxHeight: typeof props.maxHeight == 'number' ? `${props.maxHeight}px` : props.maxHeight,\n minHeight: typeof props.minHeight == 'number' ? `${props.minHeight}px` : props.minHeight,\n }))\n\n const showHorizontalScrollbar = ref(false)\n const debounceFn = debounce(() => {\n showHorizontalScrollbar.value = bodyMaxWidth.value > bodyWidth.value\n if (bodyWidth.value > bodyScrollWidth.value) {\n bodyScrollWidth.value = bodyWidth.value\n }\n }, 100)\n\n watch([bodyMaxWidth, bodyWidth], () => {\n debounceFn()\n })\n\n const showVerticalScrollbar = eagerComputed(\n () => !!mergedScrollY.value && bodyHeight.value + 0.9 < viewportHeight.value,\n )\n const scrollToFirstRow = eagerComputed(\n () => !props.scroll || (props.scroll && props.scroll.scrollToFirstRowOnChange !== false),\n )\n\n triggerOnChange = (\n info: Partial<ChangeEventInfo<DefaultRecordType>>,\n action: TableAction,\n reset = false,\n ) => {\n if (reset) {\n refreshPagination()\n triggeronPaginationChange(1, mergedPagination.value.pageSize!)\n if (props.pagination) {\n props.pagination.onChange?.(1, mergedPagination.value.pageSize)\n }\n }\n if (scrollToFirstRow.value) {\n scrollTop.value = 0\n }\n props.onChange?.(\n info.pagination || mergedPagination.value,\n info.filters || filters.value,\n info.sorter || sorter.value,\n {\n currentDataSource: info.currentDataSource || filterData.value,\n action,\n },\n )\n }\n\n const paginationProps = computed(() => {\n return omit(mergedPagination.value, ['position', 'onChange', 'onShowSizeChange'])\n })\n\n const paginationClass = computed(() => {\n return {\n [`${props.prefixCls}-pagination`]: true,\n [`${props.prefixCls}-pagination-${pos.value.bottom}`]: true,\n [`${customUiCls}`]: true,\n }\n })\n const bottomPaginationHeight = ref(0)\n const bottomPaginationStyle = computed<any>(() => {\n if (!props.paginationSticky) {\n return {}\n }\n if (props.paginationSticky === true) {\n return { position: 'sticky', 'z-index': 9, bottom: '0px' }\n }\n return {\n position: 'sticky',\n 'z-index': 9,\n bottom: `${props.paginationSticky?.offsetBottom ?? 0}px`,\n }\n })\n\n const indentSize = computed(() => (typeof props.indentSize == 'number' ? props.indentSize : 15))\n\n const cellProps = useCellProps({\n leftColumns: columns.leftColumns,\n rightColumns: columns.rightColumns,\n visibleCenterColumns: columns.visibleCenterColumns,\n allColumns: columns.allColumns,\n data,\n mergedRowHeights: cal.mergedRowHeights,\n startIndex,\n getColumnPosition: columns.getColumnPosition,\n bodyWidth,\n leftWidth,\n centerWidth,\n getRowHeight: cal.getRowHeight,\n customCell: toRef(props, 'customCell'),\n })\n\n watch(\n [realHeaderHeight, scrollLeft],\n () => {\n popupContainer.value?.alignPopup?.()\n },\n { flush: 'post' },\n )\n\n useProvideTable({\n ...cal,\n ...columns,\n ...cellProps,\n rootRef,\n rawData,\n getRowFlattenIndexByKey,\n prefixCls: computed(() => props.prefixCls!),\n draggingRowKey,\n insertToRowKey,\n status,\n useAnimate,\n animateRows,\n watermarkMsg,\n onResizeColumn: (w: number, col: ColumnType, action: ResizeActionType) => {\n const width = col.width\n const result = props.onResizeColumn?.(w, col, action)\n if (result !== false && !(width === w && col.width === w)) {\n col.width = width !== col.width ? col.width : w\n triggerRef(rawColumns)\n }\n },\n onRowDragEnd: (opt: DragRowEventInfo) => {\n const { insertToRowKey, record, fromIndexs, rowKey, dir, preTargetInfo, nextTargetInfo } =\n opt\n const rawRecord = toRaw(record)\n const dragEnd = props.onRowDragEnd?.({ ...opt, record: rawRecord, fromIndexs })\n if (dragEnd === false) {\n return\n }\n\n const handler = () => {\n if (!isMyChildren(rowKey, preTargetInfo?.rowKey as Key) && insertToRowKey !== rowKey) {\n if (insertToRowKey !== null) {\n const parentRecord = getRecordByKey(insertToRowKey)\n if (\n insertToRowKey === preTargetInfo?.rowKey ||\n insertToRowKey === nextTargetInfo?.rowKey\n ) {\n if (dir === DOWN) {\n addNestItemData(\n parentRecord[childrenColumnName.value],\n [],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n parentRecord[childrenColumnName.value],\n [],\n childrenColumnName.value,\n rawRecord,\n )\n }\n } else {\n if (dir === DOWN) {\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs as number[],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs as number[],\n childrenColumnName.value,\n rawRecord,\n )\n }\n }\n } else {\n if (dir === DOWN && preTargetInfo) {\n addNestItemData(\n rawData.value,\n [preTargetInfo.indexs[0]!],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else if (dir === UP && nextTargetInfo) {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs ? [preTargetInfo!.indexs[0]!] : [],\n childrenColumnName.value,\n rawRecord,\n )\n }\n }\n triggerRef(rawData)\n emit('update:dataSource', rawData.value)\n }\n }\n\n if (isPromise(dragEnd)) {\n dragEnd\n .then(() => {\n handler()\n })\n .catch(() => {})\n } else {\n handler()\n }\n },\n virtual,\n xVirtual,\n dataRowPosition,\n rawColumns,\n bodyHeight,\n scrollTop,\n scrollLeft,\n supportSticky,\n childrenColumnName,\n bodyScrollWidth,\n baseHeight,\n startIndex,\n data,\n pageData,\n getRecordByKey,\n getIndexsByKey,\n expandType,\n flattenData,\n expandedRowKeys,\n indentSize,\n props,\n bodyWidth,\n scrollTo,\n scrollBarSize,\n leftWidth,\n rightWidth,\n centerWidth,\n showVerticalScrollbar,\n showHorizontalScrollbar,\n getRowKey,\n selection,\n updateSelectedRowKeys: (keys: Key[]) => {\n emit('update:selectedRowKeys', keys)\n },\n locale,\n sorterStates,\n changeSorter,\n changeFilter,\n filterStates,\n onTriggerExpand: (record, key: Key) => {\n let keys: Key[]\n const hasKey = expandedRowKeys.value.has(key)\n if (hasKey) {\n expandedRowKeys.value.delete(key)\n keys = [...expandedRowKeys.value]\n } else {\n keys = [...expandedRowKeys.value, key]\n }\n defaultExpandedRowKeys.value = keys\n emit('update:expandedRowKeys', keys)\n emit('expand', !hasKey, record)\n emit('expandedRowsChange', keys)\n },\n keyEntities,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n checkboxPropsMap,\n mergedRowSelection,\n getPopupContainer,\n allDataRowKeys,\n allDataRootRowKeys,\n dragRowsHandle,\n isMyChildren,\n getKeyByIndexs,\n getRowByFlattenIndex,\n draggingColumnKey,\n dragColumnsHandle,\n onColumnDragEnd: (arg: DragColumnEventInfo) => {\n const { dir, column, targetColumn } = arg\n const dragEnd = props.onColumnDragEnd?.(arg)\n if (dragEnd === false) {\n return\n }\n\n const handler = () => {\n if (column === targetColumn || column.key === targetColumn.key) return\n const index = rawColumns.value.findIndex(\n (col) => col === column || col.key === column.key,\n )\n const targetIndex = rawColumns.value.findIndex(\n (col) => col === targetColumn || col.key === targetColumn.key,\n )\n if (dir === LEFT) {\n rawColumns.value.splice(index, 1)\n rawColumns.value.splice(targetIndex, 0, column)\n } else {\n rawColumns.value.splice(targetIndex + 1, 0, column)\n rawColumns.value.splice(index, 1)\n }\n triggerRef(rawColumns)\n emit('update:columns', rawColumns.value)\n }\n\n if (isPromise(dragEnd)) {\n dragEnd\n .then(() => {\n handler()\n })\n .catch(() => {})\n } else {\n handler()\n }\n },\n onColumnDrag: () => {},\n columnDrag: computed(() => props.columnDrag),\n summaryFixed: mergedSummaryFixed,\n realHeaderHeight,\n bottomPaginationHeight,\n pos,\n })\n\n const tabGuardTopRef = ref()\n const tabGuardBottomRef = ref()\n\n const {\n navigationService,\n getSelectedRange,\n clearAllSelectedRange,\n copySelectedRange,\n appendCellToSelectedRange,\n onBodyKeydown,\n } = useProvideRangeStore({\n allColumns: columns.allColumns,\n flattenData,\n rangeSelection: computed(() => props.rangeSelection),\n getRowByFlattenIndex,\n rootRef,\n prefixCls: computed(() => props.prefixCls!),\n allCellProps: cellProps.allCellProps,\n tabGuardTopRef,\n tabGuardBottomRef,\n ensureCellColumnVisible: (cell: RangeCell) => {\n if (!cell.column || cell.column.fixed) return\n const sl = scrollLeft.value\n const pos = columns.getColumnPositionByKey(cell.column.columnKey)\n if (pos) {\n const { width, left } = pos\n const lw = leftWidth.value\n const rw = rightWidth.value\n left - lw < sl\n ? (scrollLeft.value = left - lw)\n : left + width > sl + bodyWidth.value - rw &&\n (scrollLeft.value = left + width - bodyWidth.value + rw)\n }\n },\n ensureCellRowVisible: (cell: RangeCell) => {\n const { rowIndex } = cell\n const st = scrollTop.value\n const row = getRowByFlattenIndex(rowIndex)\n const pos = cal.getRowPositionByKey(row.rowKey)\n const cprops =\n (cellProps.allCellProps.value[row.rowKey]?.[cell.column!.columnKey] || {}).props || {}\n const height = cal.getRowHeight(rowIndex, cprops.rowSpan)\n if (pos !== undefined) {\n updateAnimate()\n if (pos < st) {\n scrollTop.value = pos\n } else {\n if (pos + height > st + bodyHeight.value) {\n scrollTop.value = pos + height - bodyHeight.value\n }\n }\n }\n },\n latestRangeStartCell,\n bodyRef: computed(() => {\n return (bodyRef.value as any)?.bodyRef\n }),\n scrollLeft,\n scrollTop,\n scrollTo,\n showVerticalScrollbar,\n showHorizontalScrollbar,\n getIndexsByKey,\n formatRangeCellText: (parmas) => {\n if (props.formatRangeCellText) {\n return props.formatRangeCellText(parmas)\n } else if (parmas.value) {\n return parmas.value\n }\n return ''\n },\n editCellKeys,\n copyDelimiter: computed(() => props.copyDelimiter),\n })\n\n expose({\n scrollTo,\n scrollLeft,\n scrollTop,\n bodyRef: computed(() => {\n return (bodyRef.value as any)?.bodyRef\n }),\n getSelectedRange,\n clearAllSelectedRange,\n copySelectedRange,\n appendCellToSelectedRange,\n openEditor: (cellInfos: any[]) => {\n openEditor(cellInfos.map((info) => `${info.rowKey} ${info.columnKey}`))\n },\n closeEditor: (cellInfos: any[]) => {\n if (cellInfos) {\n closeEditor(cellInfos.map((info) => `${info.rowKey} ${info.columnKey}`))\n } else {\n closeEditor()\n }\n },\n })\n\n return {\n bodyRef,\n spinProps,\n rowPosition,\n viewportHeight,\n startIndex,\n data,\n watermarkMsg,\n rootStyle,\n rootClass,\n onBodyKeydown,\n watermarkStyle: computed<any>(() => ({\n minWidth: '100px!important',\n minHeight: '40px!important',\n position: 'absolute!important',\n fontSize: '20px!important',\n opacity: '0.8!important',\n bottom: '40px!important',\n right: '40px!important',\n pointerEvents: 'none',\n display: 'block!important',\n zIndex: '999999!important',\n color: '#000000!important',\n margin: '0px!important',\n padding: '0px!important',\n transform: 'unset!important',\n })),\n mergedPagination,\n pos,\n onPaginationChange,\n scrollBarSize,\n scrollTop,\n bodyScrollWidth,\n bodyWidth,\n scrollLeft,\n cal,\n selection,\n locale,\n paginationProps,\n slots,\n mergedScrollX,\n mergedScrollY,\n bodyHeight,\n measureWidthRef,\n flattenData,\n rootRef,\n mergedSummaryFixed,\n handleResize: (e: CustomEvent) => {\n realHeaderHeight.value = e.detail.height\n },\n handlePaginationResize: (e: CustomEvent) => {\n bottomPaginationHeight.value = e.detail.height\n },\n popupContainer,\n handleGuardTopKeydown: (e: KeyboardEvent) => {\n e.keyCode !== KeyCode.TAB ||\n e.shiftKey ||\n (navigationService.getFirstCellToFocus(e.shiftKey), e.preventDefault())\n },\n handleGuardBottomKeydown: (e: KeyboardEvent) => {\n e.keyCode === KeyCode.TAB &&\n e.shiftKey &&\n (navigationService.getLastCellToFocus(e.shiftKey), e.preventDefault())\n },\n tabGuardTopRef,\n tabGuardBottomRef,\n onShowSizeChange,\n customUiCls,\n paginationClass,\n bottomPaginationStyle,\n }\n },\n})\n</script>\n\n<template>\n <TableSlotsContextProvider :value=\"{ ...slots }\">\n <Spin v-bind=\"spinProps\">\n <Pagination\n v-if=\"pos.top\"\n :class=\"`${prefixCls}-pagination ${prefixCls}-pagination-${pos.top} ${customUiCls}`\"\n v-bind=\"paginationProps\"\n @change=\"onPaginationChange\"\n @show-size-change=\"onShowSizeChange\"\n />\n <div\n ref=\"tabGuardTopRef\"\n role=\"presentation\"\n tabindex=\"0\"\n :style=\"{ position: 'absolute', width: '0', height: '0' }\"\n @keydown=\"handleGuardTopKeydown\"\n ></div>\n <div key=\"content\" ref=\"ref\" :class=\"rootClass\" :style=\"rootStyle\">\n <template v-if=\"showHeader\">\n <AutoHeightHeader\n v-if=\"autoHeaderHeight\"\n :prefix-cls=\"prefixCls\"\n :sticky=\"sticky\"\n @resizeheight=\"handleResize\"\n />\n <ProHeader v-else :prefix-cls=\"prefixCls\" :sticky=\"sticky\" @resizeheight=\"handleResize\" />\n </template>\n <ProBody\n ref=\"bodyRef\"\n v-model:bodyScrollWidth=\"bodyScrollWidth\"\n v-model:bodyWidth=\"bodyWidth\"\n v-model:bodyHeight=\"bodyHeight\"\n :prefix-cls=\"prefixCls\"\n :wrap-text=\"wrapText\"\n :scroll-x=\"mergedScrollX\"\n :height=\"mergedScrollY\"\n :summary-fixed=\"mergedSummaryFixed\"\n :summary=\"$slots.summary\"\n :empty-text=\"$slots.emptyText\"\n @keydown=\"onBodyKeydown\"\n />\n </div>\n <div\n ref=\"tabGuardBottomRef\"\n role=\"presentation\"\n tabindex=\"0\"\n :style=\"{ position: 'absolute', width: '0', height: '0' }\"\n @keydown=\"handleGuardBottomKeydown\"\n ></div>\n <div v-if=\"$slots.footer\" key=\"footer\" :class=\"`${prefixCls}-footer`\">\n <slot name=\"footer\" />\n </div>\n <PopupContainer ref=\"popupContainer\" :prefix-cls=\"prefixCls\" />\n <div\n v-if=\"pos.bottom\"\n v-resize:height\n :style=\"bottomPaginationStyle\"\n :class=\"`${prefixCls}-pagination-wrap`\"\n @resizeheight=\"handlePaginationResize\"\n >\n <Pagination\n :class=\"paginationClass\"\n v-bind=\"paginationProps\"\n @change=\"onPaginationChange\"\n @show-size-change=\"onShowSizeChange\"\n />\n </div>\n </Spin>\n <MeasureWidth ref=\"measureWidthRef\" />\n </TableSlotsContextProvider>\n</template>\n"],"names":["_createBlock","_createVNode","_normalizeProps","_guardReactiveProps","_withCtx","_openBlock","_mergeProps","_createCommentVNode","_createElementVNode","_normalizeClass","_normalizeStyle","_createElementBlock","_Fragment","_renderSlot","_withDirectives"],"m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AAM;AAAA,aAAA,CAAA,GAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA;AAAA;;;;;;;MAanBN,WAAA;AAAA,QAAsC,uBAAA;AAAA,QAAA,EAAxB,KAAI,iBAAA,EAAiB;AAAA,QAAA,IAAA;AAAA,QAAA;AAAA;AAAA;AAAA,KAAA,CAAA;AAAA;;;;;;;;"}
1
+ {"version":3,"file":"InteralTable.vue.mjs","sources":["../../../../../../../packages/components/table/src/components/InteralTable.vue"],"sourcesContent":["<!--\n * @Author: shen\n * @Date: 2023-11-01 09:29:27\n * @LastEditors: shen\n * @LastEditTime: 2025-09-30 16:18:38\n * @Description:\n-->\n<script lang=\"ts\">\nimport type { WatchStopHandle } from 'vue'\nimport {\n computed,\n defineComponent,\n shallowRef,\n ref,\n watchEffect,\n inject,\n watch,\n toRaw,\n triggerRef,\n onActivated,\n isReactive,\n toRef,\n} from 'vue'\nimport { Spin, Pagination } from 'ant-design-vue'\nimport { animateRows as globalAnimateRows } from './config'\nimport { baseTableProps } from './interface'\nimport { DOWN, LEFT, UP } from './Drag/constant'\nimport { addNestItemData, deleteNestItemData } from '../utils/util'\nimport { useEditProvider } from '../hooks/useEdit'\nimport { useProvidePopup } from './context/PopupContext'\nimport { useHScrollSyncProvide } from '../hooks/useHScrollSync'\nimport { useVScrollSyncProvide } from '../hooks/useVScrollSync'\nimport { useProvideTable } from './context/TableContext'\nimport { useProvideRangeStore } from '../hooks/useRangeStore'\nimport { usePrefixCls } from '@pro-design-vue/hooks'\nimport { resize } from '@pro-design-vue/directives'\nimport { omit, debounce, isPromise } from '@pro-design-vue/utils'\nimport useKVMap from '../hooks/useKVMap'\nimport useLicense from '../hooks/useLicense'\nimport devWarning from '../utils/devWarning'\nimport eagerComputed from '../utils/eagerComputed'\nimport getScrollBarSize from '../utils/getScrollBarSize'\nimport useColumns from '../hooks/useColumns'\nimport useSorter from '../hooks/useSorter'\nimport useFilter from '../hooks/useFilter'\nimport useCal from '../hooks/useCal'\nimport useFlattenRecords from '../hooks/useFlattenRecords'\nimport useSelection from '../hooks/useRowSelection'\nimport usePagination, { getPaginationParam } from '../hooks/usePagination'\nimport raf from '../utils/raf'\nimport easeoutScroll from '../utils/easeoutScroll'\nimport useData from '../hooks/useData'\nimport supportSticky from '../utils/supportSticky'\nimport classNames from '../utils/classNames'\nimport useCellProps from '../hooks/useCellProps'\nimport KeyCode from '../utils/KeyCode'\nimport TableSlotsContextProvider from './context/TableSlotsContext'\nimport MeasureWidth from './MeasureWidth.vue'\nimport PopupContainer from './PopupContainer.vue'\nimport AutoHeightHeader from './AutoHeightHeader/Header.vue'\nimport Header from './Header/Header.vue'\nimport Body from './Body/Body.vue'\n\nimport type { SpinProps } from 'ant-design-vue/es/spin'\nimport type {\n GetRowKey,\n Key,\n SorterResult,\n TableLocale,\n ColumnType,\n ResizeActionType,\n DragRowEventInfo,\n DragColumnEventInfo,\n DefaultRecordType,\n TableAction,\n} from './interface'\nimport type { CustomSlotsType } from '../utils/type'\nimport type { RangeCell } from '../hooks/RangeInterface'\nimport type { SortState } from '../hooks/useSorter'\nimport type { FilterState } from '../hooks/useFilter'\nimport type { ContextSlots } from './context/TableSlotsContext'\n\nexport type FilterValue = (Key | boolean)[]\nexport interface ChangeEventInfo<RecordType> {\n pagination: {\n current?: number\n pageSize?: number\n total?: number\n }\n filters: Record<string, FilterValue | null>\n sorter: SorterResult<RecordType> | SorterResult<RecordType>[]\n filterStates: FilterState<RecordType>[]\n sorterStates: SortState<RecordType>[]\n currentDataSource: RecordType[]\n action: TableAction\n}\nconst EMPTY_LIST: any[] = []\n\nexport default defineComponent({\n name: 'ProTable',\n inheritAttrs: false,\n directives: { resize },\n components: {\n TableSlotsContextProvider,\n Spin,\n MeasureWidth,\n Pagination,\n PopupContainer,\n AutoHeightHeader,\n ProHeader: Header,\n ProBody: Body,\n },\n props: baseTableProps(),\n emits: [\n 'update:pagination',\n 'scroll',\n 'update:selectedRowKeys',\n 'update:expandedRowKeys',\n 'update:columns',\n 'update:sorter',\n 'update:filters',\n 'expand',\n 'expandedRowsChange',\n 'resizeColumn',\n 'update:dataSource',\n 'cellKeydown',\n ],\n slots: {} as CustomSlotsType<ContextSlots>,\n setup(props, { expose, emit, slots }) {\n const rowKey = computed(() => props.rowKey ?? 'id')\n const popupContainer = shallowRef<any>(null)\n const customUiCls = usePrefixCls('custom-ui')\n\n const { editCellKeys, openEditor, closeEditor } = useEditProvider()\n\n useProvidePopup()\n\n const getPopupContainer = computed(() => props.getPopupContainer!)\n const { status, watermarkMsg } = useLicense()\n\n const dragRowsHandle = new Map<Key, Set<HTMLSpanElement>>()\n const draggingRowKey = ref<Key | null>(null)\n const insertToRowKey = ref<Key | null>(null)\n const dragColumnsHandle = new Map<Key, Set<HTMLDivElement>>()\n const draggingColumnKey = ref<Key>('')\n const latestRangeStartCell = shallowRef<RangeCell | null>(null)\n const mergedSummaryFixed = computed(() =>\n props.summaryFixed === true || props.summaryFixed === ('' as any)\n ? 'bottom'\n : props.summaryFixed,\n )\n const realHeaderHeight = ref(0)\n\n watchEffect(() => {\n devWarning(\n !(typeof rowKey.value == 'function' && rowKey.value.length > 1),\n 'table',\n '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.',\n )\n })\n\n const localeData: any = inject('localeData', {\n antLocale: {\n Table: {\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting',\n },\n },\n })\n\n const locale = computed<TableLocale>(() => {\n const antLocale = localeData?.antLocale || {}\n return {\n ...(antLocale.locale === 'zh-cn'\n ? {\n triggerDesc: '\\u70B9\\u51FB\\u964D\\u5E8F',\n triggerAsc: '\\u70B9\\u51FB\\u5347\\u5E8F',\n cancelSort: '\\u53D6\\u6D88\\u6392\\u5E8F',\n }\n : {}),\n ...(antLocale.Table || {}),\n ...(props.locale || {}),\n }\n })\n\n const scrollTop = ref(0)\n const scrollLeft = ref(0)\n const rootRef = ref<HTMLDivElement>()\n const bodyWidth = ref(0)\n const bodyHeight = ref(0)\n const measureWidthRef = shallowRef<HTMLDivElement>()\n\n const mergedScrollX = eagerComputed(() => props.scrollX ?? props.scroll?.x)\n const mergedScrollY = eagerComputed(() => props.scroll?.y ?? props.height ?? props.maxHeight)\n const bodyScrollWidth = ref(typeof mergedScrollX.value == 'number' ? mergedScrollX.value : 0)\n\n watch(mergedScrollX, () => {\n bodyScrollWidth.value = typeof mergedScrollX.value == 'number' ? mergedScrollX.value : 0\n })\n\n const virtual = eagerComputed<boolean>(() => !(props.virtual === false || !mergedScrollY.value))\n const xVirtual = eagerComputed<boolean>(\n () => props.xVirtual || (props.virtual !== false && props.xVirtual !== false),\n )\n\n const getRowKey = computed<GetRowKey>(() =>\n typeof rowKey.value == 'function'\n ? rowKey.value\n : (record: Record<string, any>) => {\n return record?.[rowKey.value as string]\n },\n )\n\n const rawData = shallowRef<DefaultRecordType[]>([])\n const rawColumns = shallowRef<ColumnType[]>([])\n\n let dataSourceWatchStopHandle: WatchStopHandle\n let columnsWatchStopHandle: WatchStopHandle\n watch(\n () => props.deepWatchDataSource,\n () => {\n dataSourceWatchStopHandle && dataSourceWatchStopHandle()\n dataSourceWatchStopHandle = watch(\n () => props.dataSource,\n () => {\n rawData.value = toRaw(props.dataSource) || EMPTY_LIST\n triggerRef(rawData)\n },\n { immediate: true, deep: !!props.deepWatchDataSource },\n )\n },\n { immediate: true, deep: true },\n )\n\n watch(\n () => props.deepWatchColumns,\n () => {\n columnsWatchStopHandle && columnsWatchStopHandle()\n columnsWatchStopHandle = watch(\n () => props.columns,\n () => {\n rawColumns.value = toRaw(props.columns) || EMPTY_LIST\n triggerRef(rawColumns)\n },\n { immediate: true, deep: true },\n )\n },\n { immediate: true, deep: !!props.deepWatchColumns },\n )\n\n const childrenColumnName = computed(() => props.childrenColumnName || 'children')\n\n const { getRecordByKey, getIndexsByKey, getKeyByIndexs, allDataRowKeys, allDataRootRowKeys } =\n useKVMap(rawData, childrenColumnName, getRowKey)\n\n const defaultExpandedRowKeys = shallowRef<Key[]>([])\n watchEffect(() => {\n props.defaultExpandedRowKeys && (defaultExpandedRowKeys.value = props.defaultExpandedRowKeys)\n props.defaultExpandAllRows && (defaultExpandedRowKeys.value = allDataRowKeys.value)\n })\n\n const mergedRowSelection = computed(() => {\n const rowSelection = props.rowSelection || {}\n const { checkStrictly = true } = rowSelection\n return { ...rowSelection, checkStrictly }\n })\n\n const expandedRowKeys = computed(\n () => new Set(props.expandedRowKeys || defaultExpandedRowKeys.value || []),\n )\n\n const spinProps = computed<SpinProps>(() => {\n if (typeof props.loading === 'boolean') {\n return { spinning: props.loading }\n } else if (typeof props.loading === 'object') {\n return { spinning: true, ...props.loading }\n } else {\n return { spinning: false }\n }\n })\n\n onActivated(() => {\n scrollTo({ left: 0, top: 0 })\n })\n\n let triggerOnChange: any = () => {}\n\n const scrollBarSize = shallowRef(getScrollBarSize())\n const baseHeight = computed(() =>\n props.size === 'small' ? 39 : props.size === 'middle' ? 47 : 55,\n )\n const expandedRowRender = computed(() => props.expandedRowRender)\n const expandType = eagerComputed(() =>\n rawData.value.some((column) => column?.[childrenColumnName.value])\n ? 'nest'\n : expandedRowRender.value\n ? 'row'\n : null,\n )\n const expandable = eagerComputed(() => !!props.expandedRowRender)\n\n const columns = useColumns({\n props,\n rawColumns,\n bodyScrollWidth,\n baseHeight,\n measureWidthRef,\n expandable,\n expandType,\n scrollLeft,\n bodyWidth,\n xVirtual,\n draggingColumnKey,\n latestRangeStartCell,\n })\n\n const { sortedData, sorterStates, sorter, changeSorter } = useSorter(\n props,\n rawData,\n columns.allColumns,\n (sorter, sorterStates) => {\n scrollTop.value > bodyHeight.value && updateAnimate()\n triggerOnChange({ sorter, sorterStates }, 'sort', false)\n },\n )\n\n const { filterData, filterStates, filters, changeFilter } = useFilter(\n props,\n sortedData,\n columns.allColumns,\n (filters, filterStates) => {\n triggerOnChange({ filters, filterStates }, 'filter', true)\n },\n )\n\n const total = eagerComputed(() => filterData.value.length)\n const paginationParam = computed(() => {\n if (props.pagination === false) {\n return {}\n }\n return getPaginationParam(props.pagination, mergedPagination.value)\n })\n\n const triggeronPaginationChange = (current: number, pageSize: number) => {\n const pagination = { ...paginationParam.value, current, pageSize }\n props['onUpdate:pagination'] &&\n emit(\n 'update:pagination',\n isReactive(props.pagination)\n ? Object.assign(props.pagination || {}, pagination)\n : pagination,\n )\n }\n\n const {\n mergedPagination,\n pos,\n refreshPagination,\n onChange: onPaginationChange,\n onShowSizeChange,\n pageData,\n } = usePagination(total, props, filterData, (current, pageSize) => {\n const pagination = { ...paginationParam.value, current, pageSize }\n triggeronPaginationChange(current, pageSize)\n updateAnimate()\n triggerOnChange({ pagination }, 'paginate')\n })\n\n const {\n flattenData,\n keyEntities,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n checkboxPropsMap,\n getRowFlattenIndexByKey,\n isMyChildren,\n getRowByFlattenIndex,\n } = useFlattenRecords(\n pageData,\n childrenColumnName,\n expandedRowKeys,\n getRowKey,\n expandType,\n mergedRowSelection,\n )\n\n const cal = useCal(props, flattenData, bodyHeight, scrollTop, virtual, keyEntities)\n\n const { rowPosition, viewportHeight, startIndex, endIndex } = cal\n const { leftWidth, rightWidth, centerWidth, bodyMaxWidth } = columns\n\n const selection = useSelection(props, mergedRowSelection, rawData, {\n prefixCls: computed(() => props.prefixCls!),\n pageData,\n getRowKey,\n getRecordByKey,\n childrenColumnName,\n locale,\n flattenData,\n keyEntities,\n checkboxPropsMap,\n allDataRowKeys,\n allDataRootRowKeys,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n })\n\n const bodyRef = ref<HTMLDivElement>()\n let leftRaf: any, topRaf: any\n\n const scrollTo = (options: any = {}, type = 'auto', isAnimate = false) => {\n if (!isAnimate) {\n updateAnimate()\n }\n const mergeOptions = typeof options == 'number' ? { top: options } : options\n let left, top\n if ('left' in mergeOptions) {\n left = mergeOptions.left || 0\n } else if ('columnIndex' in mergeOptions) {\n const position = columns.getColumnPosition(mergeOptions.columnIndex!)\n if (position) {\n left = position.left - leftWidth.value\n }\n } else if ('columnKey' in mergeOptions) {\n const position = columns.getColumnPositionByKey(mergeOptions.columnKey!)\n if (position) {\n left = position.left - leftWidth.value\n }\n }\n if ('top' in mergeOptions) {\n top = Math.min(Math.max(mergeOptions.top || 0, 0), maxScrollTop.value)\n } else if ('rowKey' in mergeOptions) {\n const pos = cal.getRowPositionByKey(mergeOptions.rowKey!)\n if (pos) {\n top = pos\n }\n }\n\n left = Math.max(Math.min(maxScrollLeft.value, left || 0), 0)\n if (!showVerticalScrollbar.value) {\n top = 0\n }\n if (type === 'smooth') {\n if (left !== undefined) {\n raf.cancel(leftRaf)\n leftRaf = easeoutScroll(scrollLeft.value, left, (val: number) => {\n scrollLeft.value = val\n })\n }\n if (top !== undefined) {\n raf.cancel(topRaf)\n topRaf = easeoutScroll(scrollTop.value, top, (val: number) => {\n scrollTop.value = val\n })\n }\n } else {\n if (left !== undefined) {\n scrollLeft.value = left\n }\n if (top !== undefined) {\n scrollTop.value = top\n }\n }\n }\n\n const useAnimate = ref(false)\n const animateRows = computed(() => {\n return !!(props.animateRows ?? globalAnimateRows.value)\n })\n\n let timer: any\n watch(\n animateRows,\n (newVal) => {\n useAnimate.value = newVal\n },\n { immediate: true },\n )\n\n const updateAnimate = () => {\n useAnimate.value = false\n clearTimeout(timer)\n timer = setTimeout(() => {\n useAnimate.value = animateRows.value\n }, 100)\n }\n\n const maxScrollLeft = computed(() => bodyMaxWidth.value - bodyWidth.value)\n const maxScrollTop = computed(() => viewportHeight.value - bodyHeight.value)\n const onScroll = (e) => {\n emit('scroll', e)\n }\n\n useHScrollSyncProvide({ scrollLeft, maxScrollLeft, onScroll, bodyWidth })\n useVScrollSyncProvide({ scrollTop, maxScrollTop, onScroll, updateAnimate, bodyWidth })\n\n const { data, pos: dataRowPosition } = useData(\n props,\n rowPosition,\n flattenData,\n startIndex,\n endIndex,\n draggingRowKey,\n useAnimate,\n getRowFlattenIndexByKey,\n latestRangeStartCell,\n )\n\n const pingedLeft = ref(false)\n const pingedRight = ref(false)\n const noPinged = ref(false)\n\n watchEffect(() => {\n pingedLeft.value = supportSticky && !!scrollLeft.value\n pingedRight.value =\n supportSticky &&\n centerWidth.value - (bodyWidth.value - leftWidth.value - rightWidth.value) >\n scrollLeft.value\n noPinged.value = !pingedLeft.value && !pingedRight.value\n })\n\n const rootClass = computed(() =>\n classNames({\n [`${props.prefixCls}`]: true,\n [`${props.prefixCls}-support-sticky`]: supportSticky,\n [`${props.prefixCls}-stripe`]: props.stripe,\n [`${props.prefixCls}-bordered`]: props.bordered,\n [`${props.prefixCls}-${props.size}`]: true,\n [`${props.prefixCls}-ping-left`]: pingedLeft.value,\n [`${props.prefixCls}-ping-right`]: pingedRight.value,\n [`${props.prefixCls}-no-ping`]: noPinged.value,\n [`${props.prefixCls}-has-animate`]: animateRows.value,\n }),\n )\n const rootStyle = computed(() => ({\n height: typeof props.height == 'number' ? `${props.height}px` : props.height,\n maxHeight: typeof props.maxHeight == 'number' ? `${props.maxHeight}px` : props.maxHeight,\n minHeight: typeof props.minHeight == 'number' ? `${props.minHeight}px` : props.minHeight,\n }))\n\n const showHorizontalScrollbar = ref(false)\n const debounceFn = debounce(() => {\n showHorizontalScrollbar.value = bodyMaxWidth.value > bodyWidth.value\n if (bodyWidth.value > bodyScrollWidth.value) {\n bodyScrollWidth.value = bodyWidth.value\n }\n }, 100)\n\n watch([bodyMaxWidth, bodyWidth], () => {\n debounceFn()\n })\n\n const showVerticalScrollbar = eagerComputed(\n () => !!mergedScrollY.value && bodyHeight.value + 0.9 < viewportHeight.value,\n )\n const scrollToFirstRow = eagerComputed(\n () => !props.scroll || (props.scroll && props.scroll.scrollToFirstRowOnChange !== false),\n )\n\n triggerOnChange = (\n info: Partial<ChangeEventInfo<DefaultRecordType>>,\n action: TableAction,\n reset = false,\n ) => {\n if (reset) {\n refreshPagination()\n triggeronPaginationChange(1, mergedPagination.value.pageSize!)\n if (props.pagination) {\n props.pagination.onChange?.(1, mergedPagination.value.pageSize)\n }\n }\n if (scrollToFirstRow.value) {\n scrollTop.value = 0\n }\n props.onChange?.(\n info.pagination || mergedPagination.value,\n info.filters || filters.value,\n info.sorter || sorter.value,\n {\n currentDataSource: info.currentDataSource || filterData.value,\n action,\n },\n )\n }\n\n const paginationProps = computed(() => {\n return omit(mergedPagination.value, ['position', 'onChange', 'onShowSizeChange'])\n })\n\n const paginationClass = computed(() => {\n return {\n [`${props.prefixCls}-pagination`]: true,\n [`${props.prefixCls}-pagination-${pos.value.bottom}`]: true,\n [`${customUiCls}`]: true,\n }\n })\n const bottomPaginationHeight = ref(0)\n const bottomPaginationStyle = computed<any>(() => {\n if (!props.paginationSticky) {\n return {}\n }\n if (props.paginationSticky === true) {\n return { position: 'sticky', 'z-index': 9, bottom: '0px' }\n }\n return {\n position: 'sticky',\n 'z-index': 9,\n bottom: `${props.paginationSticky?.offsetBottom ?? 0}px`,\n }\n })\n\n const indentSize = computed(() => (typeof props.indentSize == 'number' ? props.indentSize : 15))\n\n const cellProps = useCellProps({\n leftColumns: columns.leftColumns,\n rightColumns: columns.rightColumns,\n visibleCenterColumns: columns.visibleCenterColumns,\n allColumns: columns.allColumns,\n data,\n mergedRowHeights: cal.mergedRowHeights,\n startIndex,\n getColumnPosition: columns.getColumnPosition,\n bodyWidth,\n leftWidth,\n centerWidth,\n getRowHeight: cal.getRowHeight,\n customCell: toRef(props, 'customCell'),\n })\n\n watch(\n [realHeaderHeight, scrollLeft],\n () => {\n popupContainer.value?.alignPopup?.()\n },\n { flush: 'post' },\n )\n\n useProvideTable({\n ...cal,\n ...columns,\n ...cellProps,\n rootRef,\n rawData,\n getRowFlattenIndexByKey,\n prefixCls: computed(() => props.prefixCls!),\n draggingRowKey,\n insertToRowKey,\n status,\n useAnimate,\n animateRows,\n watermarkMsg,\n onResizeColumn: (w: number, col: ColumnType, action: ResizeActionType) => {\n const width = col.width\n const result = props.onResizeColumn?.(w, col, action)\n if (result !== false) {\n if (!(width === w && col.width === w)) {\n col.width = width !== col.width ? col.width : w\n triggerRef(rawColumns)\n }\n if (action === 'end') {\n emit('update:columns', rawColumns.value, 'resize')\n }\n }\n },\n onRowDragEnd: (opt: DragRowEventInfo) => {\n const { insertToRowKey, record, fromIndexs, rowKey, dir, preTargetInfo, nextTargetInfo } =\n opt\n const rawRecord = toRaw(record)\n const dragEnd = props.onRowDragEnd?.({ ...opt, record: rawRecord, fromIndexs })\n if (dragEnd === false) {\n return\n }\n\n const handler = () => {\n if (!isMyChildren(rowKey, preTargetInfo?.rowKey as Key) && insertToRowKey !== rowKey) {\n if (insertToRowKey !== null) {\n const parentRecord = getRecordByKey(insertToRowKey)\n if (\n insertToRowKey === preTargetInfo?.rowKey ||\n insertToRowKey === nextTargetInfo?.rowKey\n ) {\n if (dir === DOWN) {\n addNestItemData(\n parentRecord[childrenColumnName.value],\n [],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n parentRecord[childrenColumnName.value],\n [],\n childrenColumnName.value,\n rawRecord,\n )\n }\n } else {\n if (dir === DOWN) {\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs as number[],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs as number[],\n childrenColumnName.value,\n rawRecord,\n )\n }\n }\n } else {\n if (dir === DOWN && preTargetInfo) {\n addNestItemData(\n rawData.value,\n [preTargetInfo.indexs[0]!],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else if (dir === UP && nextTargetInfo) {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs ? [preTargetInfo!.indexs[0]!] : [],\n childrenColumnName.value,\n rawRecord,\n )\n }\n }\n triggerRef(rawData)\n emit('update:dataSource', rawData.value)\n }\n }\n if (isPromise(dragEnd)) {\n dragEnd\n .then(() => {\n handler()\n })\n .catch(() => {})\n } else {\n handler()\n }\n },\n virtual,\n xVirtual,\n dataRowPosition,\n rawColumns,\n bodyHeight,\n scrollTop,\n scrollLeft,\n supportSticky,\n childrenColumnName,\n bodyScrollWidth,\n baseHeight,\n startIndex,\n data,\n pageData,\n getRecordByKey,\n getIndexsByKey,\n expandType,\n flattenData,\n expandedRowKeys,\n indentSize,\n props,\n bodyWidth,\n scrollTo,\n scrollBarSize,\n leftWidth,\n rightWidth,\n centerWidth,\n showVerticalScrollbar,\n showHorizontalScrollbar,\n getRowKey,\n selection,\n updateSelectedRowKeys: (keys: Key[]) => {\n emit('update:selectedRowKeys', keys)\n },\n locale,\n sorterStates,\n changeSorter,\n changeFilter,\n filterStates,\n onTriggerExpand: (record, key: Key) => {\n let keys: Key[]\n const hasKey = expandedRowKeys.value.has(key)\n if (hasKey) {\n expandedRowKeys.value.delete(key)\n keys = [...expandedRowKeys.value]\n } else {\n keys = [...expandedRowKeys.value, key]\n }\n defaultExpandedRowKeys.value = keys\n emit('update:expandedRowKeys', keys)\n emit('expand', !hasKey, record)\n emit('expandedRowsChange', keys)\n },\n keyEntities,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n checkboxPropsMap,\n mergedRowSelection,\n getPopupContainer,\n allDataRowKeys,\n allDataRootRowKeys,\n dragRowsHandle,\n isMyChildren,\n getKeyByIndexs,\n getRowByFlattenIndex,\n draggingColumnKey,\n dragColumnsHandle,\n onColumnDragEnd: (arg: DragColumnEventInfo) => {\n const { dir, column, targetColumn } = arg\n const dragEnd = props.onColumnDragEnd?.(arg)\n if (dragEnd === false) {\n return\n }\n\n const handler = () => {\n if (column === targetColumn || column.key === targetColumn.key) return\n const index = rawColumns.value.findIndex(\n (col) => col === column || col.key === column.key,\n )\n const targetIndex = rawColumns.value.findIndex(\n (col) => col === targetColumn || col.key === targetColumn.key,\n )\n if (dir === LEFT) {\n rawColumns.value.splice(index, 1)\n rawColumns.value.splice(targetIndex, 0, column)\n } else {\n rawColumns.value.splice(targetIndex + 1, 0, column)\n rawColumns.value.splice(index, 1)\n }\n triggerRef(rawColumns)\n emit('update:columns', rawColumns.value, 'drag')\n }\n\n if (isPromise(dragEnd)) {\n dragEnd\n .then(() => {\n handler()\n })\n .catch(() => {})\n } else {\n handler()\n }\n },\n onColumnDrag: () => {},\n columnDrag: computed(() => props.columnDrag),\n summaryFixed: mergedSummaryFixed,\n realHeaderHeight,\n bottomPaginationHeight,\n pos,\n })\n\n const tabGuardTopRef = ref()\n const tabGuardBottomRef = ref()\n\n const {\n navigationService,\n getSelectedRange,\n clearAllSelectedRange,\n copySelectedRange,\n appendCellToSelectedRange,\n onBodyKeydown,\n } = useProvideRangeStore({\n allColumns: columns.allColumns,\n flattenData,\n rangeSelection: computed(() => props.rangeSelection),\n getRowByFlattenIndex,\n rootRef,\n prefixCls: computed(() => props.prefixCls!),\n allCellProps: cellProps.allCellProps,\n tabGuardTopRef,\n tabGuardBottomRef,\n ensureCellColumnVisible: (cell: RangeCell) => {\n if (!cell.column || cell.column.fixed) return\n const sl = scrollLeft.value\n const pos = columns.getColumnPositionByKey(cell.column.columnKey)\n if (pos) {\n const { width, left } = pos\n const lw = leftWidth.value\n const rw = rightWidth.value\n left - lw < sl\n ? (scrollLeft.value = left - lw)\n : left + width > sl + bodyWidth.value - rw &&\n (scrollLeft.value = left + width - bodyWidth.value + rw)\n }\n },\n ensureCellRowVisible: (cell: RangeCell) => {\n const { rowIndex } = cell\n const st = scrollTop.value\n const row = getRowByFlattenIndex(rowIndex)\n const pos = cal.getRowPositionByKey(row.rowKey)\n const cprops =\n (cellProps.allCellProps.value[row.rowKey]?.[cell.column!.columnKey] || {}).props || {}\n const height = cal.getRowHeight(rowIndex, cprops.rowSpan)\n if (pos !== undefined) {\n updateAnimate()\n if (pos < st) {\n scrollTop.value = pos\n } else {\n if (pos + height > st + bodyHeight.value) {\n scrollTop.value = pos + height - bodyHeight.value\n }\n }\n }\n },\n latestRangeStartCell,\n bodyRef: computed(() => {\n return (bodyRef.value as any)?.bodyRef\n }),\n scrollLeft,\n scrollTop,\n scrollTo,\n showVerticalScrollbar,\n showHorizontalScrollbar,\n getIndexsByKey,\n formatRangeCellText: (parmas) => {\n if (props.formatRangeCellText) {\n return props.formatRangeCellText(parmas)\n } else if (parmas.value) {\n return parmas.value\n }\n return ''\n },\n editCellKeys,\n copyDelimiter: computed(() => props.copyDelimiter),\n })\n\n expose({\n scrollTo,\n scrollLeft,\n scrollTop,\n bodyRef: computed(() => {\n return (bodyRef.value as any)?.bodyRef\n }),\n getSelectedRange,\n clearAllSelectedRange,\n copySelectedRange,\n appendCellToSelectedRange,\n openEditor: (cellInfos: any[]) => {\n openEditor(cellInfos.map((info) => `${info.rowKey} ${info.columnKey}`))\n },\n closeEditor: (cellInfos: any[]) => {\n if (cellInfos) {\n closeEditor(cellInfos.map((info) => `${info.rowKey} ${info.columnKey}`))\n } else {\n closeEditor()\n }\n },\n })\n\n return {\n bodyRef,\n spinProps,\n rowPosition,\n viewportHeight,\n startIndex,\n data,\n watermarkMsg,\n rootStyle,\n rootClass,\n onBodyKeydown,\n watermarkStyle: computed<any>(() => ({\n minWidth: '100px!important',\n minHeight: '40px!important',\n position: 'absolute!important',\n fontSize: '20px!important',\n opacity: '0.8!important',\n bottom: '40px!important',\n right: '40px!important',\n pointerEvents: 'none',\n display: 'block!important',\n zIndex: '999999!important',\n color: '#000000!important',\n margin: '0px!important',\n padding: '0px!important',\n transform: 'unset!important',\n })),\n mergedPagination,\n pos,\n onPaginationChange,\n scrollBarSize,\n scrollTop,\n bodyScrollWidth,\n bodyWidth,\n scrollLeft,\n cal,\n selection,\n locale,\n paginationProps,\n slots,\n mergedScrollX,\n mergedScrollY,\n bodyHeight,\n measureWidthRef,\n flattenData,\n rootRef,\n mergedSummaryFixed,\n handleResize: (e: CustomEvent) => {\n realHeaderHeight.value = e.detail.height\n },\n handlePaginationResize: (e: CustomEvent) => {\n bottomPaginationHeight.value = e.detail.height\n },\n popupContainer,\n handleGuardTopKeydown: (e: KeyboardEvent) => {\n e.keyCode !== KeyCode.TAB ||\n e.shiftKey ||\n (navigationService.getFirstCellToFocus(e.shiftKey), e.preventDefault())\n },\n handleGuardBottomKeydown: (e: KeyboardEvent) => {\n e.keyCode === KeyCode.TAB &&\n e.shiftKey &&\n (navigationService.getLastCellToFocus(e.shiftKey), e.preventDefault())\n },\n tabGuardTopRef,\n tabGuardBottomRef,\n onShowSizeChange,\n customUiCls,\n paginationClass,\n bottomPaginationStyle,\n }\n },\n})\n</script>\n\n<template>\n <TableSlotsContextProvider :value=\"{ ...slots }\">\n <Spin v-bind=\"spinProps\">\n <Pagination\n v-if=\"pos.top\"\n :class=\"`${prefixCls}-pagination ${prefixCls}-pagination-${pos.top} ${customUiCls}`\"\n v-bind=\"paginationProps\"\n @change=\"onPaginationChange\"\n @show-size-change=\"onShowSizeChange\"\n />\n <div\n ref=\"tabGuardTopRef\"\n role=\"presentation\"\n tabindex=\"0\"\n :style=\"{ position: 'absolute', width: '0', height: '0' }\"\n @keydown=\"handleGuardTopKeydown\"\n ></div>\n <div key=\"content\" ref=\"ref\" :class=\"rootClass\" :style=\"rootStyle\">\n <template v-if=\"showHeader\">\n <AutoHeightHeader\n v-if=\"autoHeaderHeight\"\n :prefix-cls=\"prefixCls\"\n :sticky=\"sticky\"\n @resizeheight=\"handleResize\"\n />\n <ProHeader v-else :prefix-cls=\"prefixCls\" :sticky=\"sticky\" @resizeheight=\"handleResize\" />\n </template>\n <ProBody\n ref=\"bodyRef\"\n v-model:bodyScrollWidth=\"bodyScrollWidth\"\n v-model:bodyWidth=\"bodyWidth\"\n v-model:bodyHeight=\"bodyHeight\"\n :prefix-cls=\"prefixCls\"\n :wrap-text=\"wrapText\"\n :scroll-x=\"mergedScrollX\"\n :height=\"mergedScrollY\"\n :summary-fixed=\"mergedSummaryFixed\"\n :summary=\"$slots.summary\"\n :empty-text=\"$slots.emptyText\"\n @keydown=\"onBodyKeydown\"\n />\n </div>\n <div\n ref=\"tabGuardBottomRef\"\n role=\"presentation\"\n tabindex=\"0\"\n :style=\"{ position: 'absolute', width: '0', height: '0' }\"\n @keydown=\"handleGuardBottomKeydown\"\n ></div>\n <div v-if=\"$slots.footer\" key=\"footer\" :class=\"`${prefixCls}-footer`\">\n <slot name=\"footer\" />\n </div>\n <PopupContainer ref=\"popupContainer\" :prefix-cls=\"prefixCls\" />\n <div\n v-if=\"pos.bottom\"\n v-resize:height\n :style=\"bottomPaginationStyle\"\n :class=\"`${prefixCls}-pagination-wrap`\"\n @resizeheight=\"handlePaginationResize\"\n >\n <Pagination\n :class=\"paginationClass\"\n v-bind=\"paginationProps\"\n @change=\"onPaginationChange\"\n @show-size-change=\"onShowSizeChange\"\n />\n </div>\n </Spin>\n <MeasureWidth ref=\"measureWidthRef\" />\n </TableSlotsContextProvider>\n</template>\n"],"names":["_createBlock","_createVNode","_normalizeProps","_guardReactiveProps","_withCtx","_openBlock","_mergeProps","_createCommentVNode","_createElementVNode","_normalizeClass","_normalizeStyle","_createElementBlock","_Fragment","_renderSlot","_withDirectives"],"mappings":";;;;;;;;;;;;;;sBA4gCEA,WAAA,CAoE4B,oCAAA,EAAA;AAAA,IApEA,KAAA,EAAK,KAAO,IAAA,CAAA,KAAA;AAAK,GAAA,EAAA;AAAA,qBAC3C,MAiEO;AAAA,MAjEPC,WAAA;AAAA,QAiEO,eAAA;AAAA,QAAAC,cAAA,CAAAC,kBAAA,CAjEO,IAAA,CAAA,SAAS,CAAA,CAAA;AAAA,QAAA;AAAA,UAAA,OAAA,EAAAC,QACrB,MAME;AAAA,YALM,KAAA,GAAA,CAAI,GAAA,IAAAC,WAAA,EADZL,WAAA,CAME,uBANFM,UAAA,CAME;AAAA,cAAA,GAAA,EAAA,CAAA;AAAA,cAJC,KAAA,EAAK,CAAA,EAAK,IAAA,UAAS,C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AAAA,YAE1C,IAAA,CAAA,GAAA,CAAI,MAAA,GAAAa,cAAA,EAAAT,WAAA,EADZM,kBAAA;AAAA,cAaM,KAAA;AAAA,cAAA;AAAA,gBAAA,GAAA,EAAA,CAAA;AAAA,gBAVH,KAAA,EAAKD,cAAA,CAAE,IAAA,CAAA,qBAAqB,CAAA;AAAA,gBAC5B,KAAA,EAAKD,cAAA,IAAK,IAAA,CAAA,SAAS,CAAA,gBAAA,CAAA,CAAA;AAAA,gBACnB,cAAA,EAAY,MAAA,CAAA,CAAA,CAAA,KAAA,OAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAE,IAAA,CAAA,sBAAA,IAAA,IAAA,CAAA,sBAAA,CAAA,GAAA,IAAA,CAAA;AAAA,eAAA;AAAA;gBAEfR,WAAA,CAKE,uBALFK,UAAA,CAKE,EAJC,OAAO,IAAA,CAAA,eAAA,EAAe,EACf,IAAA,CAAA,eAAA,EAAe;AAAA,kBACtB,UAAQ,IAAA,CAAA,kBAAA;AAAA,kBACR,kBAAkB,IAAA,CAAA;AAAA,iBAAA,GAAA,IAAA,EAAA,EAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,kBAAA,CAAA;AAAA;;;;0CATZ,QAAM;AAAA,aAAA,CAAA,GAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA;AAAA;;;;;;;MAanBN,WAAA;AAAA,QAAsC,uBAAA;AAAA,QAAA,EAAxB,KAAI,iBAAA,EAAiB;AAAA,QAAA,IAAA;AAAA,QAAA;AAAA;AAAA;AAAA,KAAA,CAAA;AAAA;;;;;;;;"}
@@ -3,7 +3,7 @@ import { Pagination, Spin } from 'ant-design-vue';
3
3
  import { animateRows } from './config.mjs';
4
4
  import { baseTableProps } from './interface.mjs';
5
5
  import { LEFT, DOWN, UP } from './Drag/constant.mjs';
6
- import { isPromise, addNestItemData, deleteNestItemData } from '../utils/util.mjs';
6
+ import { addNestItemData, deleteNestItemData } from '../utils/util.mjs';
7
7
  import { useEditProvider } from '../hooks/useEdit.mjs';
8
8
  import { useProvidePopup } from './context/PopupContext.mjs';
9
9
  import { useHScrollSyncProvide } from '../hooks/useHScrollSync.mjs';
@@ -39,6 +39,7 @@ import { resize } from '../../../../directives/resize.mjs';
39
39
  import { usePrefixCls } from '../../../../hooks/use-prefix-cls/index.mjs';
40
40
  import { debounce } from 'lodash-unified';
41
41
  import { omit } from '../../../../utils/omit.mjs';
42
+ import { isPromise } from '../../../../utils/validate.mjs';
42
43
 
43
44
  const EMPTY_LIST = [];
44
45
  var _sfc_main = defineComponent({
@@ -531,9 +532,14 @@ var _sfc_main = defineComponent({
531
532
  var _a;
532
533
  const width = col.width;
533
534
  const result = (_a = props.onResizeColumn) == null ? void 0 : _a.call(props, w, col, action);
534
- if (result !== false && !(width === w && col.width === w)) {
535
- col.width = width !== col.width ? col.width : w;
536
- triggerRef(rawColumns);
535
+ if (result !== false) {
536
+ if (!(width === w && col.width === w)) {
537
+ col.width = width !== col.width ? col.width : w;
538
+ triggerRef(rawColumns);
539
+ }
540
+ if (action === "end") {
541
+ emit("update:columns", rawColumns.value, "resize");
542
+ }
537
543
  }
538
544
  },
539
545
  onRowDragEnd: (opt) => {
@@ -707,7 +713,7 @@ var _sfc_main = defineComponent({
707
713
  rawColumns.value.splice(index, 1);
708
714
  }
709
715
  triggerRef(rawColumns);
710
- emit("update:columns", rawColumns.value);
716
+ emit("update:columns", rawColumns.value, "drag");
711
717
  };
712
718
  if (isPromise(dragEnd)) {
713
719
  dragEnd.then(() => {