ztxkui 4.3.38 → 4.3.39
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.
|
@@ -12,6 +12,7 @@ function useDropRef(index, moverow) {
|
|
|
12
12
|
collect: function (monitor) { return ({
|
|
13
13
|
isDragging: monitor.isDragging(),
|
|
14
14
|
}); },
|
|
15
|
+
canDrag: function (monitor) { var _a; return !((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName.toLowerCase().match(/input|textarea/)); },
|
|
15
16
|
}); }, [index]), drag = _a[1];
|
|
16
17
|
/**
|
|
17
18
|
* @description 定义可放置项
|
|
@@ -44,7 +45,8 @@ function useDropRef(index, moverow) {
|
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
47
|
return {
|
|
47
|
-
ref
|
|
48
|
+
// ref 不能给null值 某些场景下会报错
|
|
49
|
+
ref: ref,
|
|
48
50
|
isOver: null,
|
|
49
51
|
dropClassName: null,
|
|
50
52
|
};
|
|
@@ -29,6 +29,6 @@ var TableEnhanceRow = function (props) {
|
|
|
29
29
|
var tempProps = useMemo(function () {
|
|
30
30
|
return __assign({ ref: ref, className: "" + className + (isOver ? dropClassName : ''), style: memoStyle }, restProps);
|
|
31
31
|
}, [className, dropClassName, restProps, memoStyle, isOver, ref]);
|
|
32
|
-
return vRow
|
|
32
|
+
return vRow ? (vRow(tempProps, ref)) : (React.createElement("tr", __assign({ ref: ref, className: "" + className + (isOver ? dropClassName : ''), style: memoStyle }, restProps)));
|
|
33
33
|
};
|
|
34
34
|
export default memo(TableEnhanceRow);
|