@zat-design/sisyphus-react 4.3.6 → 4.4.1-beta.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 -1
- package/dist/less.esm.css +1 -1
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +0 -2
- package/es/ProEditTable/style/index.less +9 -1
- package/es/ProEditTable/utils/index.js +1 -0
- package/es/ProForm/components/combination/Group/utils/index.d.ts +23 -23
- 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
|
@@ -30,6 +30,20 @@
|
|
|
30
30
|
* @description ProLayout 标签页实例接口(类似 FormInstance)
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @description iframe 路由表配置项
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @description iframe 嵌入配置
|
|
39
|
+
*
|
|
40
|
+
* **触发条件**:URL query 上带 `?isIframe`(大小写不敏感,值不限,只看 key 是否存在)。
|
|
41
|
+
* 第三方系统通过在 iframe src 上拼 `?isIframe=1` 来触发组件库的嵌入模式。
|
|
42
|
+
*
|
|
43
|
+
* 未带该 query 时(独立访问),即使配置了 `tabs.iframe`,组件库也完全不读取,
|
|
44
|
+
* 维持完整 Layout 渲染。
|
|
45
|
+
*/
|
|
46
|
+
|
|
33
47
|
export const isTabsMode = props => props.mode === 'tabs';
|
|
34
48
|
export const validateTabsProps = (mode = 'normal', tabs) => {
|
|
35
49
|
if (mode === 'tabs' && !tabs) {
|
package/es/utils/index.d.ts
CHANGED
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
|
};
|