@zat-design/sisyphus-react 3.11.5-beta.2 → 3.11.5-beta.4
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.
@@ -24,7 +24,7 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
24
24
|
register = _useStep.register,
|
25
25
|
collapse = _useStep.collapse,
|
26
26
|
globalLazyLoad = _useStep.lazyLoad;
|
27
|
-
var lazyLoad = stepLazyLoad
|
27
|
+
var lazyLoad = stepLazyLoad !== null && stepLazyLoad !== void 0 ? stepLazyLoad : globalLazyLoad;
|
28
28
|
useEffect(function () {
|
29
29
|
// Schedule registration to avoid re-render issues
|
30
30
|
var timeoutId = setTimeout(function () {
|
@@ -60,7 +60,10 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
60
60
|
onChange: function onChange(e) {
|
61
61
|
var _restProps$onChange;
|
62
62
|
if (lazyLoad) {
|
63
|
-
|
63
|
+
// 延时执行, 避免在折叠时, 懒加载的元素没有高度
|
64
|
+
setTimeout(function () {
|
65
|
+
forceCheck();
|
66
|
+
}, 100);
|
64
67
|
}
|
65
68
|
// 默认执行
|
66
69
|
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
@@ -32,7 +32,7 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
32
32
|
register = _useStep.register,
|
33
33
|
collapse = _useStep.collapse,
|
34
34
|
globalLazyLoad = _useStep.lazyLoad;
|
35
|
-
var lazyLoad = stepLazyLoad
|
35
|
+
var lazyLoad = stepLazyLoad !== null && stepLazyLoad !== void 0 ? stepLazyLoad : globalLazyLoad;
|
36
36
|
(0, _react.useEffect)(function () {
|
37
37
|
// Schedule registration to avoid re-render issues
|
38
38
|
var timeoutId = setTimeout(function () {
|
@@ -68,7 +68,10 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
68
68
|
onChange: function onChange(e) {
|
69
69
|
var _restProps$onChange;
|
70
70
|
if (lazyLoad) {
|
71
|
-
|
71
|
+
// 延时执行, 避免在折叠时, 懒加载的元素没有高度
|
72
|
+
setTimeout(function () {
|
73
|
+
(0, _reactLazyload.forceCheck)();
|
74
|
+
}, 100);
|
72
75
|
}
|
73
76
|
// 默认执行
|
74
77
|
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|