@zat-design/sisyphus-react 3.11.4 → 3.11.5-beta.10
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 +1 -2
- package/dist/less.esm.css +1 -2
- package/es/ProDrawerForm/components/ProDrawer/index.js +28 -3
- package/es/ProEditTable/index.js +3 -1
- package/es/ProEditTable/style/index.less +1 -2
- package/es/ProEditTable/utils/tools.d.ts +7 -2
- package/es/ProEditTable/utils/tools.js +7 -4
- package/es/ProForm/components/base/DatePicker/index.js +2 -2
- package/es/ProForm/components/base/RangePicker/index.js +2 -2
- package/es/ProForm/components/combination/ProModalSelect/index.js +20 -9
- package/es/ProLayout/components/ProCollapse/index.js +4 -2
- package/es/ProStep/components/Item/index.js +17 -11
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -2
- package/es/ProTable/index.js +0 -3
- package/es/ProTable/utils/index.d.ts +2 -2
- package/es/ProTable/utils/index.js +1 -0
- package/es/ProTree/components/AdaptiveTooltip.js +2 -2
- package/es/ProTree/components/List.js +2 -2
- package/es/ProTree/components/SearchTitle.js +2 -2
- package/es/ProTreeModal/index.js +2 -2
- package/es/ProUpload/components/ButtonRender.d.ts +1 -0
- package/es/ProUpload/components/ButtonRender.js +32 -2
- package/es/ProUpload/components/ImageRender.d.ts +1 -1
- package/es/ProUpload/index.js +1 -1
- package/lib/ProDrawerForm/components/ProDrawer/index.js +27 -2
- package/lib/ProEditTable/index.js +3 -1
- package/lib/ProEditTable/style/index.less +1 -2
- package/lib/ProEditTable/utils/tools.d.ts +7 -2
- package/lib/ProEditTable/utils/tools.js +7 -4
- package/lib/ProForm/components/base/DatePicker/index.js +2 -2
- package/lib/ProForm/components/base/RangePicker/index.js +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.js +18 -7
- package/lib/ProLayout/components/ProCollapse/index.js +4 -2
- package/lib/ProStep/components/Item/index.js +18 -11
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -2
- package/lib/ProTable/index.js +0 -3
- package/lib/ProTable/utils/index.d.ts +2 -2
- package/lib/ProTable/utils/index.js +1 -0
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -2
- package/lib/ProTree/components/List.js +2 -2
- package/lib/ProTree/components/SearchTitle.js +2 -2
- package/lib/ProTreeModal/index.js +2 -2
- package/lib/ProUpload/components/ButtonRender.d.ts +1 -0
- package/lib/ProUpload/components/ButtonRender.js +32 -2
- package/lib/ProUpload/components/ImageRender.d.ts +1 -1
- package/lib/ProUpload/index.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
@@ -4812,8 +4812,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
4812
4812
|
margin-left: var(--zaui-space-size-xs, 4px);
|
4813
4813
|
}
|
4814
4814
|
.pro-edit-table-drag table tr th.ant-table-selection-column.ant-table-cell-fix-left {
|
4815
|
-
text-align:
|
4816
|
-
padding-left: 52px;
|
4815
|
+
text-align: right;
|
4817
4816
|
}
|
4818
4817
|
.pro-edit-label {
|
4819
4818
|
display: inline-block;
|
package/dist/less.esm.css
CHANGED
@@ -4812,8 +4812,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
4812
4812
|
margin-left: var(--zaui-space-size-xs, 4px);
|
4813
4813
|
}
|
4814
4814
|
.pro-edit-table-drag table tr th.ant-table-selection-column.ant-table-cell-fix-left {
|
4815
|
-
text-align:
|
4816
|
-
padding-left: 52px;
|
4815
|
+
text-align: right;
|
4817
4816
|
}
|
4818
4817
|
.pro-edit-label {
|
4819
4818
|
display: inline-block;
|
@@ -9,7 +9,7 @@ import _Modal from "antd/es/modal";
|
|
9
9
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
10
10
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
-
import React, { useCallback, useState, useRef } from 'react';
|
12
|
+
import React, { useCallback, useState, useRef, useEffect } from 'react';
|
13
13
|
import { useScroll } from 'ahooks';
|
14
14
|
import { isArray } from 'lodash';
|
15
15
|
import { ReactSVG } from 'react-svg';
|
@@ -46,13 +46,38 @@ var ProDrawer = function ProDrawer(_ref) {
|
|
46
46
|
_useState2 = _slicedToArray(_useState, 2),
|
47
47
|
loading = _useState2[0],
|
48
48
|
toggleLoading = _useState2[1];
|
49
|
+
var _useState3 = useState(''),
|
50
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
51
|
+
initialSnapshot = _useState4[0],
|
52
|
+
setInitialSnapshot = _useState4[1];
|
49
53
|
var noRenderFooter = isView || footer === false || footer === null;
|
54
|
+
// 使用 useEffect 在 visible 变更时延迟捕获 初始DOM 快照
|
55
|
+
useEffect(function () {
|
56
|
+
if (visible) {
|
57
|
+
// 延迟到下一个事件循环,确保 Drawer 已经渲染
|
58
|
+
var timeoutId = setTimeout(function () {
|
59
|
+
if (ref.current) {
|
60
|
+
setInitialSnapshot(ref.current.innerHTML); // 捕获 DOM 快照
|
61
|
+
}
|
62
|
+
}, 100); // 使用 setTimeout 让 DOM 渲染完成后再执行
|
63
|
+
return function () {
|
64
|
+
return clearTimeout(timeoutId);
|
65
|
+
}; // 清理定时器
|
66
|
+
}
|
67
|
+
setInitialSnapshot('');
|
68
|
+
}, [visible]); // 当 visible 变化时执行
|
69
|
+
// 快照对比
|
70
|
+
var compareSnapshots = function compareSnapshots() {
|
71
|
+
if (!ref.current) return false;
|
72
|
+
return ref.current.innerHTML === initialSnapshot;
|
73
|
+
};
|
50
74
|
var onConfirm = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
51
75
|
var _locale$ProDrawerForm, _locale$ProDrawerForm2, _locale$ProDrawerForm3, _locale$ProDrawerForm4;
|
52
76
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
53
77
|
while (1) switch (_context.prev = _context.next) {
|
54
78
|
case 0:
|
55
|
-
|
79
|
+
// 如果当前是查看状态,或者不需要确认关闭,或者快照对比一致,则直接关闭
|
80
|
+
if (isView || !isConfirmClose || compareSnapshots()) {
|
56
81
|
onCancel && onCancel();
|
57
82
|
} else if (!modalRef.current) {
|
58
83
|
modalRef.current = _Modal.confirm(_objectSpread({
|
@@ -74,7 +99,7 @@ var ProDrawer = function ProDrawer(_ref) {
|
|
74
99
|
return _context.stop();
|
75
100
|
}
|
76
101
|
}, _callee);
|
77
|
-
})), [onCancel, modalRef.current]);
|
102
|
+
})), [onCancel, modalRef.current, ref.current]);
|
78
103
|
var handleFinish = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
79
104
|
var values, _error$errorFields, _error$errorFields$;
|
80
105
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
package/es/ProEditTable/index.js
CHANGED
@@ -7,7 +7,7 @@ export declare const customValidate: (validateKeys: any, form: any, rowName: any
|
|
7
7
|
* @returns string
|
8
8
|
*/
|
9
9
|
export declare const splitNames: (names: any[]) => any;
|
10
|
-
export declare const getNamePath: (name: any, virtualKey: any) => any;
|
10
|
+
export declare const getNamePath: (name: any, virtualKey: any) => any[];
|
11
11
|
export declare const onDelete: ({ name, form, virtualKey, selectedRowKeys }: {
|
12
12
|
name: any;
|
13
13
|
form: any;
|
@@ -35,7 +35,10 @@ export declare const handleScrollToError: () => void;
|
|
35
35
|
* @returns 深拷贝后的对象,其中的React节点会被保留
|
36
36
|
*/
|
37
37
|
export declare function cloneDeepFilterNode(value: any): any;
|
38
|
-
|
38
|
+
/**
|
39
|
+
* 分页校验
|
40
|
+
*/
|
41
|
+
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState, isView, disabled }: {
|
39
42
|
form: any;
|
40
43
|
name: any;
|
41
44
|
value: any;
|
@@ -43,4 +46,6 @@ export declare const onPageCheck: ({ form, name, value, columns, page, paginatio
|
|
43
46
|
page: any;
|
44
47
|
pagination: any;
|
45
48
|
setState: any;
|
49
|
+
isView: any;
|
50
|
+
disabled: any;
|
46
51
|
}) => Promise<void>;
|
@@ -51,7 +51,7 @@ export var splitNames = function splitNames(names) {
|
|
51
51
|
};
|
52
52
|
// 获取中间formItem的name
|
53
53
|
export var getNamePath = function getNamePath(name, virtualKey) {
|
54
|
-
var nextName = cloneDeep(name);
|
54
|
+
var nextName = cloneDeep(Array.isArray(name) ? name : [name]);
|
55
55
|
var lastValue = nextName[nextName.length - 1];
|
56
56
|
nextName[nextName.length - 1] = "".concat(lastValue).concat(virtualKey ? "-".concat(virtualKey) : '');
|
57
57
|
return nextName;
|
@@ -334,14 +334,17 @@ var handleCheckCellValue = /*#__PURE__*/function () {
|
|
334
334
|
return _ref6.apply(this, arguments);
|
335
335
|
};
|
336
336
|
}();
|
337
|
+
/**
|
338
|
+
* 分页校验
|
339
|
+
*/
|
337
340
|
export var onPageCheck = /*#__PURE__*/function () {
|
338
341
|
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref7) {
|
339
|
-
var form, name, value, columns, page, pagination, setState, pageNum, pageSize, pageArr, flag, errorNum, errorPageNum, _i, _pageArr, item, start, end, nextValues, _iterator2, _step2, record, _iterator3, _step3, column, result, nextState;
|
342
|
+
var form, name, value, columns, page, pagination, setState, isView, disabled, pageNum, pageSize, pageArr, flag, errorNum, errorPageNum, _i, _pageArr, item, start, end, nextValues, _iterator2, _step2, record, _iterator3, _step3, column, result, nextState;
|
340
343
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
341
344
|
while (1) switch (_context2.prev = _context2.next) {
|
342
345
|
case 0:
|
343
|
-
form = _ref7.form, name = _ref7.name, value = _ref7.value, columns = _ref7.columns, page = _ref7.page, pagination = _ref7.pagination, setState = _ref7.setState;
|
344
|
-
if (!pagination) {
|
346
|
+
form = _ref7.form, name = _ref7.name, value = _ref7.value, columns = _ref7.columns, page = _ref7.page, pagination = _ref7.pagination, setState = _ref7.setState, isView = _ref7.isView, disabled = _ref7.disabled;
|
347
|
+
if (!(pagination && !isView && !disabled)) {
|
345
348
|
_context2.next = 75;
|
346
349
|
break;
|
347
350
|
}
|
@@ -7,9 +7,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
7
7
|
var _excluded = ["className", "format"];
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
/*
|
10
|
-
* @Author:
|
10
|
+
* @Author: ''
|
11
11
|
* @Date: 2024-01-19 18:27:41
|
12
|
-
* @LastEditors:
|
12
|
+
* @LastEditors: ''
|
13
13
|
* @LastEditTime: 2024-06-03 15:33:12
|
14
14
|
* @FilePath: /za-material-warehouse/src/ProForm/components/base/DatePicker/index.tsx
|
15
15
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -6,9 +6,9 @@ import _DatePicker from "antd/es/date-picker";
|
|
6
6
|
var _excluded = ["format", "otherProps", "separator", "range"];
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
8
|
/*
|
9
|
-
* @Author:
|
9
|
+
* @Author: ''
|
10
10
|
* @Date: 2024-04-10 11:39:17
|
11
|
-
* @LastEditors:
|
11
|
+
* @LastEditors: ''
|
12
12
|
* @LastEditTime: 2024-05-29 11:50:49
|
13
13
|
* @FilePath: /za-material-warehouse/src/ProForm/components/base/RangePicker/index.tsx
|
14
14
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -19,15 +19,15 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
19
19
|
import "antd/es/form/style";
|
20
20
|
import _Form from "antd/es/form";
|
21
21
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
22
|
-
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne"],
|
22
|
+
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
|
23
23
|
_excluded2 = ["onOk"],
|
24
24
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
26
26
|
import { SearchOutlined } from '@ant-design/icons';
|
27
27
|
import { useDebounceEffect, useDeepCompareEffect, useMount, useSetState } from 'ahooks';
|
28
|
-
import { debounce, isArray, isEqual, isFunction
|
28
|
+
import { debounce, isArray, isEqual, isFunction } from 'lodash';
|
29
29
|
import { ReactSVG } from 'react-svg';
|
30
|
-
import React, { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
|
30
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } 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';
|
@@ -58,6 +58,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
58
58
|
searchForm = props.searchForm,
|
59
59
|
searchKey = props.searchKey,
|
60
60
|
defaultOne = props.defaultOne,
|
61
|
+
otherProps = props.otherProps,
|
61
62
|
restProps = _objectWithoutProperties(props, _excluded);
|
62
63
|
var contentForm = _Form.useFormInstance();
|
63
64
|
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
@@ -105,6 +106,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
105
106
|
columns = _ref4.columns,
|
106
107
|
rowSelection = _ref4.rowSelection,
|
107
108
|
restTableProps = _objectWithoutProperties(_ref4, _excluded3);
|
109
|
+
var preValue = useRef(value);
|
108
110
|
var _useSetState = useSetState({
|
109
111
|
_value: value,
|
110
112
|
isInit: true,
|
@@ -250,6 +252,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
250
252
|
};
|
251
253
|
var handleChangeValue = function handleChangeValue(e) {
|
252
254
|
onChange(e.target.value);
|
255
|
+
preValue.current = e.target.value;
|
253
256
|
if (!readOnly) {
|
254
257
|
setState({
|
255
258
|
_value: e.target.value
|
@@ -258,6 +261,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
258
261
|
};
|
259
262
|
var handleSelectValue = function handleSelectValue(val, option) {
|
260
263
|
onChange(val, option);
|
264
|
+
preValue.current = val;
|
261
265
|
};
|
262
266
|
var handleClick = /*#__PURE__*/function () {
|
263
267
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
@@ -369,6 +373,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
369
373
|
case 14:
|
370
374
|
if (flag) {
|
371
375
|
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? record : getNextValues(record), record);
|
376
|
+
preValue.current = labelInValue ? record : getNextValues(record);
|
372
377
|
// 更新内部展示值
|
373
378
|
setState({
|
374
379
|
_value: record,
|
@@ -497,6 +502,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
497
502
|
nextSelectRowKeys = isMultiple ? value : [value];
|
498
503
|
if (labelInValue) {
|
499
504
|
onChange(_data);
|
505
|
+
preValue.current = _data;
|
500
506
|
}
|
501
507
|
// 更新内部展示值
|
502
508
|
setState({
|
@@ -553,10 +559,14 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
553
559
|
nextSelectRowKeys = isMultiple ? value : [value];
|
554
560
|
if (labelInValue) {
|
555
561
|
onChange(_data2);
|
562
|
+
preValue.current = _data2;
|
556
563
|
} else {
|
557
564
|
onChange(isMultiple ? _data2.map(function (item) {
|
558
565
|
return item[valueKey];
|
559
566
|
}) : _data2[valueKey]);
|
567
|
+
preValue.current = isMultiple ? _data2.map(function (item) {
|
568
|
+
return item[valueKey];
|
569
|
+
}) : _data2[valueKey];
|
560
570
|
}
|
561
571
|
// 更新内部展示值
|
562
572
|
setState({
|
@@ -640,14 +650,15 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
640
650
|
setState(nextState);
|
641
651
|
}
|
642
652
|
}, [onOff, visible, JSON.stringify(value)]);
|
643
|
-
|
653
|
+
useEffect(function () {
|
644
654
|
if (value && !visible && isInit && !readOnly) {
|
645
655
|
getInitValues();
|
646
656
|
}
|
647
657
|
}, [JSON.stringify(value), visible, isInit]);
|
648
658
|
useDebounceEffect(function () {
|
649
|
-
if (value && !visible && readOnly) {
|
659
|
+
if (value && !visible && readOnly && (!isEqual(value, preValue.current) || (options === null || options === void 0 ? void 0 : options.length) === 0)) {
|
650
660
|
var _options$some;
|
661
|
+
preValue.current = value;
|
651
662
|
var isHasValue = options === null || options === void 0 ? void 0 : (_options$some = options.some) === null || _options$some === void 0 ? void 0 : _options$some.call(options, function (item) {
|
652
663
|
return item[valueKey] === value;
|
653
664
|
});
|
@@ -668,7 +679,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
668
679
|
}, 300);
|
669
680
|
}
|
670
681
|
}
|
671
|
-
}, [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)]);
|
682
|
+
}, [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), options === null || options === void 0 ? void 0 : options.length]);
|
672
683
|
useDebounceEffect(function () {
|
673
684
|
if (!value) {
|
674
685
|
if (defaultOne) {
|
@@ -746,17 +757,17 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
746
757
|
var nextParams = transformParams ? transformParams(params) : params;
|
747
758
|
run(nextParams);
|
748
759
|
}
|
749
|
-
},
|
760
|
+
}, 2000),
|
750
761
|
style: {
|
751
762
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
752
763
|
}
|
753
|
-
},
|
764
|
+
}, restProps)) : _jsx(_Input, _objectSpread({
|
754
765
|
value: viewText,
|
755
766
|
onChange: handleChangeValue,
|
756
767
|
disabled: disabled,
|
757
768
|
autoComplete: "off",
|
758
769
|
allowClear: true
|
759
|
-
},
|
770
|
+
}, restProps)), isView || disabled ? null : _jsx(_Button, {
|
760
771
|
icon: _jsx(ReactSVG, {
|
761
772
|
className: "viewSvg",
|
762
773
|
src: viewSvg,
|
@@ -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,13 +3,12 @@ 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
|
-
import { getLoadedMap } from '../../utils';
|
10
9
|
import ProCollapse from '../../../ProLayout/components/ProCollapse';
|
11
10
|
var defaultLazyLoadConfig = {
|
12
|
-
height:
|
11
|
+
height: 200,
|
13
12
|
offset: 100,
|
14
13
|
once: true // Load only once upon first entry into the viewport
|
15
14
|
};
|
@@ -24,10 +23,8 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
24
23
|
var _useStep = useStep(),
|
25
24
|
register = _useStep.register,
|
26
25
|
collapse = _useStep.collapse,
|
27
|
-
globalLazyLoad = _useStep.lazyLoad
|
28
|
-
|
29
|
-
var lazyLoad = stepLazyLoad || globalLazyLoad;
|
30
|
-
var loadedMap = getLoadedMap(registerMap);
|
26
|
+
globalLazyLoad = _useStep.lazyLoad;
|
27
|
+
var lazyLoad = stepLazyLoad !== null && stepLazyLoad !== void 0 ? stepLazyLoad : globalLazyLoad;
|
31
28
|
useEffect(function () {
|
32
29
|
// Schedule registration to avoid re-render issues
|
33
30
|
var timeoutId = setTimeout(function () {
|
@@ -38,13 +35,11 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
38
35
|
}, restProps));
|
39
36
|
}, 0);
|
40
37
|
return function () {
|
41
|
-
|
38
|
+
clearTimeout(timeoutId);
|
42
39
|
};
|
43
40
|
}, [id, title, lazyLoad, restProps, register]);
|
44
41
|
var renderChildren = function renderChildren() {
|
45
|
-
|
46
|
-
// 第一个step不设置lasyload,防止懒加载不生效
|
47
|
-
if (lazyLoad && (loadedMap === null || loadedMap === void 0 ? void 0 : loadedMap.length) && (loadedMap === null || loadedMap === void 0 ? void 0 : (_loadedMap$ = loadedMap[0]) === null || _loadedMap$ === void 0 ? void 0 : _loadedMap$.id) !== id) {
|
42
|
+
if (lazyLoad) {
|
48
43
|
var lazyLoadProps = isBoolean(lazyLoad) ? defaultLazyLoadConfig : lazyLoad;
|
49
44
|
return _jsx(LazyLoad, _objectSpread(_objectSpread({}, lazyLoadProps), {}, {
|
50
45
|
classNamePrefix: id,
|
@@ -62,6 +57,17 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
62
57
|
title: title,
|
63
58
|
icon: true
|
64
59
|
}, restProps), {}, {
|
60
|
+
onChange: function onChange(e) {
|
61
|
+
var _restProps$onChange;
|
62
|
+
if (lazyLoad) {
|
63
|
+
// 延时执行, 避免在折叠时, 懒加载的元素没有高度
|
64
|
+
setTimeout(function () {
|
65
|
+
forceCheck();
|
66
|
+
}, 100);
|
67
|
+
}
|
68
|
+
// 默认执行
|
69
|
+
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
70
|
+
},
|
65
71
|
children: renderChildren()
|
66
72
|
}))
|
67
73
|
});
|
@@ -5,9 +5,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
5
5
|
var _excluded = ["dataSource", "tableProps", "draggableProps", "summaryProps", "emptyTextProps"];
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
7
|
/*
|
8
|
-
* @Author:
|
8
|
+
* @Author: ''
|
9
9
|
* @Date: 2024-08-09 13:48:59
|
10
|
-
* @LastEditors:
|
10
|
+
* @LastEditors: ''
|
11
11
|
* @LastEditTime: 2024-08-27 15:27:44
|
12
12
|
* @FilePath: /za-material-warehouse/src/ProTable/components/RcTable/components/DraggableTable/index.tsx
|
13
13
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
package/es/ProTable/index.js
CHANGED
@@ -250,9 +250,6 @@ var ProTable = function ProTable(props) {
|
|
250
250
|
if (isExistPercentWidth) {
|
251
251
|
_scroll = props === null || props === void 0 ? void 0 : props.scroll;
|
252
252
|
}
|
253
|
-
if (props.expandable) {
|
254
|
-
_scroll = {};
|
255
|
-
}
|
256
253
|
var handleColumnConfig = /*#__PURE__*/function () {
|
257
254
|
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(checkList) {
|
258
255
|
var newColumns, _columnConfig$onColum, catchColumns;
|
@@ -30,8 +30,8 @@ export declare const isListResult: (data: {
|
|
30
30
|
}) => boolean;
|
31
31
|
export declare const getRowKey: (rowKey: any, record: any) => any;
|
32
32
|
/** 移除对象中的 null , undefined, '' 的key */
|
33
|
-
export declare const removeEmptyKeys: (obj
|
34
|
-
[k: string]:
|
33
|
+
export declare const removeEmptyKeys: (obj?: Record<string, any>) => {
|
34
|
+
[k: string]: any;
|
35
35
|
};
|
36
36
|
export declare const getPadding: (el: HTMLElement) => {
|
37
37
|
pLeft: number;
|
@@ -75,6 +75,7 @@ export var getRowKey = function getRowKey(rowKey, record) {
|
|
75
75
|
};
|
76
76
|
/** 移除对象中的 null , undefined, '' 的key */
|
77
77
|
export var removeEmptyKeys = function removeEmptyKeys(obj) {
|
78
|
+
if (!obj) return {};
|
78
79
|
// 使用 Object.entries() 将对象转换为键值对数组
|
79
80
|
var entries = Object.entries(obj);
|
80
81
|
// 过滤掉值为 null, undefined, 或 '' 的键值对
|
@@ -3,9 +3,9 @@ import _Tooltip from "antd/es/tooltip";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
4
4
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
/*
|
6
|
-
* @Author:
|
6
|
+
* @Author: ''
|
7
7
|
* @Date: 2024-09-20 10:26:04
|
8
|
-
* @LastEditors:
|
8
|
+
* @LastEditors: ''
|
9
9
|
* @LastEditTime: 2024-09-26 14:12:44
|
10
10
|
* @FilePath: /za-material-warehouse/src/ProTree/components/AdaptiveTooltip.tsx
|
11
11
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -5,9 +5,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
5
5
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "showCodeName", "mode", "fieldNames", "handleOnChange", "handleFilterClose", "optionRender"];
|
6
6
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
7
7
|
/*
|
8
|
-
* @Author:
|
8
|
+
* @Author: ''
|
9
9
|
* @Date: 2024-07-03 11:02:19
|
10
|
-
* @LastEditors:
|
10
|
+
* @LastEditors: ''
|
11
11
|
* @LastEditTime: 2024-09-26 14:30:26
|
12
12
|
* @FilePath: /za-material-warehouse/src/ProTree/components/List.tsx
|
13
13
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
/*
|
3
|
-
* @Author:
|
3
|
+
* @Author: ''
|
4
4
|
* @Date: 2024-09-26 14:37:00
|
5
|
-
* @LastEditors:
|
5
|
+
* @LastEditors: ''
|
6
6
|
* @LastEditTime: 2024-09-26 17:50:59
|
7
7
|
* @FilePath: /za-material-warehouse/src/ProTree/components/SearchTitle.tsx
|
8
8
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
package/es/ProTreeModal/index.js
CHANGED
@@ -12,9 +12,9 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
12
12
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
14
14
|
/*
|
15
|
-
* @Author:
|
15
|
+
* @Author: ''
|
16
16
|
* @Date: 2024-06-04 10:01:18
|
17
|
-
* @LastEditors:
|
17
|
+
* @LastEditors: ''
|
18
18
|
* @LastEditTime: 2024-09-27 11:49:28
|
19
19
|
* @FilePath: /za-material-warehouse/src/ProTreeModal/index.tsx
|
20
20
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -14,6 +14,7 @@ interface DragRenderProps extends Pick<ProUploadProps, 'buttonProps' | 'disabled
|
|
14
14
|
afterRender: string | ReactNode;
|
15
15
|
extExt: any[];
|
16
16
|
isConfirmDelete?: boolean;
|
17
|
+
onRemove?: (file: UploadFile) => any | Promise<any>;
|
17
18
|
}
|
18
19
|
declare const ButtonRender: FC<DragRenderProps>;
|
19
20
|
export default ButtonRender;
|
@@ -2,6 +2,8 @@ import "antd/es/button/style";
|
|
2
2
|
import _Button from "antd/es/button";
|
3
3
|
import "antd/es/upload/style";
|
4
4
|
import _Upload from "antd/es/upload";
|
5
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
6
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
5
7
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
6
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
7
9
|
import { DndContext } from '@dnd-kit/core';
|
@@ -26,7 +28,8 @@ var ButtonRender = function ButtonRender(props) {
|
|
26
28
|
afterRender = props.afterRender,
|
27
29
|
_props$buttonText = props.buttonText,
|
28
30
|
buttonText = _props$buttonText === void 0 ? locale === null || locale === void 0 ? void 0 : (_locale$ProUpload = locale.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.buttonText : _props$buttonText,
|
29
|
-
isConfirmDelete = props.isConfirmDelete
|
31
|
+
isConfirmDelete = props.isConfirmDelete,
|
32
|
+
_onRemove = props.onRemove;
|
30
33
|
// 按钮类型的props
|
31
34
|
var buttonUploadProps = _objectSpread(_objectSpread({}, baseUploadProps), {}, {
|
32
35
|
fileList: fileList,
|
@@ -38,7 +41,34 @@ var ButtonRender = function ButtonRender(props) {
|
|
38
41
|
file: file,
|
39
42
|
isConfirmDelete: isConfirmDelete,
|
40
43
|
onPreview: onPreview,
|
41
|
-
onRemove:
|
44
|
+
onRemove: function () {
|
45
|
+
var _onRemove2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
46
|
+
var res;
|
47
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
48
|
+
while (1) switch (_context.prev = _context.next) {
|
49
|
+
case 0:
|
50
|
+
_context.next = 2;
|
51
|
+
return _onRemove === null || _onRemove === void 0 ? void 0 : _onRemove(file);
|
52
|
+
case 2:
|
53
|
+
res = _context.sent;
|
54
|
+
if (!(res === false)) {
|
55
|
+
_context.next = 5;
|
56
|
+
break;
|
57
|
+
}
|
58
|
+
return _context.abrupt("return");
|
59
|
+
case 5:
|
60
|
+
actions.remove(file);
|
61
|
+
case 6:
|
62
|
+
case "end":
|
63
|
+
return _context.stop();
|
64
|
+
}
|
65
|
+
}, _callee);
|
66
|
+
}));
|
67
|
+
function onRemove(_x) {
|
68
|
+
return _onRemove2.apply(this, arguments);
|
69
|
+
}
|
70
|
+
return onRemove;
|
71
|
+
}(),
|
42
72
|
onDownload: onDownload
|
43
73
|
})
|
44
74
|
});
|
@@ -13,7 +13,7 @@ interface DragRenderProps extends Pick<ProUploadProps, 'buttonProps' | 'disabled
|
|
13
13
|
onPreview: any;
|
14
14
|
onDownload: any;
|
15
15
|
extExt: any[];
|
16
|
-
onRemove: (file: UploadFile) =>
|
16
|
+
onRemove: (file: UploadFile) => any | Promise<any>;
|
17
17
|
}
|
18
18
|
declare const ImageRender: FC<DragRenderProps>;
|
19
19
|
export default ImageRender;
|
package/es/ProUpload/index.js
CHANGED
@@ -265,7 +265,7 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
265
265
|
onDragEnd: onDragEnd,
|
266
266
|
onPreview: onPreview,
|
267
267
|
onDownload: onDownload,
|
268
|
-
onRemove:
|
268
|
+
onRemove: onRemove,
|
269
269
|
onChange: onChange,
|
270
270
|
setFileList: setFileList,
|
271
271
|
extExt: extExt,
|
@@ -49,13 +49,38 @@ var ProDrawer = function ProDrawer(_ref) {
|
|
49
49
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
50
50
|
loading = _useState2[0],
|
51
51
|
toggleLoading = _useState2[1];
|
52
|
+
var _useState3 = (0, _react.useState)(''),
|
53
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
54
|
+
initialSnapshot = _useState4[0],
|
55
|
+
setInitialSnapshot = _useState4[1];
|
52
56
|
var noRenderFooter = isView || footer === false || footer === null;
|
57
|
+
// 使用 useEffect 在 visible 变更时延迟捕获 初始DOM 快照
|
58
|
+
(0, _react.useEffect)(function () {
|
59
|
+
if (visible) {
|
60
|
+
// 延迟到下一个事件循环,确保 Drawer 已经渲染
|
61
|
+
var timeoutId = setTimeout(function () {
|
62
|
+
if (ref.current) {
|
63
|
+
setInitialSnapshot(ref.current.innerHTML); // 捕获 DOM 快照
|
64
|
+
}
|
65
|
+
}, 100); // 使用 setTimeout 让 DOM 渲染完成后再执行
|
66
|
+
return function () {
|
67
|
+
return clearTimeout(timeoutId);
|
68
|
+
}; // 清理定时器
|
69
|
+
}
|
70
|
+
setInitialSnapshot('');
|
71
|
+
}, [visible]); // 当 visible 变化时执行
|
72
|
+
// 快照对比
|
73
|
+
var compareSnapshots = function compareSnapshots() {
|
74
|
+
if (!ref.current) return false;
|
75
|
+
return ref.current.innerHTML === initialSnapshot;
|
76
|
+
};
|
53
77
|
var onConfirm = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
54
78
|
var _locale$ProDrawerForm, _locale$ProDrawerForm2, _locale$ProDrawerForm3, _locale$ProDrawerForm4;
|
55
79
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
56
80
|
while (1) switch (_context.prev = _context.next) {
|
57
81
|
case 0:
|
58
|
-
|
82
|
+
// 如果当前是查看状态,或者不需要确认关闭,或者快照对比一致,则直接关闭
|
83
|
+
if (isView || !isConfirmClose || compareSnapshots()) {
|
59
84
|
onCancel && onCancel();
|
60
85
|
} else if (!modalRef.current) {
|
61
86
|
modalRef.current = _antd.Modal.confirm((0, _objectSpread2.default)({
|
@@ -77,7 +102,7 @@ var ProDrawer = function ProDrawer(_ref) {
|
|
77
102
|
return _context.stop();
|
78
103
|
}
|
79
104
|
}, _callee);
|
80
|
-
})), [onCancel, modalRef.current]);
|
105
|
+
})), [onCancel, modalRef.current, ref.current]);
|
81
106
|
var handleFinish = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
|
82
107
|
var values, _error$errorFields, _error$errorFields$;
|
83
108
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
@@ -7,7 +7,7 @@ export declare const customValidate: (validateKeys: any, form: any, rowName: any
|
|
7
7
|
* @returns string
|
8
8
|
*/
|
9
9
|
export declare const splitNames: (names: any[]) => any;
|
10
|
-
export declare const getNamePath: (name: any, virtualKey: any) => any;
|
10
|
+
export declare const getNamePath: (name: any, virtualKey: any) => any[];
|
11
11
|
export declare const onDelete: ({ name, form, virtualKey, selectedRowKeys }: {
|
12
12
|
name: any;
|
13
13
|
form: any;
|
@@ -35,7 +35,10 @@ export declare const handleScrollToError: () => void;
|
|
35
35
|
* @returns 深拷贝后的对象,其中的React节点会被保留
|
36
36
|
*/
|
37
37
|
export declare function cloneDeepFilterNode(value: any): any;
|
38
|
-
|
38
|
+
/**
|
39
|
+
* 分页校验
|
40
|
+
*/
|
41
|
+
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState, isView, disabled }: {
|
39
42
|
form: any;
|
40
43
|
name: any;
|
41
44
|
value: any;
|
@@ -43,4 +46,6 @@ export declare const onPageCheck: ({ form, name, value, columns, page, paginatio
|
|
43
46
|
page: any;
|
44
47
|
pagination: any;
|
45
48
|
setState: any;
|
49
|
+
isView: any;
|
50
|
+
disabled: any;
|
46
51
|
}) => Promise<void>;
|
@@ -60,7 +60,7 @@ var splitNames = exports.splitNames = function splitNames(names) {
|
|
60
60
|
};
|
61
61
|
// 获取中间formItem的name
|
62
62
|
var getNamePath = exports.getNamePath = function getNamePath(name, virtualKey) {
|
63
|
-
var nextName = (0, _lodash.cloneDeep)(name);
|
63
|
+
var nextName = (0, _lodash.cloneDeep)(Array.isArray(name) ? name : [name]);
|
64
64
|
var lastValue = nextName[nextName.length - 1];
|
65
65
|
nextName[nextName.length - 1] = "".concat(lastValue).concat(virtualKey ? "-".concat(virtualKey) : '');
|
66
66
|
return nextName;
|
@@ -343,14 +343,17 @@ var handleCheckCellValue = /*#__PURE__*/function () {
|
|
343
343
|
return _ref6.apply(this, arguments);
|
344
344
|
};
|
345
345
|
}();
|
346
|
+
/**
|
347
|
+
* 分页校验
|
348
|
+
*/
|
346
349
|
var onPageCheck = exports.onPageCheck = /*#__PURE__*/function () {
|
347
350
|
var _ref8 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(_ref7) {
|
348
|
-
var form, name, value, columns, page, pagination, setState, pageNum, pageSize, pageArr, flag, errorNum, errorPageNum, _i, _pageArr, item, start, end, nextValues, _iterator2, _step2, record, _iterator3, _step3, column, result, nextState;
|
351
|
+
var form, name, value, columns, page, pagination, setState, isView, disabled, pageNum, pageSize, pageArr, flag, errorNum, errorPageNum, _i, _pageArr, item, start, end, nextValues, _iterator2, _step2, record, _iterator3, _step3, column, result, nextState;
|
349
352
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
350
353
|
while (1) switch (_context2.prev = _context2.next) {
|
351
354
|
case 0:
|
352
|
-
form = _ref7.form, name = _ref7.name, value = _ref7.value, columns = _ref7.columns, page = _ref7.page, pagination = _ref7.pagination, setState = _ref7.setState;
|
353
|
-
if (!pagination) {
|
355
|
+
form = _ref7.form, name = _ref7.name, value = _ref7.value, columns = _ref7.columns, page = _ref7.page, pagination = _ref7.pagination, setState = _ref7.setState, isView = _ref7.isView, disabled = _ref7.disabled;
|
356
|
+
if (!(pagination && !isView && !disabled)) {
|
354
357
|
_context2.next = 75;
|
355
358
|
break;
|
356
359
|
}
|
@@ -19,9 +19,9 @@ var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
|
|
19
19
|
var _Container = _interopRequireDefault(require("../../Container"));
|
20
20
|
var _excluded = ["className", "format"];
|
21
21
|
/*
|
22
|
-
* @Author:
|
22
|
+
* @Author: ''
|
23
23
|
* @Date: 2024-01-19 18:27:41
|
24
|
-
* @LastEditors:
|
24
|
+
* @LastEditors: ''
|
25
25
|
* @LastEditTime: 2024-06-03 15:33:12
|
26
26
|
* @FilePath: /za-material-warehouse/src/ProForm/components/base/DatePicker/index.tsx
|
27
27
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -18,9 +18,9 @@ var _Container = _interopRequireDefault(require("../../Container"));
|
|
18
18
|
var _useDateRange = require("./useDateRange");
|
19
19
|
var _excluded = ["format", "otherProps", "separator", "range"];
|
20
20
|
/*
|
21
|
-
* @Author:
|
21
|
+
* @Author: ''
|
22
22
|
* @Date: 2024-04-10 11:39:17
|
23
|
-
* @LastEditors:
|
23
|
+
* @LastEditors: ''
|
24
24
|
* @LastEditTime: 2024-05-29 11:50:49
|
25
25
|
* @FilePath: /za-material-warehouse/src/ProForm/components/base/RangePicker/index.tsx
|
26
26
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -25,7 +25,7 @@ var _Container = _interopRequireDefault(require("../../Container"));
|
|
25
25
|
var _view = _interopRequireDefault(require("../../../../assets/view.svg"));
|
26
26
|
var _useRequestList3 = _interopRequireDefault(require("./hooks/useRequestList"));
|
27
27
|
var _locale = _interopRequireDefault(require("../../../../locale"));
|
28
|
-
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne"],
|
28
|
+
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
|
29
29
|
_excluded2 = ["onOk"],
|
30
30
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
31
31
|
var ProModalSelect = function ProModalSelect(props, ref) {
|
@@ -53,6 +53,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
53
53
|
searchForm = props.searchForm,
|
54
54
|
searchKey = props.searchKey,
|
55
55
|
defaultOne = props.defaultOne,
|
56
|
+
otherProps = props.otherProps,
|
56
57
|
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
57
58
|
var contentForm = _antd.Form.useFormInstance();
|
58
59
|
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
@@ -100,6 +101,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
100
101
|
columns = _ref4.columns,
|
101
102
|
rowSelection = _ref4.rowSelection,
|
102
103
|
restTableProps = (0, _objectWithoutProperties2.default)(_ref4, _excluded3);
|
104
|
+
var preValue = (0, _react.useRef)(value);
|
103
105
|
var _useSetState = (0, _ahooks.useSetState)({
|
104
106
|
_value: value,
|
105
107
|
isInit: true,
|
@@ -245,6 +247,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
245
247
|
};
|
246
248
|
var handleChangeValue = function handleChangeValue(e) {
|
247
249
|
onChange(e.target.value);
|
250
|
+
preValue.current = e.target.value;
|
248
251
|
if (!readOnly) {
|
249
252
|
setState({
|
250
253
|
_value: e.target.value
|
@@ -253,6 +256,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
253
256
|
};
|
254
257
|
var handleSelectValue = function handleSelectValue(val, option) {
|
255
258
|
onChange(val, option);
|
259
|
+
preValue.current = val;
|
256
260
|
};
|
257
261
|
var handleClick = /*#__PURE__*/function () {
|
258
262
|
var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
@@ -364,6 +368,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
364
368
|
case 14:
|
365
369
|
if (flag) {
|
366
370
|
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? record : getNextValues(record), record);
|
371
|
+
preValue.current = labelInValue ? record : getNextValues(record);
|
367
372
|
// 更新内部展示值
|
368
373
|
setState({
|
369
374
|
_value: record,
|
@@ -492,6 +497,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
492
497
|
nextSelectRowKeys = isMultiple ? value : [value];
|
493
498
|
if (labelInValue) {
|
494
499
|
onChange(_data);
|
500
|
+
preValue.current = _data;
|
495
501
|
}
|
496
502
|
// 更新内部展示值
|
497
503
|
setState({
|
@@ -548,10 +554,14 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
548
554
|
nextSelectRowKeys = isMultiple ? value : [value];
|
549
555
|
if (labelInValue) {
|
550
556
|
onChange(_data2);
|
557
|
+
preValue.current = _data2;
|
551
558
|
} else {
|
552
559
|
onChange(isMultiple ? _data2.map(function (item) {
|
553
560
|
return item[valueKey];
|
554
561
|
}) : _data2[valueKey]);
|
562
|
+
preValue.current = isMultiple ? _data2.map(function (item) {
|
563
|
+
return item[valueKey];
|
564
|
+
}) : _data2[valueKey];
|
555
565
|
}
|
556
566
|
// 更新内部展示值
|
557
567
|
setState({
|
@@ -635,14 +645,15 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
635
645
|
setState(nextState);
|
636
646
|
}
|
637
647
|
}, [onOff, visible, JSON.stringify(value)]);
|
638
|
-
(0,
|
648
|
+
(0, _react.useEffect)(function () {
|
639
649
|
if (value && !visible && isInit && !readOnly) {
|
640
650
|
getInitValues();
|
641
651
|
}
|
642
652
|
}, [JSON.stringify(value), visible, isInit]);
|
643
653
|
(0, _ahooks.useDebounceEffect)(function () {
|
644
|
-
if (value && !visible && readOnly) {
|
654
|
+
if (value && !visible && readOnly && (!(0, _lodash.isEqual)(value, preValue.current) || (options === null || options === void 0 ? void 0 : options.length) === 0)) {
|
645
655
|
var _options$some;
|
656
|
+
preValue.current = value;
|
646
657
|
var isHasValue = options === null || options === void 0 ? void 0 : (_options$some = options.some) === null || _options$some === void 0 ? void 0 : _options$some.call(options, function (item) {
|
647
658
|
return item[valueKey] === value;
|
648
659
|
});
|
@@ -663,7 +674,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
663
674
|
}, 300);
|
664
675
|
}
|
665
676
|
}
|
666
|
-
}, [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)]);
|
677
|
+
}, [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), options === null || options === void 0 ? void 0 : options.length]);
|
667
678
|
(0, _ahooks.useDebounceEffect)(function () {
|
668
679
|
if (!value) {
|
669
680
|
if (defaultOne) {
|
@@ -741,17 +752,17 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
741
752
|
var nextParams = transformParams ? transformParams(params) : params;
|
742
753
|
run(nextParams);
|
743
754
|
}
|
744
|
-
},
|
755
|
+
}, 2000),
|
745
756
|
style: {
|
746
757
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
747
758
|
}
|
748
|
-
},
|
759
|
+
}, restProps)) : (0, _jsxRuntime.jsx)(_antd.Input, (0, _objectSpread3.default)({
|
749
760
|
value: viewText,
|
750
761
|
onChange: handleChangeValue,
|
751
762
|
disabled: disabled,
|
752
763
|
autoComplete: "off",
|
753
764
|
allowClear: true
|
754
|
-
},
|
765
|
+
}, restProps)), isView || disabled ? null : (0, _jsxRuntime.jsx)(_antd.Button, {
|
755
766
|
icon: (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
|
756
767
|
className: "viewSvg",
|
757
768
|
src: _view.default,
|
@@ -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,14 +10,13 @@ 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
|
-
var _utils = require("../../utils");
|
16
16
|
var _ProCollapse = _interopRequireDefault(require("../../../ProLayout/components/ProCollapse"));
|
17
17
|
var _excluded = ["id", "title", "collapse", "children", "lazyLoad"];
|
18
18
|
var defaultLazyLoadConfig = {
|
19
|
-
height:
|
19
|
+
height: 200,
|
20
20
|
offset: 100,
|
21
21
|
once: true // Load only once upon first entry into the viewport
|
22
22
|
};
|
@@ -31,10 +31,8 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
31
31
|
var _useStep = (0, _index.useStep)(),
|
32
32
|
register = _useStep.register,
|
33
33
|
collapse = _useStep.collapse,
|
34
|
-
globalLazyLoad = _useStep.lazyLoad
|
35
|
-
|
36
|
-
var lazyLoad = stepLazyLoad || globalLazyLoad;
|
37
|
-
var loadedMap = (0, _utils.getLoadedMap)(registerMap);
|
34
|
+
globalLazyLoad = _useStep.lazyLoad;
|
35
|
+
var lazyLoad = stepLazyLoad !== null && stepLazyLoad !== void 0 ? stepLazyLoad : globalLazyLoad;
|
38
36
|
(0, _react.useEffect)(function () {
|
39
37
|
// Schedule registration to avoid re-render issues
|
40
38
|
var timeoutId = setTimeout(function () {
|
@@ -45,13 +43,11 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
45
43
|
}, restProps));
|
46
44
|
}, 0);
|
47
45
|
return function () {
|
48
|
-
|
46
|
+
clearTimeout(timeoutId);
|
49
47
|
};
|
50
48
|
}, [id, title, lazyLoad, restProps, register]);
|
51
49
|
var renderChildren = function renderChildren() {
|
52
|
-
|
53
|
-
// 第一个step不设置lasyload,防止懒加载不生效
|
54
|
-
if (lazyLoad && (loadedMap === null || loadedMap === void 0 ? void 0 : loadedMap.length) && (loadedMap === null || loadedMap === void 0 ? void 0 : (_loadedMap$ = loadedMap[0]) === null || _loadedMap$ === void 0 ? void 0 : _loadedMap$.id) !== id) {
|
50
|
+
if (lazyLoad) {
|
55
51
|
var lazyLoadProps = (0, _lodash.isBoolean)(lazyLoad) ? defaultLazyLoadConfig : lazyLoad;
|
56
52
|
return (0, _jsxRuntime.jsx)(_reactLazyload.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, lazyLoadProps), {}, {
|
57
53
|
classNamePrefix: id,
|
@@ -69,6 +65,17 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
69
65
|
title: title,
|
70
66
|
icon: true
|
71
67
|
}, restProps), {}, {
|
68
|
+
onChange: function onChange(e) {
|
69
|
+
var _restProps$onChange;
|
70
|
+
if (lazyLoad) {
|
71
|
+
// 延时执行, 避免在折叠时, 懒加载的元素没有高度
|
72
|
+
setTimeout(function () {
|
73
|
+
(0, _reactLazyload.forceCheck)();
|
74
|
+
}, 100);
|
75
|
+
}
|
76
|
+
// 默认执行
|
77
|
+
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
78
|
+
},
|
72
79
|
children: renderChildren()
|
73
80
|
}))
|
74
81
|
});
|
@@ -16,9 +16,9 @@ var _index = require("../../../index");
|
|
16
16
|
require("../../../../style/index.less");
|
17
17
|
var _excluded = ["dataSource", "tableProps", "draggableProps", "summaryProps", "emptyTextProps"];
|
18
18
|
/*
|
19
|
-
* @Author:
|
19
|
+
* @Author: ''
|
20
20
|
* @Date: 2024-08-09 13:48:59
|
21
|
-
* @LastEditors:
|
21
|
+
* @LastEditors: ''
|
22
22
|
* @LastEditTime: 2024-08-27 15:27:44
|
23
23
|
* @FilePath: /za-material-warehouse/src/ProTable/components/RcTable/components/DraggableTable/index.tsx
|
24
24
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
package/lib/ProTable/index.js
CHANGED
@@ -257,9 +257,6 @@ var ProTable = function ProTable(props) {
|
|
257
257
|
if (isExistPercentWidth) {
|
258
258
|
_scroll = props === null || props === void 0 ? void 0 : props.scroll;
|
259
259
|
}
|
260
|
-
if (props.expandable) {
|
261
|
-
_scroll = {};
|
262
|
-
}
|
263
260
|
var handleColumnConfig = /*#__PURE__*/function () {
|
264
261
|
var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(checkList) {
|
265
262
|
var newColumns, _columnConfig$onColum, catchColumns;
|
@@ -30,8 +30,8 @@ export declare const isListResult: (data: {
|
|
30
30
|
}) => boolean;
|
31
31
|
export declare const getRowKey: (rowKey: any, record: any) => any;
|
32
32
|
/** 移除对象中的 null , undefined, '' 的key */
|
33
|
-
export declare const removeEmptyKeys: (obj
|
34
|
-
[k: string]:
|
33
|
+
export declare const removeEmptyKeys: (obj?: Record<string, any>) => {
|
34
|
+
[k: string]: any;
|
35
35
|
};
|
36
36
|
export declare const getPadding: (el: HTMLElement) => {
|
37
37
|
pLeft: number;
|
@@ -82,6 +82,7 @@ var getRowKey = exports.getRowKey = function getRowKey(rowKey, record) {
|
|
82
82
|
};
|
83
83
|
/** 移除对象中的 null , undefined, '' 的key */
|
84
84
|
var removeEmptyKeys = exports.removeEmptyKeys = function removeEmptyKeys(obj) {
|
85
|
+
if (!obj) return {};
|
85
86
|
// 使用 Object.entries() 将对象转换为键值对数组
|
86
87
|
var entries = Object.entries(obj);
|
87
88
|
// 过滤掉值为 null, undefined, 或 '' 的键值对
|
@@ -10,9 +10,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
var _antd = require("antd");
|
11
11
|
var _react = require("react");
|
12
12
|
/*
|
13
|
-
* @Author:
|
13
|
+
* @Author: ''
|
14
14
|
* @Date: 2024-09-20 10:26:04
|
15
|
-
* @LastEditors:
|
15
|
+
* @LastEditors: ''
|
16
16
|
* @LastEditTime: 2024-09-26 14:12:44
|
17
17
|
* @FilePath: /za-material-warehouse/src/ProTree/components/AdaptiveTooltip.tsx
|
18
18
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -14,9 +14,9 @@ var _SearchTitle = _interopRequireDefault(require("./SearchTitle"));
|
|
14
14
|
var _CloseIcon = _interopRequireDefault(require("./CloseIcon"));
|
15
15
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "showCodeName", "mode", "fieldNames", "handleOnChange", "handleFilterClose", "optionRender"];
|
16
16
|
/*
|
17
|
-
* @Author:
|
17
|
+
* @Author: ''
|
18
18
|
* @Date: 2024-07-03 11:02:19
|
19
|
-
* @LastEditors:
|
19
|
+
* @LastEditors: ''
|
20
20
|
* @LastEditTime: 2024-09-26 14:30:26
|
21
21
|
* @FilePath: /za-material-warehouse/src/ProTree/components/List.tsx
|
22
22
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -9,9 +9,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
9
9
|
var _react = require("react");
|
10
10
|
var _AdaptiveTooltip = _interopRequireDefault(require("./AdaptiveTooltip"));
|
11
11
|
/*
|
12
|
-
* @Author:
|
12
|
+
* @Author: ''
|
13
13
|
* @Date: 2024-09-26 14:37:00
|
14
|
-
* @LastEditors:
|
14
|
+
* @LastEditors: ''
|
15
15
|
* @LastEditTime: 2024-09-26 17:50:59
|
16
16
|
* @FilePath: /za-material-warehouse/src/ProTree/components/SearchTitle.tsx
|
17
17
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -25,9 +25,9 @@ var _inputSearch = _interopRequireDefault(require("../assets/input-search.svg"))
|
|
25
25
|
var _locale = _interopRequireWildcard(require("../locale"));
|
26
26
|
require("./style/index.less");
|
27
27
|
/*
|
28
|
-
* @Author:
|
28
|
+
* @Author: ''
|
29
29
|
* @Date: 2024-06-04 10:01:18
|
30
|
-
* @LastEditors:
|
30
|
+
* @LastEditors: ''
|
31
31
|
* @LastEditTime: 2024-09-27 11:49:28
|
32
32
|
* @FilePath: /za-material-warehouse/src/ProTreeModal/index.tsx
|
33
33
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -14,6 +14,7 @@ interface DragRenderProps extends Pick<ProUploadProps, 'buttonProps' | 'disabled
|
|
14
14
|
afterRender: string | ReactNode;
|
15
15
|
extExt: any[];
|
16
16
|
isConfirmDelete?: boolean;
|
17
|
+
onRemove?: (file: UploadFile) => any | Promise<any>;
|
17
18
|
}
|
18
19
|
declare const ButtonRender: FC<DragRenderProps>;
|
19
20
|
export default ButtonRender;
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
exports.default = void 0;
|
8
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
8
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
9
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
10
12
|
var _antd = require("antd");
|
@@ -30,7 +32,8 @@ var ButtonRender = function ButtonRender(props) {
|
|
30
32
|
afterRender = props.afterRender,
|
31
33
|
_props$buttonText = props.buttonText,
|
32
34
|
buttonText = _props$buttonText === void 0 ? _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProUpload = _locale.default.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.buttonText : _props$buttonText,
|
33
|
-
isConfirmDelete = props.isConfirmDelete
|
35
|
+
isConfirmDelete = props.isConfirmDelete,
|
36
|
+
_onRemove = props.onRemove;
|
34
37
|
// 按钮类型的props
|
35
38
|
var buttonUploadProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, baseUploadProps), {}, {
|
36
39
|
fileList: fileList,
|
@@ -42,7 +45,34 @@ var ButtonRender = function ButtonRender(props) {
|
|
42
45
|
file: file,
|
43
46
|
isConfirmDelete: isConfirmDelete,
|
44
47
|
onPreview: onPreview,
|
45
|
-
onRemove:
|
48
|
+
onRemove: function () {
|
49
|
+
var _onRemove2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(file) {
|
50
|
+
var res;
|
51
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
52
|
+
while (1) switch (_context.prev = _context.next) {
|
53
|
+
case 0:
|
54
|
+
_context.next = 2;
|
55
|
+
return _onRemove === null || _onRemove === void 0 ? void 0 : _onRemove(file);
|
56
|
+
case 2:
|
57
|
+
res = _context.sent;
|
58
|
+
if (!(res === false)) {
|
59
|
+
_context.next = 5;
|
60
|
+
break;
|
61
|
+
}
|
62
|
+
return _context.abrupt("return");
|
63
|
+
case 5:
|
64
|
+
actions.remove(file);
|
65
|
+
case 6:
|
66
|
+
case "end":
|
67
|
+
return _context.stop();
|
68
|
+
}
|
69
|
+
}, _callee);
|
70
|
+
}));
|
71
|
+
function onRemove(_x) {
|
72
|
+
return _onRemove2.apply(this, arguments);
|
73
|
+
}
|
74
|
+
return onRemove;
|
75
|
+
}(),
|
46
76
|
onDownload: onDownload
|
47
77
|
})
|
48
78
|
});
|
@@ -13,7 +13,7 @@ interface DragRenderProps extends Pick<ProUploadProps, 'buttonProps' | 'disabled
|
|
13
13
|
onPreview: any;
|
14
14
|
onDownload: any;
|
15
15
|
extExt: any[];
|
16
|
-
onRemove: (file: UploadFile) =>
|
16
|
+
onRemove: (file: UploadFile) => any | Promise<any>;
|
17
17
|
}
|
18
18
|
declare const ImageRender: FC<DragRenderProps>;
|
19
19
|
export default ImageRender;
|
package/lib/ProUpload/index.js
CHANGED
@@ -272,7 +272,7 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
272
272
|
onDragEnd: onDragEnd,
|
273
273
|
onPreview: onPreview,
|
274
274
|
onDownload: onDownload,
|
275
|
-
onRemove:
|
275
|
+
onRemove: onRemove,
|
276
276
|
onChange: onChange,
|
277
277
|
setFileList: setFileList,
|
278
278
|
extExt: extExt,
|