@zat-design/sisyphus-react 3.4.5-beta.14 → 3.4.5-beta.16

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.
@@ -119,7 +119,7 @@ var RenderField = function RenderField(_ref) {
119
119
  tabledDisabled: config === null || config === void 0 ? void 0 : config.disabled,
120
120
  columnFieldProps: _fieldProps,
121
121
  params: rowParams,
122
- rowDisabled: rowDisabled
122
+ rowDisabled: rowDisabled || 'empty'
123
123
  });
124
124
  // 只读文本时,采用当前formItem的name,单行编辑时,使用生成的虚拟的name
125
125
  var baseName = isView ? name : namePath;
@@ -96,6 +96,9 @@ export var getDisabled = function getDisabled(_ref2) {
96
96
  params = _ref2.params,
97
97
  rowDisabled = _ref2.rowDisabled;
98
98
  var convertToBoolean = function convertToBoolean(value) {
99
+ if (Array.isArray(value)) {
100
+ return value;
101
+ }
99
102
  if (value === null || value === undefined || value === '') {
100
103
  return false;
101
104
  }
@@ -122,11 +125,15 @@ export var getDisabled = function getDisabled(_ref2) {
122
125
  if (globalControl) {
123
126
  return convertToBoolean(formDisabled) || convertToBoolean(tabledDisabled);
124
127
  }
128
+ if (rowDisabled === 'empty') {
129
+ return false;
130
+ }
125
131
  // 当表单含有diabled属性时,优先使用表单的disabled
126
132
  if (isFunction(rowDisabled) && noColumnDisabled()) {
127
133
  return rowDisabled(params[1]);
128
134
  }
129
135
  if (isFunction(column === null || column === void 0 ? void 0 : column.disabled)) {
136
+ debugger;
130
137
  return convertToBoolean(column === null || column === void 0 ? void 0 : column.disabled.apply(column, _toConsumableArray(params)));
131
138
  }
132
139
  // 表单FieldProps为函数时
@@ -122,7 +122,7 @@ var RenderField = function RenderField(_ref) {
122
122
  tabledDisabled: config === null || config === void 0 ? void 0 : config.disabled,
123
123
  columnFieldProps: _fieldProps,
124
124
  params: rowParams,
125
- rowDisabled: rowDisabled
125
+ rowDisabled: rowDisabled || 'empty'
126
126
  });
127
127
  // 只读文本时,采用当前formItem的name,单行编辑时,使用生成的虚拟的name
128
128
  var baseName = isView ? name : namePath;
@@ -103,6 +103,9 @@ var getDisabled = exports.getDisabled = function getDisabled(_ref2) {
103
103
  params = _ref2.params,
104
104
  rowDisabled = _ref2.rowDisabled;
105
105
  var convertToBoolean = function convertToBoolean(value) {
106
+ if (Array.isArray(value)) {
107
+ return value;
108
+ }
106
109
  if (value === null || value === undefined || value === '') {
107
110
  return false;
108
111
  }
@@ -129,11 +132,15 @@ var getDisabled = exports.getDisabled = function getDisabled(_ref2) {
129
132
  if (globalControl) {
130
133
  return convertToBoolean(formDisabled) || convertToBoolean(tabledDisabled);
131
134
  }
135
+ if (rowDisabled === 'empty') {
136
+ return false;
137
+ }
132
138
  // 当表单含有diabled属性时,优先使用表单的disabled
133
139
  if ((0, _lodash.isFunction)(rowDisabled) && noColumnDisabled()) {
134
140
  return rowDisabled(params[1]);
135
141
  }
136
142
  if ((0, _lodash.isFunction)(column === null || column === void 0 ? void 0 : column.disabled)) {
143
+ debugger;
137
144
  return convertToBoolean(column === null || column === void 0 ? void 0 : column.disabled.apply(column, (0, _toConsumableArray2.default)(params)));
138
145
  }
139
146
  // 表单FieldProps为函数时
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.4.5-beta.14",
3
+ "version": "3.4.5-beta.16",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",