@zat-design/sisyphus-react 3.12.1-beta.1 → 3.12.1-beta.2
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/ProStep/index.js +18 -12
- package/lib/ProStep/index.js +18 -12
- package/package.json +1 -1
package/es/ProStep/index.js
CHANGED
@@ -148,20 +148,26 @@ var ProStep = function ProStep(_ref) {
|
|
148
148
|
}
|
149
149
|
};
|
150
150
|
var handleScrollError = function handleScrollError(data) {
|
151
|
-
var
|
152
|
-
if (
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
return child === item.code;
|
157
|
-
});
|
158
|
-
return data[moduleKey];
|
159
|
-
})) === null || _dataSource$find === void 0 ? void 0 : _dataSource$find.code;
|
160
|
-
firstErrorModuleKey && handleScroll(firstErrorModuleKey, {
|
161
|
-
targetOffset: targetOffset,
|
162
|
-
scrollToError: scrollToError
|
151
|
+
var errorDom = document.querySelector('.ant-form-item-explain-error');
|
152
|
+
if (errorDom) {
|
153
|
+
errorDom.scrollIntoView({
|
154
|
+
behavior: 'smooth',
|
155
|
+
block: 'center'
|
163
156
|
});
|
164
157
|
}
|
158
|
+
// const errorModuleKeys = Object.keys(data).reverse();
|
159
|
+
// if (errorModuleKeys?.length) {
|
160
|
+
// const firstErrorModuleKey = dataSource.find((item) => {
|
161
|
+
// const moduleKey = errorModuleKeys.find((child) => child === item.code);
|
162
|
+
// return data[moduleKey];
|
163
|
+
// })?.code;
|
164
|
+
// console.log('firstErrorModuleKey', firstErrorModuleKey)·;
|
165
|
+
// firstErrorModuleKey &&
|
166
|
+
// handleScroll(firstErrorModuleKey, {
|
167
|
+
// targetOffset,
|
168
|
+
// scrollToError,
|
169
|
+
// });
|
170
|
+
// }
|
165
171
|
};
|
166
172
|
var notify = /*#__PURE__*/function () {
|
167
173
|
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
package/lib/ProStep/index.js
CHANGED
@@ -155,20 +155,26 @@ var ProStep = function ProStep(_ref) {
|
|
155
155
|
}
|
156
156
|
};
|
157
157
|
var handleScrollError = function handleScrollError(data) {
|
158
|
-
var
|
159
|
-
if (
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
return child === item.code;
|
164
|
-
});
|
165
|
-
return data[moduleKey];
|
166
|
-
})) === null || _dataSource$find === void 0 ? void 0 : _dataSource$find.code;
|
167
|
-
firstErrorModuleKey && (0, _utils.handleScroll)(firstErrorModuleKey, {
|
168
|
-
targetOffset: targetOffset,
|
169
|
-
scrollToError: scrollToError
|
158
|
+
var errorDom = document.querySelector('.ant-form-item-explain-error');
|
159
|
+
if (errorDom) {
|
160
|
+
errorDom.scrollIntoView({
|
161
|
+
behavior: 'smooth',
|
162
|
+
block: 'center'
|
170
163
|
});
|
171
164
|
}
|
165
|
+
// const errorModuleKeys = Object.keys(data).reverse();
|
166
|
+
// if (errorModuleKeys?.length) {
|
167
|
+
// const firstErrorModuleKey = dataSource.find((item) => {
|
168
|
+
// const moduleKey = errorModuleKeys.find((child) => child === item.code);
|
169
|
+
// return data[moduleKey];
|
170
|
+
// })?.code;
|
171
|
+
// console.log('firstErrorModuleKey', firstErrorModuleKey)·;
|
172
|
+
// firstErrorModuleKey &&
|
173
|
+
// handleScroll(firstErrorModuleKey, {
|
174
|
+
// targetOffset,
|
175
|
+
// scrollToError,
|
176
|
+
// });
|
177
|
+
// }
|
172
178
|
};
|
173
179
|
var notify = /*#__PURE__*/function () {
|
174
180
|
var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(params) {
|