@zat-design/sisyphus-react 3.8.3-beta.18 → 3.8.3-beta.19
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.
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +2 -1
- package/es/ProEditTable/components/RenderField/index.js +1 -1
- package/es/ProTable/components/RenderColumn/index.js +19 -5
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +2 -1
- package/lib/ProEditTable/components/RenderField/index.js +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +17 -5
- package/package.json +1 -1
|
@@ -136,7 +136,7 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
|
136
136
|
var _children = children;
|
|
137
137
|
if (viewRender) {
|
|
138
138
|
if (! /*#__PURE__*/React.isValidElement(viewRender)) {
|
|
139
|
-
return viewRender(orgValue, originalDTO === null || originalDTO === void 0 ? void 0 : originalDTO.originalValueRow, {
|
|
139
|
+
return viewRender(orgValue, (originalDTO === null || originalDTO === void 0 ? void 0 : originalDTO.originalValueRow) || {}, {
|
|
140
140
|
form: form,
|
|
141
141
|
name: name,
|
|
142
142
|
index: index
|
|
@@ -170,6 +170,7 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
|
170
170
|
return scrollFollowParent ? trigger.parentElement : document.body;
|
|
171
171
|
},
|
|
172
172
|
overlayClassName: "original-value-tootip",
|
|
173
|
+
placement: "topLeft",
|
|
173
174
|
title: _jsxs(_Space, {
|
|
174
175
|
direction: "vertical",
|
|
175
176
|
className: "changed-tooltip",
|
|
@@ -255,7 +255,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
255
255
|
if (typeof viewRender === 'function') {
|
|
256
256
|
var _column$dataIndex;
|
|
257
257
|
currentValue = (column === null || column === void 0 ? void 0 : (_column$dataIndex = column.dataIndex) === null || _column$dataIndex === void 0 ? void 0 : _column$dataIndex.includes('-')) ? value : currentValue;
|
|
258
|
-
var View = viewRender(currentValue, record, options);
|
|
258
|
+
var View = viewRender(currentValue, record || {}, options);
|
|
259
259
|
TargetComponent = _jsx(Container, {
|
|
260
260
|
viewEmpty: viewEmpty,
|
|
261
261
|
children: View
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "antd/es/space/style";
|
|
2
|
+
import _Space from "antd/es/space";
|
|
1
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
4
|
import "antd/es/tooltip/style";
|
|
3
5
|
import _Tooltip from "antd/es/tooltip";
|
|
@@ -53,11 +55,23 @@ var RenderColumn = function RenderColumn(props) {
|
|
|
53
55
|
width: width,
|
|
54
56
|
minWidth: minWidth
|
|
55
57
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
overlayClassName: "original-value-tootip",
|
|
59
|
+
title: _jsx(_Space, {
|
|
60
|
+
direction: "vertical",
|
|
61
|
+
className: "changed-tooltip",
|
|
62
|
+
children: originalDiffTip ? _jsxs(_Fragment, {
|
|
63
|
+
children: [_jsxs(_Space, {
|
|
64
|
+
align: "start",
|
|
65
|
+
className: "original-value-container",
|
|
66
|
+
children: ["\u521D\u59CB\u503C\uFF1A", originalValue]
|
|
67
|
+
}), _jsx(_Space, {
|
|
68
|
+
className: "current-value-container",
|
|
69
|
+
children: ellipsis ? _jsxs("span", {
|
|
70
|
+
children: ["\u5F53\u524D\u503C\uFF1A", currentValue]
|
|
71
|
+
}) : null
|
|
72
|
+
})]
|
|
73
|
+
}) : node
|
|
74
|
+
}),
|
|
61
75
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
62
76
|
return triggerNode.parentNode;
|
|
63
77
|
}
|
|
@@ -141,7 +141,7 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
|
141
141
|
var _children = children;
|
|
142
142
|
if (viewRender) {
|
|
143
143
|
if (! /*#__PURE__*/_react.default.isValidElement(viewRender)) {
|
|
144
|
-
return viewRender(orgValue, originalDTO === null || originalDTO === void 0 ? void 0 : originalDTO.originalValueRow, {
|
|
144
|
+
return viewRender(orgValue, (originalDTO === null || originalDTO === void 0 ? void 0 : originalDTO.originalValueRow) || {}, {
|
|
145
145
|
form: form,
|
|
146
146
|
name: name,
|
|
147
147
|
index: index
|
|
@@ -177,6 +177,7 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
|
177
177
|
return scrollFollowParent ? trigger.parentElement : document.body;
|
|
178
178
|
},
|
|
179
179
|
overlayClassName: "original-value-tootip",
|
|
180
|
+
placement: "topLeft",
|
|
180
181
|
title: (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
181
182
|
direction: "vertical",
|
|
182
183
|
className: "changed-tooltip",
|
|
@@ -262,7 +262,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
262
262
|
if (typeof viewRender === 'function') {
|
|
263
263
|
var _column$dataIndex;
|
|
264
264
|
currentValue = (column === null || column === void 0 ? void 0 : (_column$dataIndex = column.dataIndex) === null || _column$dataIndex === void 0 ? void 0 : _column$dataIndex.includes('-')) ? value : currentValue;
|
|
265
|
-
var View = viewRender(currentValue, record, options);
|
|
265
|
+
var View = viewRender(currentValue, record || {}, options);
|
|
266
266
|
TargetComponent = (0, _jsxRuntime.jsx)(_Container.default, {
|
|
267
267
|
viewEmpty: viewEmpty,
|
|
268
268
|
children: View
|
|
@@ -57,11 +57,23 @@ var RenderColumn = function RenderColumn(props) {
|
|
|
57
57
|
width: width,
|
|
58
58
|
minWidth: minWidth
|
|
59
59
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
overlayClassName: "original-value-tootip",
|
|
61
|
+
title: (0, _jsxRuntime.jsx)(_antd.Space, {
|
|
62
|
+
direction: "vertical",
|
|
63
|
+
className: "changed-tooltip",
|
|
64
|
+
children: originalDiffTip ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
65
|
+
children: [(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
66
|
+
align: "start",
|
|
67
|
+
className: "original-value-container",
|
|
68
|
+
children: ["\u521D\u59CB\u503C\uFF1A", originalValue]
|
|
69
|
+
}), (0, _jsxRuntime.jsx)(_antd.Space, {
|
|
70
|
+
className: "current-value-container",
|
|
71
|
+
children: ellipsis ? (0, _jsxRuntime.jsxs)("span", {
|
|
72
|
+
children: ["\u5F53\u524D\u503C\uFF1A", currentValue]
|
|
73
|
+
}) : null
|
|
74
|
+
})]
|
|
75
|
+
}) : node
|
|
76
|
+
}),
|
|
65
77
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
66
78
|
return triggerNode.parentNode;
|
|
67
79
|
}
|