Yansen vor 2 Jahren
Ursprung
Commit
68760a15a9

+ 77
- 5
src/index.less Datei anzeigen

@@ -4,6 +4,74 @@ html, body, #root {
4 4
   margin: 0;
5 5
 }
6 6
 
7
+body {
8
+  background-color: #F5F8FF;
9
+
10
+  &::before {
11
+    content: '';
12
+    position: absolute;
13
+    width: 300px;
14
+    height: 300px;
15
+    border-radius: 50%;
16
+    background-image: linear-gradient(135deg, #EBF2FF, #C3DAFB);
17
+    left: 0;
18
+    top: 0;
19
+    animation: toright 40s linear infinite alternate;
20
+  }
21
+
22
+  @keyframes toright {
23
+    0% {
24
+      transform: translate3d(0, 0, 0);
25
+    }
26
+
27
+    50% {
28
+      transform: translate3d(calc(100vw - 300px), 30vh, 0);
29
+    }
30
+
31
+    100% {
32
+      transform: translate3d(50vw, calc(100vh - 300px), 0);
33
+    }
34
+  }
35
+  
36
+  &::after {
37
+    content: '';
38
+    position: absolute;
39
+    width: 200px;
40
+    height: 200px;
41
+    border-radius: 50%;
42
+    background-image: linear-gradient(-45deg, #EBF2FF, #C3DAFB);
43
+    right: 0;
44
+    bottom: 100px;
45
+    z-index: 0;
46
+    animation: toleft 40s linear 2s infinite alternate;
47
+  }
48
+  
49
+
50
+  @keyframes toleft {
51
+    0% {
52
+      transform: translate3d(0, 0, 0);
53
+    }
54
+
55
+    50% {
56
+      transform: translate3d(calc(-100vw + 200px), -30vh, 0);
57
+    }
58
+
59
+    100% {
60
+      transform: translate3d(-50vw, calc(-100vh + 200px), 0);
61
+    }
62
+  }
63
+
64
+  #root {    
65
+    position: relative;
66
+    backdrop-filter: blur(4px);
67
+    z-index: 1;
68
+  }
69
+
70
+  .ant-layout, .ant-layout-footer {
71
+    background-color: transparent !important;
72
+  }
73
+}
74
+
7 75
 :root {
8 76
   --theme-color: #fff;
9 77
   --theme-front: #000;
@@ -26,10 +94,6 @@ html, body, #root {
26 94
   z-index: 100;
27 95
 }
28 96
 
29
-.ant-layout {
30
-  background-color: #f0f2f5;
31
-}
32
-
33 97
 .ant-layout-header {
34 98
   line-height: var(--header-height);
35 99
   box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
@@ -41,11 +105,19 @@ html, body, #root {
41 105
   width: var(--siderbar-width);
42 106
   background-color: var(--theme-color);
43 107
   color: var(--theme-front);
44
-  box-shadow: 1px 0 4px 0 rgba(0, 21, 41, 0.08);
108
+  // box-shadow: 1px 0 4px 0 rgba(0, 21, 41, 0.08);
45 109
 
46 110
   .ant-menu {
47 111
     background: transparent;
48 112
   }
113
+
114
+  &.ant-layout-sider-light {
115
+    background: transparent;
116
+
117
+    .ant-layout-sider-trigger {
118
+      background: transparent;
119
+    }
120
+  }
49 121
 }
50 122
 
51 123
 

+ 3
- 5
src/layouts/AuthLayout/components/Header/User.jsx Datei anzeigen

@@ -16,7 +16,7 @@ const ChangePassword = forwardRef((props, ref) => {
16 16
   });
17 17
 
18 18
   return (
19
-    <Modal title="修改密码" visible={visible} onCancel={() => setVisible(false)}>
19
+    <Modal title="修改密码" open={visible} onCancel={() => setVisible(false)}>
20 20
       <Form
21 21
         labelCol={{ span: 8 }}
22 22
         wrapperCol={{ span: 16 }}
@@ -58,7 +58,7 @@ const ChangePassword = forwardRef((props, ref) => {
58 58
 });
59 59
 
60 60
 export default (props) => {
61
-  const menuItems = [
61
+  const items = [
62 62
     {
63 63
       key: 'changePassword',
64 64
       label: '修改密码',
@@ -74,10 +74,8 @@ export default (props) => {
74 74
     }
75 75
   };
76 76
 
77
-  const menu = <Menu items={menuItems} onClick={onClick} />;
78
-
79 77
   return (
80
-    <Dropdown overlay={menu}>
78
+    <Dropdown menu={{ items, onClick }}>
81 79
       <div className="user-info">
82 80
         <Avatar size={24} src="https://joeschmoe.io/api/v1/random" />
83 81
         <span className='font'>{user.name}</span>

+ 1
- 1
src/layouts/AuthLayout/style.less Datei anzeigen

@@ -8,7 +8,7 @@
8 8
   color: #fff;
9 9
 
10 10
   &.light {
11
-    background-color: #fff;
11
+    background-color: transparent;
12 12
     color: #000;
13 13
   }
14 14