@aks-dev/easyui 1.0.130 → 1.0.131
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-05-17 15:22:06
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-12-
|
|
5
|
+
* @LastEditTime: 2022-12-22 11:06:15
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/lib/AnimationModal/AnimationModal.tsx
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -46,13 +46,15 @@ export const AnimationModal: React.ForwardRefExoticComponent<
|
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
const layoutRef = React.useRef<{
|
|
52
|
+
/**:父容器的高度 */
|
|
53
|
+
h0: number;
|
|
54
|
+
/**:子容器的高度 */
|
|
55
|
+
h1: number;
|
|
56
|
+
}>({ h0: 0, h1: 0 })
|
|
57
|
+
|
|
56
58
|
|
|
57
59
|
React.useImperativeHandle<unknown, AnimationModalProps.RefAttributes>(ref, () => ({
|
|
58
60
|
show,
|
|
@@ -61,7 +63,8 @@ export const AnimationModal: React.ForwardRefExoticComponent<
|
|
|
61
63
|
}), [])
|
|
62
64
|
const targetRef = React.useRef<any>()
|
|
63
65
|
|
|
64
|
-
const show = async () => {
|
|
66
|
+
const show = async (target?: any) => {
|
|
67
|
+
targetRef.current = target
|
|
65
68
|
dispatch({ display: 'flex' })
|
|
66
69
|
await utils.sleep(50)
|
|
67
70
|
timing(-layoutRef.current?.h1)
|