@zat-design/sisyphus-react 3.9.4-beta.8 → 3.9.4-beta.9
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.
@@ -128,6 +128,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
128
128
|
var isInNewRowFlag = isInNewRow(record);
|
129
129
|
var _isAddCell = isAddCell;
|
130
130
|
otherProps.isChanged = isChanged;
|
131
|
+
var nextValue = value;
|
131
132
|
// 存在比对
|
132
133
|
if (isFunction(otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewRender) && (diffConfig === null || diffConfig === void 0 ? void 0 : diffConfig.originalDataSource)) {
|
133
134
|
var _originalObj$record$r;
|
@@ -139,10 +140,17 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
139
140
|
index: index
|
140
141
|
});
|
141
142
|
// viewRender 返回值为 false 时,不显示对比
|
142
|
-
if (isBoolean(diffResult)) {
|
143
|
+
if (isBoolean(diffResult) && !diffResult) {
|
143
144
|
otherProps.isChanged = false;
|
144
145
|
}
|
145
146
|
originalValue = diffResult;
|
147
|
+
nextValue = otherProps.viewRender({
|
148
|
+
originalValue: value,
|
149
|
+
originalRecord: record !== null && record !== void 0 ? record : {},
|
150
|
+
value: value,
|
151
|
+
record: record,
|
152
|
+
index: index
|
153
|
+
});
|
146
154
|
}
|
147
155
|
// 存在自定义onDiff比对
|
148
156
|
if (isFunction(onDiff)) {
|
@@ -150,7 +158,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
150
158
|
var _diffResult = onDiff({
|
151
159
|
originalValue: originalValue,
|
152
160
|
originalRecord: (_originalObj$record$r2 = originalObj === null || originalObj === void 0 ? void 0 : originalObj[record === null || record === void 0 ? void 0 : record[rowKey]]) !== null && _originalObj$record$r2 !== void 0 ? _originalObj$record$r2 : {},
|
153
|
-
value:
|
161
|
+
value: nextValue,
|
154
162
|
record: record,
|
155
163
|
index: index
|
156
164
|
});
|
@@ -134,6 +134,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
134
134
|
var isInNewRowFlag = isInNewRow(record);
|
135
135
|
var _isAddCell = isAddCell;
|
136
136
|
otherProps.isChanged = isChanged;
|
137
|
+
var nextValue = value;
|
137
138
|
// 存在比对
|
138
139
|
if ((0, _lodash.isFunction)(otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewRender) && (diffConfig === null || diffConfig === void 0 ? void 0 : diffConfig.originalDataSource)) {
|
139
140
|
var _originalObj$record$r;
|
@@ -145,10 +146,17 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
145
146
|
index: index
|
146
147
|
});
|
147
148
|
// viewRender 返回值为 false 时,不显示对比
|
148
|
-
if ((0, _lodash.isBoolean)(diffResult)) {
|
149
|
+
if ((0, _lodash.isBoolean)(diffResult) && !diffResult) {
|
149
150
|
otherProps.isChanged = false;
|
150
151
|
}
|
151
152
|
originalValue = diffResult;
|
153
|
+
nextValue = otherProps.viewRender({
|
154
|
+
originalValue: value,
|
155
|
+
originalRecord: record !== null && record !== void 0 ? record : {},
|
156
|
+
value: value,
|
157
|
+
record: record,
|
158
|
+
index: index
|
159
|
+
});
|
152
160
|
}
|
153
161
|
// 存在自定义onDiff比对
|
154
162
|
if ((0, _lodash.isFunction)(onDiff)) {
|
@@ -156,7 +164,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
156
164
|
var _diffResult = onDiff({
|
157
165
|
originalValue: originalValue,
|
158
166
|
originalRecord: (_originalObj$record$r2 = originalObj === null || originalObj === void 0 ? void 0 : originalObj[record === null || record === void 0 ? void 0 : record[rowKey]]) !== null && _originalObj$record$r2 !== void 0 ? _originalObj$record$r2 : {},
|
159
|
-
value:
|
167
|
+
value: nextValue,
|
160
168
|
record: record,
|
161
169
|
index: index
|
162
170
|
});
|