ztxkui 2.5.4 → 2.5.5

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.
@@ -64,7 +64,9 @@ function useColumns(props) {
64
64
  }
65
65
  // 添加render字段
66
66
  if (!_column.render) {
67
- _column.render = function (text, record, index) { return (text ? text : '— —'); };
67
+ _column.render = function (text, record, index) {
68
+ return text == null || text === '' ? '— —' : text;
69
+ };
68
70
  }
69
71
  });
70
72
  if (showColumnDynamic) {
@@ -11,7 +11,7 @@ export interface IEditableConfig {
11
11
  maxHandle?: (record: any) => any;
12
12
  minHandle?: (record: any) => any;
13
13
  /**是否禁用 */
14
- disabledHandle?: (record: any) => boolean;
14
+ disabledHandle?: (record: any, index?: number) => boolean;
15
15
  /**数字输入框的转换类型:内置 货币和百分比 */
16
16
  formatterType?: IFormatterType;
17
17
  /**货币的前缀 可以为 $ 或 ¥ */
@@ -157,7 +157,7 @@ var TableEnhanceCell = memo(function (_a) {
157
157
  }
158
158
  }
159
159
  if (disabledHandle && disabledHandle instanceof Function) {
160
- disabledResult = disabledHandle(record);
160
+ disabledResult = disabledHandle(record, index);
161
161
  }
162
162
  // 处理各种类型
163
163
  if (type === 'select') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",