@arim-aisdc/public-components 2.3.90 → 2.3.91

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.
@@ -533,22 +533,18 @@ var TableMax = function TableMax(_ref) {
533
533
  var arr = newColumnOrder;
534
534
  if (!tableId) {
535
535
  setColumnOrder(arr);
536
- console.log(arr, '表格列顺序1');
537
536
  return;
538
537
  }
539
538
  var cache = JSON.parse((_localStorage$getItem = localStorage.getItem(tableKey)) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : '{}');
540
539
  if (version && version !== (cache === null || cache === void 0 ? void 0 : cache.version)) {
541
540
  setColumnOrder(arr);
542
- console.log(arr, '表格列顺序2');
543
541
  return;
544
542
  }
545
543
  ;
546
544
  if (cache && tableMaxConfig.cacheMaxAge && cache !== null && cache !== void 0 && cache.editTime && +new Date() - cache.editTime > ((_tableMaxConfig$cache = tableMaxConfig.cacheMaxAge) !== null && _tableMaxConfig$cache !== void 0 ? _tableMaxConfig$cache : CACHE_MAX_AGE)) {
547
545
  setColumnOrder(arr);
548
- console.log(arr, '表格列顺序3');
549
546
  return;
550
547
  }
551
- console.log(tableKey, cache, '表格缓存数据');
552
548
  var columnsIdSet = new Set(tableColumns.map(function (column) {
553
549
  return column.id;
554
550
  }));
@@ -598,7 +594,7 @@ var TableMax = function TableMax(_ref) {
598
594
  var newColumnSorting = (cacheColumnSorting === null || cacheColumnSorting === void 0 ? void 0 : cacheColumnSorting.filter(function (item) {
599
595
  return tableColumnIds.includes(item.id);
600
596
  })) || [];
601
- setColumnFilters(newColumnFilters);
597
+ setColumnFilters(canFilter ? newColumnFilters : []);
602
598
  setSorting(newColumnSorting);
603
599
  }
604
600
 
@@ -765,7 +761,7 @@ var TableMax = function TableMax(_ref) {
765
761
 
766
762
  // 初始化列
767
763
  useEffect(function () {
768
- console.log("tableId", tableId, !tableMaxRef.current || !tableContentRef.current || !tableId);
764
+ // console.log("tableId", tableId, !tableMaxRef.current || !tableContentRef.current || !tableId)
769
765
  if (!tableMaxRef.current || !tableContentRef.current || !tableId) return;
770
766
  if (!Array.isArray(columns) || columns.length === 0) return;
771
767
  // 根据props,自动增加勾选列/展开列
@@ -779,7 +775,7 @@ var TableMax = function TableMax(_ref) {
779
775
  var _column$columns;
780
776
  return (column === null || column === void 0 ? void 0 : column.columns) && ((_column$columns = column.columns) === null || _column$columns === void 0 ? void 0 : _column$columns.length) > 0;
781
777
  }) > -1);
782
- }, [columns, tableId]);
778
+ }, [columns, tableId, canFilter]);
783
779
  var _rowSelectionChange = useCallback(debounce(function (rowOriginal, row) {
784
780
  if (rowSelectionChange) {
785
781
  rowSelectionChange(rowOriginal, row);
@@ -856,7 +852,7 @@ var TableMax = function TableMax(_ref) {
856
852
  if (!tableId) return;
857
853
  cacheTimer.current = setTimeout(function () {
858
854
  var tableState = table.getState();
859
- console.log('缓存表格状态:', {
855
+ console.log('缓存表格状态:', tableKey, {
860
856
  enableFilters: enableFilters,
861
857
  headerRowNum: headerRowNum,
862
858
  compactMode: compactMode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.3.90",
3
+ "version": "2.3.91",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -48,7 +48,7 @@
48
48
  "dependencies": {
49
49
  "@ant-design/icons": "^5.3.7",
50
50
  "@ant-design/pro-components": "^2.7.10",
51
- "@arim-aisdc/public-components": "^2.3.82",
51
+ "@arim-aisdc/public-components": "^2.3.90",
52
52
  "@tanstack/match-sorter-utils": "^8.8.4",
53
53
  "@tanstack/react-table": "^8.9.1",
54
54
  "@tanstack/react-virtual": "^3.13.12",