@zat-design/sisyphus-react 4.3.6 → 4.4.0
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 -1
- package/dist/less.esm.css +1 -1
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +0 -2
- package/es/ProForm/components/combination/Group/utils/index.d.ts +19 -19
- package/es/ProForm/utils/index.d.ts +0 -6
- package/es/ProForm/utils/index.js +0 -47
- package/es/ProLayout/components/TabsManager/hooks/useIframeRoute.d.ts +25 -0
- package/es/ProLayout/components/TabsManager/hooks/useIframeRoute.js +63 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +11 -6
- package/es/ProLayout/components/TabsManager/index.js +56 -5
- package/es/ProLayout/components/TabsManager/propTypes.d.ts +4 -0
- package/es/ProLayout/components/TabsManager/utils/index.d.ts +0 -8
- package/es/ProLayout/components/TabsManager/utils/index.js +0 -26
- package/es/ProLayout/index.js +15 -1
- package/es/ProLayout/propTypes.d.ts +56 -0
- package/es/ProLayout/propTypes.js +14 -0
- package/es/ProLayout/style/index.less +5 -0
- package/es/utils/index.d.ts +0 -1
- package/es/utils/index.js +1 -22
- package/package.json +1 -1
package/es/utils/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _isFunction from "lodash/isFunction";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
const EMPTY_VALUE = [undefined, null, ''];
|
|
4
4
|
|
|
5
5
|
// 自定义深比对 如果两边都是函数类型则认为相等
|
|
@@ -70,25 +70,4 @@ export const isEllipsisActive = element => {
|
|
|
70
70
|
}
|
|
71
71
|
// 多行情况下,判断高度是否足够
|
|
72
72
|
return element.scrollHeight > element.clientHeight;
|
|
73
|
-
};
|
|
74
|
-
export const useFocus = element => {
|
|
75
|
-
const [focus, setFocus] = useState(false);
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
if (!element) return;
|
|
78
|
-
element.addEventListener('focus', () => {
|
|
79
|
-
setFocus(true);
|
|
80
|
-
}, true);
|
|
81
|
-
element.addEventListener('blur', () => {
|
|
82
|
-
setFocus(false);
|
|
83
|
-
}, true);
|
|
84
|
-
return () => {
|
|
85
|
-
element.removeEventListener('focus', () => {
|
|
86
|
-
setFocus(true);
|
|
87
|
-
}, true);
|
|
88
|
-
element.removeEventListener('blur', () => {
|
|
89
|
-
setFocus(false);
|
|
90
|
-
}, true);
|
|
91
|
-
};
|
|
92
|
-
}, [element]);
|
|
93
|
-
return focus;
|
|
94
73
|
};
|