ztxkui 4.2.23-591 → 4.2.23-592

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.
@@ -81,8 +81,8 @@ function useColumns(tableHandleRef) {
81
81
  title: i18next.t('序号'),
82
82
  width: 62,
83
83
  fixed: 'left',
84
- key: 'index',
85
- render: function (_text, _record, index) { return "" + (index + 1); },
84
+ // key: 'index',
85
+ // render: (_text, _record, index) => `${index + 1}`,
86
86
  },
87
87
  {
88
88
  title: i18next.t('测试列1'),
@@ -130,7 +130,7 @@ function useColumns(tableHandleRef) {
130
130
  },
131
131
  {
132
132
  title: i18next.t('测试列2'),
133
- // width: 100,
133
+ width: 100,
134
134
  dataIndex: 'test2',
135
135
  key: 'test2',
136
136
  showCopy: true,
@@ -140,7 +140,7 @@ function useColumns(tableHandleRef) {
140
140
  },
141
141
  {
142
142
  title: i18next.t('测试列31112'),
143
- // width: 100,
143
+ width: 100,
144
144
  dataIndex: 'test3',
145
145
  key: 'test3',
146
146
  showCopy: true,
@@ -156,7 +156,7 @@ function useColumns(tableHandleRef) {
156
156
  },
157
157
  {
158
158
  title: i18next.t('测试列4'),
159
- // width: 100,
159
+ width: 100,
160
160
  dataIndex: 'test4',
161
161
  key: 'test4',
162
162
  showCopy: true,
@@ -191,7 +191,7 @@ function useColumns(tableHandleRef) {
191
191
  },
192
192
  {
193
193
  title: i18next.t('测试列41'),
194
- // width: 100,
194
+ width: 100,
195
195
  dataIndex: 'test41',
196
196
  key: 'test41',
197
197
  showCopy: true,
@@ -204,7 +204,7 @@ function useColumns(tableHandleRef) {
204
204
  },
205
205
  {
206
206
  title: i18next.t('测试列41123'),
207
- // width: 100,
207
+ width: 100,
208
208
  dataIndex: 'test41123',
209
209
  key: 'test41123',
210
210
  showCopy: true,
@@ -217,7 +217,7 @@ function useColumns(tableHandleRef) {
217
217
  },
218
218
  {
219
219
  title: i18next.t('测试列42'),
220
- // width: 100,
220
+ width: 100,
221
221
  dataIndex: 'test42',
222
222
  key: 'test42',
223
223
  showCopy: true,
@@ -233,7 +233,7 @@ function useColumns(tableHandleRef) {
233
233
  },
234
234
  {
235
235
  title: i18next.t('测试列142'),
236
- // width: 100,
236
+ width: 100,
237
237
  dataIndex: 'test142',
238
238
  key: 'test142',
239
239
  showCopy: true,
@@ -250,7 +250,7 @@ function useColumns(tableHandleRef) {
250
250
  },
251
251
  {
252
252
  title: i18next.t('测试列43'),
253
- // width: 100,
253
+ width: 100,
254
254
  dataIndex: 'test43',
255
255
  key: 'test43',
256
256
  showCopy: true,
@@ -265,7 +265,7 @@ function useColumns(tableHandleRef) {
265
265
  },
266
266
  {
267
267
  title: i18next.t('测试列5'),
268
- // width: 100,
268
+ width: 100,
269
269
  dataIndex: 'test5',
270
270
  key: 'test5',
271
271
  showCopy: true,
@@ -679,6 +679,12 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
679
679
  var originalContent = originalRender_1
680
680
  ? originalRender_1(text, record, index)
681
681
  : text;
682
+ // 如果结果是普通对象(如 record、列合并对象),不渲染
683
+ if (originalContent != null &&
684
+ typeof originalContent === 'object' &&
685
+ !React.isValidElement(originalContent)) {
686
+ originalContent = null;
687
+ }
682
688
  return (React.createElement("div", { style: {
683
689
  display: 'flex',
684
690
  alignItems: 'center',
@@ -238,7 +238,9 @@ var TableMenu = forwardRef(function (_a, ref) {
238
238
  var currentRecord = recordItem || record;
239
239
  var renderItem = null;
240
240
  var isDisabled = false;
241
- if (item.editable && onEditableSave && typeof item.onCell === 'function') {
241
+ if (item.editable &&
242
+ onEditableSave &&
243
+ typeof item.onCell === 'function') {
242
244
  var onCellItem = item.onCell(currentRecord, recordIndex);
243
245
  renderItem = React.createElement(TableEnhanceCell, __assign({}, onCellItem, { noTdWrap: true }));
244
246
  // 与 TableEnhanceCell 保持一致的禁用判断逻辑
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "4.2.23-591",
3
+ "version": "4.2.23-592",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",