@zat-design/sisyphus-react 3.11.4-beta.5 → 3.11.4-beta.7
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/ProForm/components/combination/ProModalSelect/index.js +1 -1
- package/es/ProLayout/components/ProCollapse/index.js +4 -2
- package/es/ProStep/components/Item/index.js +9 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +1 -1
- package/lib/ProLayout/components/ProCollapse/index.js +4 -2
- package/lib/ProStep/components/Item/index.js +10 -1
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -5
@@ -730,7 +730,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
730
730
|
size: "small"
|
731
731
|
}) : null,
|
732
732
|
onFocus: function onFocus() {
|
733
|
-
if (useRequest) {
|
733
|
+
if (useRequest && (options === null || options === void 0 ? void 0 : options.length) === 0) {
|
734
734
|
var _useRequest$options10;
|
735
735
|
var queryBean = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options10 = useRequest.options) === null || _useRequest$options10 === void 0 ? void 0 : _useRequest$options10.defaultParams) || {};
|
736
736
|
var params = withPagination ? {
|
@@ -36,7 +36,8 @@ var ProCollapse = function ProCollapse(props) {
|
|
36
36
|
className = props.className,
|
37
37
|
icon = props.icon,
|
38
38
|
_props$autoHeight = props.autoHeight,
|
39
|
-
autoHeight = _props$autoHeight === void 0 ? true : _props$autoHeight
|
39
|
+
autoHeight = _props$autoHeight === void 0 ? true : _props$autoHeight,
|
40
|
+
onChange = props.onChange;
|
40
41
|
var cls = classNames(_defineProperty({
|
41
42
|
'pro-collapse': true,
|
42
43
|
'pro-collapse-level2': level === '2',
|
@@ -154,7 +155,8 @@ var ProCollapse = function ProCollapse(props) {
|
|
154
155
|
});
|
155
156
|
},
|
156
157
|
expandIconPosition: "end",
|
157
|
-
defaultActiveKey: folding ? [] : ['1']
|
158
|
+
defaultActiveKey: folding ? [] : ['1'],
|
159
|
+
onChange: onChange
|
158
160
|
}, collapseProps), {}, {
|
159
161
|
children: renderPanel()
|
160
162
|
}))
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
3
3
|
var _excluded = ["id", "title", "collapse", "children", "lazyLoad"];
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
import { useEffect } from 'react';
|
6
|
-
import LazyLoad from 'react-lazyload';
|
6
|
+
import LazyLoad, { forceCheck } from 'react-lazyload';
|
7
7
|
import { isBoolean } from 'lodash';
|
8
8
|
import { useStep } from '../../index';
|
9
9
|
import ProCollapse from '../../../ProLayout/components/ProCollapse';
|
@@ -57,6 +57,14 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
57
57
|
title: title,
|
58
58
|
icon: true
|
59
59
|
}, restProps), {}, {
|
60
|
+
onChange: function onChange(e) {
|
61
|
+
var _restProps$onChange;
|
62
|
+
if (lazyLoad) {
|
63
|
+
forceCheck();
|
64
|
+
}
|
65
|
+
// 默认执行
|
66
|
+
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
67
|
+
},
|
60
68
|
children: renderChildren()
|
61
69
|
}))
|
62
70
|
});
|
@@ -725,7 +725,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
725
725
|
size: "small"
|
726
726
|
}) : null,
|
727
727
|
onFocus: function onFocus() {
|
728
|
-
if (useRequest) {
|
728
|
+
if (useRequest && (options === null || options === void 0 ? void 0 : options.length) === 0) {
|
729
729
|
var _useRequest$options10;
|
730
730
|
var queryBean = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options10 = useRequest.options) === null || _useRequest$options10 === void 0 ? void 0 : _useRequest$options10.defaultParams) || {};
|
731
731
|
var params = withPagination ? {
|
@@ -38,7 +38,8 @@ var ProCollapse = function ProCollapse(props) {
|
|
38
38
|
className = props.className,
|
39
39
|
icon = props.icon,
|
40
40
|
_props$autoHeight = props.autoHeight,
|
41
|
-
autoHeight = _props$autoHeight === void 0 ? true : _props$autoHeight
|
41
|
+
autoHeight = _props$autoHeight === void 0 ? true : _props$autoHeight,
|
42
|
+
onChange = props.onChange;
|
42
43
|
var cls = (0, _classnames.default)((0, _defineProperty2.default)({
|
43
44
|
'pro-collapse': true,
|
44
45
|
'pro-collapse-level2': level === '2',
|
@@ -156,7 +157,8 @@ var ProCollapse = function ProCollapse(props) {
|
|
156
157
|
});
|
157
158
|
},
|
158
159
|
expandIconPosition: "end",
|
159
|
-
defaultActiveKey: folding ? [] : ['1']
|
160
|
+
defaultActiveKey: folding ? [] : ['1'],
|
161
|
+
onChange: onChange
|
160
162
|
}, collapseProps), {}, {
|
161
163
|
children: renderPanel()
|
162
164
|
}))
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
@@ -9,7 +10,7 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
11
12
|
var _react = require("react");
|
12
|
-
var _reactLazyload =
|
13
|
+
var _reactLazyload = _interopRequireWildcard(require("react-lazyload"));
|
13
14
|
var _lodash = require("lodash");
|
14
15
|
var _index = require("../../index");
|
15
16
|
var _ProCollapse = _interopRequireDefault(require("../../../ProLayout/components/ProCollapse"));
|
@@ -64,6 +65,14 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
64
65
|
title: title,
|
65
66
|
icon: true
|
66
67
|
}, restProps), {}, {
|
68
|
+
onChange: function onChange(e) {
|
69
|
+
var _restProps$onChange;
|
70
|
+
if (lazyLoad) {
|
71
|
+
(0, _reactLazyload.forceCheck)();
|
72
|
+
}
|
73
|
+
// 默认执行
|
74
|
+
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
75
|
+
},
|
67
76
|
children: renderChildren()
|
68
77
|
}))
|
69
78
|
});
|
package/package.json
CHANGED