张延森 3 år sedan
förälder
incheckning
819839b909
3 ändrade filer med 15 tillägg och 11 borttagningar
  1. 3
    3
      src/components/PageTransition/style.less
  2. 6
    3
      src/layouts/BasicLayout.jsx
  3. 6
    5
      src/layouts/BlankLayout.jsx

+ 3
- 3
src/components/PageTransition/style.less Visa fil

@@ -1,7 +1,7 @@
1 1
 
2 2
 .page-fade-enter {
3 3
   opacity: 0;
4
-  transform: translateY(20%);
4
+  transform: translateY(10%);
5 5
 }
6 6
 .page-fade-enter-active {
7 7
   opacity: 1;
@@ -13,9 +13,9 @@
13 13
 }
14 14
 .page-fade-exit-active {
15 15
   opacity: 0;
16
-  transform: translateY(20%);
16
+  transform: translateY(10%);
17 17
 }
18 18
 .page-fade-enter-active,
19 19
 .page-fade-exit-active {
20
-  transition: opacity 500ms, transform 500ms;
20
+  transition: opacity 450ms, transform 450ms;
21 21
 }

+ 6
- 3
src/layouts/BasicLayout.jsx Visa fil

@@ -12,6 +12,7 @@ import { formatMessage } from 'umi-plugin-react/locale';
12 12
 import Authorized from '@/utils/Authorized';
13 13
 import GlobalHeader from '@/components/GlobalHeader';
14 14
 import GlobalFooter from '@/components/GlobalFooter';
15
+import PageTransition from '@/components/PageTransition';
15 16
 import { isAntDesignPro, getAuthorityFromRouter } from '@/utils/utils';
16 17
 import logo from '../assets/logo.svg';
17 18
 const noMatch = (
@@ -119,9 +120,11 @@ const BasicLayout = (props) => {
119 120
       {...props}
120 121
       {...settings}
121 122
     >
122
-      <Authorized authority={authorized.authority} noMatch={noMatch}>
123
-        {children}
124
-      </Authorized>
123
+      <PageTransition>
124
+        <Authorized authority={authorized.authority} noMatch={noMatch}>
125
+          {children}
126
+        </Authorized>
127
+      </PageTransition>
125 128
     </ProLayout>
126 129
   );
127 130
 };

+ 6
- 5
src/layouts/BlankLayout.jsx Visa fil

@@ -2,11 +2,12 @@ import React from 'react';
2 2
 import PageTransition from '@/components/PageTransition';
3 3
 
4 4
 const Layout = (props) => {
5
-  return (
6
-    <PageTransition>
7
-      {props.children}
8
-    </PageTransition>
9
-  );
5
+  return props.children;
6
+  // return (
7
+  //   <PageTransition>
8
+  //     {props.children}
9
+  //   </PageTransition>
10
+  // );
10 11
 };
11 12
 
12 13
 export default Layout;