@zat-design/sisyphus-react 3.11.4 → 3.11.5-beta.1.1
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/ProEditTable/components/RcTable/DraggableTable.js +6 -5
- package/es/ProEditTable/index.js +5 -4
- package/es/ProEditTable/style/index.less +1 -2
- package/es/ProEditTable/utils/config.js +13 -9
- package/es/ProEditTable/utils/index.js +3 -3
- package/es/ProEditTable/utils/tools.d.ts +2 -2
- package/es/ProEditTable/utils/tools.js +3 -3
- 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 +13 -10
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -2
- 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/lib/ProEditTable/components/RcTable/DraggableTable.js +6 -5
- package/lib/ProEditTable/index.js +5 -4
- package/lib/ProEditTable/style/index.less +1 -2
- package/lib/ProEditTable/utils/config.js +13 -9
- package/lib/ProEditTable/utils/index.js +3 -3
- package/lib/ProEditTable/utils/tools.d.ts +2 -2
- package/lib/ProEditTable/utils/tools.js +3 -3
- 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 +14 -10
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -2
- 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/package.json +1 -1
- package/.vscode/extensions.json +0 -5
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;
|
|
@@ -67,7 +67,7 @@ var Row = function Row(props) {
|
|
|
67
67
|
}));
|
|
68
68
|
};
|
|
69
69
|
var DndWrapper = function DndWrapper(_ref2) {
|
|
70
|
-
var _value
|
|
70
|
+
var _value$, _value$map;
|
|
71
71
|
var draggable = _ref2.draggable,
|
|
72
72
|
value = _ref2.value,
|
|
73
73
|
onChange = _ref2.onChange,
|
|
@@ -78,15 +78,16 @@ var DndWrapper = function DndWrapper(_ref2) {
|
|
|
78
78
|
var active = event.active,
|
|
79
79
|
over = event.over;
|
|
80
80
|
if (active.id !== (over === null || over === void 0 ? void 0 : over.id)) {
|
|
81
|
+
var _value$findIndex, _value$findIndex2;
|
|
81
82
|
if (onDrag) {
|
|
82
83
|
var nextList = onDrag(event, value);
|
|
83
84
|
onChange(nextList);
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
|
-
var activeIndex = value.findIndex(function (i) {
|
|
87
|
+
var activeIndex = value === null || value === void 0 ? void 0 : (_value$findIndex = value.findIndex) === null || _value$findIndex === void 0 ? void 0 : _value$findIndex.call(value, function (i) {
|
|
87
88
|
return i.rowKey === active.id;
|
|
88
89
|
});
|
|
89
|
-
var overIndex = value.findIndex(function (i) {
|
|
90
|
+
var overIndex = value === null || value === void 0 ? void 0 : (_value$findIndex2 = value.findIndex) === null || _value$findIndex2 === void 0 ? void 0 : _value$findIndex2.call(value, function (i) {
|
|
90
91
|
return i.rowKey === (over === null || over === void 0 ? void 0 : over.id);
|
|
91
92
|
});
|
|
92
93
|
var nextValue = arrayMove(value, activeIndex, overIndex);
|
|
@@ -96,8 +97,8 @@ var DndWrapper = function DndWrapper(_ref2) {
|
|
|
96
97
|
return draggable && !disabled ? _jsx(DndContext, {
|
|
97
98
|
onDragEnd: onDragEnd,
|
|
98
99
|
children: _jsx(SortableContext, {
|
|
99
|
-
items: (value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey) ? value.map(function (i) {
|
|
100
|
-
return i.rowKey;
|
|
100
|
+
items: (value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey) ? value === null || value === void 0 ? void 0 : (_value$map = value.map) === null || _value$map === void 0 ? void 0 : _value$map.call(value, function (i) {
|
|
101
|
+
return i === null || i === void 0 ? void 0 : i.rowKey;
|
|
101
102
|
}) : [],
|
|
102
103
|
strategy: verticalListSortingStrategy,
|
|
103
104
|
children: children
|
package/es/ProEditTable/index.js
CHANGED
|
@@ -122,10 +122,10 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
122
122
|
className: className
|
|
123
123
|
});
|
|
124
124
|
var getRowKey = function getRowKey(record) {
|
|
125
|
-
var key = record.rowKey || getRandom();
|
|
125
|
+
var key = (record === null || record === void 0 ? void 0 : record.rowKey) || getRandom();
|
|
126
126
|
if (rowKey) {
|
|
127
127
|
var _ref3;
|
|
128
|
-
key = (_ref3 = typeof rowKey === 'function' ? rowKey(record) : record[rowKey]) !== null && _ref3 !== void 0 ? _ref3 : key;
|
|
128
|
+
key = (_ref3 = typeof rowKey === 'function' ? rowKey(record) : record === null || record === void 0 ? void 0 : record[rowKey]) !== null && _ref3 !== void 0 ? _ref3 : key;
|
|
129
129
|
}
|
|
130
130
|
return key;
|
|
131
131
|
};
|
|
@@ -240,7 +240,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
240
240
|
}, resetProps);
|
|
241
241
|
// 编辑行设置下样式
|
|
242
242
|
var _rowClassName = function _rowClassName(record) {
|
|
243
|
-
var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
|
|
243
|
+
var isEdit = !virtualKey || editingKeys.includes(record === null || record === void 0 ? void 0 : record.rowKey);
|
|
244
244
|
var className = isEdit ? 'is-editing' : '';
|
|
245
245
|
if (getIsNew(record)) {
|
|
246
246
|
return "is-new-row ".concat(className);
|
|
@@ -342,7 +342,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
342
342
|
});
|
|
343
343
|
// 初始化默认生成row-key
|
|
344
344
|
if ((value === null || value === void 0 ? void 0 : value.length) && (!isAllHasKey || isNeedCover)) {
|
|
345
|
-
var
|
|
345
|
+
var _value$map;
|
|
346
|
+
var nextValues = value === null || value === void 0 ? void 0 : (_value$map = value.map) === null || _value$map === void 0 ? void 0 : _value$map.call(value, function (item) {
|
|
346
347
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
347
348
|
rowKey: getRowKey(item)
|
|
348
349
|
});
|
|
@@ -50,7 +50,7 @@ export var actions = {
|
|
|
50
50
|
}
|
|
51
51
|
var nextEditingKeys = _toConsumableArray(editingKeys);
|
|
52
52
|
// 开启编辑状态
|
|
53
|
-
nextEditingKeys.push(record.rowKey);
|
|
53
|
+
nextEditingKeys.push(record === null || record === void 0 ? void 0 : record.rowKey);
|
|
54
54
|
// 编辑时赋值编辑状态,供validator做保存校验
|
|
55
55
|
if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
|
|
56
56
|
record.isEditing = true;
|
|
@@ -65,6 +65,7 @@ export var actions = {
|
|
|
65
65
|
},
|
|
66
66
|
save: function () {
|
|
67
67
|
var _save = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
|
|
68
|
+
var _editingKeys$filter;
|
|
68
69
|
var record, editingKeys, setState, form, rowName, virtualRowName, result, updateData, nextEditingKeys, values;
|
|
69
70
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
70
71
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -75,8 +76,9 @@ export var actions = {
|
|
|
75
76
|
record = _objectSpread(_objectSpread(_objectSpread({}, record), form.getFieldValue(virtualRowName)), updateData);
|
|
76
77
|
delete record.addFlag; // 删除第一次新增的标记
|
|
77
78
|
// 关闭当前保存行的编辑状态
|
|
78
|
-
nextEditingKeys = editingKeys.filter(function (key) {
|
|
79
|
-
|
|
79
|
+
nextEditingKeys = editingKeys === null || editingKeys === void 0 ? void 0 : (_editingKeys$filter = editingKeys.filter) === null || _editingKeys$filter === void 0 ? void 0 : _editingKeys$filter.call(editingKeys, function (key) {
|
|
80
|
+
var _record;
|
|
81
|
+
return key !== ((_record = record) === null || _record === void 0 ? void 0 : _record.rowKey);
|
|
80
82
|
}); // 保存后取消编辑状态,供validator做保存校验
|
|
81
83
|
if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
|
|
82
84
|
record.isEditing = true;
|
|
@@ -102,6 +104,7 @@ export var actions = {
|
|
|
102
104
|
return save;
|
|
103
105
|
}(),
|
|
104
106
|
cancel: function cancel(_ref3) {
|
|
107
|
+
var _editingKeys$filter2;
|
|
105
108
|
var name = _ref3.name,
|
|
106
109
|
record = _ref3.record,
|
|
107
110
|
editingKeys = _ref3.editingKeys,
|
|
@@ -109,8 +112,8 @@ export var actions = {
|
|
|
109
112
|
form = _ref3.form,
|
|
110
113
|
virtualRowName = _ref3.virtualRowName,
|
|
111
114
|
virtualKey = _ref3.virtualKey;
|
|
112
|
-
var nextEditingKeys = editingKeys.filter(function (key) {
|
|
113
|
-
return key !== record.rowKey;
|
|
115
|
+
var nextEditingKeys = editingKeys === null || editingKeys === void 0 ? void 0 : (_editingKeys$filter2 = editingKeys.filter) === null || _editingKeys$filter2 === void 0 ? void 0 : _editingKeys$filter2.call(editingKeys, function (key) {
|
|
116
|
+
return key !== (record === null || record === void 0 ? void 0 : record.rowKey);
|
|
114
117
|
});
|
|
115
118
|
// 保存后取消编辑状态,供validator做保存校验
|
|
116
119
|
if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
|
|
@@ -127,7 +130,7 @@ export var actions = {
|
|
|
127
130
|
name: name,
|
|
128
131
|
form: form,
|
|
129
132
|
virtualKey: virtualKey,
|
|
130
|
-
selectedRowKeys: [record.rowKey]
|
|
133
|
+
selectedRowKeys: [record === null || record === void 0 ? void 0 : record.rowKey]
|
|
131
134
|
});
|
|
132
135
|
} else {
|
|
133
136
|
// 防止value引用不变, 值不更新 - (自定义组件)
|
|
@@ -154,12 +157,13 @@ export var actions = {
|
|
|
154
157
|
name: name,
|
|
155
158
|
form: form,
|
|
156
159
|
virtualKey: virtualKey,
|
|
157
|
-
selectedRowKeys: [record.rowKey]
|
|
160
|
+
selectedRowKeys: [record === null || record === void 0 ? void 0 : record.rowKey]
|
|
158
161
|
});
|
|
159
162
|
if (virtualKey) {
|
|
163
|
+
var _editingKeys$filter3;
|
|
160
164
|
// 关闭编辑状态
|
|
161
|
-
var nextEditingKeys = editingKeys.filter(function (key) {
|
|
162
|
-
return key === record.rowKey;
|
|
165
|
+
var nextEditingKeys = editingKeys === null || editingKeys === void 0 ? void 0 : (_editingKeys$filter3 = editingKeys.filter) === null || _editingKeys$filter3 === void 0 ? void 0 : _editingKeys$filter3.call(editingKeys, function (key) {
|
|
166
|
+
return key === (record === null || record === void 0 ? void 0 : record.rowKey);
|
|
163
167
|
});
|
|
164
168
|
setState({
|
|
165
169
|
editingKeys: nextEditingKeys
|
|
@@ -174,7 +174,7 @@ var getActionColumn = function getActionColumn(config) {
|
|
|
174
174
|
config: config,
|
|
175
175
|
btnConfig: btnConfig
|
|
176
176
|
}))
|
|
177
|
-
}, "".concat(record.rowKey, "-").concat(btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.type));
|
|
177
|
+
}, "".concat(record === null || record === void 0 ? void 0 : record.rowKey, "-").concat(btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.type));
|
|
178
178
|
})
|
|
179
179
|
});
|
|
180
180
|
}
|
|
@@ -277,9 +277,9 @@ export var transformColumns = function transformColumns() {
|
|
|
277
277
|
item.className = _toConsumableArray(new Set(item.className.split(' '))).join(' ');
|
|
278
278
|
}
|
|
279
279
|
var _render = function _render(text, record, index) {
|
|
280
|
-
var isEditing = !virtualKey || editingKeys.includes(record.rowKey) || record.addFlag;
|
|
280
|
+
var isEditing = !virtualKey || editingKeys.includes(record === null || record === void 0 ? void 0 : record.rowKey) || record.addFlag;
|
|
281
281
|
var namePath = isArray(name) ? name : [name];
|
|
282
|
-
if (virtualKey && editingKeys.includes(record.rowKey)) {
|
|
282
|
+
if (virtualKey && editingKeys.includes(record === null || record === void 0 ? void 0 : record.rowKey)) {
|
|
283
283
|
namePath = getNamePath(name, virtualKey);
|
|
284
284
|
}
|
|
285
285
|
var columnNamePath = isArray(columnName) ? columnName : [columnName];
|
|
@@ -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,7 @@ export declare const handleScrollToError: () => void;
|
|
|
35
35
|
* @returns 深拷贝后的对象,其中的React节点会被保留
|
|
36
36
|
*/
|
|
37
37
|
export declare function cloneDeepFilterNode(value: any): any;
|
|
38
|
-
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState
|
|
38
|
+
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState }: {
|
|
39
39
|
form: any;
|
|
40
40
|
name: any;
|
|
41
41
|
value: any;
|
|
@@ -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;
|
|
@@ -65,7 +65,7 @@ export var onDelete = function onDelete(_ref) {
|
|
|
65
65
|
// 正常的form数据流处理
|
|
66
66
|
var dataSource = form.getFieldValue(name);
|
|
67
67
|
dataSource = dataSource.filter(function (row) {
|
|
68
|
-
return !selectedRowKeys.includes(row.rowKey);
|
|
68
|
+
return !selectedRowKeys.includes(row === null || row === void 0 ? void 0 : row.rowKey);
|
|
69
69
|
});
|
|
70
70
|
form.setFieldValue(name, dataSource);
|
|
71
71
|
// 单行模式数据流处理 重置中间正在编辑状态单行数据
|
|
@@ -75,7 +75,7 @@ export var onDelete = function onDelete(_ref) {
|
|
|
75
75
|
var virtualList = form.getFieldValue(namePath);
|
|
76
76
|
if ((_virtualList = virtualList) === null || _virtualList === void 0 ? void 0 : _virtualList.length) {
|
|
77
77
|
virtualList = virtualList.filter(function (row) {
|
|
78
|
-
return !selectedRowKeys.includes(row.rowKey);
|
|
78
|
+
return !selectedRowKeys.includes(row === null || row === void 0 ? void 0 : row.rowKey);
|
|
79
79
|
});
|
|
80
80
|
form.setFieldValue(namePath, virtualList);
|
|
81
81
|
}
|
|
@@ -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: 300,
|
|
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
|
-
registerMap = _useStep.registerMap;
|
|
26
|
+
globalLazyLoad = _useStep.lazyLoad;
|
|
29
27
|
var lazyLoad = stepLazyLoad || globalLazyLoad;
|
|
30
|
-
var loadedMap = getLoadedMap(registerMap);
|
|
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,14 @@ 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
|
+
forceCheck();
|
|
64
|
+
}
|
|
65
|
+
// 默认执行
|
|
66
|
+
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
|
67
|
+
},
|
|
65
68
|
children: renderChildren()
|
|
66
69
|
}))
|
|
67
70
|
});
|
|
@@ -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
|
|
@@ -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
|
|
@@ -74,7 +74,7 @@ var Row = function Row(props) {
|
|
|
74
74
|
}));
|
|
75
75
|
};
|
|
76
76
|
var DndWrapper = function DndWrapper(_ref2) {
|
|
77
|
-
var _value
|
|
77
|
+
var _value$, _value$map;
|
|
78
78
|
var draggable = _ref2.draggable,
|
|
79
79
|
value = _ref2.value,
|
|
80
80
|
onChange = _ref2.onChange,
|
|
@@ -85,15 +85,16 @@ var DndWrapper = function DndWrapper(_ref2) {
|
|
|
85
85
|
var active = event.active,
|
|
86
86
|
over = event.over;
|
|
87
87
|
if (active.id !== (over === null || over === void 0 ? void 0 : over.id)) {
|
|
88
|
+
var _value$findIndex, _value$findIndex2;
|
|
88
89
|
if (onDrag) {
|
|
89
90
|
var nextList = onDrag(event, value);
|
|
90
91
|
onChange(nextList);
|
|
91
92
|
return;
|
|
92
93
|
}
|
|
93
|
-
var activeIndex = value.findIndex(function (i) {
|
|
94
|
+
var activeIndex = value === null || value === void 0 ? void 0 : (_value$findIndex = value.findIndex) === null || _value$findIndex === void 0 ? void 0 : _value$findIndex.call(value, function (i) {
|
|
94
95
|
return i.rowKey === active.id;
|
|
95
96
|
});
|
|
96
|
-
var overIndex = value.findIndex(function (i) {
|
|
97
|
+
var overIndex = value === null || value === void 0 ? void 0 : (_value$findIndex2 = value.findIndex) === null || _value$findIndex2 === void 0 ? void 0 : _value$findIndex2.call(value, function (i) {
|
|
97
98
|
return i.rowKey === (over === null || over === void 0 ? void 0 : over.id);
|
|
98
99
|
});
|
|
99
100
|
var nextValue = (0, _sortable.arrayMove)(value, activeIndex, overIndex);
|
|
@@ -103,8 +104,8 @@ var DndWrapper = function DndWrapper(_ref2) {
|
|
|
103
104
|
return draggable && !disabled ? (0, _jsxRuntime.jsx)(_core.DndContext, {
|
|
104
105
|
onDragEnd: onDragEnd,
|
|
105
106
|
children: (0, _jsxRuntime.jsx)(_sortable.SortableContext, {
|
|
106
|
-
items: (value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey) ? value.map(function (i) {
|
|
107
|
-
return i.rowKey;
|
|
107
|
+
items: (value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey) ? value === null || value === void 0 ? void 0 : (_value$map = value.map) === null || _value$map === void 0 ? void 0 : _value$map.call(value, function (i) {
|
|
108
|
+
return i === null || i === void 0 ? void 0 : i.rowKey;
|
|
108
109
|
}) : [],
|
|
109
110
|
strategy: _sortable.verticalListSortingStrategy,
|
|
110
111
|
children: children
|
|
@@ -125,10 +125,10 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
125
125
|
className: className
|
|
126
126
|
});
|
|
127
127
|
var getRowKey = function getRowKey(record) {
|
|
128
|
-
var key = record.rowKey || (0, _tools.getRandom)();
|
|
128
|
+
var key = (record === null || record === void 0 ? void 0 : record.rowKey) || (0, _tools.getRandom)();
|
|
129
129
|
if (rowKey) {
|
|
130
130
|
var _ref3;
|
|
131
|
-
key = (_ref3 = typeof rowKey === 'function' ? rowKey(record) : record[rowKey]) !== null && _ref3 !== void 0 ? _ref3 : key;
|
|
131
|
+
key = (_ref3 = typeof rowKey === 'function' ? rowKey(record) : record === null || record === void 0 ? void 0 : record[rowKey]) !== null && _ref3 !== void 0 ? _ref3 : key;
|
|
132
132
|
}
|
|
133
133
|
return key;
|
|
134
134
|
};
|
|
@@ -243,7 +243,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
243
243
|
}, resetProps);
|
|
244
244
|
// 编辑行设置下样式
|
|
245
245
|
var _rowClassName = function _rowClassName(record) {
|
|
246
|
-
var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
|
|
246
|
+
var isEdit = !virtualKey || editingKeys.includes(record === null || record === void 0 ? void 0 : record.rowKey);
|
|
247
247
|
var className = isEdit ? 'is-editing' : '';
|
|
248
248
|
if (getIsNew(record)) {
|
|
249
249
|
return "is-new-row ".concat(className);
|
|
@@ -345,7 +345,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
345
345
|
});
|
|
346
346
|
// 初始化默认生成row-key
|
|
347
347
|
if ((value === null || value === void 0 ? void 0 : value.length) && (!isAllHasKey || isNeedCover)) {
|
|
348
|
-
var
|
|
348
|
+
var _value$map;
|
|
349
|
+
var nextValues = value === null || value === void 0 ? void 0 : (_value$map = value.map) === null || _value$map === void 0 ? void 0 : _value$map.call(value, function (item) {
|
|
349
350
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
350
351
|
rowKey: getRowKey(item)
|
|
351
352
|
});
|
|
@@ -56,7 +56,7 @@ var actions = exports.actions = {
|
|
|
56
56
|
}
|
|
57
57
|
var nextEditingKeys = (0, _toConsumableArray2.default)(editingKeys);
|
|
58
58
|
// 开启编辑状态
|
|
59
|
-
nextEditingKeys.push(record.rowKey);
|
|
59
|
+
nextEditingKeys.push(record === null || record === void 0 ? void 0 : record.rowKey);
|
|
60
60
|
// 编辑时赋值编辑状态,供validator做保存校验
|
|
61
61
|
if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
|
|
62
62
|
record.isEditing = true;
|
|
@@ -71,6 +71,7 @@ var actions = exports.actions = {
|
|
|
71
71
|
},
|
|
72
72
|
save: function () {
|
|
73
73
|
var _save = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(_ref2) {
|
|
74
|
+
var _editingKeys$filter;
|
|
74
75
|
var record, editingKeys, setState, form, rowName, virtualRowName, result, updateData, nextEditingKeys, values;
|
|
75
76
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
76
77
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -81,8 +82,9 @@ var actions = exports.actions = {
|
|
|
81
82
|
record = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, record), form.getFieldValue(virtualRowName)), updateData);
|
|
82
83
|
delete record.addFlag; // 删除第一次新增的标记
|
|
83
84
|
// 关闭当前保存行的编辑状态
|
|
84
|
-
nextEditingKeys = editingKeys.filter(function (key) {
|
|
85
|
-
|
|
85
|
+
nextEditingKeys = editingKeys === null || editingKeys === void 0 ? void 0 : (_editingKeys$filter = editingKeys.filter) === null || _editingKeys$filter === void 0 ? void 0 : _editingKeys$filter.call(editingKeys, function (key) {
|
|
86
|
+
var _record;
|
|
87
|
+
return key !== ((_record = record) === null || _record === void 0 ? void 0 : _record.rowKey);
|
|
86
88
|
}); // 保存后取消编辑状态,供validator做保存校验
|
|
87
89
|
if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
|
|
88
90
|
record.isEditing = true;
|
|
@@ -108,6 +110,7 @@ var actions = exports.actions = {
|
|
|
108
110
|
return save;
|
|
109
111
|
}(),
|
|
110
112
|
cancel: function cancel(_ref3) {
|
|
113
|
+
var _editingKeys$filter2;
|
|
111
114
|
var name = _ref3.name,
|
|
112
115
|
record = _ref3.record,
|
|
113
116
|
editingKeys = _ref3.editingKeys,
|
|
@@ -115,8 +118,8 @@ var actions = exports.actions = {
|
|
|
115
118
|
form = _ref3.form,
|
|
116
119
|
virtualRowName = _ref3.virtualRowName,
|
|
117
120
|
virtualKey = _ref3.virtualKey;
|
|
118
|
-
var nextEditingKeys = editingKeys.filter(function (key) {
|
|
119
|
-
return key !== record.rowKey;
|
|
121
|
+
var nextEditingKeys = editingKeys === null || editingKeys === void 0 ? void 0 : (_editingKeys$filter2 = editingKeys.filter) === null || _editingKeys$filter2 === void 0 ? void 0 : _editingKeys$filter2.call(editingKeys, function (key) {
|
|
122
|
+
return key !== (record === null || record === void 0 ? void 0 : record.rowKey);
|
|
120
123
|
});
|
|
121
124
|
// 保存后取消编辑状态,供validator做保存校验
|
|
122
125
|
if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
|
|
@@ -133,7 +136,7 @@ var actions = exports.actions = {
|
|
|
133
136
|
name: name,
|
|
134
137
|
form: form,
|
|
135
138
|
virtualKey: virtualKey,
|
|
136
|
-
selectedRowKeys: [record.rowKey]
|
|
139
|
+
selectedRowKeys: [record === null || record === void 0 ? void 0 : record.rowKey]
|
|
137
140
|
});
|
|
138
141
|
} else {
|
|
139
142
|
// 防止value引用不变, 值不更新 - (自定义组件)
|
|
@@ -160,12 +163,13 @@ var actions = exports.actions = {
|
|
|
160
163
|
name: name,
|
|
161
164
|
form: form,
|
|
162
165
|
virtualKey: virtualKey,
|
|
163
|
-
selectedRowKeys: [record.rowKey]
|
|
166
|
+
selectedRowKeys: [record === null || record === void 0 ? void 0 : record.rowKey]
|
|
164
167
|
});
|
|
165
168
|
if (virtualKey) {
|
|
169
|
+
var _editingKeys$filter3;
|
|
166
170
|
// 关闭编辑状态
|
|
167
|
-
var nextEditingKeys = editingKeys.filter(function (key) {
|
|
168
|
-
return key === record.rowKey;
|
|
171
|
+
var nextEditingKeys = editingKeys === null || editingKeys === void 0 ? void 0 : (_editingKeys$filter3 = editingKeys.filter) === null || _editingKeys$filter3 === void 0 ? void 0 : _editingKeys$filter3.call(editingKeys, function (key) {
|
|
172
|
+
return key === (record === null || record === void 0 ? void 0 : record.rowKey);
|
|
169
173
|
});
|
|
170
174
|
setState({
|
|
171
175
|
editingKeys: nextEditingKeys
|
|
@@ -178,7 +178,7 @@ var getActionColumn = function getActionColumn(config) {
|
|
|
178
178
|
config: config,
|
|
179
179
|
btnConfig: btnConfig
|
|
180
180
|
}))
|
|
181
|
-
}, "".concat(record.rowKey, "-").concat(btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.type));
|
|
181
|
+
}, "".concat(record === null || record === void 0 ? void 0 : record.rowKey, "-").concat(btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.type));
|
|
182
182
|
})
|
|
183
183
|
});
|
|
184
184
|
}
|
|
@@ -281,9 +281,9 @@ var transformColumns = exports.transformColumns = function transformColumns() {
|
|
|
281
281
|
item.className = (0, _toConsumableArray2.default)(new Set(item.className.split(' '))).join(' ');
|
|
282
282
|
}
|
|
283
283
|
var _render = function _render(text, record, index) {
|
|
284
|
-
var isEditing = !virtualKey || editingKeys.includes(record.rowKey) || record.addFlag;
|
|
284
|
+
var isEditing = !virtualKey || editingKeys.includes(record === null || record === void 0 ? void 0 : record.rowKey) || record.addFlag;
|
|
285
285
|
var namePath = (0, _lodash.isArray)(name) ? name : [name];
|
|
286
|
-
if (virtualKey && editingKeys.includes(record.rowKey)) {
|
|
286
|
+
if (virtualKey && editingKeys.includes(record === null || record === void 0 ? void 0 : record.rowKey)) {
|
|
287
287
|
namePath = (0, _tools.getNamePath)(name, virtualKey);
|
|
288
288
|
}
|
|
289
289
|
var columnNamePath = (0, _lodash.isArray)(columnName) ? columnName : [columnName];
|
|
@@ -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,7 @@ export declare const handleScrollToError: () => void;
|
|
|
35
35
|
* @returns 深拷贝后的对象,其中的React节点会被保留
|
|
36
36
|
*/
|
|
37
37
|
export declare function cloneDeepFilterNode(value: any): any;
|
|
38
|
-
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState
|
|
38
|
+
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState }: {
|
|
39
39
|
form: any;
|
|
40
40
|
name: any;
|
|
41
41
|
value: any;
|
|
@@ -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;
|
|
@@ -74,7 +74,7 @@ var onDelete = exports.onDelete = function onDelete(_ref) {
|
|
|
74
74
|
// 正常的form数据流处理
|
|
75
75
|
var dataSource = form.getFieldValue(name);
|
|
76
76
|
dataSource = dataSource.filter(function (row) {
|
|
77
|
-
return !selectedRowKeys.includes(row.rowKey);
|
|
77
|
+
return !selectedRowKeys.includes(row === null || row === void 0 ? void 0 : row.rowKey);
|
|
78
78
|
});
|
|
79
79
|
form.setFieldValue(name, dataSource);
|
|
80
80
|
// 单行模式数据流处理 重置中间正在编辑状态单行数据
|
|
@@ -84,7 +84,7 @@ var onDelete = exports.onDelete = function onDelete(_ref) {
|
|
|
84
84
|
var virtualList = form.getFieldValue(namePath);
|
|
85
85
|
if ((_virtualList = virtualList) === null || _virtualList === void 0 ? void 0 : _virtualList.length) {
|
|
86
86
|
virtualList = virtualList.filter(function (row) {
|
|
87
|
-
return !selectedRowKeys.includes(row.rowKey);
|
|
87
|
+
return !selectedRowKeys.includes(row === null || row === void 0 ? void 0 : row.rowKey);
|
|
88
88
|
});
|
|
89
89
|
form.setFieldValue(namePath, virtualList);
|
|
90
90
|
}
|
|
@@ -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: 300,
|
|
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
|
-
registerMap = _useStep.registerMap;
|
|
34
|
+
globalLazyLoad = _useStep.lazyLoad;
|
|
36
35
|
var lazyLoad = stepLazyLoad || globalLazyLoad;
|
|
37
|
-
var loadedMap = (0, _utils.getLoadedMap)(registerMap);
|
|
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,14 @@ 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
|
+
(0, _reactLazyload.forceCheck)();
|
|
72
|
+
}
|
|
73
|
+
// 默认执行
|
|
74
|
+
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
|
75
|
+
},
|
|
72
76
|
children: renderChildren()
|
|
73
77
|
}))
|
|
74
78
|
});
|
|
@@ -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
|
|
@@ -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
|
package/package.json
CHANGED