@teamix/pro 1.5.17 → 1.5.18-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/fonts/txddinmedium.woff +0 -0
  2. package/dist/pro.all.min.css +1 -0
  3. package/dist/pro.css +1 -0
  4. package/dist/pro.js +114796 -0
  5. package/dist/pro.min.css +1 -0
  6. package/dist/pro.min.js +2 -0
  7. package/dist/pro.min.js.LICENSE.txt +47 -0
  8. package/dist/pro.xconsole.min.css +1 -0
  9. package/es/actions/dialog-component.js +1 -4
  10. package/es/actions/dialog-form.js +4 -3
  11. package/es/actions/dialog.js +2 -1
  12. package/es/actions/index.js +35 -22
  13. package/es/actions/quick.js +1 -4
  14. package/es/card/card-container.js +12 -5
  15. package/es/card/divider.js +2 -4
  16. package/es/card/index.js +18 -7
  17. package/es/card/selectable.js +2 -4
  18. package/es/card/tab.js +2 -4
  19. package/es/form/Components/Editable/index.js +1 -1
  20. package/es/form/Components/FormGroup/index.js +4 -3
  21. package/es/form/Components/LightFilter/index.js +11 -2
  22. package/es/form/Components/ProField/index.js +2 -4
  23. package/es/form/Components/Text/index.js +2 -4
  24. package/es/form/Filter/AdvancedFilter.js +16 -14
  25. package/es/form/Filter/LightFilter.js +13 -9
  26. package/es/form/Filter/SimpleFilter.js +8 -5
  27. package/es/form/Filter/index.js +24 -7
  28. package/es/form/Filter/index.scss +1 -0
  29. package/es/form/Filter/index2.js +22 -17
  30. package/es/form/Filter/index2.scss +1 -0
  31. package/es/form/Filter/useBindUrl.js +3 -0
  32. package/es/form/Filter/useSpecialProps.js +1 -0
  33. package/es/form/ProForm/index.js +5 -2
  34. package/es/form/ProForm/useAutoLayout.js +4 -0
  35. package/es/form/ProForm/useFormDisplayValues.js +1 -0
  36. package/es/form/SchemaForm/adapterComponent.js +1 -0
  37. package/es/form/SchemaForm/adapterDecorator.js +1 -0
  38. package/es/form/SchemaForm/adapterType.js +1 -0
  39. package/es/form/SchemaForm/index.js +13 -0
  40. package/es/form/SchemaForm/initializeFormButton.js +2 -0
  41. package/es/form/SchemaForm/initializeReactions.js +1 -0
  42. package/es/form/SchemaForm/initializeSelectTable.js +1 -0
  43. package/es/form/SchemaForm/reactions.js +5 -0
  44. package/es/form/index.js +4 -0
  45. package/es/form/utils.js +12 -0
  46. package/es/form/warning.js +2 -0
  47. package/es/index.js +3 -1
  48. package/es/info/components/InfoGroup/index.js +2 -4
  49. package/es/info/components/InfoValueItem/index.js +32 -20
  50. package/es/info/components/ProInfoItem/index.js +1 -0
  51. package/es/info/components/baseInfo/index.js +3 -0
  52. package/es/info/components/tableInfo/index.js +6 -4
  53. package/es/info/index.js +11 -5
  54. package/es/info/utils/index.js +3 -0
  55. package/es/layout/index.js +2 -0
  56. package/es/nocode/index.js +2 -0
  57. package/es/nocode/pages/index.js +3 -0
  58. package/es/nocode/pages/playground.js +3 -5
  59. package/es/nocode/pages/renderer.js +4 -6
  60. package/es/nocode/playground.js +2 -4
  61. package/es/page-header/index.js +12 -7
  62. package/es/sidebar/components/sidebar-container/index.js +10 -7
  63. package/es/sidebar/components/tree/index.js +22 -4
  64. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +3 -4
  65. package/es/sidebar/components/tree-node/components/IconAction/index.js +4 -2
  66. package/es/sidebar/components/tree-node/components/IconSwitch/index.js +1 -0
  67. package/es/sidebar/components/tree-node/index.js +29 -16
  68. package/es/sidebar/index.js +15 -4
  69. package/es/sidebar/utils/index.js +19 -11
  70. package/es/table/components/CardView/index.js +29 -13
  71. package/es/table/components/Filter/index.js +11 -0
  72. package/es/table/components/Layout/index.js +13 -8
  73. package/es/table/components/LoadMore/index.js +3 -0
  74. package/es/table/components/Pagination/index.js +12 -10
  75. package/es/table/components/QuickAction/index.js +3 -2
  76. package/es/table/components/ToolBar/CardSwitch.js +2 -0
  77. package/es/table/components/ToolBar/DensityIcon.js +7 -2
  78. package/es/table/components/ToolBar/FilterColumnIcon.js +9 -0
  79. package/es/table/components/ToolBar/FullScreenIcon.js +1 -0
  80. package/es/table/components/ToolBar/Fullscreen.js +3 -0
  81. package/es/table/components/ToolBar/RefreshIcon.js +11 -0
  82. package/es/table/components/ToolBar/index.js +13 -10
  83. package/es/table/index.js +138 -51
  84. package/es/table/index.scss +26 -0
  85. package/es/table/utils/columnRender.js +81 -27
  86. package/es/table/utils/genAutoWidthColumns.js +347 -0
  87. package/es/table/utils/index.js +6 -0
  88. package/es/table/utils/pureColumnRender.js +9 -1
  89. package/es/templates/List/index.js +4 -6
  90. package/es/templates/index.js +2 -1
  91. package/es/timeline/ProTimeLineItem/index.js +8 -4
  92. package/es/timeline/index.js +5 -5
  93. package/es/utils/message.js +3 -5
  94. package/es/xconsole.scss +23 -0
  95. package/lib/form/Filter/index.scss +1 -0
  96. package/lib/form/Filter/index2.scss +1 -0
  97. package/lib/index.d.ts +1 -1
  98. package/lib/index.js +1 -1
  99. package/lib/table/components/CardView/index.js +5 -10
  100. package/lib/table/components/ToolBar/index.js +10 -7
  101. package/lib/table/index.js +71 -25
  102. package/lib/table/index.scss +26 -0
  103. package/lib/table/typing.d.ts +11 -1
  104. package/lib/table/utils/columnRender.d.ts +1 -0
  105. package/lib/table/utils/columnRender.js +49 -4
  106. package/lib/table/utils/genAutoWidthColumns.d.ts +30 -0
  107. package/lib/table/utils/genAutoWidthColumns.js +351 -0
  108. package/lib/xconsole.scss +23 -0
  109. package/package.json +1 -1
  110. package/es/actions/base.d.ts +0 -24
  111. package/es/actions/confirm.d.ts +0 -7
  112. package/es/actions/danger-confirm.d.ts +0 -7
  113. package/es/actions/danger-pop-confirm.d.ts +0 -5
  114. package/es/actions/dialog-component.d.ts +0 -10
  115. package/es/actions/dialog-form.d.ts +0 -29
  116. package/es/actions/dialog-info.d.ts +0 -9
  117. package/es/actions/dialog-table.d.ts +0 -9
  118. package/es/actions/dialog.d.ts +0 -40
  119. package/es/actions/drawer-form.d.ts +0 -6
  120. package/es/actions/drawer-info.d.ts +0 -6
  121. package/es/actions/drawer-table.d.ts +0 -6
  122. package/es/actions/drawer.d.ts +0 -6
  123. package/es/actions/error.d.ts +0 -7
  124. package/es/actions/index.d.ts +0 -114
  125. package/es/actions/link.d.ts +0 -8
  126. package/es/actions/notice.d.ts +0 -7
  127. package/es/actions/pop-confirm.d.ts +0 -9
  128. package/es/actions/quick.d.ts +0 -2
  129. package/es/actions/request.d.ts +0 -9
  130. package/es/actions/utils.d.ts +0 -1
  131. package/es/card/card-container.d.ts +0 -18
  132. package/es/card/divider.d.ts +0 -6
  133. package/es/card/index.d.ts +0 -109
  134. package/es/card/selectable.d.ts +0 -13
  135. package/es/card/tab.d.ts +0 -6
  136. package/es/card/utils.d.ts +0 -9
  137. package/es/field/index.d.ts +0 -3
  138. package/es/form/Components/Editable/index.d.ts +0 -20
  139. package/es/form/Components/FormGroup/index.d.ts +0 -14
  140. package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
  141. package/es/form/Components/LightFilter/index.d.ts +0 -17
  142. package/es/form/Components/ProField/index.d.ts +0 -2
  143. package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
  144. package/es/form/Components/Text/index.d.ts +0 -8
  145. package/es/form/Filter/AdvancedFilter.d.ts +0 -7
  146. package/es/form/Filter/Layout.d.ts +0 -5
  147. package/es/form/Filter/LightFilter.d.ts +0 -7
  148. package/es/form/Filter/SimpleFilter.d.ts +0 -7
  149. package/es/form/Filter/index.d.ts +0 -9
  150. package/es/form/Filter/index2.d.ts +0 -13
  151. package/es/form/Filter/useBindUrl.d.ts +0 -2
  152. package/es/form/Filter/useSpecialProps.d.ts +0 -6
  153. package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
  154. package/es/form/ProForm/customComponent.d.ts +0 -3
  155. package/es/form/ProForm/index.d.ts +0 -5
  156. package/es/form/ProForm/useAutoLayout.d.ts +0 -9
  157. package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
  158. package/es/form/ProForm/useFieldRequest.d.ts +0 -5
  159. package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
  160. package/es/form/ProForm/useInitialRequest.d.ts +0 -6
  161. package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
  162. package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
  163. package/es/form/SchemaForm/adapterType.d.ts +0 -5
  164. package/es/form/SchemaForm/index.d.ts +0 -4
  165. package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
  166. package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
  167. package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
  168. package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
  169. package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
  170. package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
  171. package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
  172. package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
  173. package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
  174. package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
  175. package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
  176. package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
  177. package/es/form/SchemaForm/initializeRules.d.ts +0 -11
  178. package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
  179. package/es/form/SchemaForm/reactions.d.ts +0 -6
  180. package/es/form/docs/ActionResponse.d.ts +0 -8
  181. package/es/form/fieldTypeMap.d.ts +0 -7
  182. package/es/form/index.d.ts +0 -125
  183. package/es/form/locales/validate.d.ts +0 -159
  184. package/es/form/schemaNameMap.d.ts +0 -5
  185. package/es/form/typing.d.ts +0 -194
  186. package/es/form/utils.d.ts +0 -55
  187. package/es/form/warning.d.ts +0 -3
  188. package/es/hooks/index.d.ts +0 -2
  189. package/es/index-without-icon.d.ts +0 -32
  190. package/es/index.d.ts +0 -32
  191. package/es/info/components/InfoGroup/index.d.ts +0 -5
  192. package/es/info/components/InfoValueItem/index.d.ts +0 -5
  193. package/es/info/components/ProInfoItem/index.d.ts +0 -5
  194. package/es/info/components/baseInfo/index.d.ts +0 -8
  195. package/es/info/components/headerInfo/index.d.ts +0 -8
  196. package/es/info/components/tableInfo/index.d.ts +0 -7
  197. package/es/info/index.d.ts +0 -10
  198. package/es/info/typing.d.ts +0 -220
  199. package/es/info/utils/index.d.ts +0 -20
  200. package/es/info/utils/layout.d.ts +0 -2
  201. package/es/info/utils/utils.d.ts +0 -1
  202. package/es/layout/index.d.ts +0 -2
  203. package/es/nocode/configurators/Card.d.ts +0 -3
  204. package/es/nocode/configurators/PageHeader.d.ts +0 -3
  205. package/es/nocode/configurators/ProTable.d.ts +0 -3
  206. package/es/nocode/configurators/common.d.ts +0 -280
  207. package/es/nocode/configurators/index.d.ts +0 -15
  208. package/es/nocode/configurators/map.d.ts +0 -2
  209. package/es/nocode/index.d.ts +0 -8
  210. package/es/nocode/pages/editor.d.ts +0 -12
  211. package/es/nocode/pages/index.d.ts +0 -14
  212. package/es/nocode/pages/playground.d.ts +0 -11
  213. package/es/nocode/pages/renderer.d.ts +0 -10
  214. package/es/nocode/playground.d.ts +0 -14
  215. package/es/page-container/index.d.ts +0 -3
  216. package/es/page-header/index.d.ts +0 -74
  217. package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
  218. package/es/sidebar/components/tree/index.d.ts +0 -6
  219. package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
  220. package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
  221. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
  222. package/es/sidebar/components/tree-node/index.d.ts +0 -7
  223. package/es/sidebar/index.d.ts +0 -9
  224. package/es/sidebar/typing.d.ts +0 -141
  225. package/es/sidebar/utils/action-ref.d.ts +0 -3
  226. package/es/sidebar/utils/index.d.ts +0 -364
  227. package/es/skeleton/index.d.ts +0 -3
  228. package/es/table/components/CardView/index.d.ts +0 -5
  229. package/es/table/components/EmptyContent/index.d.ts +0 -2
  230. package/es/table/components/Filter/index.d.ts +0 -12
  231. package/es/table/components/Layout/index.d.ts +0 -5
  232. package/es/table/components/LoadMore/index.d.ts +0 -20
  233. package/es/table/components/Pagination/index.d.ts +0 -7
  234. package/es/table/components/QuickAction/index.d.ts +0 -11
  235. package/es/table/components/ToolBar/CardSwitch.d.ts +0 -8
  236. package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
  237. package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
  238. package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
  239. package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
  240. package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
  241. package/es/table/components/ToolBar/index.d.ts +0 -5
  242. package/es/table/index.d.ts +0 -5
  243. package/es/table/typing.d.ts +0 -418
  244. package/es/table/utils/columnRender.d.ts +0 -13
  245. package/es/table/utils/genProColumnToColumn.d.ts +0 -13
  246. package/es/table/utils/getTableProps.d.ts +0 -2
  247. package/es/table/utils/getTableSortIcons.d.ts +0 -3
  248. package/es/table/utils/index.d.ts +0 -19
  249. package/es/table/utils/pureColumnRender.d.ts +0 -9
  250. package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
  251. package/es/table/utils/useTableSelection.d.ts +0 -3
  252. package/es/table/utils/util.d.ts +0 -5
  253. package/es/templates/Detail/index.d.ts +0 -2
  254. package/es/templates/Form/index.d.ts +0 -2
  255. package/es/templates/List/index.d.ts +0 -9
  256. package/es/templates/index.d.ts +0 -3
  257. package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
  258. package/es/timeline/index.d.ts +0 -10
  259. package/es/timeline/typing.d.ts +0 -107
  260. package/es/utils/index.d.ts +0 -3
  261. package/es/utils/message.d.ts +0 -3
package/es/table/index.js CHANGED
@@ -1,5 +1,6 @@
1
- var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps", "bindUrlProps", "bindUrl"],
1
+ var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "autoWidth", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps", "bindUrlProps", "bindUrl"],
2
2
  _excluded2 = ["onChange"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
4
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
5
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
6
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -33,12 +34,14 @@ import { EmptyContent } from '@teamix/pro-field';
33
34
  import { ProActionGroup } from '../actions';
34
35
  import classNames from 'classnames';
35
36
  import ProPageContainer from '../page-container';
37
+ import { genAutoWidthColumns, shadowContainer, shadowActionColumnContainer } from './utils/genAutoWidthColumns';
36
38
  import debounce from 'lodash.debounce';
37
39
  import CardView from './components/CardView';
38
40
  import { useUrlState } from '@teamix/hooks';
39
41
  import { getUrlStateFilter } from './utils/util';
40
42
  export * from './typing';
41
43
  var cls = usePrefixCls('teamix-pro-table');
44
+
42
45
  /**
43
46
  * 处理原生传入的 columns 以便于 选择列 方便处理
44
47
  * @param columns 原生传入的 columns
@@ -73,6 +76,7 @@ var processColumns = function processColumns(columns, initialColumns) {
73
76
  }
74
77
  return filterColumns;
75
78
  };
79
+
76
80
  /** 默认请求翻页参数 */
77
81
  var globalPageKey = 'currentPage';
78
82
  var globalPageSizeKey = 'pageSize';
@@ -146,6 +150,8 @@ var ProTable = function ProTable(props) {
146
150
  propsSize = _props$size === void 0 ? 'medium' : _props$size,
147
151
  disableSelectAll = props.disableSelectAll,
148
152
  context = props.context,
153
+ _props$autoWidth = props.autoWidth,
154
+ autoWidth = _props$autoWidth === void 0 ? true : _props$autoWidth,
149
155
  _props$fixedTableBody = props.fixedTableBody,
150
156
  fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
151
157
  isTree = props.isTree,
@@ -206,6 +212,11 @@ var ProTable = function ProTable(props) {
206
212
  _useState16 = _slicedToArray(_useState15, 2),
207
213
  filteredColumns = _useState16[0],
208
214
  setFilteredColumns = _useState16[1];
215
+ // 判断是否有操作列,有的话则渲染一个 shadow dom
216
+ var hasActionColumn = filteredColumns.some(function (column) {
217
+ var _column$actionSchema, _column$actionSchema$;
218
+ return (column === null || column === void 0 ? void 0 : column.actionSchema) && ((_column$actionSchema = column.actionSchema) === null || _column$actionSchema === void 0 ? void 0 : (_column$actionSchema$ = _column$actionSchema.actions) === null || _column$actionSchema$ === void 0 ? void 0 : _column$actionSchema$.length) > 0;
219
+ });
209
220
  var _useState17 = useState(propsSize),
210
221
  _useState18 = _slicedToArray(_useState17, 2),
211
222
  size = _useState18[0],
@@ -214,6 +225,14 @@ var ProTable = function ProTable(props) {
214
225
  _useState20 = _slicedToArray(_useState19, 2),
215
226
  showLoading = _useState20[0],
216
227
  setShowLoading = _useState20[1];
228
+
229
+ // 自动计算列宽需要的一些hook
230
+ var _useState21 = useState(true),
231
+ _useState22 = _slicedToArray(_useState21, 2),
232
+ showShadowContainer = _useState22[0],
233
+ setShowShadowContainer = _useState22[1];
234
+ var shadowContainerRef = useRef(null);
235
+ var shadowActionColumnContainerRef = useRef(null);
217
236
  // 表格内部用作存储的 Ref,标识 Table 组件是否被第一次渲染。用作 useUrlState filter 第一次渲染时使用 state 数据请求
218
237
  var dataRef = useRef({
219
238
  flag: true
@@ -232,31 +251,37 @@ var ProTable = function ProTable(props) {
232
251
  }
233
252
  }
234
253
  }, [currentPage, pageSize, urlState]);
254
+
235
255
  // 存储能够被 on 监听到的 ProTable 状态
236
256
  // 因为只做存储用。不需要更新视图以及需要同步更改。所以不使用 setState 更新
237
- var _useState21 = useState({
257
+ var _useState23 = useState({
238
258
  fullScreenState: false,
239
259
  filterRules: {},
240
260
  filterColumns: []
241
261
  }),
242
- _useState22 = _slicedToArray(_useState21, 1),
243
- actionRefState = _useState22[0];
262
+ _useState24 = _slicedToArray(_useState23, 1),
263
+ actionRefState = _useState24[0];
264
+
244
265
  // 存储 on 监听事件
245
- var _useState23 = useState({
266
+ var _useState25 = useState({
246
267
  fullScreenState: {}
247
268
  }),
248
- _useState24 = _slicedToArray(_useState23, 1),
249
- actionRefCallback = _useState24[0];
269
+ _useState26 = _slicedToArray(_useState25, 1),
270
+ actionRefCallback = _useState26[0];
271
+
250
272
  // 存储定时器 id
251
273
  var autoRefreshTimerRef = useRef();
252
274
  var onResize = null;
275
+
253
276
  // useEffect(() => {
254
277
  // setShowSkeleton(propsShowSkeleton);
255
278
  // }, [propsShowSkeleton]);
279
+
256
280
  // useEffect(() => {
257
281
  // console.log('传入的props变化', propsLoading);
258
282
  // setShowLoading(propsLoading ?? false);
259
283
  // }, [propsLoading]);
284
+
260
285
  useEffect(function () {
261
286
  var _propsDataFilter$sche, _propsDataFilter$sche2;
262
287
  getHeaderHeight(fullscreenState);
@@ -283,6 +308,7 @@ var ProTable = function ProTable(props) {
283
308
  }
284
309
  }, 500);
285
310
  }
311
+
286
312
  // 如果不传 dataFilter,则在这里初始化请求
287
313
  var hasDataFilter = (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : (_propsDataFilter$sche = propsDataFilter.schema) === null || _propsDataFilter$sche === void 0 ? void 0 : _propsDataFilter$sche.length) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : (_propsDataFilter$sche2 = propsDataFilter.schema) === null || _propsDataFilter$sche2 === void 0 ? void 0 : _propsDataFilter$sche2.length) > 0;
288
314
  if (requestWhenMount && !hasDataFilter) {
@@ -301,6 +327,7 @@ var ProTable = function ProTable(props) {
301
327
  actionRef.current = undefined;
302
328
  };
303
329
  }, []);
330
+
304
331
  // 获取header高度,用作全屏吸底吸底高度计算以及固定body高度计算(滚动条在底部)
305
332
  var getHeaderHeight = function getHeaderHeight(isFullscreen, offset) {
306
333
  var _tableDom$getElements, _tableDom$getElements2, _document$querySelect, _document$querySelect2, _document$querySelect3;
@@ -331,6 +358,7 @@ var ProTable = function ProTable(props) {
331
358
  // 16px 为 padding
332
359
  var pageHeaderHeight = ((_pageContainerDom$off = pageContainerDom === null || pageContainerDom === void 0 ? void 0 : pageContainerDom.offsetHeight) !== null && _pageContainerDom$off !== void 0 ? _pageContainerDom$off : 0) + 16;
333
360
  var teamixNavHeight = (_teamixNavDom$offsetH = teamixNavDom === null || teamixNavDom === void 0 ? void 0 : teamixNavDom.offsetHeight) !== null && _teamixNavDom$offsetH !== void 0 ? _teamixNavDom$offsetH : 0;
361
+
334
362
  // 1 为预留值,js无法取出精确高度,会被四舍五入
335
363
  var offsetHeaderHeight = headerHeight + tableHeaderHeight + pageHeaderHeight + teamixNavHeight + footerRowSelectionHeight + 16 + (offset !== null && offset !== void 0 ? offset : 0) + 1;
336
364
  if (switchViewState === 'card') {
@@ -341,12 +369,15 @@ var ProTable = function ProTable(props) {
341
369
  } else {
342
370
  setFooterSuctionState(false);
343
371
  }
372
+
344
373
  // 如果有切换区tab,那么重新计算
345
374
  if (headerFixedTopSectionDom.clientHeight) {
346
375
  var _headerFixedTopSectio;
347
376
  var headerFixedTopSectionHeight = (_headerFixedTopSectio = headerFixedTopSectionDom.clientHeight) !== null && _headerFixedTopSectio !== void 0 ? _headerFixedTopSectio : 0;
377
+
348
378
  // const clientTableBodyHeight =
349
379
  // document.body.clientHeight - offsetHeaderHeight;
380
+
350
381
  setHeaderHeight(headerFixedTopSectionHeight + teamixNavHeight + footerRowSelectionHeight + tableHeaderHeight + 1);
351
382
  return;
352
383
  }
@@ -357,39 +388,45 @@ var ProTable = function ProTable(props) {
357
388
  }
358
389
  }, 50);
359
390
  };
391
+
360
392
  // header 区域高度。用作全屏计算吸顶吸底高度。默认不做计算
361
- var _useState25 = useState(0),
362
- _useState26 = _slicedToArray(_useState25, 2),
363
- headerHeight = _useState26[0],
364
- setHeaderHeight = _useState26[1];
365
- // 全屏显示 className
366
- var _useState27 = useState(false),
393
+ var _useState27 = useState(0),
367
394
  _useState28 = _slicedToArray(_useState27, 2),
368
- fullscreenState = _useState28[0],
369
- setFullscreenState = _useState28[1];
370
- // 切换视角
371
- var _useState29 = useState(defaultView !== null && defaultView !== void 0 ? defaultView : 'table'),
395
+ headerHeight = _useState28[0],
396
+ setHeaderHeight = _useState28[1];
397
+
398
+ // 全屏显示 className
399
+ var _useState29 = useState(false),
372
400
  _useState30 = _slicedToArray(_useState29, 2),
373
- switchViewState = _useState30[0],
374
- setSwitchViewState = _useState30[1];
401
+ fullscreenState = _useState30[0],
402
+ setFullscreenState = _useState30[1];
403
+ // 切换视角
404
+ var _useState31 = useState(defaultView !== null && defaultView !== void 0 ? defaultView : 'table'),
405
+ _useState32 = _slicedToArray(_useState31, 2),
406
+ switchViewState = _useState32[0],
407
+ setSwitchViewState = _useState32[1];
375
408
  // 切换全屏搜索开关
376
409
  var filterEnableRef = useRef({
377
410
  fullscreen: false,
378
411
  normal: true
379
412
  });
413
+
380
414
  // 非全屏状态下的
381
415
  var normalDataFilterFormRef = useRef();
382
416
  var fullscreenDataFilterFormRef = useRef();
383
417
  var normalDataFilterForm = normalDataFilterFormRef.current;
384
418
  var fullscreenDataFilterForm = fullscreenDataFilterFormRef.current;
419
+
385
420
  // 传给 QueryFilter 的 formRef
386
421
  var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef;
387
422
  // let dataFilterForm = dataFilterFormRef.current;
423
+
388
424
  // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
389
- var _useState31 = useState(false),
390
- _useState32 = _slicedToArray(_useState31, 2),
391
- footerSuctionState = _useState32[0],
392
- setFooterSuctionState = _useState32[1];
425
+ var _useState33 = useState(false),
426
+ _useState34 = _slicedToArray(_useState33, 2),
427
+ footerSuctionState = _useState34[0],
428
+ setFooterSuctionState = _useState34[1];
429
+
393
430
  // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
394
431
  var getFooterSuctionState = function getFooterSuctionState() {
395
432
  if (!footerSuction) {
@@ -411,6 +448,7 @@ var ProTable = function ProTable(props) {
411
448
  }
412
449
  }
413
450
  };
451
+
414
452
  // rowSelection 相关
415
453
  var rowSelectionHook = useTableSelection(_objectSpread(_objectSpread({}, propsRowSelection), {}, {
416
454
  // 当初始出现骨架屏的时候,不可选择
@@ -441,15 +479,17 @@ var ProTable = function ProTable(props) {
441
479
  useEffect(function () {
442
480
  getRowSelection && getRowSelection(rowSelectionHook);
443
481
  }, [rowSelectionHook]);
482
+
444
483
  // 获取 table 左下角 checkbox 属性
445
484
  function getCheckAllProps() {
446
- var _rowSelection$onChang = rowSelection.onChange,
447
- _onChange = _rowSelection$onChang === void 0 ? function () {} : _rowSelection$onChang,
448
- _rowSelection$onSelec = rowSelection.onSelectAll,
449
- onSelectAll = _rowSelection$onSelec === void 0 ? function () {} : _rowSelection$onSelec,
450
- _rowSelection$selecte2 = rowSelection.selectedRowKeys,
451
- selectedRowKeys = _rowSelection$selecte2 === void 0 ? [] : _rowSelection$selecte2,
452
- getProps = rowSelection.getProps;
485
+ var _ref3 = rowSelection,
486
+ _ref3$onChange = _ref3.onChange,
487
+ _onChange = _ref3$onChange === void 0 ? function () {} : _ref3$onChange,
488
+ _ref3$onSelectAll = _ref3.onSelectAll,
489
+ onSelectAll = _ref3$onSelectAll === void 0 ? function () {} : _ref3$onSelectAll,
490
+ _ref3$selectedRowKeys = _ref3.selectedRowKeys,
491
+ selectedRowKeys = _ref3$selectedRowKeys === void 0 ? [] : _ref3$selectedRowKeys,
492
+ getProps = _ref3.getProps;
453
493
  var dataSource = data;
454
494
  var allRowKeys = dataSource.filter(function (d, i) {
455
495
  var _getProps;
@@ -493,12 +533,14 @@ var ProTable = function ProTable(props) {
493
533
  setFilteredColumns(columns);
494
534
  (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setState) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, 'filterColumns', columns);
495
535
  }, [propsColumns]);
536
+
496
537
  // dataSource 受控
497
538
  useEffect(function () {
498
539
  if (propsDataSource) {
499
540
  _setData(propsDataSource);
500
541
  }
501
542
  }, [propsDataSource]);
543
+
502
544
  // 初始化 ActionRef。
503
545
  initActionRef(actionRef, {
504
546
  getState: function getState() {
@@ -518,19 +560,20 @@ var ProTable = function ProTable(props) {
518
560
  actionRefCallback[state][name] = fun;
519
561
  },
520
562
  off: function off(name) {
521
- actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref3) {
522
- var _ref4 = _slicedToArray(_ref3, 2),
523
- k = _ref4[0],
524
- v = _ref4[1];
525
- var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref5) {
526
- var _ref6 = _slicedToArray(_ref5, 1),
527
- k = _ref6[0];
563
+ actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref4) {
564
+ var _ref5 = _slicedToArray(_ref4, 2),
565
+ k = _ref5[0],
566
+ v = _ref5[1];
567
+ var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref6) {
568
+ var _ref7 = _slicedToArray(_ref6, 1),
569
+ k = _ref7[0];
528
570
  return k !== name;
529
571
  }));
530
572
  return [k, filterV];
531
573
  }));
532
574
  }
533
575
  });
576
+
534
577
  // 绑定 Actions
535
578
  useActionType(actionRef, {
536
579
  fullScreen: function fullScreen() {
@@ -540,6 +583,7 @@ var ProTable = function ProTable(props) {
540
583
  setFullscreenState(state);
541
584
  getHeaderHeight(state);
542
585
  actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setState) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, 'fullScreenState', state);
586
+ reGenFilteredColumnsByAutoWidth();
543
587
  return state;
544
588
  },
545
589
  setColumn: function setColumn(newColumns) {
@@ -551,10 +595,12 @@ var ProTable = function ProTable(props) {
551
595
  if (update) {
552
596
  emit('refreshFilterState', newColumns);
553
597
  }
598
+ reGenFilteredColumnsByAutoWidth();
554
599
  },
555
600
  size: size,
556
601
  setSize: function setSize(mode) {
557
602
  _setSize(mode);
603
+ reGenFilteredColumnsByAutoWidth();
558
604
  },
559
605
  refresh: function refresh(params) {
560
606
  // card视角的刷新等于重新请求
@@ -660,10 +706,27 @@ var ProTable = function ProTable(props) {
660
706
  autoRefreshTimerRef.current = null;
661
707
  }
662
708
  });
709
+
663
710
  // 将 Actions 绑定到传入的 propsActionRef 中
664
711
  if (propsActionRef) {
665
712
  propsActionRef.current = actionRef.current;
666
713
  }
714
+ function reGenFilteredColumnsByAutoWidth() {
715
+ if (!autoWidth) {
716
+ return;
717
+ }
718
+ console.time('calc width');
719
+ setShowShadowContainer(true);
720
+ var authWidthedColumns = genAutoWidthColumns(filteredColumns, shadowContainerRef, data, size, useRowSelection, shadowActionColumnContainerRef);
721
+ setFilteredColumns(authWidthedColumns);
722
+ // 移除 shadow dom
723
+ // setTimeout(() => {
724
+ // if (document.querySelector('.teamix-pro-table-shadow-container')) {
725
+ // document.querySelector('.teamix-pro-table-shadow-container')?.remove();
726
+ // }
727
+ // }, 0);
728
+ console.timeEnd('calc width');
729
+ }
667
730
  function onFormatResult(next) {
668
731
  props.onFormatResult && props.onFormatResult(next);
669
732
  var time = 0;
@@ -692,7 +755,9 @@ var ProTable = function ProTable(props) {
692
755
  setTotal(total + (next.total || ((_next$data2 = next.data) === null || _next$data2 === void 0 ? void 0 : _next$data2.length)));
693
756
  }
694
757
  setShowSkeleton(false);
758
+ reGenFilteredColumnsByAutoWidth();
695
759
  }
760
+
696
761
  // 请求表格数据工具函数
697
762
  var getData = useRequest(function (params) {
698
763
  return _defineProperty({
@@ -757,6 +822,7 @@ var ProTable = function ProTable(props) {
757
822
  }
758
823
  }
759
824
  });
825
+
760
826
  // 请求函数
761
827
  function _request(params, noLoading, filterParams, isReset) {
762
828
  var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _objectSpread3;
@@ -765,6 +831,7 @@ var ProTable = function ProTable(props) {
765
831
  getUrlStateFilter(urlState !== null && urlState !== void 0 ? urlState : {}, actionRef);
766
832
  dataRef.current.flag = false;
767
833
  }
834
+
768
835
  // 如果没有传 url 且没有 customRequest,直接返回
769
836
  if (!url && !customRequest) {
770
837
  return;
@@ -778,6 +845,7 @@ var ProTable = function ProTable(props) {
778
845
  var dataFilterParams = filterParams !== null && filterParams !== void 0 ? filterParams : (_dataFilterFormRef$cu2 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu2 === void 0 ? void 0 : _dataFilterFormRef$cu2.values;
779
846
  // 列过滤请求参数
780
847
  var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$g = _actionRef$current6.getFilterRules) === null || _actionRef$current6$g === void 0 ? void 0 : _actionRef$current6$g.call(_actionRef$current6)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
848
+
781
849
  // 格式化后的请求参数
782
850
  var requestData = {};
783
851
  var preParams = _objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread((_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, pageSize), _objectSpread3), dataFilterParams), propsParams), sortParams), columnsFilterParams)), params);
@@ -828,9 +896,11 @@ var ProTable = function ProTable(props) {
828
896
  _setData([].concat(_toConsumableArray(data), _toConsumableArray(dataRes || [])));
829
897
  setTotal(total + (totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length)));
830
898
  }
899
+ reGenFilteredColumnsByAutoWidth();
831
900
  setShowSkeleton(false);
832
901
  setCustomTableLoading(false);
833
902
  }
903
+
834
904
  // 重新计算是否需要吸底
835
905
  if (footerSuction) {
836
906
  getFooterSuctionState();
@@ -838,6 +908,7 @@ var ProTable = function ProTable(props) {
838
908
  if (fixedTableBody) {
839
909
  getHeaderHeight(fullscreenState);
840
910
  }
911
+
841
912
  // customRequest 中支持 autoRefresh
842
913
  var time = 0;
843
914
  if (autoRefresh) {
@@ -866,6 +937,7 @@ var ProTable = function ProTable(props) {
866
937
  setSort(nextSort);
867
938
  _request(targetFormatSort(nextSort));
868
939
  }
940
+
869
941
  // 处理 dataFilter 中的 onFilter、onReset
870
942
  var dataFilter = _objectSpread(_objectSpread({
871
943
  mode: 'inline',
@@ -940,7 +1012,7 @@ var ProTable = function ProTable(props) {
940
1012
  autoRefreshProps: autoRefreshProps,
941
1013
  bindUrlProps: bindUrlProps,
942
1014
  bindUrl: bindUrl
943
- }), switchViewState === 'table' && /*#__PURE__*/React.createElement(Table.StickyLock, _objectSpread({
1015
+ }), switchViewState === 'table' && /*#__PURE__*/React.createElement(Table.StickyLock, _extends({
944
1016
  hasBorder: false,
945
1017
  dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
946
1018
  columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context, dataTeamixSpm, bindUrl, bindUrlProps),
@@ -955,10 +1027,11 @@ var ProTable = function ProTable(props) {
955
1027
  sort: sort,
956
1028
  primaryKey: primaryKey,
957
1029
  rowSelection: rowSelection,
958
- emptyContent: /*#__PURE__*/React.createElement(EmptyContent, _objectSpread({}, emptyProps)),
1030
+ emptyContent: /*#__PURE__*/React.createElement(EmptyContent, emptyProps),
959
1031
  sortIcons: getTableSortIcons(),
960
1032
  fixedHeader: fullscreenState || fixedTableBody,
961
1033
  maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
1034
+ // 过滤出可以传到 Table 的 Props
962
1035
  }, pickProps(getTableProps(), otherProps))), switchViewState === 'card' && /*#__PURE__*/React.createElement(CardView, {
963
1036
  dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
964
1037
  showSkeleton: showSkeleton,
@@ -968,18 +1041,20 @@ var ProTable = function ProTable(props) {
968
1041
  scrollHeight: fullscreenState || fixedTableBody ? "calc(100vh - ".concat(headerHeight, "px)") : undefined,
969
1042
  actionRef: actionRef,
970
1043
  context: context,
971
- columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context)
1044
+ columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context),
1045
+ emptyProps: emptyProps,
1046
+ emptyContent: otherProps === null || otherProps === void 0 ? void 0 : otherProps.emptyContent
972
1047
  }));
973
1048
  } else {
974
1049
  // 不传 columns 直接返回原始 Table
975
- return /*#__PURE__*/React.createElement(Table, _objectSpread({
1050
+ return /*#__PURE__*/React.createElement(Table, _extends({
976
1051
  className: cls()
977
1052
  }, pickProps(getTableProps(), otherProps)));
978
1053
  }
979
1054
  };
980
1055
  var renderFooterAction = function renderFooterAction() {
981
- var _footerAction$actions;
982
- if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_footerAction$actions = footerAction.actions) === null || _footerAction$actions === void 0 ? void 0 : _footerAction$actions.length) >= 0) {
1056
+ var _actions;
1057
+ if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_actions = footerAction.actions) === null || _actions === void 0 ? void 0 : _actions.length) >= 0) {
983
1058
  // 默认 context
984
1059
  var defaultContext = {
985
1060
  action: actionRef.current,
@@ -996,7 +1071,7 @@ var ProTable = function ProTable(props) {
996
1071
  });
997
1072
  return /*#__PURE__*/React.createElement("div", {
998
1073
  className: cls('footer-action')
999
- }, /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({}, targetFooterActions), {}, {
1074
+ }, /*#__PURE__*/React.createElement(ProActionGroup, _extends({}, targetFooterActions, {
1000
1075
  context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context),
1001
1076
  "data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-footerAction") : undefined
1002
1077
  })));
@@ -1033,7 +1108,7 @@ var ProTable = function ProTable(props) {
1033
1108
  } else {
1034
1109
  return /*#__PURE__*/React.createElement("div", {
1035
1110
  className: cls('footer-left-wrapper')
1036
- }, /*#__PURE__*/React.createElement(React.Fragment, null, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _objectSpread({
1111
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _extends({
1037
1112
  className: cls("footer-checkbox-".concat(size))
1038
1113
  }, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/React.createElement("span", {
1039
1114
  className: cls('selected-msg')
@@ -1055,9 +1130,9 @@ var ProTable = function ProTable(props) {
1055
1130
  }
1056
1131
  if (showPagination && switchViewState === 'table' || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination) && switchViewState === 'card') {
1057
1132
  var _props$paginationProp3;
1058
- var _ref8 = (_props$paginationProp3 = props === null || props === void 0 ? void 0 : props.paginationProps) !== null && _props$paginationProp3 !== void 0 ? _props$paginationProp3 : {},
1059
- onPaginationPropsChange = _ref8.onChange,
1060
- othersPaginationProps = _objectWithoutProperties(_ref8, _excluded2);
1133
+ var _ref9 = (_props$paginationProp3 = props === null || props === void 0 ? void 0 : props.paginationProps) !== null && _props$paginationProp3 !== void 0 ? _props$paginationProp3 : {},
1134
+ onPaginationPropsChange = _ref9.onChange,
1135
+ othersPaginationProps = _objectWithoutProperties(_ref9, _excluded2);
1061
1136
  return /*#__PURE__*/React.createElement("div", {
1062
1137
  className: cls('footer', {
1063
1138
  'footer-has-rowSelection': rowSelection,
@@ -1065,16 +1140,17 @@ var ProTable = function ProTable(props) {
1065
1140
  })
1066
1141
  }, renderRowSelection(), /*#__PURE__*/React.createElement("div", {
1067
1142
  className: cls('footer-right-wrapper')
1068
- }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _objectSpread({
1143
+ }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _extends({
1069
1144
  className: cls('pagination'),
1070
1145
  onChange: function onChange(number, e) {
1071
1146
  onChangePagination(number);
1072
1147
  onPaginationPropsChange === null || onPaginationPropsChange === void 0 ? void 0 : onPaginationPropsChange(number, e);
1073
1148
  },
1074
1149
  total: total,
1075
- responsivePaginationType: responsivePaginationType,
1150
+ responsivePaginationType: responsivePaginationType
1076
1151
  // shape="arrow-only"
1077
1152
  // pageSizePosition="end"
1153
+ ,
1078
1154
  totalRender: function totalRender(total) {
1079
1155
  return getMessage('total', {
1080
1156
  total: new Intl.NumberFormat().format(total)
@@ -1099,6 +1175,7 @@ var ProTable = function ProTable(props) {
1099
1175
  }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : footer));
1100
1176
  }
1101
1177
  };
1178
+
1102
1179
  // 判断是否需要吸底
1103
1180
  var fixFooterState = useMemo(function () {
1104
1181
  if (fullscreenState) {
@@ -1122,8 +1199,18 @@ var ProTable = function ProTable(props) {
1122
1199
  fullscreen: isFullScreen
1123
1200
  // 'footer-suction': footerSuctionState && footerSuction,
1124
1201
  }),
1202
+
1125
1203
  ref: tableRef
1126
- }, renderTable(isFullScreen), fixFooterState && /*#__PURE__*/React.createElement(ProPageContainer.FixedFooter, null, renderFooter()), !fixFooterState && renderFooter());
1204
+ }, showShadowContainer && shadowContainer({
1205
+ columns: filteredColumns,
1206
+ data: data,
1207
+ shadowContainerRef: shadowContainerRef
1208
+ }), hasActionColumn && shadowActionColumnContainer(filteredColumns, shadowActionColumnContainerRef), renderTable(isFullScreen), fixFooterState && /*#__PURE__*/React.createElement(ProPageContainer.FixedFooter, null, renderFooter()), !fixFooterState && renderFooter());
1127
1209
  });
1128
1210
  };
1211
+
1212
+ // window.TeamixMaterial = {
1213
+ // ...window.TeamixMaterial,
1214
+ // ProTable
1215
+ // }
1129
1216
  export default ProTable;
@@ -77,6 +77,32 @@ $fullscreenPadding: 24px;
77
77
  transition: all 0.1s;
78
78
  }
79
79
  }
80
+ &-shadow-container {
81
+ overflow: hidden;
82
+ position: absolute;
83
+ right: 0;
84
+ left: 0;
85
+ top: 0;
86
+ visibility: hidden;
87
+ pointer-events: none;
88
+ }
89
+ &-shadow-container-columns {
90
+ display: flex;
91
+ >* {
92
+ flex-shrink: 0;
93
+ }
94
+ }
95
+ &-action-column-shadow-container {
96
+ overflow: hidden;
97
+ position: absolute;
98
+ right: 0;
99
+ left: 0;
100
+ top: 0;
101
+ visibility: hidden;
102
+ pointer-events: none;
103
+ display: flex;
104
+ }
105
+
80
106
  // sort icon
81
107
  .next-table-sort.next-table-header-icon {
82
108
  line-height: 16px;