ronds-metadata 1.2.56 → 1.2.57
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,10 +2,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import "antd/es/form/style";
|
3
3
|
import _Form from "antd/es/form";
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
6
|
+
var _excluded = ["record", "index", "className"];
|
5
7
|
/*
|
6
8
|
* @Author: wangxian
|
7
9
|
* @Date: 2022-03-04 10:01:10
|
8
|
-
* @LastEditTime: 2023-
|
10
|
+
* @LastEditTime: 2023-05-24 09:07:32
|
9
11
|
*/
|
10
12
|
import React from 'react';
|
11
13
|
import { useDrag, useDrop } from 'react-dnd';
|
@@ -14,7 +16,7 @@ var EditableRow = function EditableRow(props) {
|
|
14
16
|
var record = props.record,
|
15
17
|
index = props.index,
|
16
18
|
className = props.className,
|
17
|
-
|
19
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
18
20
|
var _Form$useForm = _Form.useForm(),
|
19
21
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
20
22
|
form = _Form$useForm2[0];
|
@@ -30,7 +32,7 @@ var EditableRow = function EditableRow(props) {
|
|
30
32
|
collect: function collect(monitor) {
|
31
33
|
var _ref2 = monitor.getItem() || {},
|
32
34
|
dragIndex = _ref2.index;
|
33
|
-
if (dragIndex === index || !onMove) {
|
35
|
+
if (dragIndex === index || !(restProps === null || restProps === void 0 ? void 0 : restProps.onMove)) {
|
34
36
|
return {};
|
35
37
|
}
|
36
38
|
return {
|
@@ -39,10 +41,10 @@ var EditableRow = function EditableRow(props) {
|
|
39
41
|
};
|
40
42
|
},
|
41
43
|
drop: function drop(item, monitor) {
|
42
|
-
onMove && onMove({
|
44
|
+
(restProps === null || restProps === void 0 ? void 0 : restProps.onMove) && (restProps === null || restProps === void 0 ? void 0 : restProps.onMove({
|
43
45
|
dragIndex: item.index,
|
44
46
|
hoverIndex: index
|
45
|
-
});
|
47
|
+
}));
|
46
48
|
}
|
47
49
|
}),
|
48
50
|
_useDrop2 = _slicedToArray(_useDrop, 2),
|
@@ -67,7 +69,7 @@ var EditableRow = function EditableRow(props) {
|
|
67
69
|
}),
|
68
70
|
_useDrag2 = _slicedToArray(_useDrag, 2),
|
69
71
|
drag = _useDrag2[1];
|
70
|
-
onMove && drop(drag(ref));
|
72
|
+
(restProps === null || restProps === void 0 ? void 0 : restProps.onMove) && drop(drag(ref));
|
71
73
|
var onValuesChange = function onValuesChange(values, allValues) {
|
72
74
|
if (editableStream) {
|
73
75
|
editableStream.next({
|
@@ -37,7 +37,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
37
37
|
/*
|
38
38
|
* @Author:wangxian
|
39
39
|
* @Date: 2021-09-18 14:15:04
|
40
|
-
* @LastEditTime: 2023-05-
|
40
|
+
* @LastEditTime: 2023-05-24 09:08:30
|
41
41
|
*/
|
42
42
|
import React from 'react';
|
43
43
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
@@ -91,7 +91,7 @@ function Index(props) {
|
|
91
91
|
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
92
92
|
expandedKeys = _React$useState12[0],
|
93
93
|
setExpandedKeys = _React$useState12[1];
|
94
|
-
var firstLoadTreeSelectRef = React.useRef(
|
94
|
+
var firstLoadTreeSelectRef = React.useRef(true);
|
95
95
|
var pageRef = React.useRef(1);
|
96
96
|
var totalRef = React.useRef();
|
97
97
|
var onSelect = function onSelect(value) {
|