@nokecy/qc-ui 1.0.53 → 1.0.55

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 (53) hide show
  1. package/README.md +23 -23
  2. package/dist/cjs/ConfirmPro/index.js +4 -4
  3. package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +5 -5
  4. package/dist/cjs/ag-grid-plus/ag-grid-theme-builder.css +352 -352
  5. package/dist/cjs/ag-grid-plus/ag-gridPlus.js +7 -4
  6. package/dist/cjs/ag-grid-plus/index.less +37 -37
  7. package/dist/cjs/ag-grid-plus/interface.d.ts +9 -0
  8. package/dist/cjs/ag-grid-plus/locale.d.ts +162 -0
  9. package/dist/cjs/ag-grid-plus/locale.js +178 -0
  10. package/dist/cjs/ag-grid-plus/queryForm/index.less +48 -48
  11. package/dist/cjs/ag-grid-plus/queryForm/queryForm.js +21 -1
  12. package/dist/cjs/ag-grid-plus/toolBar/index.js +4 -4
  13. package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -49
  14. package/dist/cjs/dashboard/dashboard/index.less +173 -173
  15. package/dist/cjs/dashboard/dashboard/utils.js +4 -4
  16. package/dist/cjs/dashboard/utils.js +8 -8
  17. package/dist/cjs/dashboard/widget/index.less +7 -7
  18. package/dist/cjs/dashboard/widget/selector/index.less +172 -172
  19. package/dist/cjs/draggableModal/index.js +4 -4
  20. package/dist/cjs/draggableModal/style.less +16 -16
  21. package/dist/cjs/formDesigner/arrayTable/styles.less +2 -2
  22. package/dist/cjs/formDesigner/index.less +2 -2
  23. package/dist/cjs/fullScreenAlert/index.js +4 -4
  24. package/dist/cjs/fullScreenAlert/index.less +133 -133
  25. package/dist/cjs/importModal/index.js +4 -4
  26. package/dist/cjs/toolBar/index.less +25 -25
  27. package/dist/esm/ConfirmPro/index.js +4 -4
  28. package/dist/esm/ag-grid-plus/_utils/boolSelect.js +5 -5
  29. package/dist/esm/ag-grid-plus/ag-grid-theme-builder.css +352 -352
  30. package/dist/esm/ag-grid-plus/ag-gridPlus.js +7 -4
  31. package/dist/esm/ag-grid-plus/index.less +37 -37
  32. package/dist/esm/ag-grid-plus/interface.d.ts +9 -0
  33. package/dist/esm/ag-grid-plus/locale.d.ts +162 -0
  34. package/dist/esm/ag-grid-plus/locale.js +172 -0
  35. package/dist/esm/ag-grid-plus/queryForm/index.less +48 -48
  36. package/dist/esm/ag-grid-plus/queryForm/queryForm.js +21 -1
  37. package/dist/esm/ag-grid-plus/toolBar/index.js +4 -4
  38. package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -49
  39. package/dist/esm/dashboard/dashboard/index.less +173 -173
  40. package/dist/esm/dashboard/dashboard/utils.js +4 -4
  41. package/dist/esm/dashboard/utils.js +8 -8
  42. package/dist/esm/dashboard/widget/index.less +7 -7
  43. package/dist/esm/dashboard/widget/selector/index.less +172 -172
  44. package/dist/esm/draggableModal/index.js +4 -4
  45. package/dist/esm/draggableModal/style.less +16 -16
  46. package/dist/esm/formDesigner/arrayTable/styles.less +2 -2
  47. package/dist/esm/formDesigner/index.less +2 -2
  48. package/dist/esm/fullScreenAlert/index.js +4 -4
  49. package/dist/esm/fullScreenAlert/index.less +133 -133
  50. package/dist/esm/importModal/index.js +4 -4
  51. package/dist/esm/toolBar/index.less +25 -25
  52. package/dist/umd/qc-ui.min.js +1 -1
  53. package/package.json +70 -70
@@ -33,6 +33,7 @@ import CustomGroupCellRenderer from "./_utils/customGroupCellRenderer";
33
33
  import processColumnGroups from "./_utils/processColumnGroups";
34
34
  import flattenColumnState from "./_utils/processFormColumnState";
35
35
  import { Select } from '@formily/antd-v5';
36
+ import { localeText } from "./locale";
36
37
  var Paragraph = Typography.Paragraph,
37
38
  Text = Typography.Text;
38
39
  var getSort = function getSort(columnState) {
@@ -389,11 +390,13 @@ function AgGridPlus(props) {
389
390
  }
390
391
  return calculateArrCopy;
391
392
  };
392
- var getDataType = function getDataType(data, colName) {
393
+ var getDataType = function getDataType(data, colName, valueEnum) {
393
394
  if (typeof data[colName] === 'number') {
395
+ // 如果有枚举值,说明是分类数据,不进行计算;否则默认求和
396
+ var shouldCalculate = !valueEnum || valueEnum.length === 0;
394
397
  return {
395
398
  type: "number",
396
- calculateType: "sum",
399
+ calculateType: shouldCalculate ? "sum" : false,
397
400
  cellStyle: {
398
401
  'text-align': 'right'
399
402
  }
@@ -419,7 +422,7 @@ function AgGridPlus(props) {
419
422
  });
420
423
  var columnDefs = !columnProps ? props.columnDefs ? props.columnDefs : [] : columnProps;
421
424
  columnDefs = columnDefs.map(function (col) {
422
- var dataType = getDataType(data, col.field);
425
+ var dataType = getDataType(data, col.field, col.valueEnum);
423
426
  if (col.valueEnum && Array.isArray(col.valueEnum)) {
424
427
  var _defaultItems$0$value, _defaultItems$;
425
428
  // 统计默认值
@@ -650,7 +653,7 @@ function AgGridPlus(props) {
650
653
  }), /*#__PURE__*/React.createElement(AgGridReact, _extends({
651
654
  className: "ag-theme-custom"
652
655
  }, rest, {
653
- // immutableData: true,
656
+ localeText: localeText,
654
657
  gridOptions: {
655
658
  enableCellTextSelection: true,
656
659
  ensureDomOrder: true
@@ -1,37 +1,37 @@
1
- .grid-spin {
2
- height: 100%;
3
-
4
- .ant-spin-container {
5
- height: 100%;
6
- }
7
- }
8
-
9
- .ag-icon-filter:before {
10
- -webkit-mask-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNzIzNjg0NDAwMDY0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI0MjgiIHh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5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTMyNS43MTQyODYgODg0LjU3MTQyOWMwIDIwLjIyODU3MSAxNi4yMjg1NzEgMzYuNTcxNDI5IDM2LjM0Mjg1NyAzNi41NzE0MjhoMjk5Ljg4NTcxNGMyMC4xMTQyODYgMCAzNi4zNDI4NTctMTYuMzQyODU3IDM2LjM0Mjg1Ny0zNi41NzE0MjhWNjYwLjU3MTQyOUgzMjUuNzE0Mjg2djIyNHogbTYwNi45NzE0MjgtNzgxLjcxNDI4Nkg5MS4zMTQyODZjLTI4IDAtNDUuNDg1NzE0IDMwLjUxNDI4Ni0zMS40Mjg1NzIgNTQuODU3MTQzbDI1Mi45MTQyODYgNDI5LjcxNDI4NWgzOTguNjI4NTcxbDI1Mi45MTQyODYtNDI5LjcxNDI4NWMxMy44Mjg1NzEtMjQuMzQyODU3LTMuNjU3MTQzLTU0Ljg1NzE0My0zMS42NTcxNDMtNTQuODU3MTQzeiIgcC1pZD0iMjQyOSIgZmlsbD0iIzhhOGE4YSI+PC9wYXRoPjwvc3ZnPg==) !important;
13
-
14
- color: #8a8a8a;
15
- }
16
-
17
- .ag-row-group {
18
- display: flex;
19
- align-items: center;
20
- padding-left: 16px;
21
- }
22
-
23
- .jf-anticon {
24
- cursor: pointer;
25
- display: inline-block;
26
- box-sizing: border-box;
27
- margin-right: 16rpx;
28
- }
29
-
30
- .ag-root-wrapper-body .ag-center-cols-viewport .ag-center-cols-container .ag-checkbox .ag-checkbox-input-wrapper {
31
- width: 18px !important;
32
- height: 18px !important;
33
- }
34
- .ag-root-wrapper-body .ag-header-viewport .ag-checkbox .ag-checkbox-input-wrapper {
35
- width: 18px !important;
36
- height: 18px !important;
37
- }
1
+ .grid-spin {
2
+ height: 100%;
3
+
4
+ .ant-spin-container {
5
+ height: 100%;
6
+ }
7
+ }
8
+
9
+ .ag-icon-filter:before {
10
+ -webkit-mask-image: url(data:image/svg+xml;base64,PD94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/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNzIzNjg0NDAwMDY0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI0MjgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTMyNS43MTQyODYgODg0LjU3MTQyOWMwIDIwLjIyODU3MSAxNi4yMjg1NzEgMzYuNTcxNDI5IDM2LjM0Mjg1NyAzNi41NzE0MjhoMjk5Ljg4NTcxNGMyMC4xMTQyODYgMCAzNi4zNDI4NTctMTYuMzQyODU3IDM2LjM0Mjg1Ny0zNi41NzE0MjhWNjYwLjU3MTQyOUgzMjUuNzE0Mjg2djIyNHogbTYwNi45NzE0MjgtNzgxLjcxNDI4Nkg5MS4zMTQyODZjLTI4IDAtNDUuNDg1NzE0IDMwLjUxNDI4Ni0zMS40Mjg1NzIgNTQuODU3MTQzbDI1Mi45MTQyODYgNDI5LjcxNDI4NWgzOTguNjI4NTcxbDI1Mi45MTQyODYtNDI5LjcxNDI4NWMxMy44Mjg1NzEtMjQuMzQyODU3LTMuNjU3MTQzLTU0Ljg1NzE0My0zMS42NTcxNDMtNTQuODU3MTQzeiIgcC1pZD0iMjQyOSIgZmlsbD0iIzhhOGE4YSI+PC9wYXRoPjwvc3ZnPg==) !important;
13
+
14
+ color: #8a8a8a;
15
+ }
16
+
17
+ .ag-row-group {
18
+ display: flex;
19
+ align-items: center;
20
+ padding-left: 16px;
21
+ }
22
+
23
+ .jf-anticon {
24
+ cursor: pointer;
25
+ display: inline-block;
26
+ box-sizing: border-box;
27
+ margin-right: 16rpx;
28
+ }
29
+
30
+ .ag-root-wrapper-body .ag-center-cols-viewport .ag-center-cols-container .ag-checkbox .ag-checkbox-input-wrapper {
31
+ width: 18px !important;
32
+ height: 18px !important;
33
+ }
34
+ .ag-root-wrapper-body .ag-header-viewport .ag-checkbox .ag-checkbox-input-wrapper {
35
+ width: 18px !important;
36
+ height: 18px !important;
37
+ }
@@ -84,6 +84,15 @@ interface AgGridColumnPropsClone extends ColDef {
84
84
  value: any;
85
85
  label: any;
86
86
  }[];
87
+ /**
88
+ * 列计算类型配置
89
+ * - "sum": 求和计算
90
+ * - "avg": 平均值计算
91
+ * - "standardDeviation": 标准差计算
92
+ * - false: 禁用计算
93
+ * 当设置后,会在表格底部固定行显示计算结果
94
+ */
95
+ calculateType?: "sum" | "avg" | "standardDeviation" | false;
87
96
  }
88
97
  declare function AgGridColumn(props: AgGridColumnPropsClone | ColGroupDef): React.JSX.Element;
89
98
  export { GridProps, AgGridColumn, GridRef, AgGridColumnPropsClone };
@@ -0,0 +1,162 @@
1
+ export declare const localeText: {
2
+ page: string;
3
+ more: string;
4
+ to: string;
5
+ of: string;
6
+ next: string;
7
+ last: string;
8
+ first: string;
9
+ previous: string;
10
+ loadingOoo: string;
11
+ selectAll: string;
12
+ searchOoo: string;
13
+ blanks: string;
14
+ filterOoo: string;
15
+ applyFilter: string;
16
+ equals: string;
17
+ notEqual: string;
18
+ lessThan: string;
19
+ greaterThan: string;
20
+ lessThanOrEqual: string;
21
+ greaterThanOrEqual: string;
22
+ inRange: string;
23
+ contains: string;
24
+ notContains: string;
25
+ startsWith: string;
26
+ endsWith: string;
27
+ dateFormatOoo: string;
28
+ group: string;
29
+ ungroup: string;
30
+ pinColumn: string;
31
+ pinLeft: string;
32
+ pinRight: string;
33
+ noPin: string;
34
+ copy: string;
35
+ cut: string;
36
+ copyWithHeaders: string;
37
+ copyWithGroupHeaders: string;
38
+ ctrlC: string;
39
+ paste: string;
40
+ ctrlV: string;
41
+ export: string;
42
+ csvExport: string;
43
+ excelExport: string;
44
+ excelOldExport: string;
45
+ pivotChart: string;
46
+ chartRange: string;
47
+ columnChart: string;
48
+ groupedColumn: string;
49
+ stackedColumn: string;
50
+ normalizedColumn: string;
51
+ barChart: string;
52
+ groupedBar: string;
53
+ stackedBar: string;
54
+ normalizedBar: string;
55
+ lineChart: string;
56
+ pieChart: string;
57
+ pie: string;
58
+ doughnut: string;
59
+ areaChart: string;
60
+ area: string;
61
+ stackedArea: string;
62
+ normalizedArea: string;
63
+ scatterChart: string;
64
+ xyChart: string;
65
+ bubbleChart: string;
66
+ histogramChart: string;
67
+ combinationChart: string;
68
+ columnLineCombo: string;
69
+ areaColumnCombo: string;
70
+ pivotChartTitle: string;
71
+ rangeChartTitle: string;
72
+ settings: string;
73
+ data: string;
74
+ format: string;
75
+ categories: string;
76
+ series: string;
77
+ axis: string;
78
+ color: string;
79
+ thickness: string;
80
+ xRotation: string;
81
+ yRotation: string;
82
+ ticks: string;
83
+ width: string;
84
+ height: string;
85
+ length: string;
86
+ padding: string;
87
+ chart: string;
88
+ title: string;
89
+ background: string;
90
+ font: string;
91
+ top: string;
92
+ right: string;
93
+ bottom: string;
94
+ left: string;
95
+ labels: string;
96
+ size: string;
97
+ legend: string;
98
+ position: string;
99
+ markerSize: string;
100
+ markerStroke: string;
101
+ markerPadding: string;
102
+ itemPaddingX: string;
103
+ itemPaddingY: string;
104
+ strokeWidth: string;
105
+ offset: string;
106
+ tooltips: string;
107
+ offsets: string;
108
+ callout: string;
109
+ markers: string;
110
+ shadow: string;
111
+ blur: string;
112
+ xOffset: string;
113
+ yOffset: string;
114
+ lineWidth: string;
115
+ normal: string;
116
+ bold: string;
117
+ italic: string;
118
+ boldItalic: string;
119
+ predefined: string;
120
+ fillOpacity: string;
121
+ strokeOpacity: string;
122
+ histogramBinCount: string;
123
+ connectorLine: string;
124
+ seriesGroup: string;
125
+ grouped: string;
126
+ stacked: string;
127
+ normalized: string;
128
+ legendPadding: string;
129
+ groupPadding: string;
130
+ seriesType: string;
131
+ columns: string;
132
+ rowGroupColumns: string;
133
+ rowGroupColumnsEmptyMessage: string;
134
+ valueColumns: string;
135
+ valueColumnsEmptyMessage: string;
136
+ pivotColumns: string;
137
+ pivotColumnsEmptyMessage: string;
138
+ toolPanelButton: string;
139
+ noRowsToShow: string;
140
+ valueAggregation: string;
141
+ autosizeThiscolumn: string;
142
+ autosizeAllColumns: string;
143
+ groupBy: string;
144
+ ungroupBy: string;
145
+ resetColumns: string;
146
+ expandAll: string;
147
+ collapseAll: string;
148
+ toolPanel: string;
149
+ sum: string;
150
+ min: string;
151
+ max: string;
152
+ none: string;
153
+ count: string;
154
+ average: string;
155
+ avg: string;
156
+ filteredRows: string;
157
+ selectedRows: string;
158
+ totalRows: string;
159
+ totalAndFilteredRows: string;
160
+ and: string;
161
+ or: string;
162
+ };
@@ -0,0 +1,172 @@
1
+ export var localeText = {
2
+ // for filter panel
3
+ page: '页',
4
+ more: '更多',
5
+ to: '到',
6
+ of: '的',
7
+ next: '下一页',
8
+ last: '末页',
9
+ first: '首页',
10
+ previous: '上一页',
11
+ loadingOoo: '加载中...',
12
+ // for set filter
13
+ selectAll: '全选',
14
+ searchOoo: '查询...',
15
+ blanks: '空白',
16
+ // for number filter and text filter
17
+ filterOoo: '筛选...',
18
+ applyFilter: '应用筛选',
19
+ equals: '等于',
20
+ notEqual: '不等于',
21
+ // for number filter
22
+ lessThan: '小于',
23
+ greaterThan: '大于',
24
+ lessThanOrEqual: '小于等于',
25
+ greaterThanOrEqual: '大于等于',
26
+ inRange: '范围',
27
+ // for text filter
28
+ contains: '包含',
29
+ notContains: '不包含',
30
+ startsWith: '开始于',
31
+ endsWith: '结束于',
32
+ // for date filter
33
+ dateFormatOoo: 'yyyy-mm-dd',
34
+ // for grouping
35
+ group: '分组',
36
+ ungroup: '取消分组',
37
+ // for context menu
38
+ pinColumn: '固定列',
39
+ pinLeft: '固定在左侧',
40
+ pinRight: '固定在右侧',
41
+ noPin: '不固定',
42
+ copy: '复制',
43
+ cut: '剪切',
44
+ copyWithHeaders: '带标题复制',
45
+ copyWithGroupHeaders: '带分组标题复制',
46
+ ctrlC: 'Ctrl+C',
47
+ paste: '粘贴',
48
+ ctrlV: 'Ctrl+V',
49
+ export: '导出',
50
+ csvExport: '导出为CSV',
51
+ excelExport: '导出为Excel (.xlsx)',
52
+ excelOldExport: '导出为Excel (.xls)',
53
+ // for chart
54
+ pivotChart: '透视表',
55
+ chartRange: '图表范围',
56
+ columnChart: '柱状图',
57
+ groupedColumn: '分组柱状图',
58
+ stackedColumn: '堆叠柱状图',
59
+ normalizedColumn: '百分比堆叠柱状图',
60
+ barChart: '条形图',
61
+ groupedBar: '分组条形图',
62
+ stackedBar: '堆叠条形图',
63
+ normalizedBar: '百分比堆叠条形图',
64
+ lineChart: '折线图',
65
+ pieChart: '饼图',
66
+ pie: '饼图',
67
+ doughnut: '环形图',
68
+ areaChart: '面积图',
69
+ area: '面积图',
70
+ stackedArea: '堆叠面积图',
71
+ normalizedArea: '百分比堆叠面积图',
72
+ scatterChart: '散点图',
73
+ xyChart: 'XY散点图',
74
+ bubbleChart: '气泡图',
75
+ histogramChart: '直方图',
76
+ combinationChart: '组合图',
77
+ columnLineCombo: '柱状图和折线图',
78
+ areaColumnCombo: '面积图和柱状图',
79
+ // for charts
80
+ pivotChartTitle: '透视表',
81
+ rangeChartTitle: '范围图表',
82
+ settings: '设置',
83
+ data: '数据',
84
+ format: '格式',
85
+ categories: '分类',
86
+ series: '系列',
87
+ axis: '坐标轴',
88
+ color: '颜色',
89
+ thickness: '厚度',
90
+ xRotation: 'X轴旋转',
91
+ yRotation: 'Y轴旋转',
92
+ ticks: '刻度',
93
+ width: '宽度',
94
+ height: '高度',
95
+ length: '长度',
96
+ padding: '内边距',
97
+ chart: '图表',
98
+ title: '标题',
99
+ background: '背景',
100
+ font: '字体',
101
+ top: '顶部',
102
+ right: '右侧',
103
+ bottom: '底部',
104
+ left: '左侧',
105
+ labels: '标签',
106
+ size: '大小',
107
+ legend: '图例',
108
+ position: '位置',
109
+ markerSize: '标记大小',
110
+ markerStroke: '标记描边',
111
+ markerPadding: '标记内边距',
112
+ itemPaddingX: '项目X轴内边距',
113
+ itemPaddingY: '项目Y轴内边距',
114
+ strokeWidth: '描边宽度',
115
+ offset: '偏移',
116
+ tooltips: '工具提示',
117
+ offsets: '偏移量',
118
+ callout: '标注',
119
+ markers: '标记',
120
+ shadow: '阴影',
121
+ blur: '模糊',
122
+ xOffset: 'X轴偏移',
123
+ yOffset: 'Y轴偏移',
124
+ lineWidth: '线宽',
125
+ normal: '正常',
126
+ bold: '粗体',
127
+ italic: '斜体',
128
+ boldItalic: '粗斜体',
129
+ predefined: '预定义',
130
+ fillOpacity: '填充不透明度',
131
+ strokeOpacity: '线条不透明度',
132
+ histogramBinCount: '直方图分组数量',
133
+ connectorLine: '连接线',
134
+ seriesGroup: '系列分组',
135
+ grouped: '分组',
136
+ stacked: '堆叠',
137
+ normalized: '归一化',
138
+ legendPadding: '图例内边距',
139
+ groupPadding: '分组内边距',
140
+ seriesType: '系列类型',
141
+ columns: '列',
142
+ rowGroupColumns: '行分组列',
143
+ rowGroupColumnsEmptyMessage: '将列拖至此处进行行分组',
144
+ valueColumns: '值列',
145
+ valueColumnsEmptyMessage: '将列拖至此处进行聚合',
146
+ pivotColumns: '数据透视列',
147
+ pivotColumnsEmptyMessage: '将列拖至此处设置为数据透视列',
148
+ toolPanelButton: '工具面板按钮',
149
+ noRowsToShow: '暂无数据',
150
+ valueAggregation: '值聚合',
151
+ autosizeThiscolumn: '自动调整此列',
152
+ autosizeAllColumns: '自动调整所有列',
153
+ groupBy: '按此列分组',
154
+ ungroupBy: '取消此列分组',
155
+ resetColumns: '重置列',
156
+ expandAll: '展开所有',
157
+ collapseAll: '折叠所有',
158
+ toolPanel: '工具面板',
159
+ sum: '总和',
160
+ min: '最小值',
161
+ max: '最大值',
162
+ none: '无',
163
+ count: '计数',
164
+ average: '平均值',
165
+ avg: '平均值',
166
+ filteredRows: '筛选行',
167
+ selectedRows: '选中行',
168
+ totalRows: '总行数',
169
+ totalAndFilteredRows: '行',
170
+ and: '和',
171
+ or: '或'
172
+ };
@@ -1,48 +1,48 @@
1
-
2
- @pro-table-search-prefix-cls: ~'ag-grid-table-search';
3
-
4
- @pro-table-form-prefix-cls: ~'ag-grid-table-form';
5
-
6
- .@{pro-table-search-prefix-cls} {
7
- margin-bottom: 8px;
8
- padding: 8px;
9
- // padding-bottom: 0;
10
- background-color: #fff;
11
-
12
- &.@{pro-table-form-prefix-cls} {
13
- margin: 0;
14
- padding: 0 16px;
15
- overflow: unset;
16
- }
17
-
18
- &-light {
19
- margin-bottom: 0;
20
- padding: 16px 0;
21
- }
22
-
23
- &-form-option {
24
- .ant-form-item {
25
- margin: 0;
26
- }
27
-
28
- .ant-form-item-label {
29
- opacity: 0;
30
- }
31
-
32
- .ant-form-item-control-input {
33
- justify-content: flex-start;
34
- }
35
- }
36
- }
37
-
38
- @media (max-width: 575px) {
39
- .@{pro-table-search-prefix-cls} {
40
- height: auto !important;
41
- padding-bottom: 24px;
42
-
43
- .ant-form-item-label {
44
- min-width: 80px;
45
- text-align: left;
46
- }
47
- }
48
- }
1
+
2
+ @pro-table-search-prefix-cls: ~'ag-grid-table-search';
3
+
4
+ @pro-table-form-prefix-cls: ~'ag-grid-table-form';
5
+
6
+ .@{pro-table-search-prefix-cls} {
7
+ margin-bottom: 8px;
8
+ padding: 8px;
9
+ // padding-bottom: 0;
10
+ background-color: #fff;
11
+
12
+ &.@{pro-table-form-prefix-cls} {
13
+ margin: 0;
14
+ padding: 0 16px;
15
+ overflow: unset;
16
+ }
17
+
18
+ &-light {
19
+ margin-bottom: 0;
20
+ padding: 16px 0;
21
+ }
22
+
23
+ &-form-option {
24
+ .ant-form-item {
25
+ margin: 0;
26
+ }
27
+
28
+ .ant-form-item-label {
29
+ opacity: 0;
30
+ }
31
+
32
+ .ant-form-item-control-input {
33
+ justify-content: flex-start;
34
+ }
35
+ }
36
+ }
37
+
38
+ @media (max-width: 575px) {
39
+ .@{pro-table-search-prefix-cls} {
40
+ height: auto !important;
41
+ padding-bottom: 24px;
42
+
43
+ .ant-form-item-label {
44
+ min-width: 80px;
45
+ text-align: left;
46
+ }
47
+ }
48
+ }
@@ -10,8 +10,28 @@ var useCollapseGrid = function useCollapseGrid(maxRows, defaultExpand) {
10
10
  maxWidth: 240,
11
11
  maxRows: defaultExpand ? Infinity : maxRows,
12
12
  shouldVisible: function shouldVisible(node, grid) {
13
- if (node.index === grid.childSize - 1) return true;
13
+ // 展开状态时,显示所有元素
14
14
  if (grid.maxRows === Infinity) return true;
15
+
16
+ // 对于按钮列(最后一个元素),总是显示
17
+ if (node.index === grid.childSize - 1) {
18
+ return true;
19
+ }
20
+
21
+ // 对于表单项
22
+ var isCollapsed = grid.maxRows === maxRows;
23
+
24
+ // 收起状态且只有一行时,需要为按钮预留空间
25
+ if (isCollapsed && maxRows === 1) {
26
+ // 如果当前节点在第一行,检查是否超过了最大列数限制
27
+ if (node.shadowRow <= 1) {
28
+ // 为按钮预留一列空间,所以实际可显示的列数要减1
29
+ return node.shadowColumn < grid.maxColumns;
30
+ }
31
+ return false;
32
+ }
33
+
34
+ // 其他情况按照行数限制显示
15
35
  return node.shadowRow < maxRows + 1;
16
36
  }
17
37
  });
@@ -10,10 +10,10 @@ import { ConfigProvider, Tooltip } from 'antd';
10
10
  import classNames from 'classnames';
11
11
  import React, { useContext, useMemo } from 'react';
12
12
  import { useStyle } from "./style";
13
- /**
14
- * 获取配置区域 DOM Item
15
- *
16
- * @param setting 配置项
13
+ /**
14
+ * 获取配置区域 DOM Item
15
+ *
16
+ * @param setting 配置项
17
17
  */
18
18
  function getSettingItem(setting) {
19
19
  if ( /*#__PURE__*/React.isValidElement(setting)) {