@zat-design/sisyphus-react 3.10.2 → 3.10.3-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/dist/index.esm.css +47 -34
- package/dist/less.esm.css +47 -34
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +4 -4
- package/es/ProEditTable/components/RenderField/index.js +2 -1
- package/es/ProEditTable/index.js +39 -11
- package/es/ProEditTable/propsType.d.ts +1 -1
- package/es/ProEditTable/style/index.less +3 -1
- package/es/ProEditTable/utils/config.d.ts +1 -1
- package/es/ProEditTable/utils/config.js +11 -3
- package/es/ProEditTable/utils/diffOriginal.d.ts +1 -1
- package/es/ProEditTable/utils/diffOriginal.js +3 -3
- package/es/ProForm/components/combination/ProModalSelect/index.js +2 -2
- package/es/ProForm/components/render/ChangedWrapper.d.ts +1 -1
- package/es/ProForm/components/render/ChangedWrapper.js +5 -6
- package/es/ProForm/components/render/Render.js +3 -2
- package/es/ProForm/components/render/RenderFields.js +2 -3
- package/es/ProForm/components/render/propsType.d.ts +1 -2
- package/es/ProForm/utils/_useChanged.d.ts +2 -2
- package/es/ProForm/utils/_useChanged.js +3 -3
- package/es/ProForm/utils/_useListChanged.d.ts +1 -1
- package/es/ProForm/utils/_useListChanged.js +3 -3
- package/es/ProForm/utils/diffOriginal.d.ts +1 -1
- package/es/ProForm/utils/diffOriginal.js +3 -3
- package/es/ProForm/utils/transformValue.js +9 -7
- package/es/ProStep/components/Anchor/index.js +12 -10
- package/es/ProStep/components/Listener/index.js +25 -0
- package/es/ProStep/components/Step/index.js +2 -2
- package/es/ProStep/style/index.less +28 -16
- package/es/ProTable/components/FormatColumn/index.js +0 -5
- package/es/ProTable/components/RenderColumn/index.js +55 -42
- package/es/ProTable/hooks/useAntdTable.js +45 -46
- package/es/ProTable/style/index.less +3 -1
- package/es/ProTable/utils/index.d.ts +8 -0
- package/es/ProTable/utils/index.js +19 -0
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +4 -4
- package/lib/ProEditTable/components/RenderField/index.js +2 -1
- package/lib/ProEditTable/index.js +38 -10
- package/lib/ProEditTable/propsType.d.ts +1 -1
- package/lib/ProEditTable/style/index.less +3 -1
- package/lib/ProEditTable/utils/config.d.ts +1 -1
- package/lib/ProEditTable/utils/config.js +11 -3
- package/lib/ProEditTable/utils/diffOriginal.d.ts +1 -1
- package/lib/ProEditTable/utils/diffOriginal.js +3 -3
- package/lib/ProForm/components/combination/ProModalSelect/index.js +1 -1
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +1 -1
- package/lib/ProForm/components/render/ChangedWrapper.js +5 -6
- package/lib/ProForm/components/render/Render.js +3 -2
- package/lib/ProForm/components/render/RenderFields.js +2 -3
- package/lib/ProForm/components/render/propsType.d.ts +1 -2
- package/lib/ProForm/utils/_useChanged.d.ts +2 -2
- package/lib/ProForm/utils/_useChanged.js +3 -3
- package/lib/ProForm/utils/_useListChanged.d.ts +1 -1
- package/lib/ProForm/utils/_useListChanged.js +3 -3
- package/lib/ProForm/utils/diffOriginal.d.ts +1 -1
- package/lib/ProForm/utils/diffOriginal.js +3 -3
- package/lib/ProForm/utils/transformValue.js +9 -7
- package/lib/ProStep/components/Anchor/index.js +11 -10
- package/lib/ProStep/components/Listener/index.js +25 -0
- package/lib/ProStep/components/Step/index.js +2 -2
- package/lib/ProStep/style/index.less +28 -16
- package/lib/ProTable/components/FormatColumn/index.js +0 -5
- package/lib/ProTable/components/RenderColumn/index.js +56 -43
- package/lib/ProTable/hooks/useAntdTable.js +42 -43
- package/lib/ProTable/style/index.less +3 -1
- package/lib/ProTable/utils/index.d.ts +8 -0
- package/lib/ProTable/utils/index.js +20 -1
- package/package.json +1 -1
@@ -31,13 +31,13 @@ var filterObject = function filterObject(data) {
|
|
31
31
|
export var diffOriginal = function diffOriginal(params) {
|
32
32
|
var originalValue = params.originalValue,
|
33
33
|
value = params.value,
|
34
|
-
|
34
|
+
onDiff = params.onDiff,
|
35
35
|
originRecord = params.originRecord,
|
36
36
|
record = params.record,
|
37
37
|
index = params.index;
|
38
38
|
// 支持传入自定义比较事件
|
39
|
-
if (isFunction(
|
40
|
-
var diffRes =
|
39
|
+
if (isFunction(onDiff)) {
|
40
|
+
var diffRes = onDiff({
|
41
41
|
originValue: originalValue,
|
42
42
|
originRecord: originRecord,
|
43
43
|
value: value,
|
@@ -27,7 +27,7 @@ import { SearchOutlined } from '@ant-design/icons';
|
|
27
27
|
import { useDebounceEffect, useDeepCompareEffect, useMount, useSetState } from 'ahooks';
|
28
28
|
import { debounce, isArray, isEqual, isFunction, omit } from 'lodash';
|
29
29
|
import { ReactSVG } from 'react-svg';
|
30
|
-
import React, { forwardRef, useImperativeHandle, useMemo } from 'react';
|
30
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
|
31
31
|
import { ProForm, ProDrawerForm, ProTable, useProConfig, ProSelect } from '../../../../index';
|
32
32
|
import Container from '../../Container';
|
33
33
|
import viewSvg from '../../../../assets/view.svg';
|
@@ -604,7 +604,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
604
604
|
});
|
605
605
|
}
|
606
606
|
});
|
607
|
-
|
607
|
+
useEffect(function () {
|
608
608
|
if (onOff && !visible) {
|
609
609
|
var _useRequest$options6;
|
610
610
|
if ((useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options6 = useRequest.options) === null || _useRequest$options6 === void 0 ? void 0 : _useRequest$options6.manual) !== true) {
|
@@ -6,7 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
7
7
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
8
8
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
9
|
-
var _excluded = ["name", "names", "namesStr", "form", "
|
9
|
+
var _excluded = ["name", "names", "namesStr", "form", "onDiff", "children", "type", "diffConfig", "valuePropName", "normalize", "getValueProps", "viewRender"];
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
11
11
|
import classNames from 'classnames';
|
12
12
|
import { get } from 'lodash';
|
@@ -21,7 +21,7 @@ var ChangedWrapper = function ChangedWrapper(props) {
|
|
21
21
|
names = props.names,
|
22
22
|
namesStr = props.namesStr,
|
23
23
|
form = props.form,
|
24
|
-
|
24
|
+
onDiff = props.onDiff,
|
25
25
|
children = props.children,
|
26
26
|
type = props.type,
|
27
27
|
diffConfig = props.diffConfig,
|
@@ -43,7 +43,7 @@ var ChangedWrapper = function ChangedWrapper(props) {
|
|
43
43
|
var originalValue = (names === null || names === void 0 ? void 0 : names.length) ? names.map(function (name) {
|
44
44
|
return get(originalValues, name);
|
45
45
|
}) : get(originalValues, name);
|
46
|
-
var noChange = !
|
46
|
+
var noChange = !onDiff && (!originalValues || isDiffAll ? false : isEmpty(originalValue));
|
47
47
|
var diffType = useMemo(function () {
|
48
48
|
if (!isWatch || noChange) return 'same';
|
49
49
|
var _value = normalize ? normalize(props[valuePropName], undefined, undefined, true) // true 代表是值比对时的调用
|
@@ -58,10 +58,10 @@ var ChangedWrapper = function ChangedWrapper(props) {
|
|
58
58
|
value: _value,
|
59
59
|
originalValue: _originalValue,
|
60
60
|
form: form,
|
61
|
-
|
61
|
+
onDiff: onDiff
|
62
62
|
// name: namesStr || name,
|
63
63
|
});
|
64
|
-
}, [isWatch, noChange, props[valuePropName], originalValue, _typeof(
|
64
|
+
}, [isWatch, noChange, props[valuePropName], originalValue, _typeof(onDiff)]);
|
65
65
|
var isAdd = diffType === 'add';
|
66
66
|
var isChanged = diffType === 'changed';
|
67
67
|
var tipContent = useMemo(function () {
|
@@ -86,7 +86,6 @@ var ChangedWrapper = function ChangedWrapper(props) {
|
|
86
86
|
}, children.props), rest));
|
87
87
|
}
|
88
88
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
89
|
-
// const isFocus = useFocus(contentRef.current);
|
90
89
|
var tipOpenCalc = function tipOpenCalc() {
|
91
90
|
if (!toolTip) return false;
|
92
91
|
// 传入undefined 鼠标移入显示移出隐藏 获得焦点时不显示气泡
|
@@ -46,7 +46,7 @@ var Render = function Render(props) {
|
|
46
46
|
formDisabled = props.formDisabled,
|
47
47
|
type = props.type,
|
48
48
|
isSelect = props.isSelect,
|
49
|
-
|
49
|
+
onDiff = props.onDiff,
|
50
50
|
requiredOnView = props.requiredOnView,
|
51
51
|
confirm = props.confirm,
|
52
52
|
globalControl = props.globalControl,
|
@@ -447,9 +447,10 @@ var Render = function Render(props) {
|
|
447
447
|
namesStr: namesStr,
|
448
448
|
diffConfig: diffConfig,
|
449
449
|
form: form,
|
450
|
-
|
450
|
+
onDiff: onDiff,
|
451
451
|
type: type,
|
452
452
|
onChange: handleChange,
|
453
|
+
onBlur: handleBlur,
|
453
454
|
valuePropName: _otherFormItemProps.valuePropName,
|
454
455
|
normalize: _otherFormItemProps.normalize,
|
455
456
|
getValueProps: _otherFormItemProps.getValueProps,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["show", "type", "viewRender", "viewType", "valueType", "formItemProps", "colProps", "formItemChildProps", "fieldProps", "
|
3
|
+
var _excluded = ["show", "type", "viewRender", "viewType", "valueType", "formItemProps", "colProps", "formItemChildProps", "fieldProps", "onDiff", "clearNotShow", "required", "confirm", "desensitization"];
|
4
4
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
5
5
|
import React from 'react';
|
6
6
|
import { isBoolean, isFunction, union, isString } from 'lodash';
|
@@ -69,7 +69,6 @@ var RenderFields = function RenderFields(props) {
|
|
69
69
|
formItemChildProps = _column$formItemChild === void 0 ? {} : _column$formItemChild,
|
70
70
|
_column$fieldProps = column.fieldProps,
|
71
71
|
fieldProps = _column$fieldProps === void 0 ? {} : _column$fieldProps,
|
72
|
-
equalWith = column.equalWith,
|
73
72
|
onDiff = column.onDiff,
|
74
73
|
_column$clearNotShow = column.clearNotShow,
|
75
74
|
clearNotShow = _column$clearNotShow === void 0 ? outerClearNotShow : _column$clearNotShow,
|
@@ -212,7 +211,7 @@ var RenderFields = function RenderFields(props) {
|
|
212
211
|
fieldProps: isFunction(fieldProps) ? fieldProps : null,
|
213
212
|
isSelect: _isSelect,
|
214
213
|
diffConfig: diffConfig,
|
215
|
-
|
214
|
+
onDiff: onDiff,
|
216
215
|
requiredOnView: requiredOnView,
|
217
216
|
globalControl: globalControl,
|
218
217
|
viewRender: viewRender,
|
@@ -206,8 +206,7 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
|
|
206
206
|
upperCase?: boolean;
|
207
207
|
hiddenNames?: string[] | any[];
|
208
208
|
rules?: ProRule[] | ReactiveFunction<Values, ProRule[]>;
|
209
|
-
|
210
|
-
onDiff?: DiffOriginalParams['equalWith'];
|
209
|
+
onDiff?: DiffOriginalParams['onDiff'];
|
211
210
|
required?: boolean | boolean[] | ReactiveFunction<Values, boolean | boolean[]>;
|
212
211
|
labelRequired?: boolean;
|
213
212
|
toISOString?: boolean;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export declare const useChanged: ({ name, names, namesStr, originalValues, form,
|
1
|
+
export declare const useChanged: ({ name, names, namesStr, originalValues, form, onDiff }: {
|
2
2
|
name: any;
|
3
3
|
names: any;
|
4
4
|
namesStr: any;
|
5
5
|
originalValues: any;
|
6
6
|
form: any;
|
7
|
-
|
7
|
+
onDiff: any;
|
8
8
|
}) => any[];
|
@@ -8,18 +8,18 @@ export var useChanged = function useChanged(_ref) {
|
|
8
8
|
namesStr = _ref.namesStr,
|
9
9
|
originalValues = _ref.originalValues,
|
10
10
|
form = _ref.form,
|
11
|
-
|
11
|
+
onDiff = _ref.onDiff;
|
12
12
|
var originalValue = (names === null || names === void 0 ? void 0 : names.length) ? names.map(function (name) {
|
13
13
|
return get(originalValues, name);
|
14
14
|
}) : get(originalValues, name);
|
15
|
-
var notWatch = !
|
15
|
+
var notWatch = !onDiff && (!originalValues || originalValue === undefined);
|
16
16
|
if (notWatch) return [false];
|
17
17
|
var value = _Form.useWatch(namesStr || name, form);
|
18
18
|
var changed = diffOriginal({
|
19
19
|
originalValue: originalValue,
|
20
20
|
value: value,
|
21
21
|
form: form,
|
22
|
-
|
22
|
+
onDiff: onDiff
|
23
23
|
});
|
24
24
|
return [changed, originalValue];
|
25
25
|
};
|
@@ -10,7 +10,7 @@ interface Params {
|
|
10
10
|
originalValues: any;
|
11
11
|
form: FormInstance;
|
12
12
|
rowKeyPath?: InternalNamePath;
|
13
|
-
|
13
|
+
onDiff?: (originalValue: any, currentValue: any) => boolean;
|
14
14
|
}
|
15
15
|
export declare const useListChanged: (params: Params) => any[];
|
16
16
|
export {};
|
@@ -64,7 +64,7 @@ export var useListChanged = function useListChanged(params) {
|
|
64
64
|
originalNames = _params$originalNames === void 0 ? names : _params$originalNames,
|
65
65
|
originalValues = params.originalValues,
|
66
66
|
form = params.form,
|
67
|
-
|
67
|
+
onDiff = params.onDiff,
|
68
68
|
rowKeyPath = params.rowKeyPath;
|
69
69
|
var namePath = toNamePath(namesStr || name);
|
70
70
|
var originalNamePath = toNamePath(originalName);
|
@@ -78,7 +78,7 @@ export var useListChanged = function useListChanged(params) {
|
|
78
78
|
rowKeyPath: rowKeyPath,
|
79
79
|
form: form
|
80
80
|
}) : undefined;
|
81
|
-
var noChange = !
|
81
|
+
var noChange = !onDiff && (!originalValues || originalValue === undefined);
|
82
82
|
var _form = form;
|
83
83
|
if (notWatch || noChange) return [false];
|
84
84
|
var value = _Form.useWatch(namePath, _form);
|
@@ -86,7 +86,7 @@ export var useListChanged = function useListChanged(params) {
|
|
86
86
|
value: value,
|
87
87
|
originalValue: originalValue,
|
88
88
|
form: form,
|
89
|
-
|
89
|
+
onDiff: onDiff
|
90
90
|
// name: isString(namesStr) ? namesStr : originalName || name,
|
91
91
|
});
|
92
92
|
return [changed, originalValue];
|
@@ -3,7 +3,7 @@ export interface DiffOriginalParams {
|
|
3
3
|
originalValue: any;
|
4
4
|
value: any;
|
5
5
|
form: FormInstance;
|
6
|
-
|
6
|
+
onDiff?: (originalValue: any, currentValue: any) => DiffType | boolean | undefined;
|
7
7
|
}
|
8
8
|
export type DiffType = 'same' | 'add' | 'changed';
|
9
9
|
export declare const diffOriginal: (params: DiffOriginalParams) => DiffType;
|
@@ -30,10 +30,10 @@ var filterObject = function filterObject(data) {
|
|
30
30
|
export var diffOriginal = function diffOriginal(params) {
|
31
31
|
var originalValue = params.originalValue,
|
32
32
|
value = params.value,
|
33
|
-
|
33
|
+
onDiff = params.onDiff;
|
34
34
|
// 支持传入自定义比较事件
|
35
|
-
if (isFunction(
|
36
|
-
var diffRes =
|
35
|
+
if (isFunction(onDiff)) {
|
36
|
+
var diffRes = onDiff(originalValue, value);
|
37
37
|
// 如果返回undefined走内置比较逻辑
|
38
38
|
if (diffRes !== undefined) {
|
39
39
|
if (typeof diffRes === 'boolean') {
|
@@ -15,21 +15,21 @@ export var transformValue = function transformValue(names, form, fieldName, _nor
|
|
15
15
|
}
|
16
16
|
names.forEach(function (name, index) {
|
17
17
|
var _value2;
|
18
|
-
// @ts-ignore
|
19
18
|
set(form.getFieldsValue(true), name, (_value2 = _value) === null || _value2 === void 0 ? void 0 : _value2[index]);
|
20
19
|
});
|
21
20
|
return _value;
|
22
21
|
},
|
23
|
-
getValueProps: function getValueProps(value,
|
22
|
+
getValueProps: function getValueProps(value, isOrigin) {
|
24
23
|
var _curValue;
|
25
24
|
var _value = [];
|
26
|
-
if (
|
25
|
+
if (isOrigin) {
|
26
|
+
_value = value;
|
27
|
+
} else {
|
28
|
+
// 非比对names场景
|
27
29
|
names.forEach(function (name, index) {
|
28
30
|
var value = form.getFieldValue(name);
|
29
31
|
_value[index] = value;
|
30
32
|
});
|
31
|
-
} else {
|
32
|
-
_value = value;
|
33
33
|
}
|
34
34
|
// 支持外部传入转换函数
|
35
35
|
var res = (_getValueProps === null || _getValueProps === void 0 ? void 0 : _getValueProps(_value)) || {
|
@@ -43,8 +43,10 @@ export var transformValue = function transformValue(names, form, fieldName, _nor
|
|
43
43
|
})) {
|
44
44
|
curValue = undefined;
|
45
45
|
}
|
46
|
-
//
|
47
|
-
|
46
|
+
// 如果来源是比对且有names场景, 则不更新表单值
|
47
|
+
if (!isOrigin) {
|
48
|
+
set(form.getFieldsValue(true), fieldName, curValue);
|
49
|
+
}
|
48
50
|
// 如果表单里的值和组合得到的值不全等 更新表单里的值、
|
49
51
|
return _objectSpread(_objectSpread({}, res), {}, {
|
50
52
|
value: curValue
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import "antd/es/badge/style";
|
2
|
+
import _Badge from "antd/es/badge";
|
1
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
4
|
import cn from 'classnames';
|
3
5
|
import { handleScroll } from '../../utils';
|
@@ -44,7 +46,7 @@ export var MenuItem = function MenuItem(props) {
|
|
44
46
|
var renderMenuIcon = function renderMenuIcon() {
|
45
47
|
if (isCurrentStep) {
|
46
48
|
return _jsx("span", {
|
47
|
-
className: cn('dot-icon', {
|
49
|
+
className: cn('pro-step-dot-icon', {
|
48
50
|
errored: !!errorNum,
|
49
51
|
disabled: isDisabled
|
50
52
|
}),
|
@@ -65,14 +67,14 @@ export var MenuItem = function MenuItem(props) {
|
|
65
67
|
});
|
66
68
|
}
|
67
69
|
return _jsx("div", {
|
68
|
-
className: cn('dot', {
|
70
|
+
className: cn('pro-step-dot', {
|
69
71
|
errored: !!errorNum,
|
70
72
|
disabled: isDisabled
|
71
73
|
})
|
72
74
|
});
|
73
75
|
};
|
74
76
|
return _jsxs("div", {
|
75
|
-
className: cn('com-menu-item', {
|
77
|
+
className: cn('pro-step-com-menu-item', {
|
76
78
|
errored: !!errorNum,
|
77
79
|
disabled: isDisabled,
|
78
80
|
current: isCurrentStep && onOff
|
@@ -84,22 +86,22 @@ export var MenuItem = function MenuItem(props) {
|
|
84
86
|
});
|
85
87
|
},
|
86
88
|
children: [_jsxs("div", {
|
87
|
-
className: "menu-item",
|
89
|
+
className: "pro-step-menu-item",
|
88
90
|
children: [_jsx("div", {
|
89
|
-
className: "menu-icon",
|
91
|
+
className: "pro-step-menu-icon",
|
90
92
|
children: renderMenuIcon()
|
91
93
|
}), onOff && _jsx("div", {
|
92
|
-
className: cn('menu-name', {
|
94
|
+
className: cn('pro-step-menu-name', {
|
93
95
|
disabled: isDisabled
|
94
96
|
}),
|
95
97
|
children: name
|
96
98
|
})]
|
97
99
|
}), !isDisabled && onOff && _jsxs("div", {
|
98
|
-
className: "checked-status",
|
100
|
+
className: "pro-step-checked-status",
|
99
101
|
children: [isChecked && _jsx(SuccessSvg, {}), errorNum > 0 && _jsx("div", {
|
100
|
-
className: "
|
101
|
-
children: _jsx(
|
102
|
-
|
102
|
+
className: "pro-step-error-dot",
|
103
|
+
children: _jsx(_Badge, {
|
104
|
+
count: errorNum
|
103
105
|
})
|
104
106
|
})]
|
105
107
|
})]
|
@@ -6,6 +6,26 @@ var _excluded = ["children", "delayTime", "excludes"];
|
|
6
6
|
import { throttle } from 'lodash';
|
7
7
|
import React from 'react';
|
8
8
|
import { useStep } from '../../index';
|
9
|
+
var checkErrorList = function checkErrorList(arr) {
|
10
|
+
for (var i = 0; i < arr.length; i++) {
|
11
|
+
if (arr[i].className.includes('errored')) {
|
12
|
+
return {
|
13
|
+
errorDom: arr[i],
|
14
|
+
index: i
|
15
|
+
};
|
16
|
+
}
|
17
|
+
}
|
18
|
+
return null;
|
19
|
+
};
|
20
|
+
var findFirstErrorDom = function findFirstErrorDom() {
|
21
|
+
var errorList = document.querySelectorAll('.pro-step-com-menu-item') || [];
|
22
|
+
var hasErrorItem = document.querySelectorAll('.pro-step-com-menu-item .errored');
|
23
|
+
var hasFormError = document.querySelector('.ant-form-item-explain-error');
|
24
|
+
if ((hasErrorItem === null || hasErrorItem === void 0 ? void 0 : hasErrorItem.length) && !hasFormError) {
|
25
|
+
return checkErrorList(errorList);
|
26
|
+
}
|
27
|
+
return null;
|
28
|
+
};
|
9
29
|
export default (function (_ref) {
|
10
30
|
var children = _ref.children,
|
11
31
|
delayTime = _ref.delayTime,
|
@@ -28,6 +48,11 @@ export default (function (_ref) {
|
|
28
48
|
values = _context.sent;
|
29
49
|
setTimeout(function () {
|
30
50
|
var localData = localStorage.getItem('cache-pro-step');
|
51
|
+
var _ref3 = findFirstErrorDom() || {},
|
52
|
+
errorDom = _ref3.errorDom;
|
53
|
+
if (errorDom) {
|
54
|
+
errorDom.click();
|
55
|
+
}
|
31
56
|
if (localData !== 'false') {
|
32
57
|
var _children$props, _children$props$onCli;
|
33
58
|
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);
|
@@ -59,10 +59,10 @@ export var Step = function Step(_ref) {
|
|
59
59
|
onMouseEnter: handleMouseEnter,
|
60
60
|
onMouseLeave: handleMouseLeave,
|
61
61
|
children: [_jsxs("div", {
|
62
|
-
className: "step-menu",
|
62
|
+
className: "pro-step-menu",
|
63
63
|
children: [_jsx(ProIcon, {
|
64
64
|
src: catalogSvg,
|
65
|
-
className: "menu-icon",
|
65
|
+
className: "pro-step-menu-icon",
|
66
66
|
actionMap: {}
|
67
67
|
}), onOff && _jsx("div", {
|
68
68
|
children: locale === null || locale === void 0 ? void 0 : (_locale$ProStep = locale.ProStep) === null || _locale$ProStep === void 0 ? void 0 : _locale$ProStep.catalogue
|
@@ -20,7 +20,7 @@
|
|
20
20
|
cursor: pointer;
|
21
21
|
transition: width 0.2s;
|
22
22
|
|
23
|
-
> .step-menu {
|
23
|
+
> .pro-step-menu {
|
24
24
|
display: flex;
|
25
25
|
align-items: center;
|
26
26
|
width: 100%;
|
@@ -33,7 +33,7 @@
|
|
33
33
|
justify-content: center;
|
34
34
|
width: 48px;
|
35
35
|
height: 24px;
|
36
|
-
> .menu-icon {
|
36
|
+
> .pro-step-menu-icon {
|
37
37
|
width: auto !important;
|
38
38
|
height: auto !important;
|
39
39
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
@@ -49,7 +49,7 @@
|
|
49
49
|
> button {
|
50
50
|
width: auto !important;
|
51
51
|
height: auto !important;
|
52
|
-
> .menu-icon {
|
52
|
+
> .pro-step-menu-icon {
|
53
53
|
width: auto !important;
|
54
54
|
height: auto !important;
|
55
55
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
@@ -79,7 +79,7 @@
|
|
79
79
|
}
|
80
80
|
}
|
81
81
|
|
82
|
-
.menu-content {
|
82
|
+
.pro-step-menu-content {
|
83
83
|
overflow: hidden;
|
84
84
|
|
85
85
|
&:hover {
|
@@ -87,7 +87,7 @@
|
|
87
87
|
}
|
88
88
|
}
|
89
89
|
|
90
|
-
.com-menu-item {
|
90
|
+
.pro-step-com-menu-item {
|
91
91
|
display: flex;
|
92
92
|
align-items: center;
|
93
93
|
justify-content: space-between;
|
@@ -107,11 +107,11 @@
|
|
107
107
|
}
|
108
108
|
}
|
109
109
|
|
110
|
-
> .menu-item {
|
110
|
+
> .pro-step-menu-item {
|
111
111
|
display: flex;
|
112
112
|
align-items: center;
|
113
113
|
|
114
|
-
> .menu-icon {
|
114
|
+
> .pro-step-menu-icon {
|
115
115
|
display: flex;
|
116
116
|
align-items: center;
|
117
117
|
justify-content: center;
|
@@ -122,14 +122,19 @@
|
|
122
122
|
fill: var(--zaui-brand, #006aff);
|
123
123
|
}
|
124
124
|
|
125
|
-
> .dot {
|
125
|
+
> .pro-step-dot {
|
126
126
|
width: 6px;
|
127
127
|
height: 6px;
|
128
128
|
background: var(--zaui-brand, #006aff);
|
129
129
|
border-radius: 3px;
|
130
130
|
|
131
|
+
|
132
|
+
|
131
133
|
&.errored {
|
134
|
+
width: 12px;
|
135
|
+
height: 12px;
|
132
136
|
background: #ff5050;
|
137
|
+
border-radius: 50%;
|
133
138
|
fill: #ff5050;
|
134
139
|
}
|
135
140
|
|
@@ -139,7 +144,7 @@
|
|
139
144
|
}
|
140
145
|
}
|
141
146
|
|
142
|
-
.dot-icon {
|
147
|
+
.pro-step-dot-icon {
|
143
148
|
display: flex;
|
144
149
|
align-items: center;
|
145
150
|
justify-content: center;
|
@@ -162,7 +167,7 @@
|
|
162
167
|
}
|
163
168
|
}
|
164
169
|
|
165
|
-
> .menu-name {
|
170
|
+
> .pro-step-menu-name {
|
166
171
|
color: #0a0a0a;
|
167
172
|
|
168
173
|
&.disabled {
|
@@ -171,21 +176,28 @@
|
|
171
176
|
}
|
172
177
|
}
|
173
178
|
|
174
|
-
> .checked-status {
|
179
|
+
> .pro-step-checked-status {
|
175
180
|
height: 18px;
|
176
181
|
|
177
182
|
> svg {
|
178
183
|
fill: var(--zaui-brand, #006aff);
|
179
184
|
}
|
180
185
|
|
181
|
-
.
|
186
|
+
.pro-step-error-dot {
|
182
187
|
display: flex;
|
183
188
|
align-items: center;
|
184
189
|
justify-content: center;
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
190
|
+
|
191
|
+
.@{ant-prefix}-badge{
|
192
|
+
.@{ant-prefix}-badge-count{
|
193
|
+
background: rgba(255, 80, 80, 0.15);
|
194
|
+
color: #ff5050;
|
195
|
+
.@{ant-prefix}-scroll-number-only-unit, .@{ant-prefix}-scroll-number{
|
196
|
+
font-weight: 600;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
}
|
189
201
|
|
190
202
|
> span {
|
191
203
|
color: #ff5050;
|
@@ -341,11 +341,6 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
341
341
|
if (!originalValue) {
|
342
342
|
originalRenderValue = '-';
|
343
343
|
}
|
344
|
-
if (originalObj && renderValue !== originalRenderValue) {
|
345
|
-
otherProps.isChanged = true;
|
346
|
-
} else {
|
347
|
-
otherProps.isChanged = false;
|
348
|
-
}
|
349
344
|
var node = _jsxs(_Space, {
|
350
345
|
size: 8,
|
351
346
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|