@zat-design/sisyphus-react 3.11.2-beta.1 → 3.11.2-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/.vscode/extensions.json +5 -0
- package/es/ProForm/components/combination/ProModalSelect/index.js +20 -24
- package/es/ProStep/components/Listener/index.js +12 -6
- package/lib/ProForm/components/combination/ProModalSelect/index.js +20 -24
- package/lib/ProStep/components/Listener/index.js +12 -6
- package/package.json +1 -1
@@ -654,19 +654,17 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
654
654
|
if (isHasValue) {
|
655
655
|
return;
|
656
656
|
}
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
}, 300);
|
669
|
-
}
|
657
|
+
// 加定时器 修复依赖数据同步更新未取到问题
|
658
|
+
setTimeout(function () {
|
659
|
+
var _useRequest$options7, _useRequest$options8;
|
660
|
+
var params = withPagination ? {
|
661
|
+
pageNum: 1,
|
662
|
+
pageSize: 50,
|
663
|
+
queryBean: _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.defaultParams), initParams)
|
664
|
+
} : _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options8 = useRequest.options) === null || _useRequest$options8 === void 0 ? void 0 : _useRequest$options8.defaultParams), initParams);
|
665
|
+
var nextParams = transformParams ? transformParams(params) : params;
|
666
|
+
run(nextParams);
|
667
|
+
}, 300);
|
670
668
|
}
|
671
669
|
}, [JSON.stringify(value), visible, JSON.stringify(useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options9 = useRequest.options) === null || _useRequest$options9 === void 0 ? void 0 : _useRequest$options9.defaultParams), JSON.stringify(initParams)]);
|
672
670
|
useDebounceEffect(function () {
|
@@ -735,17 +733,15 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
735
733
|
}
|
736
734
|
},
|
737
735
|
onSearch: debounce(function (val) {
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
run(nextParams);
|
748
|
-
}
|
736
|
+
var _useRequest$options11;
|
737
|
+
var queryBean = _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options11 = useRequest.options) === null || _useRequest$options11 === void 0 ? void 0 : _useRequest$options11.defaultParams), {}, _defineProperty({}, searchKey !== null && searchKey !== void 0 ? searchKey : labelKey, val));
|
738
|
+
var params = withPagination ? {
|
739
|
+
pageNum: 1,
|
740
|
+
pageSize: 50,
|
741
|
+
queryBean: queryBean
|
742
|
+
} : queryBean;
|
743
|
+
var nextParams = transformParams ? transformParams(params) : params;
|
744
|
+
run(nextParams);
|
749
745
|
}, 1000),
|
750
746
|
style: {
|
751
747
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
@@ -5,6 +5,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
5
5
|
var _excluded = ["children", "delayTime", "excludes"];
|
6
6
|
import { throttle } from 'lodash';
|
7
7
|
import React from 'react';
|
8
|
+
import { forceVisible } from 'react-lazyload';
|
8
9
|
import { useStep } from '../../index';
|
9
10
|
import { getLoadedMap } from '../../utils';
|
10
11
|
var checkErrorList = function checkErrorList(arr) {
|
@@ -43,18 +44,22 @@ export default (function (_ref) {
|
|
43
44
|
registerMap = _useStep.registerMap;
|
44
45
|
return /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, props), {}, {
|
45
46
|
onClick: throttle(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
46
|
-
var
|
47
|
+
var loadedMap, loaded, values;
|
47
48
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
48
49
|
while (1) switch (_context.prev = _context.next) {
|
49
50
|
case 0:
|
50
51
|
localStorage.setItem('cache-pro-step', '');
|
51
|
-
|
52
|
+
loadedMap = getLoadedMap(registerMap);
|
53
|
+
loaded = areAllModulesLoaded(loadedMap); // 存在lazyload模块时,全局按钮执行全加载
|
54
|
+
if (!loaded) {
|
55
|
+
forceVisible();
|
56
|
+
}
|
57
|
+
_context.next = 6;
|
52
58
|
return notify === null || notify === void 0 ? void 0 : notify({
|
53
59
|
excludes: excludes
|
54
60
|
});
|
55
|
-
case
|
61
|
+
case 6:
|
56
62
|
values = _context.sent;
|
57
|
-
loadedMap = getLoadedMap(registerMap);
|
58
63
|
setTimeout(function () {
|
59
64
|
var localData = localStorage.getItem('cache-pro-step');
|
60
65
|
var _ref3 = findFirstErrorDom() || {},
|
@@ -64,10 +69,11 @@ export default (function (_ref) {
|
|
64
69
|
}
|
65
70
|
if (localData !== 'false') {
|
66
71
|
var _children$props, _children$props$onCli;
|
67
|
-
children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : (_children$props$onCli = _children$props.onClick) === null || _children$props$onCli === void 0 ? void 0 : _children$props$onCli.call(_children$props, values
|
72
|
+
children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : (_children$props$onCli = _children$props.onClick) === null || _children$props$onCli === void 0 ? void 0 : _children$props$onCli.call(_children$props, values);
|
68
73
|
}
|
69
74
|
}, delayTime !== null && delayTime !== void 0 ? delayTime : 0);
|
70
|
-
|
75
|
+
return _context.abrupt("return", null);
|
76
|
+
case 9:
|
71
77
|
case "end":
|
72
78
|
return _context.stop();
|
73
79
|
}
|
@@ -649,19 +649,17 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
649
649
|
if (isHasValue) {
|
650
650
|
return;
|
651
651
|
}
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
}, 300);
|
664
|
-
}
|
652
|
+
// 加定时器 修复依赖数据同步更新未取到问题
|
653
|
+
setTimeout(function () {
|
654
|
+
var _useRequest$options7, _useRequest$options8;
|
655
|
+
var params = withPagination ? {
|
656
|
+
pageNum: 1,
|
657
|
+
pageSize: 50,
|
658
|
+
queryBean: (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.defaultParams), initParams)
|
659
|
+
} : (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options8 = useRequest.options) === null || _useRequest$options8 === void 0 ? void 0 : _useRequest$options8.defaultParams), initParams);
|
660
|
+
var nextParams = transformParams ? transformParams(params) : params;
|
661
|
+
run(nextParams);
|
662
|
+
}, 300);
|
665
663
|
}
|
666
664
|
}, [JSON.stringify(value), visible, JSON.stringify(useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options9 = useRequest.options) === null || _useRequest$options9 === void 0 ? void 0 : _useRequest$options9.defaultParams), JSON.stringify(initParams)]);
|
667
665
|
(0, _ahooks.useDebounceEffect)(function () {
|
@@ -730,17 +728,15 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
730
728
|
}
|
731
729
|
},
|
732
730
|
onSearch: (0, _lodash.debounce)(function (val) {
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
run(nextParams);
|
743
|
-
}
|
731
|
+
var _useRequest$options11;
|
732
|
+
var queryBean = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options11 = useRequest.options) === null || _useRequest$options11 === void 0 ? void 0 : _useRequest$options11.defaultParams), {}, (0, _defineProperty2.default)({}, searchKey !== null && searchKey !== void 0 ? searchKey : labelKey, val));
|
733
|
+
var params = withPagination ? {
|
734
|
+
pageNum: 1,
|
735
|
+
pageSize: 50,
|
736
|
+
queryBean: queryBean
|
737
|
+
} : queryBean;
|
738
|
+
var nextParams = transformParams ? transformParams(params) : params;
|
739
|
+
run(nextParams);
|
744
740
|
}, 1000),
|
745
741
|
style: {
|
746
742
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
@@ -11,6 +11,7 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
12
12
|
var _lodash = require("lodash");
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
14
|
+
var _reactLazyload = require("react-lazyload");
|
14
15
|
var _index = require("../../index");
|
15
16
|
var _utils = require("../../utils");
|
16
17
|
var _excluded = ["children", "delayTime", "excludes"];
|
@@ -50,18 +51,22 @@ var _default = exports.default = function _default(_ref) {
|
|
50
51
|
registerMap = _useStep.registerMap;
|
51
52
|
return /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
52
53
|
onClick: (0, _lodash.throttle)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
53
|
-
var
|
54
|
+
var loadedMap, loaded, values;
|
54
55
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
55
56
|
while (1) switch (_context.prev = _context.next) {
|
56
57
|
case 0:
|
57
58
|
localStorage.setItem('cache-pro-step', '');
|
58
|
-
|
59
|
+
loadedMap = (0, _utils.getLoadedMap)(registerMap);
|
60
|
+
loaded = areAllModulesLoaded(loadedMap); // 存在lazyload模块时,全局按钮执行全加载
|
61
|
+
if (!loaded) {
|
62
|
+
(0, _reactLazyload.forceVisible)();
|
63
|
+
}
|
64
|
+
_context.next = 6;
|
59
65
|
return notify === null || notify === void 0 ? void 0 : notify({
|
60
66
|
excludes: excludes
|
61
67
|
});
|
62
|
-
case
|
68
|
+
case 6:
|
63
69
|
values = _context.sent;
|
64
|
-
loadedMap = (0, _utils.getLoadedMap)(registerMap);
|
65
70
|
setTimeout(function () {
|
66
71
|
var localData = localStorage.getItem('cache-pro-step');
|
67
72
|
var _ref3 = findFirstErrorDom() || {},
|
@@ -71,10 +76,11 @@ var _default = exports.default = function _default(_ref) {
|
|
71
76
|
}
|
72
77
|
if (localData !== 'false') {
|
73
78
|
var _children$props, _children$props$onCli;
|
74
|
-
children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : (_children$props$onCli = _children$props.onClick) === null || _children$props$onCli === void 0 ? void 0 : _children$props$onCli.call(_children$props, values
|
79
|
+
children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : (_children$props$onCli = _children$props.onClick) === null || _children$props$onCli === void 0 ? void 0 : _children$props$onCli.call(_children$props, values);
|
75
80
|
}
|
76
81
|
}, delayTime !== null && delayTime !== void 0 ? delayTime : 0);
|
77
|
-
|
82
|
+
return _context.abrupt("return", null);
|
83
|
+
case 9:
|
78
84
|
case "end":
|
79
85
|
return _context.stop();
|
80
86
|
}
|